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-136129 | # math.tau broken video link
# Documentation
https://docs.python.org/3/library/math.html#math.tau
attempts to link to a YouTube video "Pi is (still) Wrong" by Vi Hart.
However, they intentionally removed their videos from YouTube (see [their Patreon post](https://www.patreon.com/posts/vihart-channel-129842460) ).
A... | a87f3e02828cb4404053384dba18924dcace6596 | ee47670e8b8648b14fd4cb64a9d47d6ed3c5b6b7 |
python/cpython | python__cpython-136088 | # Outdated `os.linesep` docs in `os.py`
https://github.com/python/cpython/blob/5334732f9c8a44722e4b339f4bb837b5b0226991/Lib/os.py#L13
Docs claim that `\r` is a possible value for `os.linesep`, however, I can't find any code that actually sets it to `\r`.
But it can only be:
- https://github.com/python/cpython/blob/5... | 980a56843bf631ea80c1486a367d41031dec6a7e | fb9f933b8eda6cdc1336582dc8709b759ced91af |
python/cpython | python__cpython-136069 | # Un-necessary loglinear complexity in `platform._platform`
**Bug Description:**
A of simple quadratic complexity code in platform.py
**Vulnerability Locations :**
1. https://github.com/python/cpython/blob/98a5b830d2463351800f4d76edba1a306a3e0ec9/Lib/platform.py#L642
**Repair Status:**
None
**Common Information:**... | bd928a3035a214c38e8429da8f65f823ca28151b | 30ba03ea8ed98522b0500d6856b22727c88e818f |
python/cpython | python__cpython-136054 | # Memory Safety Issue in marshal.c TYPE_SLICE Case
# Bug report
### Bug description:
### Description
__Location:__ `Python/marshal.c`, function `r_object()`, `TYPE_SLICE` case
__Issue:__ The code didn't validate the return value of `r_ref_reserve()` before passing it to `r_ref_insert()`. If `r_ref_reserve()` fails... | 30ba03ea8ed98522b0500d6856b22727c88e818f | f04d2b8819eb37d5439b7437f1e80a1e5c5c4f07 |
python/cpython | python__cpython-136133 | # argparse.BooleanOptionalAction documentation
# Documentation
Current [`argparse.BooleanOptionalAction`](https://docs.python.org/3/library/argparse.html#argparse.BooleanOptionalAction) documentation is:
>You may also specify an arbitrary action by passing an Action subclass or other object that implements the same in... | 1953713d0d67a4f54ff75bf8449895a2f08cc750 | 5dac137b9f75c5c1d5096101bcd33d565d0526e4 |
python/cpython | python__cpython-136029 | # strptime() fails to parse month names containing İ (U+0130)
# Bug report
### Bug description:
`strptime()` fails to parse month names containing "İ" (U+0130, LATIN CAPITAL LETTER I WITH DOT ABOVE) like "İyun" or "İyul". This affects locales 'az_AZ', 'ber_DZ', 'ber_MA' and 'crh_UA'.
This happens because `'İ'.lower... | 731f5b8ab3970e344bfbc4ff86df767a0795f0fc | de0d014815667982c683adb2b2cc16ae2bfb3c82 |
python/cpython | python__cpython-136332 | # Decide the fate of `type_params` in `_eval_type` and `_evaluate`
# Feature or enhancement
Currently there are two places in our typing-related code that raise a `DeprecationWarning` when `type_params` parameter is not provided:
https://github.com/python/cpython/blob/07183ebce36462aaaea4d20e0502b20821dd2682/Lib/typ... | c89f76e6c4ca9b0200d5cc8cf0a675a76de50ba8 | 77a8bd29da99e7d4fa8e7f07c4063977c2bb14d3 |
python/cpython | python__cpython-136018 | # Avoid decref in PyObject_RichCompareBool
# Feature or enhancement
### Proposal:
In `PyObject_RichCompareBool` there is a fast path for the common case where `PyObject_RichCompare` returns a `bool`. In that path there is no need to decref the result, since `bool` values are immortal.
### Has this already been dis... | e23518fa96583d0190d457adb807b19545df26cf | 07183ebce36462aaaea4d20e0502b20821dd2682 |
python/cpython | python__cpython-135990 | # Missing char in palmos encoding
# Bug report
### Bug description:
When using the `palmos` encoding, 0x8b correctly encodes to ‹, but 0x9b was mistakenly marked as a control character instead of ›. You can see the correct glyphs in this screenshot of Palm OS 3.5, or on [this page](https://web.archive.org/web/202504... | 58a42dea97f4fa0df38ef4a95a2ede65e0549f71 | 642e5dfc74310d15bb81f8e94167590380a5fbfb |
python/cpython | python__cpython-135970 | # Provide iOS stub for `strip`
# Feature or enhancement
### Proposal:
CPython provides wrappers for `clang`, `clang++`, `cpp` and `ar`. These wrappers provide "single word binaries" for tools that are commonly discovered by C builds systems.
Another tool that is commonly needed is `strip`.
`xcrun` can satisfy a `... | 0c6c09b7377e10dcf80844c961b578fbdc6f5375 | 2fc68e180ffdb31886938203e89a75b220a58cec |
python/cpython | python__cpython-135967 | # iOS testbed doesn't honor .pth files
# Bug report
### Bug description:
When running tests through the iOS testbed, `.pth` files that are installed by packaged (such as the setuptools "distutils_hack") will not be processed.
This surfaced during testing of an iOS patch for Pillow, which uses pyroma; pyroma depends... | b38810bab76c11ea09260a817b3354aebc2af580 | 34ce1920ca33c11ca2c379ed0ef30a91010bef4f |
python/cpython | python__cpython-135964 | # typo in /doc/howto/isolating-extensions
line 456:
```
If you use use :c:func:`PyObject_New` or :c:func:`PyObject_NewVar`:
```
it should be like:
```
If you use :c:func:`PyObject_New` or :c:func:`PyObject_NewVar`:
```
similar issue to #135958 and #135956. I'm sure this typo is not mentioned before.
<!-- gh-linked-p... | ffb2a02f98d904505c8a82d8540c36dee4c67eed | 6be17baeb5bcfc78f0b7fcfe5221df0744c865e8 |
python/cpython | python__cpython-135957 | # datetime.isoformat() docstring has a typo
# Documentation
In 3.13 cpython/Lib/_pydatetime.py line 2046-2047, linked below, the docstring has a typo. It repeats the word "giving".
https://github.com/python/cpython/blob/c148a68efe54b4452cfec6a65205b83bff5fefb3/Lib/_pydatetime.py#L2046-L2047
<!-- gh-linked-prs -->
#... | e3ea6f2b3b084700a34ce392f5cf897407469b3a | 1f5e23fd7015a8f7b14d0181ec83efa95c5d5b68 |
python/cpython | python__cpython-135935 | # CPython fails to build on MSVC with latest C standard flag
# Bug report
### Bug description:
When passing `/std:clatest` to MSVC, the current CPython fails to build.
### CPython versions tested on:
CPython main branch
### Operating systems tested on:
_No response_
<!-- gh-linked-prs -->
### Linked PRs
* gh-13... | a88b49c3f2184428124890741778e92c0fdb6446 | d2154912b3b10823c138e904e74f2a1e7e7ca96c |
python/cpython | python__cpython-135914 | # Document ob_refcnt, ob_type, ob_size
The fields of `PyObject` and `PyVarObject` are only documented in [static type object docs](https://docs.python.org/3/c-api/typeobj.html#pyobject-slots). They should have entries under their own types.
(Their use is discouraged. That makes proper docs all the more important.)
<... | 73e1207a4ebdb3b43d597cd6c288dae6d7d1dbdb | 11f074b243756bca0db5a7d35dd84f00879de616 |
python/cpython | python__cpython-136009 | # Free threaded builds can double dealloc if .tp_dealloc sleeps
# Bug report
### Bug description:
Hi,
I've been slowly building/debugging my dumb locking idea, and I think I've hit a bug in upstream python.
My understanding of how the GC detects when objects are in use by C, is that it counts the number of referen... | 2500eb96b260b05387d4ab1063fcfafebf37f1a4 | be02e68158aee4d70f15baa1d8329df2c35a57f2 |
python/cpython | python__cpython-135889 | # Segfault by calling `repr(SimpleNamespace)` with `typing.Union` attributes in threads on a free-threading build
# Crash report
### What happened?
It's possible to segfault or abort the interpreter of a free-threading build by calling `repr(SimpleNamespace)` in threads when the instance has `typing.Union` attribute... | b3ab94acd308591bbdf264f1722fedc7ee25d6fa | e5f03b94b6d4decbf433d385f692c1b8d9b7e88d |
python/cpython | python__cpython-135856 | # `_interpreters.set___main___attrs` raises SystemError when passed a non-dict object
# Bug report
### Bug description:
This snippet:
```python
import _interpreters
import types
i = _interpreters.create()
_interpreters.set___main___attrs(i, types.MappingProxyType({"a": 1}))
```
raises:
```python-traceback
Traceback... | 4e6f0d116e9725efb2d8eb6c3274aa3c024a6fb4 | fea5ccc55d8486300beb1d0254da030a4da10394 |
python/cpython | python__cpython-135877 | # Decide the fate of missing C99 functions in `math`
# Feature or enhancement
### Proposal:
I will first post here because I don't want to flood DPO with a controversial thread. I didn't dig much in the issues so it might have already been discussed a bit more in detail elsewhere.
There are some functions in `math.... | 42ccac2d7f29f6befed46ca7a131de82901dcbcf | ff7b5d44a00acfa681afd8aea70abc66ea536723 |
python/cpython | python__cpython-136253 | # Support zstd on Android
# Feature or enhancement
As seen on [the buildbot](https://buildbot.python.org/?#/builders/1594/builds/2712/steps/6/logs/stdio), it's currently being omitted:
```
checking for libzstd >= 1.4.5... no
```
In the current build system, this will require the following:
* Add a libzstd release in... | 61dd9fdad729fe02d91c03804659f7d0c5a89276 | ea45a2f97cb1d4774a6f88e63c6ce0a487f83031 |
python/cpython | python__cpython-135840 | # `traverse_module_state` can return `int`, do not use `(void)` for it
# Bug report
`traverse_module_state` can in theory return non-zero code:
https://github.com/python/cpython/blob/0d9d48959e050b66cb37a333940ebf4dc2a74e15/Modules/_interpchannelsmodule.c#L283-L302
because `PY_VISIT` can return it: https://github.c... | dd59c786cfb1018eb5abe877bfa7265ea9a3c2b9 | ca87a47b3d92aabaefbbe79c0493d66602184b41 |
python/cpython | python__cpython-135845 | # IndexError when calling asyncio.open_connection
# Bug report
### Bug description:
I unfortunately don't have a minimal reproducible example, as it happens in a complex system under high concurrent load, but I get the following error after calling: `await asyncio.open_connection(host, port)`
```
File "/usr/local/l... | 0e19db653dfa1a6e750e9cede1f6922e5fd1e808 | 31b56df3bb3c5e3ced10a0ad1eaed43e75f36f22 |
python/cpython | python__cpython-135827 | # Improve `netrc` security check error message
# Feature or enhancement
### Proposal:
When `netrc` security check fails due to ownership issues, we display:
https://github.com/python/cpython/blob/e7295a89b85df69f5d6a60ed50f78e1d8e636434/Lib/netrc.py#L157-L159
The message is a bit misleading, so we should improve i... | 396ca9a641429e59e09d3a3c28dc85623197797f | 6aa0826ed7688e5f40742cdcaf57420b284e194f |
python/cpython | python__cpython-135816 | # `netrc` security check may fail on WASI due to the lack of `os.getuid`
# Bug report
### Bug description:
Found as part of https://github.com/python/cpython/pull/135802.
For instance:
```py
File "/Lib/test/test_netrc.py", line 69, in use_default_netrc_in_home
return netrc.netrc()
~~~~~~~~~~~^^
... | b57b619e34cdfc87b47943c988b0b4d69f8f1fe4 | e7295a89b85df69f5d6a60ed50f78e1d8e636434 |
python/cpython | python__cpython-135868 | # -X tlbc undocumented in 3.14 and 3.15 command line options
Windows 10 + Python 3.14 `py.exe --help-xoptions` lists `-X tlbc`, but I wonder why it's not documented at https://docs.python.org/3.14/using/cmdline.html#cmdoption-X.
<!-- gh-linked-prs -->
### Linked PRs
* gh-135868
* gh-135897
<!-- /gh-linked-prs -->
| fea5ccc55d8486300beb1d0254da030a4da10394 | b3ab94acd308591bbdf264f1722fedc7ee25d6fa |
python/cpython | python__cpython-135831 | # venv using symlinks and empty pyvenv.cfg isn't recognized as venv / able to find python home
# Bug report
### Bug description:
Previously, it was possible to have a functional (enough) venv by simply doing two things:
1. Creating an empty pyvenv.cfg file
2. Creating a bin/python3 which symlinked to the actual inte... | 93263d43141a81d369adfcddf325f9a54cb5766d | 8ac7613dc8b8f82253d7c0e2b6ef6ed703a0a1ee |
python/cpython | python__cpython-135767 | # SystemError in OpenSSL's SHAKE when passing negative digest sizes
# Bug report
### Bug description:
```py
import _hashlib
_hashlib.openssl_shake_128(b'').digest(-1) # SystemError
_hashlib.openssl_shake_128(b'').hexdigest(-1) # MemoryError
import _sha3
_sha3.shake_128(b'').digest(-1) # ValueEr... | 7c4361564c3881946a5eca677607b4ffec0a566d | 13cac833471885564cbfde72a4cbac64ade3137a |
python/cpython | python__cpython-135770 | # `tkinter.commondialog.Dialog.show()` documentation has nonexistent `color` parameter
# Documentation
The documentation for [`tkinter.commondialog.Dialog.show()`](https://docs.python.org/3/library/dialog.html#tkinter.commondialog.Dialog.show) contains a `color` argument in the signature.
However, this parameter does... | 4ddf505d9982dc8afead8f52f5754eea5ebde623 | c5ea8e8e8fc725f39ed23ff6259b3cc157a0785f |
python/cpython | python__cpython-136803 | # Inaccurate description of multiprocessing.Queue.close()
# Documentation
https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Queue.close
It says "Indicate that no more data will be put on this queue by the current process." but that looks to only be half the story.
https://github.com/python/cpy... | f575588ccf27d8d54a1e99cfda944f2614b3255c | d19bb4471331ca2cb87b86e4c904bc9a2bafb044 |
python/cpython | python__cpython-135766 | # `test_capi` fails on wasm buildbots with stack overflow
# Bug report
Link: https://buildbot.python.org/#/builders/1373/builds/539/steps/13/logs/stdio
```
thread 'main' has overflowed its stack
fatal runtime error: stack overflow
```
Affected bots:
- [buildbot/wasm32 WASI 8Core PR](https://buildbot.python.org/#/bu... | 3fb6cfe7a95081e6775ad2dca845713a3ea4c799 | 61532b4bc783c1570c0fd7fb2ff5f8157cf64e82 |
python/cpython | python__cpython-135712 | # Two warnings on `wasm32-wasi Non-Debug PR` buildbot
# Bug report
Link: https://buildbot.python.org/#/builders/1373/builds/538/steps/11/logs/warnings__57_
```
../../Modules/_testcapimodule.c:2428:13: warning: unused function 'finalize_thread_hang_cleanup_callback' [-Wunused-function]
1 warning generated.
../../Modu... | 9c3c02019cf0bc7792bbdd3a314e45642178e3b5 | 754190287ece5a2e66684161aadafb18f5f44868 |
python/cpython | python__cpython-135737 | # `shutil.copyfileobj()` doesn't flush at end of copy
# Bug report
### Bug description:
If you use `shutil.copyfileobj()` to copy a file-like object to a file-like object, the destination isn't flushed at the end of the copy. This can lead to the destination file being in a written, but unflushed state, which could ... | 34393cbdd46fd965de86f1e7bc89ab111f506723 | 2793b68f758c10fb63b264787f10d46a71fc8086 |
python/cpython | python__cpython-135663 | # Raise consistent `NameError` in `ForwardRef.evaluate()`
# Feature or enhancement
### Proposal:
The new `ForwardRef.evaluate()` implementation had a fast path introduced in https://github.com/python/cpython/pull/124337 to _not_ call `eval()`:
https://github.com/python/cpython/blob/cb394101110e13a27e08bbf2fe9f38d84... | 343719d98e60d28d6102002f8ad3fd9dc5a58bd1 | 9877d191f441741fc27ae5e7a6dd7ab6d4bcc6b7 |
python/cpython | python__cpython-135667 | # 3.14: missing sys.implementation.supports_isolated_interpreters?
# Bug report
### Bug description:
```python
import sys
sys.implementation.supports_isolated_interpreters
```
This is missing, but the accepted PEP 734 [says this](https://peps.python.org/pep-0734/#sys-implementation-supports-isolated-interpreters) i... | 8ca1e4d846e868a20834cf442c48a3648b558bbe | f4911258a80409cb641f13578137475204ab43b5 |
python/cpython | python__cpython-135642 | # `test_lock_two_threads` flaky in `test_capi`
# Bug report
The lock may have the `_Py_HAS_PARKED` bit set so that `m->_bits == 3` instead of 1. This can happen due to collisions in the parking lot hash table -- that's rare so we don't see it frequently. I think the possible collision here is if the `PyEvent` that th... | 17ac3933c3c860e08f7963cf270116a39a063be7 | 46c60e0d0b716e8e6f0b74a0f9d0542605b1efd4 |
python/cpython | python__cpython-135643 | # Calling ElementTree.write on an ElementTree instance where ElementTree._root is the wrong type causes possible data loss
# Bug report
### Bug description:
Example:
```
tree = xml.etree.ElementTree.ElementTree(element = "") # element should be an ElementTree.Element object or None
tree.write("file.xml") # This appr... | e0245c789f54b63d461717a91eec8ffccbe18966 | 9084b151567d02936ea1374961809b69b4cd883d |
python/cpython | python__cpython-135662 | # `test_cycle` in `test_free_threading.test_itertools` is flaky
# Bug report
### Bug description:
`next()` on a shared `itertools.cycle()` iterator may raise a StopIteration. With the GIL, that would never happen because the iterator loops forever. I think that's fine -- the iterator doesn't need to be thread-safe -... | 4dea6b48cc24aede7250534923d3ce9f9c8b87e6 | c55512311b7cb8b7c27c19f56cd8f872be29aedc |
python/cpython | python__cpython-135632 | # LOAD_CONST_IMMORTAL is documented in dis as an instruction while it is a specialized instruction
# Documentation
The dis documentation does not document specialized instruction but LOAD_CONST_IMMORTAL is documented even though its opcode is 190 and all opcodes beyond 129 are specialized.
<!-- gh-linked-prs -->
###... | 711700259135b5f9e21c56b199f4ebc0048b18b4 | 52be7f445e454ccb44e368a22fe70a0fa6cab7c0 |
python/cpython | python__cpython-136758 | # Misleading pyrepl warnings when _curses module is missing
# Bug report
### Bug description:
If I run 3.14 on Linux without a working `_curses` extension, I get this misleading warning from pyrepl:
```
warning: can't use pyrepl: Windows only
```
I suspect pyrepl is not _actually_ Windows only, and indeed if I fix... | 09dfb50f1b7c23bc48d86bd579671761bb8ca48b | d1d526afe7ce62c787b150652a2ba136cb949d74 |
python/cpython | python__cpython-135613 | # Segfault/abort in `_Py_uop_sym_new_const` on a JIT build
# Crash report
### What happened?
It's possible to segfault a release build or abort a debug with JIT enabled by running the following MRE:
```python
import email # Any module seems to work, originally this was `sys`
def interact():
email.ps1 = None
... | b53b0c14da58b73955b8989e4a9ce19ea67db7a3 | c8c13f8036051c2858956905769b7b9dfde4bbd7 |
python/cpython | python__cpython-135614 | # data race with extension modules checking for empty weaklist
Extension modules which check for `self->weakreflist != NULL` in `tp_dealloc` before calling `PyObject_ClearWeakRefs(self)` leads to to data race if another thread is concurrently mutating the weaklist.
In free-threading the weaklist is modified atomically... | b1056c2a446b43452e457d5fd5f1bde66afd3883 | 0533c1faf27d1e50b062bb623dfad93288757f57 |
python/cpython | python__cpython-135572 | # Guard call to _hashlib in test_hashlib.py
# Feature or enhancement
### Proposal:
# Feature or enhancement
### Proposal:
This is a trivial test modification, [spun out](https://github.com/python/cpython/pull/135402#issuecomment-2970965387) into a separate issue + PR from PR 135402.
### Has this already been disc... | 065194c1a971b59547f1bb2cc64760c4bf0ee674 | 731f5b8ab3970e344bfbc4ff86df767a0795f0fc |
python/cpython | python__cpython-135562 | # `_hmac`: GIL may be released while attempting to set an exception
# Bug report
### Bug description:
When calling `hmac.update()`, if the HACL* call fails, an exception is set. But this happens while we're releasing the GIL, which is not good.
### CPython versions tested on:
CPython main branch
### Operating sys... | c76568339867422eca35876cabf82c06a55bbf56 | 9c3c02019cf0bc7792bbdd3a314e45642178e3b5 |
python/cpython | python__cpython-135601 | # data race between lock free list reads and heapq
Reproducer:
```py
import heapq
l = []
def writer():
while True:
heapq.heappush(l, 1)
heapq.heappop(l)
def reader():
while True:
try:
l[0]
except IndexError:
pass
def main():
import threading
... | 13cac833471885564cbfde72a4cbac64ade3137a | 8ca1e4d846e868a20834cf442c48a3648b558bbe |
python/cpython | python__cpython-135553 | # Change how sorting picks minimum run length
# Bug report
### Bug description:
On randomly ordered data, Python's sort ends up artificially forcing all initial runs to length `minrun`, whose value is a function of `len(list)`, picked in a cheap way to avoid the very worst cases of imbalance in the final merge.
Ste... | 2fc68e180ffdb31886938203e89a75b220a58cec | b38810bab76c11ea09260a817b3354aebc2af580 |
python/cpython | python__cpython-135544 | # Add new audit event for `sys.remote_exec()`
I think we should get an audit event in ` sys.remote_exec()` yes
_Originally posted by @pablogsal in https://github.com/python/cpython/pull/135362#discussion_r2140528333_
<!-- gh-linked-prs -->
### Linked PRs
* gh-135544
* gh-135732
<!-- /gh-linked-prs --... | 1ddfe593200fec992d283a9b4d6ad2f1b535c018 | bb9596fcfa50eac31c728b23a614bcbbf0386cd9 |
python/cpython | python__cpython-135742 | # Rewrite & cleanup HACL*-based extension modules
I recently rewrote the `_blake2` module. I want to the same for other modules where I can align the naming of functions across the different modules. The reason why I'm doing this is because it's becoming harder to make "similar" changes everywhere. In general, if I ne... | eec7a8ff22dcf409717a21a9aeab28b55526ee24 | 57dba7c9a59ab345f859810bad6608a9d1a0fdd6 |
python/cpython | python__cpython-135514 | # "variable tstate set but not used" in `crossinterp.c`
# Bug report
<img width="990" alt="Image" src="https://github.com/user-attachments/assets/0928b942-40e5-462e-bf3e-44ca12463647" />
I have a PR ready.
<!-- gh-linked-prs -->
### Linked PRs
* gh-135514
* gh-135577
<!-- /gh-linked-prs -->
| 4c15505071498439407483004721d0369f110229 | f0799795994bfd9ab0740c4d70ac54270991ba47 |
python/cpython | python__cpython-135505 | # Document `LIBZSTD_CFLAGS` and `LIBZSTD_LIBS` in `configure.rst`
# Feature or enhancement
Link: https://docs.python.org/3/using/configure.html#options-for-third-party-dependencies
Refs https://github.com/python/cpython/issues/132983
CC @emmatyping
I have a PR ready.
<!-- gh-linked-prs -->
### Linked PRs
* gh-135... | fc413ecb8f4bf1c59b29932695e3538548eb1a8a | 028309fb47869b665f55d10e9eabf7952bf7dbd3 |
python/cpython | python__cpython-135508 | # os.getlogin() fails with OSError: [Errno 34] for usernames > 9 characters
# Bug report
### Bug description:
```python
import os
print(os.getlogin())
```
```console
$ python3 -c "import os; print(os.getlogin())"
Traceback (most recent call last):
File "<string>", line 1, in <module>
import os; print(os.getl... | 2e15a50851da66eb8227ec6ea07a9cc7ed08fbf3 | fc413ecb8f4bf1c59b29932695e3538548eb1a8a |
python/cpython | python__cpython-135495 | # Typo in f-string conversion type error
# Bug report
### Bug description:
```python
f"{1! r}"
```
Gives the error
```
SyntaxError: f-string: conversion type must come right after the exclamanation mark
```
There is a typo in the word "exclamanation" (should be "exclamation")
### CPython versions tested on:
3.13, ... | c2bb3f9843bc4763d6d41e883dbe9525f5155a4a | 56eabea056ae1da49b55e0f794c9957008f8d20a |
python/cpython | python__cpython-135713 | # Regression tests do not support exclusion and pgo in the same invocation
# Bug report
### Bug description:
## Background
I've been working to build from source on Alpine. Starting in 3.13 pgo optimizations now error and that led to the test_re tests failing and blocking builds. I didn't want to fully disable pg... | 15c6d63fe6fc62c6d78d2fad81965a8e6f7b7b98 | 2060089254f0b00199b99dd1ae83a3fb139e890c |
python/cpython | python__cpython-135506 | # Using `reprlib.repr` fails for very large numbers
# Bug report
### Bug description:
### The bug
`reprlib.Repr.repr_int` fails if the integer exceeds the string conversion limit (on line 184)
https://github.com/python/cpython/blob/6eb6c5dbfb528bd07d77b60fd71fd05d81d45c41/Lib/reprlib.py#L183-L189
This impacts oth... | e5f03b94b6d4decbf433d385f692c1b8d9b7e88d | 15c6d63fe6fc62c6d78d2fad81965a8e6f7b7b98 |
python/cpython | python__cpython-136797 | # `urllib.request.HTTPRedirectHandler` documentation uses `hdrs` instead of `headers`
# Documentation
Hello, `HTTPRedirectHandler` documentation documents some methods take HTTP headers in a parameter named `hdrs`:
https://github.com/python/cpython/blob/c646846c1e8f60e52b636b68bfd0df5e84229098/Doc/library/urllib.requ... | 57acd65a30f8cb1f3a3cc01322f03215017f5caa | 8ffc3ef01e83ffe629c6107082677de4d23974d5 |
python/cpython | python__cpython-135464 | # Worst case quadratic complexity in HTMLParser
<!-- gh-linked-prs -->
### Linked PRs
* gh-135464
* gh-135481
* gh-135482
* gh-135483
* gh-135484
* gh-135485
* gh-135486
<!-- /gh-linked-prs -->
| 6eb6c5dbfb528bd07d77b60fd71fd05d81d45c41 | 14c1d093d52d8de32c486808c1e1e85e0f61c11c |
python/cpython | python__cpython-135461 | # PyManager packaging of 3.11-3.12 has broken venv scripts
See https://github.com/python/pymanager/issues/133
In short, by using the new `PC/layout` script against older versions, a rename that used to be performed at build time was skipped. As a result, the republished 3.11 and 3.12 packages have a non-functional `v... | afc5ab6cce9d7095b99c1410a6762bc4a96504dd | f4bc3a932082411243da9bb909841138ee2eea97 |
python/cpython | python__cpython-135466 | # List comprehensions cause subinterpreter crashes
# Crash report
### What happened?
If you use any list comprehension inside a subinterpreter (either through `_interpreters` or through `interpreters`), an assertion fails in `_PyCode_CheckNoExternalState`:
```python
import _interpreters
interp = _interpreters.crea... | 15f2bac02c5e106f04a93ce73fd93cc305253405 | e9b647dd30d22cef465972d898a34c4b1bb6615d |
python/cpython | python__cpython-135445 | # 3.13 asyncio DatagramTransport buffer size accounting regression.
# Bug report
### Bug description:
Commit 73e8637002639e565938d3f205bf46e7f1dbd6a8 added 8 to the buffer_size when
send could not be called right away. However, it did not complete this
accounting by removing 8 from the buffer size when sending did ... | e3ea8613519bd08aa6ce7d142403e644ae32d843 | 9d3b53c47fab9ebf1f40d6f21b7d1ad391c14cd7 |
python/cpython | python__cpython-135491 | # Interpreter.call() Fails For Various Builtins
# Bug report
### Bug description:
This includes any function that calls `_PyEval_GetGlobals()` or `_PyEval_GetFrameLocals()`. Here's a list of the ones I noticed:
* `globals()`
* `locals()`
* `dir()`
* `vars()`
* `exec()`
* `eval()`
For example:
```python
from conc... | a450a0ddec7a2813fb4603f0df406fa33750654a | 68b7e1a6677d7a8fb47fbd28cb5d39a87217273c |
python/cpython | python__cpython-135438 | # _PyCode_VerifyStateless(): Assert Fails If a Name Is Both a Global And an Attr
# Crash report
### Bug description:
For example, the following function will trigger the problem:
```python
import pprint
def spam():
pprint.pprint([])
```
Crash in `test_code` (on a debug build):
```
python: Objects/codeobject.... | 56eabea056ae1da49b55e0f794c9957008f8d20a | c7f4a80079eefc02839f193ba07ce1b33d067d8d |
python/cpython | python__cpython-135442 | # 3.14.0b2 yield gives TypeError: _pystart_callback expected 2 arguments, got 3
# Bug report
### Bug description:
I thought I add 3.14-dev to our CI on github actions and after fixing some obvious issues, this one was left (the code is tested successfully on 3.10 .. 3.13):
```python
File "/home/runner/work/borg/b... | b03309fe5fca2eef51bf739fb13d9acef70cb964 | f273fd77d790300506c6443baa94d027b643f603 |
python/cpython | python__cpython-135423 | # Invalid error messages after GH-134077
# Bug report
In https://github.com/python/cpython/issues/134036 (PR: #134077) I broke this use-case:
```python
# ex.py
raise AssertionError() from None
print(1,,2)
```
Running `./python.exe ex.py` on it produces:
```
» ./python.exe ex.py
File "/Users/sobolev/Desktop/cpyt... | 7e3355845558dd8d488f463b166c2fe6e549f433 | fc82cb91ba262275fd91bc249ed891afce60f24a |
python/cpython | python__cpython-135402 | # Add ssl module test for AWS-LC
# Feature or enhancement
### Proposal:
As a final step in this integration, I’d like to propose adding an AWS-LC CI job to CPython’s CI alongside [the OpenSSL 3.x tests](https://github.com/python/cpython/blob/076004ae5461cf3a7fe248a38e28afff33acdd14/.github/workflows/build.yml#L267).... | db47f4d844acf2b6e52e44f7f3d5f7566b1e402c | 7f1e66ae0e7c6bfa26cc128291d8705abd1a3c93 |
python/cpython | python__cpython-135381 | # Enhance critical section held assertions for objects in free-threading
Currently the critical section held assertions on objects are not helpful as it doesn't prints the object of which the critical section should be held, it is helpful for debugging to print the object along with a message that critical section of ... | a8ec511900d0d84cffbb4ee6419c9a790d131129 | 3fb6cfe7a95081e6775ad2dca845713a3ea4c799 |
python/cpython | python__cpython-135377 | # Fix and improve test_random
#135326 exposed the fact that there was no tests for objects implementing `__index__` in `test_random`, even if some code in the `random` module explicitly support them.
When trying to add more tests, I discovered that
* Some code is literally duplicated for Random and SystemRandom tests... | c55512311b7cb8b7c27c19f56cd8f872be29aedc | 21f3d15534c08d9a49d5c119a0e690855173fde4 |
python/cpython | python__cpython-135436 | # `get_all_awaited_by()` shows incorrect call stacks in awaited_by relationships
The current asyncio debugging tools (`python -m asyncio ps` and `python -m asyncio pstree`) provide limited visibility into complex async execution patterns, making it extremely difficult to debug production asyncio applications.
The fu... | 028309fb47869b665f55d10e9eabf7952bf7dbd3 | 7b15873ed00766ef6760048449f44ea0e41f4a12 |
python/cpython | python__cpython-135421 | # unittest.mock: Regression with create_autospec and dataclasses in 3.14.0b2
# Bug report
### Bug description:
```python
from dataclasses import dataclass
from unittest.mock import create_autospec
@dataclass
class Description:
name: str
mock = create_autospec(Description, instance=True)
print(isinstance(mock, ... | c8319a3fea9ff7f9b49008be3b5d681112bbe7f3 | c2bb3f9843bc4763d6d41e883dbe9525f5155a4a |
python/cpython | python__cpython-135362 | # Record the `remote_debugger_script` audit event in doc
# Documentation
(A clear and concise description of the issue.)
<!-- gh-linked-prs -->
### Linked PRs
* gh-135362
* gh-135546
<!-- /gh-linked-prs -->
| 076f87468a570c2a5e2e68d06af0a5267eb81713 | b9a1b049820517d270f5019d5eb52c8e452eb33f |
python/cpython | python__cpython-133239 | # Add fast path to json string encoding
# Feature or enhancement
### Proposal:
Most JSON strings consist solely of ASCII characters that don’t require escaping, so adding a fast path for those would make a big difference. In these cases, we can avoid allocating a new string by writing the original string directly:
... | dec624e0afe6d22d38409d2e7dd9636ea0170378 | 7ab68cd50658f76abc9e0f12e6212736e2440720 |
python/cpython | python__cpython-135338 | # Fork server doesn't flush stdout/stderr after preloading modules, potentially leaving buffered data to be inherited by child processes
# Bug report
### Bug description:
## Files
<details><summary>a/__init__.py</summary>
```python
import os
import time
print(f"init {os.getpid()} at {time.clock_gettime_ns(time.CLOC... | 9877d191f441741fc27ae5e7a6dd7ab6d4bcc6b7 | 5f6ab924653a44e08be23710d5023566e9e9214e |
python/cpython | python__cpython-135322 | # Pickle `BINSTRING` incorrect data type for size
# Bug report
### Bug description:
The `BINSTRING` opcode in Pickle has two arguments: a "4-byte little-endian signed int" length, and a string of that many bytes (see the [code comment for `BINSTRING` in `pickletools`](https://github.com/python/cpython/blob/main/Lib/... | 2b8b4774d29a707330d463f226630185cbd3ceff | 5ae669fc4e674968529cc32f7f31d14dddd76607 |
python/cpython | python__cpython-135324 | # `math.isnormal` and `math.issubnormal` referring to "normality" without context
# Problem
Descriptions of those functions assume everyone knows what "normalized float" means. Which itself is a mental shorthand to "float valve represented in *normalized* scientific notation". And even that can raise questions.
On th... | 747d390045036325a7dbce12f7f0a4bc9c84c68a | 2b0c684e0759dc3fec0e9dd0fc8383e6c75b7b5c |
python/cpython | python__cpython-135289 | # clangcl PGO builds on Windows fail with `could not open '/GENPROFILE'`
# Bug report
### Bug description:
Since https://github.com/python/cpython/issues/134923 / PR https://github.com/python/cpython/pull/134924 clangcl PGO builds on Windows fail with
```
lld-link : error : could not open '/GENPROFILE': no such file... | 0045100ccbc3919e8990fa59bc413fe38d21b075 | b150b6aca7b17efe1bb13c3058d61cdefb83237e |
python/cpython | python__cpython-135277 | # Apply bugfixes from zipp
[zipp 3.23](https://zipp.readthedocs.io/en/latest/history.html#v3-23-0) includes several bug fixes and features since the last synced version (3.20.1).
<!-- gh-linked-prs -->
### Linked PRs
* gh-135277
* gh-135278
* gh-135279
<!-- /gh-linked-prs -->
| 8d6eb0c26276c4013346622580072908d46d2341 | aac22ea212849f8fffee9e05af7429c503d973ee |
python/cpython | python__cpython-135274 | # Unify ZoneInfo.from_file signature
# Bug report
### Bug description:
While enhancing stubs for `ZoneInfo.from_file` in [typeshed](https://github.com/python/typeshed/pull/14221), I noticed that the regression in the `from_file` signature was caused by the argument clinic migration, but without specifying an argumen... | 7cc89496922b7edb033e2ed47550c7c9e2ae8525 | 0243260284d3630d58a11694904476349d14a6ed |
python/cpython | python__cpython-135275 | # Typo in `token.NAME` documentation
# Documentation
https://docs.python.org/3/library/token.html
> token.NAME
> Token value that indicates an identifier. Note that keywords are also initially tokenized **an** NAME tokens.
should read
> token.NAME
> Token value that indicates an identifier. Note that keywords are... | 8d17a412da7e7d8412efc625d48dcb5eecea50b0 | 8d6eb0c26276c4013346622580072908d46d2341 |
python/cpython | python__cpython-135257 | # Simplify parsing parameters in Argument Clinic
This is a pure refactoring. It removes some repeated calls of `ast.parse()` and reuse the result of a single `ast.parse()` call per parameter.
<!-- gh-linked-prs -->
### Linked PRs
* gh-135257
* gh-136635
<!-- /gh-linked-prs -->
| b74fb8e220a50a9580320dfd398a16995b845c69 | 283b05052338dd735cd4927011afc3735d9c6c7c |
python/cpython | python__cpython-135311 | # tarfile, zipfile, and shutil documentation should mention zstd compression
# Documentation
Python 3.14 added zstd compression support in the standard library, and `tarfile`, `zipfile` and `shutil` can now use it.
* The documentation of `tarfile.open()` should be updated to mention zstd compression.
* Documentation... | 938a5d7e62d962a8462bce9fe04236ac9a2155b8 | da79ac9d26860db62500762c95b7ae534638f9a7 |
python/cpython | python__cpython-135226 | # Use CSPRNG for random UUID node ID
# Feature or enhancement
### Proposal:
Issue for: https://github.com/python/cpython/pull/135226
(I forgot to open issue first, sry)
I'll do the benchmark of the performance impact when switching to `secrets.getrandbits()` for the clock sequence soon. I'll post here.
I totally agr... | 1cb716387255a7bdab5b580bcf8ac1b6fa32cc41 | 4372011928b43d369be727ed3eb6d9d4f9610660 |
python/cpython | python__cpython-135267 | # Smarter use of a mutex in incremental HMAC and hash functions
# Feature or enhancement
### Proposal:
Currently, when doing incremental HMAC, if a message is sufficiently large, we lock the HMAC object but release the GIL so that we can call HMAC_Update without the GIL. However, for subsequent data, we will *always... | e7295a89b85df69f5d6a60ed50f78e1d8e636434 | ac9d37c60b7d10cb38fc9e5cb04e398dbc5bf2e5 |
python/cpython | python__cpython-135250 | # Improve `_hashlib` exception reporting when an OpenSSL error occurred
### OpenSSL memory allocation failures
When an OpenSSL error occurs, we usually raise a `ValueError`. However, failures may be related to `malloc()`, in which case we should raise a `MemoryError` as we usually do. I have a PR ready for this.
###... | 83b94e856e9b55e3ad00e272ccd5e80eafa94443 | 2677dd017a033eaaad3b8e1e0eb5664a44e7e231 |
python/cpython | python__cpython-135167 | # test.test_zstd failed due to error type
# Bug report
### Bug description:
```python
weapon@dev:/tmp/tmp.SyXPqDr6vd$ ./python -m test test.test_zstd
Using random seed: 4050720728
0:00:00 load avg: 0.92 Run 1 test sequentially in a single process
0:00:00 load avg: 0.92 [1/1] test.test_zstd
test test.test_zstd failed... | 1b55e12766d007aea9fcd0966e29ce220b67d28e | 8919cb4ad9fb18832a4bc9d5bbea305e9518c7ab |
python/cpython | python__cpython-135162 | # Redundant NULL check for 'exc' after dereference in ceval.c
Redundant comparison with a NULL value at
https://github.com/python/cpython/blob/2e1544fd2b0cd46ba93fc51e3cdd47f4781d7499/Python/ceval.c#L3193
for pointer 'exc', which was dereferenced at
https://github.com/python/cpython/blob/2e1544fd2b0cd46ba93fc51e3cdd47... | 8919cb4ad9fb18832a4bc9d5bbea305e9518c7ab | 9258f3da9175134d03f2c8c7c7eed223802ad945 |
python/cpython | python__cpython-135156 | # Compile missing _zstd module
# Bug report
### Bug description:
install dependence with `.github/workflows/posix-deps-apt.sh` in `ubuntu:22.004` .
```python
The necessary bits to build these optional modules were not found:
_zstd
To find the necessary bits, ... | a7d41e8aab5211f4ed7f636c41d63adcab0affba | b90ecea9e6b33dae360ed7eb2c32598f98444c4d |
python/cpython | python__cpython-135198 | # Parts of strings that look like comments being stripped out of nested strings with debug specifier
# Bug report
### Bug description:
Is this desired behavior?
```
$ ./python -m ast
f'{""" # this is part of the string, it shouldn't be stripped out
"""=}'
Module(
body=[
Expr(
value=JoinedStr(
... | ef66fb597ba909ead2fbfc06f748aa7b7e9ea437 | e89923d36650fe10ce1c6b5f7152638589684004 |
python/cpython | python__cpython-135145 | # `_remote_debugging` is missing in the "legacy" MSI Windows installer
# Bug report
### Bug description:
The `_remote_debugging` extension module is missing in the MSI Windows installer:
```
Python 3.14.0b2 (tags/v3.14.0b2:12d3f88, May 26 2025, 13:55:44) [MSC v.1943 64 bit (AMD64)] on win32
Type "help", "copyright... | e598eecf4c97509acef517e94053e45db51636fb | a10b321a5807ba924c7a7833692fe5d0dc40e875 |
python/cpython | python__cpython-135138 | # regrtest can fail writing unencodable test description or status
# Bug report
I already fixed errors related to non-ASCII skip messages (by using `ascii()` instead of `str()` or `repr()`). There may be other non-ASCII skip messages left, but they are not raised on buildbots with non-UTF-8 stdout. In any case, this ... | 3d396ab7591d544ac8bc1fb49615b4e867ca1c83 | 2e1544fd2b0cd46ba93fc51e3cdd47f4781d7499 |
python/cpython | python__cpython-135152 | # `generator.close()` never raises `GeneratorExit`
# Bug report
### Bug description:
[The doc](https://docs.python.org/3/reference/expressions.html#generator.close) of `generator.close()` says as shown below:
> Raises a [GeneratorExit](https://docs.python.org/3/library/exceptions.html#GeneratorExit) at the point wh... | 0d76dccc3b4376ba075a1737f58809e3d83aaaa3 | fb9e292919d82326acea456aa071c9af6aff5626 |
python/cpython | python__cpython-135109 | # Build failure on NetBSD: UT_NAMESIZE undeclared due to missing utmp.h include
# Bug report
### Bug description:
CPython fails to build on NetBSD with the following error:
```c
./Modules/posixmodule.c: In function 'os_getlogin_impl':
./Modules/posixmodule.c:9569:15: error: 'UT_NAMESIZE' undeclared (first use in th... | 5b3865418ceb1448bfbf15cddf52c900cd5882a3 | 1f515104441898111c20aca5a7bbda1d11b15d36 |
python/cpython | python__cpython-135104 | # Remove an unused local variable in Lib/code.py
In file `Lib/code.py` between lines 220-231 we have:
```python
try:
sys.ps1
delete_ps1_after = False
except AttributeError:
sys.ps1 = ">>> "
delete_ps1_after = True
try:
_ps2 = sys.ps2
delete_ps2_after = False
except AttributeError:
sys.ps2 = "... "
delete_ps2_a... | 8f778f7bb9a8ad80fc06570566ad4de541826178 | dba9de731b231ca0c079205f496d1e3d178b4fd3 |
python/cpython | python__cpython-135102 | # iOS testbed fails when the dir ~/Library/Developer/XCTestDevices is empty
# Bug report
### Bug description:
iOS testbed run fails when the dir ~/Library/Developer/XCTestDevices is empty.
As seen in https://github.com/pypa/cibuildwheel/pull/2443 .
The dir `~/Library/Developer/XCTestDevices` is empty on machines t... | dba9de731b231ca0c079205f496d1e3d178b4fd3 | 1ffe913c2017b44804aca18befd45689df06c069 |
python/cpython | python__cpython-135100 | # `PyMutex` failure in `parking_lot.c` on Windows during interpreter shutdown
# Bug report
### Bug description:
```
Fatal Python error: _PySemaphore_PlatformWait: unexpected error from semaphore: 4294967295 (error: 6)
Python runtime state: finalizing (tstate=0x6aa6c460)
Thread 0x00001360 (most recent call first):
... | cc581f32bf5f15e9f2f89b830ec64ea25684d0cd | 8f778f7bb9a8ad80fc06570566ad4de541826178 |
python/cpython | python__cpython-135076 | # Unexpanded f-strings in Lib/test/support/__init__.py exceptions
# Bug report
### Bug description:
```python
❯ ruff check --target-version=py314 --preview --select RUF027 Lib/test/support/__init__.py
Lib/test/support/__init__.py:1087:26: RUF027 Possible f-string without an `f` prefix
|
1085 | memlimit = _... | bc00ce941e03347dade3faa8822f19836b5bbfe4 | 5b3865418ceb1448bfbf15cddf52c900cd5882a3 |
python/cpython | python__cpython-135071 | # encodings.idna: Unexpanded f-string in "Unsupported error handling" exception
# Bug report
### Bug description:
The exception string in `encondings.idna.IncrementalDecoder` is missing the 'f' prefix.
https://github.com/python/cpython/blob/3612d8f51741b11f36f8fb0494d79086bac9390a/Lib/encodings/idna.py#L319
The ex... | 8dc3383abea72ee3deafec60818aeb817d8fec09 | 8f8bdf251a5f79d15ac2b1a6d19860033bf50c79 |
python/cpython | python__cpython-135037 | # Multiple tarfile extraction filter bypasses (`filter="tar"`/`filter="data"`)
### Bug description:
Public issue for fixing CVE-2025-4517, CVE-2025-4330, CVE-2025-4138, and CVE-2024-12718. [See full advisory on security-announce](https://mail.python.org/archives/list/security-announce@python.org/thread/MAXIJJCUUMCL7A... | 3612d8f51741b11f36f8fb0494d79086bac9390a | ec12559ebafca01ded22c9013de64abe535c838d |
python/cpython | python__cpython-135031 | # Possible MemoryError regression in Python 3.14 since alpha 6
# Bug report
### Bug description:
Running a simple piece of code:
```python
eval("(" * 200 + ")" * 200)
```
raised an error like this in Python 3.8:
```
>>> eval("(" * 200 + ")" * 200)
s_push: parser stack overflow
Traceback (most recent call last):
... | 6e80f11eb5eba360334b4ace105eb7d73394baf7 | b525e31b7fc50e7a498f8b9b16437cb7b9656f6f |
python/cpython | python__cpython-135006 | # Rewrite and cleanup HACL* `blake2module.c`
Some parts of `blake2module.c` have duplicated bits, and most of the file has lines exceeding 100 characters. I wouldn't bother about lines exceeding 80 characters, but here we're talking about lines that exceed my (laptop) screen.
When we switched from our implementation ... | 3cb109796dd4b07625b21773bbc04697c65bdf20 | 83b94e856e9b55e3ad00e272ccd5e80eafa94443 |
python/cpython | python__cpython-135002 | # Explicitly specify the encoding parameter value of `calendar.HTMLCalendar` as 'utf-8'
# Feature or enhancement
### Proposal:
Currently, the `calendar.HTMLCalendar.formatyearpage` method is used to generate an html of a calendar. `encoding` parameter defaults to the `sys.getdefaultencoding()`, but it always return... | f90483e13ad48227767cd6d69bc4857843710a5c | aaad2e81cecae01d3e7e12b2bbd2e1a8533ff5d4 |
python/cpython | python__cpython-135188 | # os.lstat() supports dir_fd but is not in os.supports_dir_fd
# Bug report
### Bug description:
I had written a script using `os.fwalk()` and `os.lstat()`, which was working.
Then I added an `if os.lstat in os.supports_dir_fd` check and a fallback implementation and observed the fallback path being taken:
```python... | e004cf8fd5c006a7a1c60807a03066f4c43452e5 | 6ef06fad84244261c695ec337c7d2734277054db |
python/cpython | python__cpython-135021 | # Issue with `PyObject_DelAttr[String]` in stable ABI builds targeting older CPython versions
# Bug report
### Bug description:
To my knowledge, one can use newer Python version (e.g. Python 3.13) to build C extensions for _older_ Python versions (e.g. 3.12) when targeting the stable ABI. This is accomplished by set... | c21113072cd1f0da83729f99d3576647db85d816 | 40c8be0008ecadb5d0dc9a017434b1133a3a6e06 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.