repo
stringclasses
1 value
instance_id
stringlengths
20
22
problem_statement
stringlengths
126
60.8k
merge_commit
stringlengths
40
40
base_commit
stringlengths
40
40
python/cpython
python__cpython-130308
# datetime subclass repr varies by implementation In [pypy/pypy#3980](https://foss.heptapod.net/pypy/pypy/-/issues/3980#note_309077), I reported an issue I'd encountered where the repr of a `datetime.datetime` subclass shows a different repr depending on which implementation (C or Python) of the datetime module is use...
81a9b53fee79c4581bc1e2acae1c98ee0b692c7d
9f81f828c797f842d1df0a5cbda898bc0df8075a
python/cpython
python__cpython-107757
# The lltrace feature can trigger infinite recursion via `__repr__` When turning on the low-level interpreter tracing feature (`lltrace` in ceval.c) it is quite easy to hit infinite recursion in `dump_stack()`, when an item on the stack being printed has a `__repr__` method implemented in Python. (This is especially a...
328d925244511b2134d5ac926e307e4486ff4500
2df58dcd500dbedc61d0630374f9e94c522fe523
python/cpython
python__cpython-107756
# Signature of slice is documented incorrectly # Documentation https://docs.python.org/3/library/functions.html#slice currently shows: class slice(start, stop, step=1) This was changed from `slice(start, stop[, step])` in https://github.com/python/cpython/pull/96579. That default for `step` is incorrect. ...
9bf350b0662fcf1a8b43b9293e6c8ecf3c711561
3f89b257639dd817a32079da2ae2c4436b8e82eb
python/cpython
python__cpython-107736
# Add C API tests for PySys_GetObject() and PySys_SetObject() `PySys_GetObject()` will be changed in #106672, so we need tests. <!-- gh-linked-prs --> ### Linked PRs * gh-107736 * gh-107740 * gh-107741 * gh-107743 <!-- /gh-linked-prs -->
bea5f93196d213d6fbf4ba8984caf4c3cd1da882
430632d6f710c99879c5d1736f3b40ea09b11c4d
python/cpython
python__cpython-107734
# importlib.resources.as_file docs should mention it can provide whole directories # Documentation As [pointed](https://discuss.python.org/t/importlib-resources-access-whole-directories-as-resources/15618/3?u=smheidrich) [out](https://discuss.python.org/t/importlib-resources-access-whole-directories-as-resources/15...
9f0c0a46f00d687e921990ee83894b2f4ce8a6e7
f9bd6e49ae58e0ba2934f29dd0f3299ba844cc8d
python/cpython
python__cpython-107725
# The callback signature for `PY_THROW` is inconsistent with the other exception handling callbacks The callbacks for `RAISE`, `RERAISE`, `EXCEPTION_HANDLED`, `PY_UNWIND` and `STOP_ITERATION` all take the exception as their third argument. `PY_THROW` is the odd one out, but it should be consistent with the others. `...
52fbcf61b5a70993c2d32332ff0ad9f369d968d3
2fb484e62518d15fc9a19565c2ab096bd741219a
python/cpython
python__cpython-107716
# DocTestFinder.find fails if module contains class objects with special characters <!-- New to Python? The issue tracker isn't the right place to get help. Consider instead: - reading the Python tutorial: https://docs.python.org/3/tutorial/ - posting at https://discuss.python.org/c/users/7 - emailing...
85793278793708ad6b7132a54ac9fb4b2c5bcac1
ed64204716035db58c7e11b78182596aa2d97176
python/cpython
python__cpython-107714
# Reduce usage of mocks in `test_clinic.py` # Feature or enhancement We should reduce usage of mock objects in `test_clinic.py`, such as `FakeClinic`, `FakeConvertersDict`, `FakeConverterFactory` and `FakeConverter`. # Pitch There doesn't seem to be a strong reason to use mock objects like these in `test_clin...
c399b5e1a56f7c659fc92edc20bc4bf522bdeffd
8c9af6b9a0d6fc9cb237e96588d8dcab727e32b8
python/cpython
python__cpython-107711
# Optimize `logging.getHandlerNames()` Right now this function is not optimal. Source: ```python def getHandlerNames(): """ Return all known handler names as an immutable set. """ result = set(_handlers.keys()) return frozenset(result) ``` Why? `_handlers.keys()` already returns `set`-...
8fcee6b2795a504f1bd39118759e5ce44183f689
c399b5e1a56f7c659fc92edc20bc4bf522bdeffd
python/cpython
python__cpython-110507
# test_tkinter leaks files in the C locale ``` $ LC_ALL=C ./python -m test -vuall test_tkinter -m 'test_write' ... Warning -- files was modified by test_tkinter Warning -- Before: [] Warning -- After: ['@test_1061191_tmp\udce6'] Warning -- files was modified by test_tkinter Warning -- Before: [] Warnin...
ca0f3d858d069231ce7c5b382790a774f385b467
38bd2c520a2df7904e32093da2166eec2c039802
python/cpython
python__cpython-107984
# Argument Clinic: add support for deprecating keyword use of parameters See https://github.com/python/cpython/issues/95065#issuecomment-1193187512 by Serhiy. Quoting: > Turn positional-or-keyword parameters into positional-only parameters. A directive which means "the preceding positional-or-keyword parameters wil...
2f311437cd51afaa68fd671bb99ff515cf7b029a
eb953d6e4484339067837020f77eecac61f8d4f8
python/cpython
python__cpython-108260
# EnumType is not documented as new in 3.11 # Documentation In python 3.10 and earlier Enum's metaclass was called `EnumMeta`. https://docs.python.org/3.10/library/enum.html#enum-classes In python 3.11 this was renamed EnumType (https://docs.python.org/3.11/whatsnew/3.11.html#enum). However the fact that `EnumTyp...
e8ef0bdd8c613a722bf7965bf1da912882141a52
6541fe4ad7b96ab96ee5c596b60814a93346dd27
python/cpython
python__cpython-107697
# ctypes: Add docstring for `ctypes.Array` # Documentation The [`Array` class](https://docs.python.org/3.13/library/ctypes.html#ctypes.Array) from the `ctypes` module doesn't have a proper docstring: ```python from ctypes import Array help(Array) >>> Help on class Array in module _ctypes: >>> >>> class Ar...
0f2fb6efb4d5d8ca43a0e779b89a8e805880e09a
4890bfe1f906202ef521ffd327cae36e1afa0873
python/cpython
python__cpython-107688
# Tcl and Tk versions can be desynchronized For a long time Tcl and Tk versions were synchronized. But in future they can be desynchronized again, for example Tcl 9.0/Tk 8.7. Tests currently use Tcl and Tk versions interchangeably. They should be updated to test the correct version. <!-- gh-linked-prs --> ### Li...
3c8e8f3ceeae08fc43d885f5a4c65a3ee4b1a2c8
6925c578a0e3cbb00858e64da813a7ffe79623c4
python/cpython
python__cpython-107679
# ``re`` documentation contains outdated and unclear Unicode information I was reading the [``re``](https://docs.python.org/3/library/re.html) documentation recently, and I noticed that the information around the Unicode, ASCII, and Locale flags and how matching is affected was unclear in parts and inconsistent within...
c9b8a22f3404d59e2c4950715f8c29413a349b8e
b4d4aa9e8d61476267951c72321fadffc2d82227
python/cpython
python__cpython-107663
# anext is after any # Documentation In the list of builtin functions: https://docs.python.org/3/library/functions.html "anext" is after "any", yet in the documentation itself, on the same page, "anext" is before "any", in the correct alphabetical order. Is this just a typo or there is a reason for it? Thank ...
9ebc6ecbc336d7b17cd158d1a4522f832df3e6e2
41178e41995992bbe417f94bce158de93f9e3188
python/cpython
python__cpython-107660
# ctypes: Add docstrings for `ctypes.pointer` and `ctypes.POINTER` `ctypes.pointer` and `ctypes.POINTER` from the `ctypes` module are currently lacking docstrings. I suggest we add those. Luckily, these functions are already documented in the [docs](https://docs.python.org/3/library/ctypes.html#ctypes.pointer) so it ...
de72677f8a27083b2072b83b3737f891b660bb5c
7a250fdc16bb6f1fe0a6b0df8bb502870405b5d6
python/cpython
python__cpython-107653
# Set up CIFuzz to run fuzz targets continuously # Feature or enhancement OSS-Fuzz offers [CIFuzz](https://google.github.io/oss-fuzz/getting-started/continuous-integration/), a collection of GitHub actions that can be used for running fuzz targets based on [the existing OSS-Fuzz configuration](https://github.com/go...
ea7b53ff67764a2abf1f27d4c95d032d2dbb02f9
326c6c4e07137b43c49b74bd5528619360080469
python/cpython
python__cpython-107648
# TraceRefs build triggers assertion errors In a `--with-trace-refs --with-pydebug` build of 3.12 and main, even a simple test like `test_int` triggers an assertion error in the refchain handling. I expect it's caused by @ericsnowcurrently's PR #107567. ``` cpython-tracerefs % ../../cpython/configure -C --with-tra...
7cf9ce24409efb70efde08e350a4170dc98008a1
6c92d76abc730ca7a77da3c7a8627192f7ac3add
python/cpython
python__cpython-107651
# ConfigParser AttributeError: 'NoneType' object has no attribute 'append' <!-- New to Python? The issue tracker isn't the right place to get help. Consider instead: - reading the Python tutorial: https://docs.python.org/3/tutorial/ - posting at https://discuss.python.org/c/users/7 - emailing https://...
e800265aa1f3451855a2fc14fbafc4d89392e35c
27858e2a17924dfac9a10efc17caee1f5126ea19
python/cpython
python__cpython-107934
# Inconsistent behavior for duplicate inputs to `asyncio.as_completed` versus `asyncio.gather()` <!-- New to Python? The issue tracker isn't the right place to get help. Consider instead: - reading the Python tutorial: https://docs.python.org/3/tutorial/ - posting at https://discuss.python.org/c/users/7 ...
1a713eac47b26899044752f02cbfcb4d628dda2a
b1e5d2c601bbd3d435b60deef4818f3622bdfca3
python/cpython
python__cpython-107615
# Normalise Argument Clinic error messages Argument Clinic is pretty good at disallowing weird corner cases and producing error messages (there are 130 `fail(..)`s sprinkled around clinic.py!). Unfortunately, many of the error messages do not wrap the line or token in question, nor the function/module/class name in qu...
ac7605ed197e8b2336d44c8ac8aeae6faa90a768
2ba7c7f7b151ff56cf12bf3cab286981bb646c90
python/cpython
python__cpython-107610
# Argument Clinic duplicate module check is malfunctioning The following code is silently accepted by Argument Clinic: ```c /*[clinic input] module m module m [clinic start generated code]*/ ``` The duplicate `module m` should have been caught by Argument Clinic, but the guard is faulty: https://github.c...
a443c310ac87f214164cb1e3f8af3f799668c867
e52e87c349feeee77445205829bfc8db9fe4b80e
python/cpython
python__cpython-107858
# Update comment about utf-8 BOM being ignored [EDIT: I opened this because I saw a redundancy in a paragraph in Reference / 2. Lexical analysis / 2.1 Line structure / 2.1.4 [Encoding declarations](https://docs.python.org/3/reference/lexical_analysis.html#encoding-declarations). I neglected to explain the problem an...
7f64ae30ddc22577ce4101ce0b6601b3548b036f
2c82592ab463f1f38237919a12145f34eaadda23
python/cpython
python__cpython-108486
# Argument Clinic includes internal headers in generated output unconditionally It seems like Argument Clinic generates code that define `Py_BUILD_CORE` and includes internal headers unconditionally; for example, a file with a `METH_O` function will have no need for those: <details> ```c /*[clinic input] prese...
73d33c1a3078c5f2588c89d61e1a17a1b2a26c34
1dd951097728d735d46a602fc43285d35b7b32cb
python/cpython
python__cpython-107601
# ctypes docs: Update `ArgumentError` error messages # Documentation Now that #107456 has been merged, we should also update the examples in the docs which still show the old message: https://github.com/python/cpython/blob/58ef74186795c56e3ec86e8c8f351a1d7826638a/Doc/library/ctypes.rst?plain=1#L445-L447 <!--...
09a8cc79846ce0870e51fa8e7c449e153832fe4b
19f32b24b2e1680ff9929bb64d681397b259c6fb
python/cpython
python__cpython-107597
# Specialize `str[int]` According to our [stats](https://github.com/faster-cpython/benchmarking-public/blob/main/results/bm-20230729-3.13.0a0-5113ed7/bm-20230729-azure-x86_64-python-main-3.13.0a0-5113ed7-pystats.md), `BINARY_SUBSCR` has a 90% failure rate, and over half of those are due to `str[int]`. This seems li...
ea72c6fe3b6db5f4e8ce3d3405c0ea65dc002faf
aab6f7173a3b825599629dd6fa5cb7e477421595
python/cpython
python__cpython-107584
# Odd types.get_original_bases() behavior for classes with generic bases but no type arguments <!-- New to Python? The issue tracker isn't the right place to get help. Consider instead: - reading the Python tutorial: https://docs.python.org/3/tutorial/ - posting at https://discuss.python.org/c/users/7 ...
ed4a978449c856372d1a7cd389f91cafe2581c87
77e09192b5f1caf14cd5f92ccb53a4592e83e8bc
python/cpython
python__cpython-107896
# Update CI, Windows, and macOS installer builds to OpenSSL 3.0.10 3.0.10 released 2023-08-01. None of the changes *appear* to be critical to Python usage but ... <!-- gh-linked-prs --> ### Linked PRs * gh-107896 * gh-107897 * gh-108118 * gh-108119 * gh-108120 * gh-108121 * gh-108122 * gh-108123 * gh-108124 * gh-1089...
ed25f097160b5cbb0c9a1f9a746d2f1bbc96515a
dd4442c8f597af1ec3eaf20f7ad89c4ac7e2dbc9
python/cpython
python__cpython-107594
# Multiple tests fail due to expired certificates if system date is set further than year 2037ish To test the readiness of Yocto stack for Y2038 we run qemu virtual machines with RTC set to some day in 2040. This causes many of python's tests to fail on both 32 bit and 64 bit systems: the reason is that test certifica...
53930cbe47529c4de9177538c98ffdb354b9854e
21c04e1a972bd1b6285e0ea41fa107d635bbe43a
python/cpython
python__cpython-107560
# Argument Clinic: param docstrings are not checked for non-ascii chars Also, the warning message is a little bit strange: _"Non-ascii character appear in docstring"_ Suggesting to change the warning message to _"Non-ascii characters are not allowed in docstrings: {offending char!r}"_, and move the check from `docs...
9ff7b4af137b8028b04b52addf003c4b0607113b
439466a02b145b522a8969267264743706336501
python/cpython
python__cpython-107546
# misleading `setsockopt` error message # Bug report Running the following code works: ```py import socket with socket.socket() as s: s.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 2) ``` But if someone accidently passes a big value like so: ```py import socket with socket.socket() as s: s....
a50822ff94ae0625f0b46480857fb141531c0688
7f416c867445dd94d11ee9df5f1a2d9d6eb8d883
python/cpython
python__cpython-108259
# json.dump(..., default=something) takes a unary function but is documented binary # Documentation ## TLDR The following documentation at https://docs.python.org/3.13/library/json.html suggests that `default` should be a member method but light testing shows that it should be unary. ## Documentation in Questio...
ac31f714c3e55a7951a9f3f9c823740c20c5d595
891236f48263e2d4c650b7a127fc9bffb8327807
python/cpython
python__cpython-132273
# Inverted enum.Flag # Bug report ## Checklist - [X] I am confident this is a bug in CPython, not a bug in a third-party project - [X] I have searched the CPython issue tracker, and am confident this bug has not been reported before ## A clear and concise description of the bug Adding **inverted** option to e...
49365bd110a254a6a304d2f880482bfeb2e4490d
56c6f04b8862c20ff6eddc4400f170ad91e55f66
python/cpython
python__cpython-107542
# Help text of builtin functions – missing signatures I don't understand the deep details here but I think something went wrong in commit https://github.com/python/cpython/commit/bdfb6943861431a79e63f0da2e6b3fe163c12bc7 when some of the builtin functions where transferred to argument clinic. The problem I see is in...
db6dc6ce41f42ec2cb4fdfbc0a099114f42e888f
05ef4ca94c694bc50e6fd221fe648d05d227f3a4
python/cpython
python__cpython-109900
# Move the Argument Clinic docs to the devguide See [topic on Discourse](https://discuss.python.org/t/where-should-the-argument-clinic-docs-live/30160?u=erlendaasland) and python/devguide#1148 Quoting from the linked topic: > Currently, the Argument Clinic docs live in the How-To section of docs.python.org: > ...
d1f7fae424d51b0374c8204599583c4a26c1a992
f83fa0b9eb1c11a4ef53275d77c603b97335eb23
python/cpython
python__cpython-107508
# Replace the "goals of Argument Clinic" with a link to PEP 436 The [Argument Clinic howto](https://docs.python.org/3/howto/clinic.html) starts with six paragraphs about the goals of Argument Clinic, mostly repeating the motivation and rationale of PEP-436. Here's a quick run-through of the paragraphs: 1. AC should...
abb71c6a8f73482c910ffdf050a86089a48e0e60
dfb55d9d7f9349582a2077f87e95c8f9d5e2ebd4
python/cpython
python__cpython-107569
# Ref leaks on `test_import` ``` ./python -m test -R : test_import 0:00:00 load avg: 0.27 Run tests sequentially 0:00:00 load avg: 0.27 [1/1] test_import beginning 9 repetitions 123456789 ......... test_import leaked [60, 60, 60, 60] references, sum=240 test_import leaked [48, 48, 48, 48] memory blocks, sum=19...
017f047183fa33743f7e36c5c360f5c670032be3
bcdd3072316181b49d94567bb648825a07ca9ae1
python/cpython
python__cpython-107469
# Restructure Argument Clinic CLI Suggesting to ...: - [x] make the clinic tool a well-behaved command-line citizen; write to `stderr`, not `stdout`, on error (partly depends on #107468) - [x] put the whole CLI in `main`, making it easier to mock the tool in the test suite (currently we use subprocesses, which is ...
49f238e78c36532bcbca7f9cd172703eb4df319b
557b05c7a5334de5da3dc94c108c0121f10b9191
python/cpython
python__cpython-107640
# Add `pathlib.Path.from_uri()` classmethod # Feature or enhancement Add `pathlib.Path.from_uri()` classmethod that creates a path objects from a 'file' URI, like `file:///c:/windows`. This method should accept [RFC 8089](https://datatracker.ietf.org/doc/html/rfc8089) `file:` URIs, including variant forms. # Pit...
15de493395c3251b8b82063bbe22a379792b9404
06faa9a39bd93c5e7999d52b52043ecdd0774dac
python/cpython
python__cpython-107462
# ctypes: Add a testcase for nested `_as_parameter_` lookup A `ctypes` function can be called with custom objects if they define the `_as_parameter_` attribute: ```python from ctypes import * printf = CDLL('libc.so.6').printf class MyString: _as_parameter_ = b"abc" printf(b"String: %s\n", MyString())...
0bf42dae7e73febc76ea96fd58af6b765a12b8a7
59ae215387d69119f0e77b2776e8214ca4bb8a5e
python/cpython
python__cpython-107577
# test_tools are leaked ```python ./python -m test -R 3:3 test_tools Running Debug|x64 interpreter... 0:00:00 Run tests sequentially 0:00:00 [1/1] test_tools beginning 6 repetitions 123456 .C:\Users\KIRILL-1\CLionProjects\cpython\Modules\_decimal\libmpdec\context.c:57: warning: mpd_setmin...
46366ca0486d07fe94c70d00771482c8ef1546fc
62a3a15119cf16d216a2cc7dc10d97143017ef62
python/cpython
python__cpython-108900
# Bytecode documentation issues for Python 3.12 As part of adding support for Python 3.12 to https://github.com/MatthieuDartiailh/bytecode I have identified a number of documentation issues both in the `dis`module documentation in the bytecode section of the `What's new in 3.12`. Opening a separate issue for each poin...
198aa67d4ceb5298c3c60f7a77524f5ba084c121
24e4ec7766fd471deb5b7e5087f0e7dba8576cfb
python/cpython
python__cpython-107456
# ctypes: Improve error messages when converting to an incompatible type This code produces an error with a somewhat unhelpful message: ```python from ctypes import * printf = CDLL('libc.so.6').printf printf.argtypes = [c_char_p, c_char_p] printf(b"Value %s\n", 10) # call with an incompatible argument ``` ...
62a3a15119cf16d216a2cc7dc10d97143017ef62
1cd479c6d371605e9689c88ae1789dbcbceb2da0
python/cpython
python__cpython-107486
# ``errno`` documentation missing several constants The [``errno`` documentation](https://docs.python.org/3/library/errno.html) doesn't have: * errno.ECANCELED * errno.EOWNERDEAD * errno.ENOTRECOVERABLE * errno.ENOTSUP Reference: [errno(3) man page](https://linux.die.net/man/3/errno) <!-- gh-linked-prs -->...
1ac64237e6ce965064451ed57ae37271aeb9fbd3
6cb48f049501c9f8c5be107e52f8eb359b5ac533
python/cpython
python__cpython-110754
# string length overflows to negative when executing # Bug report ## Checklist - [x] I am confident this is a bug in CPython, not a bug in a third-party project - [x] I have searched the CPython issue tracker, and am confident this bug has not been reported before ## A clear and concise descrip...
fb7843ee895ac7f6eeb58f356b1a320eea081cfc
3d180347ae73119bb51500efeeafdcd62bcc6f78
python/cpython
python__cpython-107451
# test_inspect fails with `--forever` argument Traceback: ```python ...many lines... test_unwrap_several (test.test_inspect.TestUnwrap.test_unwrap_several) ... ok ====================================================================== ERROR: test_class_with_method_from_other_module (test.test_inspect.TestBuggyCa...
14fbd4e6b16dcbcbff448b047f7e2faa27bbedba
ed4a978449c856372d1a7cd389f91cafe2581c87
python/cpython
python__cpython-107443
# ctypes `_as_parameter_` does not mention all possible types # Documentation The `_as_parameter_` attribute can be used when one wants to pass a custom object a `ctypes` function. The [documentation](https://docs.python.org/3/library/ctypes.html?highlight=ctypes#calling-functions-with-your-own-custom-data-types) ...
6925c578a0e3cbb00858e64da813a7ffe79623c4
a6675b1a597c67be972598ac8562883fabe48099
python/cpython
python__cpython-107433
# multiprocessing manager classes DictProxy and ListProxy don't support typing in 3.11.4 # Bug report `DictProxy` and `ListProxy` classes from `multiprocessing.managers` do not support generic annotations. Minimal reproducible example for `DictProxy`: ```py from multiprocessing.managers import DictProxy from mu...
ae8116cfa944dccad13638f6875b33b98d285b63
06c47a305d8f7f4f56a1113d9eb2eddcc175f2ed
python/cpython
python__cpython-107429
# The description of UNPACK_SEQUENCE should be fixed. # Documentation The current description of UNPACK_SEQUENCE is as follows: ````` STACK.extend(STACK.pop()[:count:-1]) ````` It will not extend the stack since the count is a positive value. It should be fixed into ````` STACK.extend(STACK.pop()[:-coun...
a24e25d74bb5d30775a61853d34e0bb5a7e12c64
3979150a0d406707f6d253d7c15fb32c1e005a77
python/cpython
python__cpython-107613
# Use True/False instead of 1/0 in OrderedDict popitem example # Documentation https://docs.python.org/3.12/library/collections.html#ordereddict-examples-and-recipes The documentation implements a `TimeBoundedLRU` and a `MultiHitLRUCache` with `OrderedDict`. Both implementations contain `self.cache.popitem(0)` w...
23a6db98f21cba3af69a921f01613bd5f602bf6d
50bbc56009ae7303d2482f28eb62f2603664b58f
python/cpython
python__cpython-107410
# `reprlib.recursive_repr` is not setting `.__wrapped__` attribute # Bug report There is no way to get original actual `__repr__` function after applying `@recursive_repr` decorator ```py import reprlib class X: @reprlib.recursive_repr() def __repr__(self) -> str: return f'X({self.__dict__})' ...
4845b9712f2c187743344eca43fa1fb896bddfd6
0f2fb6efb4d5d8ca43a0e779b89a8e805880e09a
python/cpython
python__cpython-107407
# better `struct.Struct` repr # Feature or enhancement Add better `struct.Struct` repr # Pitch ```py >>> import struct >>> struct.Struct('i') <_struct.Struct at 0x00223FC2C7290> ``` Hmm, what is the format of this struct? It is not clear from repr. Something like this would be better: ```py >>> import s...
e407cea1938b80b1d469f148a4ea65587820e3eb
8ba47146111d714c7b61825d43b52311d9be366d
python/cpython
python__cpython-107485
# tarfiles: `AttributeError: '_Stream' object has no attribute 'exception'` while trying to open tgz file # Bug report If a tar file appears to be a `tar.gz` file, it can fail in this block of `tarfile.py` ``` while c < size: # Skip underlying buffer to avoid unaligned double buffering. ...
37135d25e269ede92bc7da363bebfa574782e59a
80bdebdd8593f007a2232ec04a7729bba6ebf12c
python/cpython
python__cpython-107374
# Optimize textwrap.indent() Current code: ```py def indent(text, prefix, predicate=None): """Adds 'prefix' to the beginning of selected lines in 'text'. If 'predicate' is provided, 'prefix' will only be added to the lines where 'predicate(line)' is True. If 'predicate' is not provided, it wi...
37551c9cef307ca3172c60b28c7de9db921808ad
f2d07d3289947d10b065b2bb7670c8fb6b6582f2
python/cpython
python__cpython-112389
# `ssl.create_default_context()`: add `VERIFY_X509_STRICT` and `VERIFY_X509_PARTIAL_CHAIN` to the default `verify_flags` # Feature or enhancement My proposal is to add two new flags to the `SSLContext.verify_flags` created within `ssl.create_default_context()`: 1. `VERIFY_X509_STRICT`: This will enable stricter ...
0876b921b28bb14e3fa61b188e52fc9b4c77cb1a
ea1803e608a7aaf9cf2c07e510d8540d46d3b9ad
python/cpython
python__cpython-107296
# zipapp docs should not suggest deleting .dist-info subdirectories From [_Creating Standalone Applications with zipapp_](https://docs.python.org/3/library/zipapp.html#creating-standalone-applications-with-zipapp), point 3 mentions you may delete .dist-info directories "_as you won’t be making any further use of pip t...
1ee50e2a78f644d81d341a08562073ad169d8cc7
bcce5e271815c0bdbe894964e853210d2c75949b
python/cpython
python__cpython-107400
# Update the importlib Docs for PEP 684 # Documentation https://docs.python.org/3.12/library/importlib.html#module-importlib.util * add an entry for `importlib.util._incompatible_extension_module_restrictions()` https://docs.python.org/3.12/library/importlib.html#importlib.machinery.ExtensionFileLoader * u...
cf63df88d38ec3e6ebd44ed184312df9f07f9782
8ba4df91ae60833723d8d3b9afeb2b642f7176d5
python/cpython
python__cpython-107403
# Add a Docs Entry for the New Py_mod_multiple_interpreters Module Def Slot # Documentation https://docs.python.org/3.12/c-api/module.html?highlight=py_mod_create#c.PyModuleDef_Slot https://docs.python.org/3.12/howto/isolating-extensions.html (See https://peps.python.org/pep-0684/ and gh-99113.) <!-- gh-linked...
fb344e99aa0da5bef9318684ade69978585fe060
abb71c6a8f73482c910ffdf050a86089a48e0e60
python/cpython
python__cpython-107324
# Update the C-API "Sub-interpreter support" Section for PEP 684 # Documentation https://docs.python.org/3.12/c-api/init.html#sub-interpreter-support * add an entry for `Py_NewInterpreterFromConfig()` and `PyInterpreterConfig` * section about the consequences of a Per-interpreter GIL * fix `Py_EndInterpreter()...
c0b81c4b5438a3565fadd9d6f5bc69f989a3fdee
ecc05e23a1f4086645cfb5362c4c1351f70a4eb1
python/cpython
python__cpython-107300
# Fix Sphinx warnings in the C API documentation Recently, I saw a growing numbers of Sphinx warnings displayed as annotations which make reviews harder. I create this issue to track changes fixing warnings. See also gh-106948 which populates ``nitpick_ignore`` of ``Doc/conf.py`` with standard C functions, varia...
87b39028e5f453a949a1675526c439f6479a04a8
b1de3807b832b72dfeb66dd5646159d08d2cc74a
python/cpython
python__cpython-107280
# Add `<stddef.h>` to `Modules/zlibmodule.c` to fix failing builds # Bug report Commits fabcbe9c12688eb9a902a5c89cb720ed373625c5, 6a43cce32b66e0f66992119dd82959069b6f324a, and 2b1a81e2cfa740609d48ad82627ae251262e6470 (and likely other commits) are failing during the build step with the following error: ``` ../Mod...
4b2e54bd3c23da37923a18ae5e82cfd574e9a439
abec9a1b20b70d8ced401d59fc4f02b331c6568b
python/cpython
python__cpython-107535
# Regression in 3.12 beta in json.dump deeply nested dict This was reported here: https://discuss.python.org/t/has-sys-setrecursionlimit-behaviour-changed-in-python-3-12b/30205 The following program works fine on 3.11, but crashes with RecursionError on 3.12: ``` d = {} for x in range(1_000): d = {'k': d} ...
fa45958450aa3489607daf9855ca0474a2a20878
0bd784b355edf0d1911a7830db5d41c84171e367
python/cpython
python__cpython-119322
# Tkinter: test failure due to Tk 8.6.14 listbox bugfix The current output of the `itemconfigure` command for listbox widgets falsely suggests that the configuration of listbox items is influenced by the options database (if I understand correctly). This will be fixed in Tk 8.6.14: see https://core.tcl-lang.org/tk/inf...
9732ed5ca94cd8fe9ca2fc7ba5a42dfa2b7791ea
ef01e95ae3659015c2ebe4ecdc048aadcda89930
python/cpython
python__cpython-107250
# Implement Py_UNUSED() for Windows MSVC compiler The ``Py_UNUSED()`` is not implemented for the Windows MSVC compiler. Example with this function included by Python.h: see https://github.com/python/cpython/pull/107239#issuecomment-1649982534 ``` static inline unsigned int PyUnicode_IS_READY(PyObject* Py_UNUSE...
6a43cce32b66e0f66992119dd82959069b6f324a
fabcbe9c12688eb9a902a5c89cb720ed373625c5
python/cpython
python__cpython-107238
# test_logging: test_udp_reconnection() fails randomly Example on Linux: ``` $ ./python -m test test_logging -m test_udp_reconnection -F -j100 -v == CPython 3.13.0a0 (heads/remove_structmember:438462a3a0, Jul 25 2023, 14:21:21) [GCC 13.1.1 20230614 (Red Hat 13.1.1-4)] == Linux-6.3.12-200.fc38.x86_64-x86_64-with-...
ed082383272c2c238e364e9cc83229234aee23cc
6261585d63a31835b65d445d99dc14cca3fe9cf5
python/cpython
python__cpython-107227
# PyModule_AddObjectRef() should only be in the limited API since 3.10 `PyModule_AddObjectRef()` was added in 3.10, but if use the limited API, it is available in all versions, independently from tha value of Py_LIMITED_API. @vstinner <!-- gh-linked-prs --> ### Linked PRs * gh-107227 * gh-107260 * gh-107261 <!-- ...
698b01513550798886add5e06a1c3f9a89d7dfc6
b5ae7c498438657a6ba0bf4cc216b9c2c93a06c7
python/cpython
python__cpython-108974
# test_concurrent_futures.test_deadlock: test_crash_big_data() hangs randomly on Windows GHA Windows x86 job, test_crash_big_data() hangs on ``ProcessPoolExecutor.shutdown()``: https://github.com/python/cpython/actions/runs/5651960914/job/15310873235?pr=107217 * Main thread: ``ProcessPoolExecutor.shutdown()`` * Th...
a8cae4071c795e55be46e339eda37e241fa0d7f8
b298b395e8ab1725c4f0dd736155b8c818664d42
python/cpython
python__cpython-107212
# C API: No longer export internal C API functions Many internal C API functions are exported with PyAPI_FUNC() and internal variables are exported with PyAPI_DATA(), whereas these APIs should not be used outside Python internals. I propose to replace PyAPI_FUNC() and PyAPI_DATA() with extern on symbols which are n...
2e0744955f1c213a55738de848a9d928b78ef289
4bbf071635504ee1c6d44f99c98e3fad191a3b13
python/cpython
python__cpython-108835
# Itertools Recipes - iter_index() silently suppresses ValueError # Documentation In Itertools Recipes there is a bug in the [`iter_index()`](https://github.com/pochmann/cpython/blob/ecd95bb943256ecb3afeb70540387475a73e6dd7/Doc/library/itertools.rst?plain=1#L893) function. The function silently suppresses `ValueErr...
f373c6b9483e12d7f6e03a631601149ed60ab883
a52213bf830226fd969dc2a2ef8006c89edecc35
python/cpython
python__cpython-107197
# Remove unused _PyArg_VaParseTupleAndKeywordsFast() It seems like the ``_PyArg_VaParseTupleAndKeywordsFast()`` function is no longer used in the Python code base. Moreover, Argument Clinic (``Tools/clinic/clinic.py``) can produce code calling the ``_PyArg_ParseTupleAndKeywordsFast()`` function, but it is not the c...
1dbb427dd67a1de5b3662cbda0277ff2c3b18095
c6539b36c163efff3d6ed02b938a6151325f4db7
python/cpython
python__cpython-107179
# Add the C API tests for Mapping Protocol and Sequence Protocol Currently only few functions in these protocols are covered by tests: `PyMapping_Keys`, `PyMapping_Values`, `PyMapping_Items`, `PyMapping_HasKey`, `PyMapping_HasKeyString`, `PySequence_SetSlice`, `PySequence_DelSlice`. Since we just added few new functio...
16c9415fba4972743f1944ebc44946e475e68bc4
85793278793708ad6b7132a54ac9fb4b2c5bcac1
python/cpython
python__cpython-107401
# `help()` output of `lambda` with manually set `__annotations__` is one char off # Bug report `help()` output of `lambda` with manually set `__annotations__` is slightly scrambled. ``` f = lambda a, b, c: 0 # lambdas cannot have annotations f.__annotations__['return'] = int # but you can set them ...
b9a9e3dd62326b726ad2e8e8efd87ca6327b4019
664965a1c141e8af5eb465d29099781a6a2fc3f3
python/cpython
python__cpython-108440
# C API: Rename _PyUnstable_GetUnaryIntrinsicName() to PyUnstable_GetUnaryIntrinsicName()? Python 3.13 added ``_PyUnstable_GetUnaryIntrinsicName()`` and ``_PyUnstable_GetBinaryIntrinsicName()`` to the C API. I don't get the ``_PyUnstable`` prefix: [PEP 689 – Unstable C API tier](https://peps.python.org/pep-0689/) uses...
9c03215a3ee31462045b2c2ee162bdda30c54572
b89b838ebc817e5fbffad1ad8e1a85aa2d9f3113
python/cpython
python__cpython-107856
# Don't run plausible analytics out of docs.python.org # Documentation Since e8ab0096a583184fe24dfbc39eff70d270c8e6f4, an HTTP request to plausible.io is triggered even for local builds. So I just triggered the tracker with a local build just to check a PR (this is how I discovered it, by seeing uBlock Origin te...
fc23f34cc9701949e6832eb32f26ea89f6622b82
e97b7bef4fbe71821d59d2f41f311e514fd29e39
python/cpython
python__cpython-107126
# Provide clear method for dbm/gdbm module There was a similar [discussion](https://github.com/python/cpython/issues/53732) about adding MutableMapping interface from dbm/gdbm module. I didn't follow up on all of the progress in adding those methods but at this moment adding a clear method looks good even consider t...
0ae4870d09de82ed5063b6998c172cc63628437e
b3c34e55c053846beb35f5e4253ef237b3494bd0
python/cpython
python__cpython-107092
# Use the C domain roles consistently in the documentation `:c:member:`, `:c:data:` and `:c:var:` are equivalent. I do not know whether there is a semantic difference between `:c:data:` and `:c:var:` (although I think that `:c:member:` is semantically different and should be used for attributes). `:c:member:` is us...
08a228da05a7aec937b65eea21f4091fa3c6b5cf
c65592c4d6d7552fb6284442906a96a6874cb266
python/cpython
python__cpython-107090
# shelve: `Shelf.clear()` has very poor performance # Bug report Calling the `clear` method on a `shelve.Shelf` object takes a very long time on databases that have thousands of entries. It can be seen in this script, which creates a database with 10,000 entries and immediately clears it. ```python import os...
810d5d87d9fe8d86aad99e48cef4f78a72e16ccf
11c055f5ff1a353de6d2e77f2af24aaa782878ba
python/cpython
python__cpython-107085
# test_capi.test_basic_loop(): _PyInstruction_GetLength() assertion error on s390x Fedora Clang 3.x buildbot s390x Fedora Clang 3.x: https://buildbot.python.org/all/#/builders/3/builds/4312 * Last successful build, build 4216 (July 7): https://buildbot.python.org/all/#/builders/3/builds/4216 -- commit 67a798888dcde...
7fc9be350af055538e70ece8d7de78414bad431e
9a6b278769b9f24e0650283f6c347db8ae52b7b3
python/cpython
python__cpython-107567
# test__xxsubinterpreters: test_already_running() crash randomly on Python built with TraceRefs: invalid object chain AMD64 Arch Linux TraceRefs 3.x: https://buildbot.python.org/all/#/builders/484/builds/3721 Assertion error: **Objects/object.c:2235: _Py_ForgetReference: Assertion failed: invalid object chain**. ...
707018cc75558d6695e9e199a3ed0c8a4ff7cbcc
5dc825d504ad08d64c9d1ce578f9deebbe012604
python/cpython
python__cpython-107586
# test_asyncio: test_create_connection_ssl_failed_certificate() failed on ARM64 macOS 3.x buildbot ARM64 macOS 3.x: https://buildbot.python.org/all/#/builders/725/builds/5088 The test started to fail when **OpenSSL** was upgrade from 3.0.0 to **3.1.1** at July 13. cc @pablogsal @ned-deily @ambv * Last succes...
77e09192b5f1caf14cd5f92ccb53a4592e83e8bc
a73daf54ebd7bd6bf32e82766a605ebead2f128c
python/cpython
python__cpython-108763
# C API: _PyObject_VisitManagedDict() function should be public **tl; dr: _PyObject_VisitManagedDict() and _PyObject_ClearManagedDict() function should be public.** If a C extension implements a type as a heap type, the type must support the GC protocol: it must implement visit and clear functions, and the dealloc ...
fc2cb86d210555d509debaeefd370d5331cd9d93
6387b5313c60c1403785b2245db33372476ac304
python/cpython
python__cpython-107029
# Ambiguity in documentation of `logger.handlers.MemoryHandler` method `flush()` # Documentation Behavior of the [MemoryHandler](https://docs.python.org/release/3.11.4/library/logging.handlers.html#memoryhandler) is slightly different as what the documentation is. Or, it has at least some ambiguity: The function `f...
5e5a34ac3a827e040cd89426b1774fec2123336a
22422e9d1a50b4970bc6957a88569618d579c47f
python/cpython
python__cpython-107018
# Remove async_hacks from the tokenizer The `async_hacks` related functionality provides a specific compile mode that still allows treating ASYNC and AWAIT like soft keywords optionally. This is not used in the interpreter and it belongs to a version that has lost upstream support (and that would imply that someone is...
da8f87b7ea421894c41dfc37f578e03409c5d280
b0202a4e5d6b629ba5acbc703e950f08ebaf07df
python/cpython
python__cpython-107011
# Document the curses module variables LINES and COLS In the `curses.update_lines_cols()` description `LINES` and `COLS` are referred as the environment variables. But actually they are the `curses` module variables. <!-- gh-linked-prs --> ### Linked PRs * gh-107011 * gh-107057 * gh-107058 <!-- /gh-linked-prs -->
26e08dfdd7ac1b3d567d30cd35e4898121580390
6fbc717214210e06313a283b2f3ec8ce67209609
python/cpython
python__cpython-131840
# Move threading.local docs from docstring to the docs # Documentation https://docs.python.org/3/library/threading.html#threading.local says: > For more details and extensive examples, see the documentation string of the _threading_local module: [Lib/_threading_local.py](https://github.com/python/cpython/tree/3...
b97328ef5d2435c08de3e4e2054c226f15b52d0f
8467026ed66ca3abefe3a13860d2633eae3d7164
python/cpython
python__cpython-106993
# tok_report_warnings in tokenizer state is not needed When we merged PEP 701, we added `tok_report_warnings`, which apparently got in by accident. The issue it was trying to solve was already resolved in #99891 and #99893. I think that it can safely removed both from the tokenizer struct and all occurences should be...
76e20c361c8d6bc20d939d436a1c3d4077a58186
adda43dc0bcea853cbfa33126e5549c584cef8be
python/cpython
python__cpython-106990
# Bump sphinx-lint to 0.6.8 # Documentation Bump sphinx-lint to 0.6.8 in `.pre-commit-config.yaml` and fix any newly reported issues. https://github.com/sphinx-contrib/sphinx-lint/releases/tag/v0.6.8 <!-- gh-linked-prs --> ### Linked PRs * gh-106990 * gh-106991 * gh-107023 <!-- /gh-linked-prs -->
6acd85d91063380d1afb86c116a66e0aadd4f909
ee5c01b473eeadb007b9f330db3143e34e46038b
python/cpython
python__cpython-106982
# Docs: alphabetise bullets by module name # Documentation Re: https://github.com/python/cpython/pull/106540#discussion_r1259964874 Look at: * https://docs.python.org/3.13/whatsnew/3.13.html#pending-removal-in-python-3-14 * https://docs.python.org/3.13/whatsnew/3.13.html#pending-removal-in-python-3-15 * https...
443d9b3033bc6189e7f1ae936806779c02a46c43
d55b4da10c56f3299998b5b8fee3a8a744fac76c
python/cpython
python__cpython-106984
# What's new in 3.12: fix typo: non-integral -> non-integer # Documentation https://docs.python.org/3.12/whatsnew/3.12.html#changes-in-the-python-api says: > * Removed randrange() functionality deprecated since Python 3.10. Formerly, randrange(10.0) losslessly converted to randrange(10). Now, it raises a [TypeEr...
d55b4da10c56f3299998b5b8fee3a8a744fac76c
806d7c98a5da5c1fd2e52a5b666f36ca4f545092
python/cpython
python__cpython-106992
# What's new in 3.12: add missing issue reference # Documentation https://docs.python.org/3.12/whatsnew/3.12.html#pending-removal-in-python-3-14 has: > * Creating immutable types ([Py_TPFLAGS_IMMUTABLETYPE](https://docs.python.org/3.12/c-api/typeobj.html#Py_TPFLAGS_IMMUTABLETYPE)) with mutable bases using the C ...
c556f9a3c9af48c9af9e1f298be638553a6c886e
1a1bfc28912a39b500c578e9f10a8a222638d411
python/cpython
python__cpython-106972
# Argument Clinic 'destination <name> clear' is broken The `destination <name> clear` command is documented like this: > It removes all the accumulated text up to this point in the destination. (I don’t know what you’d need this for, but I thought maybe it’d be useful while someone’s experimenting.) Clearly, the...
3372bcba9893030e4063a9264ec0b4d1b6166883
cdeb1a6caad5e3067f01d6058238803b8517f9de
python/cpython
python__cpython-106988
# New modules in 3.12: "None yet" # Documentation ["What's New in Python 3.12"](https://docs.python.org/3.12/whatsnew/3.12.html#new-modules) says: > **New Modules** > > * None yet. 3.12 is in feature freeze (https://devguide.python.org/versions/) and will get no new more new features or modules, so this sho...
6dbffaed17d59079d6a2788d686009f762a3278f
c5adf26b1867767781af30ada6f05a29449fc650
python/cpython
python__cpython-107000
# Date is confusing on What's New page # Documentation On this page, the Date is confusing. What does it represent? Doesn't seem to be the date the version was released. Is it the last date the documentation was updated? https://github.com/python/cpython/blob/3.11/Doc/whatsnew/3.11.rst?plain=1#L6 <!-- gh-linked-...
c92ef6fe0e1384c090b94143cdc01e5e114a8747
3782def5a2b4d24ab5d356f89da181e99a9a59b2
python/cpython
python__cpython-106961
# Python cannot be compiled with the MPI wrapper around the GCC compiler The configure script and configure.ac check for compiler: ```sh case "$CC" in *icc*) # ICC needs -fp-model strict or floats behave badly CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict" ;; *xlc*) CFLAGS_NODIST="$CFLAGS_NO...
9a6b278769b9f24e0650283f6c347db8ae52b7b3
3aeffc0d8f28655186f99d013ee9653c65b92f84
python/cpython
python__cpython-106949
# Docs: add standard external names to nitpick_ignore Sphinx in the nitpick mode complains about standard C identifiers like "size_t", "LONG_MAX" and "errno". This can be solved individually by adding `!` before the name, e.g. ``` :c:data:`errno` ``` or using literal text instead of semantic role, e.g. ``` ``errno`` `...
f8b7fe2f2647813ae8249675a80e59c117d30fe1
26e08dfdd7ac1b3d567d30cd35e4898121580390
python/cpython
python__cpython-107272
# Global String Objects are Interned Only in the First Interpreter When a string object is interned via `_PyUnicode_InternInPlace()`, its "state.interned" field is set. Afterward, subsequent calls to `_PyUnicode_InternInPlace()` will skip that string. The problem is that some strings may be used in multiple interpre...
b72947a8d26915156323ccfd04d273199ecb870c
4f67921ad28194155e3d4c16255fb140a6a4d89a
python/cpython
python__cpython-108959
# Support multi-line error locations in traceback and other related improvements (PEP-657, 3.11) # Feature or enhancement We propose a few improvements and fixes to PEP-657, namely: 1. Support underlining errors that span across multiple lines instead of only showing the first line 2. Use caret anchors for functi...
6275c67ea68645e5b296a80ea63b90707a0be792
aa51182320f3c391195eb7d5bd970867e63bd978
python/cpython
python__cpython-106920
# Use proper markup for the C "constants" Many of the C "constants" (actually macros without parameters) are declared in the documentation using the `data` directive and referred using `:data:` and `:const:` roles. It is incorrect, because these directive and roles are defined in the Python domain and purposed to use ...
fcc816dbff7ca66c26f57a506e4d2330fe41d0ff
81861fd90b4ae981e7881cd03a3c370713063525
python/cpython
python__cpython-106977
# 3.12.0b4 Backwards incompatible change with reassignment of `cls.__new__` and `super()` <!-- If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not the right place to seek help. Consider the following options instead: - reading the Python tu...
e5d5522612e03af3941db1d270bf6caebf330b8a
b38370349139e06f3a44150943ee44e345567d77