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-126013 | # Add `__class_getitem__` support to `memoryview`
# Feature or enhancement
### Proposal:
`memoryview` was made generic in typeshed in https://github.com/python/typeshed/pull/12247. Mypy recently received a report (https://github.com/python/mypy/issues/18053) due to it not being subscriptable at runtime:
```python
>>... | dc76a4ad3c46af3fb70361be10b8a791cd126931 | dad34531298fc0ea91b9000aafdd2ea2fce5e54a |
python/cpython | python__cpython-127680 | # Incorrect handling of `start` and `end` values in `codecs` error handlers
# Crash report
### What happened?
```py
./python -c "import codecs; codecs.xmlcharrefreplace_errors(UnicodeEncodeError('bad', '', 0, 1, 'reason'))"
python: ./Include/cpython/unicodeobject.h:339: PyUnicode_READ_CHAR: Assertion `index >=... | cf0b2da1e6947aa15be119582c2017765ab46863 | b23b27bc556857be73ee0f2379441c422b6fee26 |
python/cpython | python__cpython-125986 | # Add free threading scaling microbenchmarks
# Feature or enhancement
I've been using a simple script to help identify and track scaling bottlenecks in the free threading build. The benchmarks consists of patterns that ought to scale well, but haven't in the past, typically due to reference count contention or lock... | 00ea179879726ae221ac7084bdc14752c45ff558 | b5b06349eb71b7cf9e5082e26e6fe0145875f95b |
python/cpython | python__cpython-126003 | # UAF on `fut->fut_{callback,context}0` with evil `__getattribute__` in `_asynciomodule.c`
# Crash report
### What happened?
```python
import asyncio
class EvilLoop:
def call_soon(*args):
# will crash before it actually gets here
print(args)
def get_debug(self):
return... | f819d4301d7c75f02be1187fda017f0e7b608816 | 80eec52fc813bc7d20478da3114ec6ffd73e7c31 |
python/cpython | python__cpython-125970 | # Evil `call_soon` may cause OOB in `future_schedule_callbacks`
# Crash report
### Bug description:
In `future_schedule_callbacks`, the length of the callback list is assumed to be constant, but an evil `call_soon` can make it change.
PoC:
```py
import asyncio
called_on_fut_callback0 = False
pad = lambda: ...
de... | c5b99f5c2c5347d66b9da362773969c531fb6c85 | 13844094609cf8265a2eed023e33c7002f3f530d |
python/cpython | python__cpython-125967 | # UAF on `fut->fut_callback0` with evil `__eq__` in `_asynciomodule.c`
# Crash report
### Bug description:
This is an issue just to track the progress of fixing the UAF on `fut->fut_callback0` (see https://github.com/python/cpython/pull/125833#issuecomment-2435463447).
The UAF that could be exploited by cl... | ed5059eeb1aa50b481957307db5a34b937497382 | 0922a4ae0d2803e3a4e9f3d2ccd217364cfd700e |
python/cpython | python__cpython-125958 | # Discrepancy in argument naming for Sphinx docs & help in the cmath module
For example, cmath.sin docs [looks](https://docs.python.org/3.13/library/cmath.html#cmath.sin) like:
https://github.com/python/cpython/blob/2513593303b306cd8273682811d26600651c60e4/Doc/library/cmath.rst?plain=1#L147-L149
while help() shows:
... | 0a3eb8855ccea52c618db1cf09840c6368a3745f | fe5c4c53e7bc6d780686013eaab17de2237b2176 |
python/cpython | python__cpython-125943 | # Android: stdout is set to `errors="surrogateescape"`
# Bug report
### Bug description:
The Android stdout and stderr tests include an assertion that both streams are set to `errors="backslashreplace"`, which is the most useful setting for redirecting the streams to the Android log. However, this test only pass... | b08570c90eb9fa2e2ee4429909b14240b7a427d4 | e68d4b08ff13a06a2c2877f63bf856e6bf3c2e77 |
python/cpython | python__cpython-125941 | # Android: support 16 KB pages
# Feature or enhancement
### Proposal:
For details, see https://github.com/chaquo/chaquopy/issues/1171.
### Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
### Links to previous discussion of this featur... | e68d4b08ff13a06a2c2877f63bf856e6bf3c2e77 | fed501d7247053ce46a2ba512bf0e4bb4f483be6 |
python/cpython | python__cpython-125934 | # Add ARIA labels to improve documentation accessibility
# Documentation
According to the Lighthouse report, select elements do not have labels.

These `select` elements are rendered in the JS in `Doc/tools/static/rtd_switc... | 1306f33c84b2745aa8af5e3e8f680aa80b836c0e | 500f5338a8fe13719478589333fcd296e8e8eb02 |
python/cpython | python__cpython-125989 | # urljoin() undocumented behavior change in Python 3.14.
# Bug report
### Bug description:
Django is tested with the earliest alpha versions. We noticed a behavior change in the `urllib.parse.urljoin()` that is used in a few places in Django, e.g. for staticfiles or build-in storages.
Python 3.14.0a1:
```python
... | dbb6e22cb1f533bba00a61a5b63ec68af9d48836 | 223d3dc554dde45f185f7f465753824c6f698b9b |
python/cpython | python__cpython-125917 | # Allow `functools.reduce`s 'initial' to be a keyword argument
# Feature or enhancement
### Proposal:
`functools.reduce` takes `function` (generally a callable) and `iterable`, with an optional `initial` parameter:
https://docs.python.org/3/library/functools.html#functools.reduce
However, `initial` cannot be passe... | abb90ba46c597a1b192027e914ad312dd62d2462 | 6e3bb8a91380ba98d704f2dca8e98923c0abc8a8 |
python/cpython | python__cpython-125935 | # The JIT optimizer doesn't know about `_BINARY_OP_INPLACE_ADD_UNICODE`'s store
# Bug report
Our abstract interpreter should have a case for `_BINARY_OP_INPLACE_ADD_UNICODE`, since this "special" instruction includes a store to a fast local. This can mean that the local being stored to is left with stale information ... | b5b06349eb71b7cf9e5082e26e6fe0145875f95b | dcda92f8fcfa70ef48935db0dc468734de897d96 |
python/cpython | python__cpython-125973 | # The JIT doesn't call for `combine_symbol_mask` on the initial trampoline for a trace
# Crash report
`_PyJIT_Compile` doesn't consider [the initial (big) trampoline "group"](https://github.com/python/cpython/blob/c35b33bfb7c491dfbdd40195d70dcfc4618265db/Python/jit.c#L473-L475) when collecting the (little) trampoline... | 7f6e884f3acc860c1cf1b773c9659e8f861263e7 | 417c130ba55ca29e132808a0a500329f73b6ec41 |
python/cpython | python__cpython-125826 | # the link to "Contributing to Docs" redirects to a different URL
On the main python documentation page: https://docs.python.org/3.14/
there is a link to [Contributing to Docs](https://devguide.python.org/docquality/#helping-with-documentation) which links to "https://devguide.python.org/docquality/#helping-with-do... | 5003ad5c5ea508f0dde1b374cd8bc6a481ad5c5d | ad6110a93ffa82cae71af6c78692de065d3871b5 |
python/cpython | python__cpython-125901 | # Clean-up use of `@suppress_immortalization`
As a temporary measure, we immortalized a number of objects in the 3.13 free threading build. To work around refleak test failures, we added a `@test.support.suppress_immortalization()` decorator that suppressed the behavior.
* https://github.com/python/cpython/issues/... | 332356b880576a1a00b5dc34f03d7d3995dd4512 | 1306f33c84b2745aa8af5e3e8f680aa80b836c0e |
python/cpython | python__cpython-125907 | # Outdated PyObject_HasAttr documentation (Exception behavior)
# Documentation
In Python 3.13, `PyObject_HasAttr` doc says:
> Exceptions that occur when this calls `__getattr__()` and `__getattribute__()` methods are silently ignored.
But its exception behavior after https://github.com/python/cpython/pull/10... | 08a0728d6c32986d35edb26872b4512a71ae60f3 | 401bba6b58497ce59e7b45ad33e43ae8c67abcb9 |
python/cpython | python__cpython-125892 | # pdb fails when setting a breakpoint to function names with return-type annotations
# Bug report
### Bug description:
When having return-type annotations on a function:
```python
def foo() -> int:
return 0
```
and trying to establish a breakpoint on the name of the function:
```
(Pdb) break foo
```
PDB raises t... | 8f2c0f7a03b71485b5635cb47c000e4e8ace8800 | 13c9fa3d64e0653d696daad716703ef05fd5002b |
python/cpython | python__cpython-126319 | # wrong opname in 3.13 dis module documentation
According to python 3.13 changelog there are three new opcodes replacing FORMAT_VALUE - CONVERT_VALUE, FORMAT_SIMPLE and FORMAT_WITH_SPEC.
But in https://docs.python.org/3/library/dis.html there are mentioned CONVERT_VALUE, FORMAT_SIMPLE and FORMAT_SPEC
<!-- gh-linked... | 914356f4d485e378eb692e57d822b893acc0c0da | f0c6fccd08904787a39269367f09f263d496114c |
python/cpython | python__cpython-125876 | # Running Cython fails with 3.14.0a1 - a list attribute gets changed to `None`
# Bug report
### Bug description:
To be clear - this issue is just about running the Cython itself (i.e. pure Python code). It is not about compiled extension modules.
To reproduce
* Checkout Cython from git: `https://github.com/c... | b61fece8523d0fa6d9cc6ad3fd855a136c34f0cd | c35b33bfb7c491dfbdd40195d70dcfc4618265db |
python/cpython | python__cpython-125993 | # Improve file URI ergonomics in `urllib.request`
# Feature or enhancement
I request that we make [`pathname2url`](https://docs.python.org/3/library/urllib.request.html#urllib.request.pathname2url) and [`url2pathname`](https://docs.python.org/3/library/urllib.request.html#urllib.request.url2pathname) easier to use:... | 6742f14dfd3fa8ba8a245efa21a4f723160d93d4 | 802d405ff1233a48004a7c9b302baa76291514d1 |
python/cpython | python__cpython-125898 | # InterpreterPoolExecutor Hangs on Certain Functions
# Bug report
### Bug description:
** I first noticed this when testing the backports <https://github.com/ericsnowcurrently/interpreters/issues/17> on 3.13 on windows and WSL. Issue reproduced on 3.14.0a1+ [34653bb](https://github.com/python/cpython/commit/3465... | 41bd9d959ccdb1095b6662b903bb3cbd2a47087b | 3c4a7fa6178d852ccb73527aaa2d0a5e93022e89 |
python/cpython | python__cpython-125882 | # `gc.get_objects` can corrupt in-progress GC in free threading build
# Bug report
### Background
The free threading GC uses two queue-like data structures to keep track of objects:
* [`struct worklist`](https://github.com/python/cpython/blob/aaed91cabcedc16c089c4b1c9abb1114659a83d3/Python/gc_free_threading.c#L36-L... | e545ead66ce725aae6fb0ad5d733abe806c19750 | b61fece8523d0fa6d9cc6ad3fd855a136c34f0cd |
python/cpython | python__cpython-125844 | # Improve error messages of `curses` by indicating failed C function
# Feature or enhancement
### Proposal:
The `curses` module raises an exception `curses.error` with a message of the form "XXX() returned ERR" where XXX is generally the name of the C *or* Python function that was just called. Most of the time, XXX... | ee36db550076e5a9185444ffbc53eaf8157ef04c | c31547a5914db93b8b38c6a5261ef716255f3582 |
python/cpython | python__cpython-125896 | # SystemError: <method 'is_done' of '_thread._ThreadHandle' objects> returned a result with an exception set
# Bug report
### Bug description:
There is an unexpected SystemError which is completely outside of user code. I get it with Python 3.13.0 on Windows, but did never see it with Python 3.12.x:
```
Exce... | ad6110a93ffa82cae71af6c78692de065d3871b5 | e545ead66ce725aae6fb0ad5d733abe806c19750 |
python/cpython | python__cpython-126322 | # Outdated post PEP-709 comment in `Python/codegen.c`
# Bug report
### Bug description:
After the implementation of https://peps.python.org/pep-0709/, this comment looks wrong:
https://github.com/python/cpython/blob/57e3c59bb64fc2f8b2845a7e03ab0abb029ccd02/Python/codegen.c#L4079-L4090
### CPython versions tested on... | 868bfcc02ed42a1042851830b79c6877b7f1c7a8 | bd4be5e67de5f31e9336ba0fdcd545e88d70b954 |
python/cpython | python__cpython-125823 | # Setting `None` to `skip_file_prefixes` of `warnings.warn()` gets error
# Bug report
### Bug description:
[The doc](https://docs.python.org/3/library/warnings.html#warnings.warn) of `warnings.warn()` says `skip_file_prefixes` is `None` by default as shown below:
> warnings.warn(message, category=None, stacklevel=1... | d467d9246cbe0ce5dc149c4c74223bb8374ece73 | b3122aa6132de263f389317efe9dcf2b14c6b393 |
python/cpython | python__cpython-125812 | # Remove DeprecationWarnings in test_peg_generator
# Feature or enhancement
### Proposal:
Some DeprecationWarnings are present in ```test.test_peg_generator.test_pegen``` output:
```
-> % (make -j && ./python -m unittest -v test.test_peg_generator.test_pegen) 2>&1 | grep Deprecation
test_locations_in_alt_action_and_... | 4efe64aa56e7a9a96b94c0ae0201db8d402a5f53 | 03f9264ecef4b1df5e71586327a04ec3b9331cbe |
python/cpython | python__cpython-125881 | # Add tests to prevent regressions with the combination of `ctypes` and metaclasses.
# Feature or enhancement
### Proposal:
There were [breaking changes to `ctypes` in Python 3.13](https://docs.python.org/3.13/whatsnew/3.13.html#ctypes).
Projects like [`comtypes`](https://github.com/enthought/comtypes/) and [`pygl... | 13844094609cf8265a2eed023e33c7002f3f530d | 7f6e884f3acc860c1cf1b773c9659e8f861263e7 |
python/cpython | python__cpython-125781 | # Support pickling of super object
# Feature or enhancement
As was noted in https://github.com/python/cpython/issues/125714#issuecomment-2423259145, the `super` object is not pickleable. For example:
```py
import pickle
class X: pass
s = super(X, X())
pickle.dumps(s)
```
Produces a traceback:
```pytb
Traceback (most... | 5ca4e34bc1aab8321911aac6d5b2b9e75ff764d8 | de5a6c7c7d00ac37d66cba9849202b374e9cdfb7 |
python/cpython | python__cpython-125743 | # reword some parts of "Using Python on Unix platforms"
I suggest the following changes to "Using Python on Unix platforms" on Linux section.
https://docs.python.org/3.14/using/unix.html#on-linux
1. "You can easily compile the latest version of Python from source." -> "You can compile the latest version of Pytho... | d67bf2d89ab57f94608d7d2cf949dc4a8749485d | 5b7a872b26a9ba6c93d7c2109559a82d1c1612de |
python/cpython | python__cpython-126326 | # `warnings.simplefilter("once")` and `warnings.warn()` print all occurrences of matching warnings, regardless of location
# Bug report
### Bug description:
With [warnings.simplefilter("module")](https://docs.python.org/3/library/warnings.html#warnings.simplefilter) and [warnings.warn()](https://docs.python.org/... | 10eeec2d4ffb6b09a6d925877b6d9ef6aa6bb59d | cfb1b2f0cb999558a30e61a9e1a62fdb7f55f6a4 |
python/cpython | python__cpython-125748 | # Delay deprecated `zipimport.zipimporter.load_module` removal time to 3.15
# Feature or enhancement
### Proposal:
This method have been deprecated since Python 3.10
At https://github.com/python/cpython/blob/main/Lib/zipimport.py#L224-L225
```python
msg = ("zipimport.zipimporter.load_module() is deprecated an... | 06ac157c53046f4fcad34383ef131f773085f3d5 | a7427f2db937adb4c787754deb4c337f1894fe86 |
python/cpython | python__cpython-125744 | # Update check_generated_files CI to use our published container image
We can do this through https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/running-jobs-in-a-container, and it is less painful to make both image environments the same.
See: https://github.com/python/cpython/... | ed24702bd0f9925908ce48584c31dfad732208b2 | e924bb667a19ee1812d6c7592a37dd37346dda04 |
python/cpython | python__cpython-126176 | # Add turtle module into installion option tcl/tk
# Feature or enhancement
### Proposal:
Just as the title said, add turtle module into the option in the picture:

Because the turtle module is a tool requiring tkinter, why s... | 88dc84bcf9fef32afa9af0ab41fa467c9733483f | 29cbcbd73bbfd8c953c0b213fb33682c289934ff |
python/cpython | python__cpython-126956 | # [3.13] Crash when generator frame proxies outlive their generator
Edit (2025-06-13): this has been fixed for 3.14+, but it's still an open issue for 3.13.x
----
# Crash report
### What happened?
Checking some frame proxy behaviour at the interactive prompt, I encountered the following crash:
```
$ PYTHON_BASIC_R... | 8e20e42cc63321dacc500d7670bfc225ca04e78b | 24c84d816f2f2ecb76b80328c3f1d8c05ead0b10 |
python/cpython | python__cpython-128922 | # Use the latest Sphinx version
# Documentation
Python's documentation uses the Sphinx toolchain. Originally written for the Python documentation, it is now developed and distributed as an independent project. The two remain closely linked, e.g. when new syntax is added to the Python language. To document this synt... | d46b577ec026c2e700a9f920f81cfbf698e53eb6 | bca35f0e782848ae2acdcfbfb000cd4a2af49fbd |
python/cpython | python__cpython-125802 | # test_concurrent_futures.test_interpreter_pool failing
# Bug report
### Bug description:
I've seen 4 kinds of failure which I'm failure sure have the same cause:
* segfault during `WorkerContext.initialize()` (line 137)
* hanging
* weird test failure
* undefined behavior on USAN buildbot
The failures have happene... | 44f841f01af0fb038e142a07f15eda1ecdd5b08a | 9dde4638e44639d45bd7d72e70a8d410995a585a |
python/cpython | python__cpython-125735 | # Enum by-value lookup no longer compares hashable argument to unhashable values
# Bug report
### Bug description:
When defining enum members with hashable values (e.g. `frozenset`s), it was previously (prior to 3.13) possible to look those members up by passing in unhashable values (e.g. `set`s) that compare equal ... | aaed91cabcedc16c089c4b1c9abb1114659a83d3 | 079875e39589eb0628b5883f7ffa387e7476ec06 |
python/cpython | python__cpython-125704 | # _Py_DECREF_SPECIALIZED doesn't respect pymalloc tracking
PR https://github.com/python/cpython/pull/30872 added `_Py_DECREF_SPECIALIZED` which calls `destruct` over the object. When `destruct` is `PyObject_Free` this skips `tracemalloc` counting reporting that the memory is alive. This also makes debuggers segfault b... | f8ba9fb2ce6690d2dd05b356583e8e4790badad7 | 6d93690954daae9e9a368084765a4005f957686d |
python/cpython | python__cpython-125699 | # Configure `EXEEXT` hacks are interfering with `AX_C_FLOAT_WORDS_BIGENDIAN`
# Bug report
### Bug description:
We mess up `EXEEXT` in `configure.ac`:
https://github.com/python/cpython/blob/cda0ec8e7c4e9a010e5f73c5afaf18f86cb27b97/configure.ac#L1323-L1340
This creates problems[^1], since `AX_C_FLOAT_WORDS_BIGENDIAN... | e924bb667a19ee1812d6c7592a37dd37346dda04 | 14cafe1a108cf0be73a27a0001003b5897eec8f0 |
python/cpython | python__cpython-125687 | # Python implementation of `json.loads()` accepts non-ascii digits
# Bug report
### Bug description:
You should be careful when matching unicode regexes:
https://github.com/python/cpython/blob/a0f5c8e6272a1fd5422892d773923b138e77ae5f/Lib/json/scanner.py#L11-L13
```python
>>> import sys
>>> sys.modules["_json"] = N... | d358425e6968858e52908794d15f37e62abc74ec | a0f5c8e6272a1fd5422892d773923b138e77ae5f |
python/cpython | python__cpython-125680 | # Multiprocessing Lock and RLock - invalid representation string on MacOSX.
# Bug report
### Bug description:
Due of absence of the `sem_getvalue` C function in the MacOSX semaphore implementation, `Lock` and `RLock` representation strings are invalid in the `multiprocessing` module.
Call to `self._semlock._get_val... | 75f7cf91ec5afc6091a0fd442a1f0435c19300b2 | d46d3f2ec783004f0927c9f5e6211a570360cf3b |
python/cpython | python__cpython-125675 | # Wrong type for first parameter of `newfunc` C function type
# Documentation
The first parameter of the `newfunc` function type has type `PyTypeObject *`:
https://github.com/python/cpython/blob/a0f5c8e6272a1fd5422892d773923b138e77ae5f/Include/object.h#L354
However, in a couple of places in the documentation ... | 616468b87bc5bcf5a4db688637ef748e1243db8a | 5768fef355a55aa9c6522e5444de9346bd267972 |
python/cpython | python__cpython-125730 | # Some weird `make test` behavior
# Bug report
### Bug description:
To varying degrees, this affects the 3.12, 3.13, and main branches. Other branches are also probably affected but I haven't tested them. They aren't showstoppers, but they are annoying.
1. `make test` breaks the terminal. All input is hidden un... | 1f16df4bfe5cfbe4ac40cc9c6d15f44bcfd99a64 | 1064141967a2d22c2ae9e22ae77e8c9616559947 |
python/cpython | python__cpython-125668 | # qidarg_converter_data Values Not Properly Initialized
# Bug report
### Bug description:
In https://github.com/python/cpython/pull/124548#issuecomment-2420488611, @ZeroIntensity noted that the various locals of type `qidarg_converter_data` in _interpqueuesmodule.c are not statically initialized. Whether or not the... | 7cf2dbc3cb3ef7be65a98bbfc87246d36d795c82 | c3164ae3cf4e8f9ccc4df8ea5f5664c5927ea839 |
python/cpython | python__cpython-125732 | # PyREPL exits the interpreter on specific input
# Bug report
### Bug description:
Playing with the Python 3.13.0 interpreter installed from brew on macOS 14.7 in a Terminal window.
I entered the repl and typed
```python
>>> import math
>>> math.tau
6.283185307179586
```
Then I hit ctrl-P to get the last line and... | 44becb8cba677cbfdbcf2f7652277e5e1efc4f20 | 51b012b2a8093c92ef2c06884f9719657f9b17f7 |
python/cpython | python__cpython-125691 | # Update turtledemo docstrings with correct file names
# Bug report
### Bug description:
In #123370 , I discussed with Terry some measures to modernize the turtledemo. This requires changes to each file. **First**, I want to modify the incorrect comment file names, which is the easiest to review. There are five ... | 9c01db40aa5edbd75ce50342c08f7ed018ee7864 | 6f26d496d3c894970ee18a125e9100791ebc2b36 |
python/cpython | python__cpython-125683 | # Python implementation of `json.loads()` accepts invalid unicode escapes
# Bug report
### Bug description:
While reviewing #125652 and reading the documentation of [`int()`](https://docs.python.org/3/library/functions.html#int), I realised this condition in `json.decoder` is insufficient:
https://github.com/... | df751363e386d1f77c5ba9515a5539902457d386 | d358425e6968858e52908794d15f37e62abc74ec |
python/cpython | python__cpython-125645 | # Update location of `locations.md`
# Documentation
Commit d484383861b44b4cf76f31ad6af9a0b413334a89 moved the location of `locations.md`. The `InternalDocs/compiler.md` file should update the reference.
<!-- gh-linked-prs -->
### Linked PRs
* gh-125645
<!-- /gh-linked-prs -->
| 0d88b995a641315306d56fba7d07479b2c5f57ef | 37986e830ba25d2c382988b06bbe27410596346c |
python/cpython | python__cpython-125634 | # Add function `ispackage` to stdlib `inspect`
# Feature or enhancement
### Proposal:
Currently, the built-in module `inspect` lacks a function to determine whether an object is a package or not. This is a small but useful feature.
According to the documentation, this feature should not be difficult to implem... | dad34531298fc0ea91b9000aafdd2ea2fce5e54a | c51b56038ba344dece607eb5f035dca544187813 |
python/cpython | python__cpython-125626 | # Allow 3.13 py.exe can be use on PCBuild
# Bug report
### Bug description:
> @rem It is fine to add new versions tot
his list when they have released,
> @rem but we do not use prerelease bu
ilds here
### CPython versions tested on:
3.13, 3.14, CPython main branch
### Operating systems tested on:
Windows
<!-- g... | 0cb20f2e7e867d5c34fc17dd5b8e51e8b0020bb3 | c124577ebe915a00de4033c0f7fa7c47621d79e0 |
python/cpython | python__cpython-125621 | # test_resource_tracker_sigkill fails on NetBSD: AssertionError for warning count in test_multiprocessing_fork
# Bug report
### Bug description:
```sh
-bash-5.2$ ./python -m test test_multiprocessing_fork.test_misc -m test_resource_tracker_sigkill
```
```sh
Using random seed: 1947163462
0:00:00 load avg: 0.16 Run 1 ... | a0f5c8e6272a1fd5422892d773923b138e77ae5f | 77cebb1ce9baac9e01a45d34113c3bea74940d90 |
python/cpython | python__cpython-132818 | # [3.14] annotationlib - get_annotations returns an empty annotations dict if an `AttributeError` is raised when `__annotations__` is accessed
# Bug report
### Bug description:
If there's an annotation with an incorrect attribute access, the `AttributeError` causes `get_annotations` to return an empty dictionary for... | af5799f3056b0eee61fc09587633500a3690e67e | 3109c47be8fc00df999c5bff01229a6b93513224 |
python/cpython | python__cpython-125617 | # Grammar error in appendix: "with output nor the ..." should be "with neither output nor the..."
See: https://github.com/python/cpython/blob/760872efecb95017db8e38a8eda614bf23d2a22c/Doc/tutorial/appendix.rst?plain=1#L23
<!-- gh-linked-prs -->
### Linked PRs
* gh-125617
* gh-125619
<!-- /gh-linked-prs -->
| aab3210271136ad8e8fecd927b806602c463e1f2 | 760872efecb95017db8e38a8eda614bf23d2a22c |
python/cpython | python__cpython-125635 | # [3.14] annotationlib - `get_annotations` with `Format.FORWARDREF` returns `_Stringifier` instances instead of ForwardRef for `module.type` annotations where the module is not loaded
# Bug report
### Bug description:
Tested on 3.14.0a1 - related to implementation of PEP 649 / PEP 749 - #119180
If a type uses dott... | d3be6f945a4def7d123b2ef4d11d59abcdd3e446 | 8f2c0f7a03b71485b5635cb47c000e4e8ace8800 |
python/cpython | python__cpython-125612 | # Bad specialization of `STORE_ATTR_INSTANCE_VALUE` with `obj.__dict__`
Consider:
```python
class MyObject: pass
def func():
o = MyObject()
o.__dict__
for _ in range(100):
o.foo = "bar"
o.baz = "qux"
for _ in range(100):
func()
```
```
opcode[STORE_ATTR_INSTANCE... | a353455fca1b8f468ff3ffbb4b5e316510b4fd43 | 36c6178d372b075e9c74b786cfb5e47702976b1c |
python/cpython | python__cpython-125611 | # Python dictionary watchers no longer trigger when an object's attributes change
# Bug report
Here's an example function using [`test_capi/test_watchers.py`](https://github.com/python/cpython/blob/main/Lib/test/test_capi/test_watchers.py) that passes in 3.12, but fails in 3.13 and 3.14:
```python
def test_watch... | 5989eb74463c26780632f17f221d6bf4c9372a01 | 0cd21406bf84b3b4927a8117024232774823aee0 |
python/cpython | python__cpython-125605 | # Avoid Standalone Sub-structs In pycore_runtime.h
pycore_runtime.h is where the `_PyRuntimeState` struct is declared. Nearly every one of the structs it relies on ("sub-struct") is found in the internal header file that corresponds to that struct's subject matter, rather than in pycore_runtime.h. There are only a f... | 6d93690954daae9e9a368084765a4005f957686d | 2e950e341930ea79549137d4d3771d5edb940e65 |
python/cpython | python__cpython-125601 | # Generate less warnings for stale code
# Feature or enhancement
### Proposal:
We added a feature in pdb to give a warning when the source code is changed during debugging, which was a nice feature. However, there are certain scenarios where we don't need to give this warning (like if the user restart the program im... | 77cebb1ce9baac9e01a45d34113c3bea74940d90 | 7cf2dbc3cb3ef7be65a98bbfc87246d36d795c82 |
python/cpython | python__cpython-125681 | # colors are missing on (Base)ExceptionGroup tracebacks in the pyrepl
### Bug description:
```python
import sys
class InvalidFruitException(Exception):
pass
def eat_fruit(fruit):
if fruit == "banana":
raise InvalidFruitException("no herbs please, only fruit")
if fruit == "rock":
... | 51b012b2a8093c92ef2c06884f9719657f9b17f7 | f6cc7c8bd01d8468af70a65e550abef3854d0754 |
python/cpython | python__cpython-125616 | # it's no longer possible to delete items from f_locals (FrameLocalsProxy) in 3.13+
# Bug report
### Bug description:
```python
try:
driver.switch_to.alert.accept()
driver.switch_to.alert.dismiss()
except:
pass
```
In the example scrip... | 5b7a872b26a9ba6c93d7c2109559a82d1c1612de | 3d1df3d84e5c75a52b6f1379cd7f2809fc50befa |
python/cpython | python__cpython-125589 | # The python PEG parser generator doesn't allow f-strings anymore in actions
After the changes in 3.12 to the f-string formalisation, the PEG parser doesn't recognise the new tokens.
<!-- gh-linked-prs -->
### Linked PRs
* gh-125589
* gh-127969
<!-- /gh-linked-prs -->
| 9dfef4e5f4ac3c1ce494c48f2476a694c12d72a5 | 0e45b1fd0ffbb165f580ecdfd5234c1d54389501 |
python/cpython | python__cpython-125586 | # `test.test_urllib2.HandlerTests.test_ftp_error` fails without network access (running `-u-network`)
# Bug report
### Bug description:
The newly added `test_ftp_error` (in 77133f570dcad599e5b1199c39e999bfac959ae2, FWICS) is failing in environments without Internet access, even though it is not marked as needing the... | e4d90be84536746a966478acc4c0cf43a201f492 | feda9aa73ab95d17a291db22c416146f8e70edeb |
python/cpython | python__cpython-125564 | # Consider pinning runner image instead of using `ubuntu-latest` in JIT CI
It looks like GitHub updated the default/latest Ubuntu runner to use Ubuntu 24.04 from 22.04, which is leading to [failed CI runs](https://github.com/python/cpython/actions/runs/11357684569/job/31591164216?pr=125499). We should consider pinnin... | c84a136511c673f495f466887716b55c13b7e3ac | 51ef54abc42e020d7e80549d49ca32310495b4eb |
python/cpython | python__cpython-126010 | # untokenize() does not round-trip for code containing line breaks (`\` + `\n`)
# Bug report
### Bug description:
Code which contains line breaks is not round-trip invariant:
```python
import tokenize, io
source_code = r"""
1 + \
2
"""
tokens = list(tokenize.generate_tokens(io.StringIO(source_code).readline))
... | 7ad793e5dbdf07e51a71b70d20f3e6e3ab60244d | a4760ef8e5463116b3076e0f5e3c38b314f7b20f |
python/cpython | python__cpython-125551 | # Allow py.exe to detect 3.14 installs
Update the list of known package names to include 3.14 packages.
This should be backported to all branches.
<!-- gh-linked-prs -->
### Linked PRs
* gh-125551
* gh-125622
* gh-125623
<!-- /gh-linked-prs -->
| 8e7b2a1161744c7d3d90966a65ed6ae1019a65cb | aecbc2e6f40f8066f478c2d0f3be5b550e36cfd3 |
python/cpython | python__cpython-125563 | # Deprecate `prefix_chars` in `argument_group`
Now, after `conflict_handler` and `argument_default` have been documented, we can deprecate `prefix_chars`. @savannahostrowski, are you interesting? We should just add a runtime warning in the `_ArgumentGroup` constructor, test, and documentation (the `deprecated` instruc... | 7b04496e5c7ed47e9653f4591674fc9ffef34587 | 624be8699aec22bef137041478078c6fafaf032e |
python/cpython | python__cpython-125546 | # Make `ctrl-c` interrupt `threading.Lock.acquire()` on Windows
# Feature or enhancement
Since Python 3.2, pressing `ctrl-c` (`SIGINT`) interrupts `threading.Lock.acquire()` on POSIX platforms, including Linux and macOS. However, this does not work on Windows.
Now that `threading.Lock` and `threading.RLock` use `Py... | d8c864816121547338efa43c56e3f75ead98a924 | b454662921fd3a1fc27169e91aca03aadea08817 |
python/cpython | python__cpython-125523 | # avoid bare except: in stdlib
Bare excepts are best avoided, this issue is to reduce their use in the stdlib. It is not the intention to blindly replace them by `except BaseException:`, or to religiously purge all of them, but just to review them and avoid where it's feasible to do so.
(see also https://github.c... | e97910cdb76c1f1dadfc4721b828611e4f4b6449 | c9826c11db25e81b1a90c837f84074879f1b1126 |
python/cpython | python__cpython-125700 | # Strange warning and failure of JIT workflow on `aarch64-unknown-linux-gnu/gcc (Debug)`
# Bug report
Link: https://github.com/python/cpython/actions/runs/11333284963/job/31517441366#step:8:9113
Report:
```
Python/generated_cases.c.h: In function ‘_PyEval_EvalFrameDefault’:
Python/generated_cases.c.h:4738:46: warn... | 57e3c59bb64fc2f8b2845a7e03ab0abb029ccd02 | c1bdbe84c8ab29b68bb109328e02af9464f104b3 |
python/cpython | python__cpython-125520 | # Messy traceback if `importlib.reload()` is called with a `str`
# Bug report
### Bug description:
If you call `importlib.reload()` with a `str`, there's a huge amount of unnecessary detail in the traceback that makes it look like there's an internal error in the function itself:
```pytb
>>> import importlib
>>> im... | c5c21fee7ae1ea689a351caa454c98e716a6e537 | 9256be7ff0ab035cfd262127d893c9bc88b3c84c |
python/cpython | python__cpython-125518 | # Unused code warning in `_testembed.c`
# Bug report
Link: https://github.com/python/cpython/actions/runs/11333284963/job/31517440086#step:6:1315
Report:
```
./Programs/_testembed.c:1904:5: warning: code will never be executed [-Wunreachable-code]
const char *err_msg;
^~~~~~~~~~~~~~~~~~~~
sed -e "s,/usr/bin... | c8a1818fb01937b66b93728c11d68c9f9af688a5 | cc5a225cdc2a5d4e035dd08d59cef39182c10a6c |
python/cpython | python__cpython-125697 | # Multiple unused code warnings in `Python/generated_cases.c.h`
# Bug report
Link: https://github.com/python/cpython/actions/runs/11333284963/job/31517440086#step:6:1025
Report:
```
In file included from Python/ceval.c:870:
Python/generated_cases.c.h:5062:13: warning: code will never be executed [-Wunreachable-cod... | 25441592db179e9f5e6c896d1a691459a23e3422 | 19e93e2e269889ecb3c4c039091abff489f247c2 |
python/cpython | python__cpython-125516 | # test_traceback's PurePythonExceptionFormattingMixin does not fail correctly
```
class PurePythonExceptionFormattingMixin:
def get_exception(self, callable, slice_start=0, slice_end=-1):
try:
callable()
self.fail("No exception thrown.")
except:
return... | 55c4f4c30b49734ce35dc88139b8b4fdc94c66fd | c8a1818fb01937b66b93728c11d68c9f9af688a5 |
python/cpython | python__cpython-125513 | # ``test_capi`` leaks references
# Bug report
### Bug description:
```python
admin@Admins-MacBook-Air ~/p/cpython (main)> ./python.exe -m test -R 3:3 test_capi
Using random seed: 2315181180
0:00:00 load avg: 88.93 Run 1 test sequentially in a single process
0:00:00 load avg: 88.93 [1/1] test_capi
beginning 6 repetit... | d3c82b9ccedd77fc302f5ab8ab0220b3372f574c | 55c4f4c30b49734ce35dc88139b8b4fdc94c66fd |
python/cpython | python__cpython-125499 | # Replace ghccc with `preserve_none` in JIT builds
Now that we are going to be updating the JIT to use LLVM 19 (see #124093), we can use the `preserve_none` attribute which exposes ghccc to the compiler instead of [manually patching in the calling convention](https://github.com/python/cpython/blob/8d42e2d915c3096e7eac... | c29bbe21018dc1602ea70f34621de67cce782ed2 | 597d814334742dde386a4d2979b9418aee6fcaba |
python/cpython | python__cpython-125476 | # CI is failing on current main: test_asyncio.test_taskgroups
# Bug report
### Bug description:
Example of failing CI:
* https://github.com/python/cpython/actions/runs/11331846505/job/31512771372?pr=125471
* https://github.com/python/cpython/actions/runs/11331026920/job/31510134859?pr=125469
* https://github.com/pyt... | 0b28ea4a35dc7c68c97127f7aad8f0175d77c520 | 1bffd7a2a738506a4ad50c6c3c2c32926cce6d14 |
python/cpython | python__cpython-125471 | # New warning: unused variable `left_o`[-Wunused-variable] in `Python/generated_cases.c.h:186`
# Bug report
See output in https://github.com/python/cpython/pull/125455
<img width="992" alt="Снимок экрана 2024-10-14 в 19 37 26" src="https://github.com/user-attachments/assets/de742b55-c06f-418a-8ebf-deea82f6123e">
<!... | 0c8c665581ede95fe119f902b070e395614b78ed | 843d28f59d2616d052d9d45f31823976da07f0f3 |
python/cpython | python__cpython-125462 | # Remove reference to python 2 in section 2 of language ref
# Documentation
The description of identifier names is based on how those names were handled in Python 2.0. The description should instead be only for Python 3.
<!-- gh-linked-prs -->
### Linked PRs
* gh-125462
* gh-125464
* gh-125465
<!-- /gh-linked-prs ... | 5dac0dceda9097d46a0b5a6ad7c927e002c6c7a5 | d5dbbf4372cd3dbf3eead1cc70ddc4261c061fd9 |
python/cpython | python__cpython-125492 | # test_concurrent_futures.test_shutdown.test_processes_terminate() hangs randomly when run multiple times
Example on Fedora 40:
```
$ ./python -m test test_concurrent_futures.test_shutdown -m test_processes_terminate -v -R 3:3 --timeout=15
(...)
OK
.test_processes_terminate (test.test_concurrent_futures.test_sh... | 760872efecb95017db8e38a8eda614bf23d2a22c | d83fcf8371f2f33c7797bc8f5423a8bca8c46e5c |
python/cpython | python__cpython-125574 | # Python 3.13 can't compile with armv5 target
# Bug report
### Bug description:
If we build cpython 3.13 for Linux/ARMv5 using `-march=armv5te` and then run inside a qemu with the `versatilepb` machine (which uses a ARM926EJ-S processor) then python crashes with "Illegal Instruction". Specifically, `mrc` is used in... | feda9aa73ab95d17a291db22c416146f8e70edeb | 51410d8bdcfe0fd215f94a098dc6cd0919c648a1 |
python/cpython | python__cpython-125437 | # Doc for ConfigParser misses `allow_unnamed_section=False` param
Currently
[doc for configparser.ConfigParser](https://docs.python.org/release/3.13.0/library/configparser.html#configparser.ConfigParser)
misses `allow_unnamed_section=False` param, which is added in https://github.com/python/cpython/pull/117273
, so I'm wondering if this is a bug.
... | 703227dd021491ceb9343f69fa48f4b6a05adbb3 | d3c82b9ccedd77fc302f5ab8ab0220b3372f574c |
python/cpython | python__cpython-125443 | # memoryview is a Sequence but does not implement the full Sequence API
# Bug report
### Bug description:
The `memoryview` builtin is registered as a `Sequence`, but doesn't implement the full API, because it doesn't inherit from `Sequence` at runtime and doesn't implement the mixin methods.
```python
>>> im... | 4331832db02ff4a7598dcdd99cae31087173dce0 | 050d59bd1765de417bf4ec8b5c3cbdac65695f5e |
python/cpython | python__cpython-125404 | # incorrect formatting in chapter "12. Virtual Environments and Packages" of the tutorial
# Documentation
Chapter 12. Virtual Environments and Packages of the tutorial formats console commands as "bash" code, which results in some strange formatting.
https://docs.python.org/3.14/tutorial/venv.html
for example:... | 6c386b703d19aaec9a34fd1e843a4d0a144ad14b | cd0f9d111a040ad863c680e9f464419640c8c3fd |
python/cpython | python__cpython-125399 | # The virtualenv activate script does not correctly detect the Windows Git Bash shell
# Bug report
### Bug description:
When using the virtualenv activate script in Git Bash for Windows, the environment is not correctly detected and paths are not converted.
This results in `$PATH` being set to something like ... | 2a378dba987e125521b678364f0cd44b92dd5d52 | 4b421e8aca7f2dccc5ac8604b78589941dd7974c |
python/cpython | python__cpython-125386 | # 4.8. Defining Functions example is slightly misleading
https://docs.python.org/3/tutorial/controlflow.html#defining-functions
This is the example:
```
def fib(n): # write Fibonacci series up to n
"""Print a Fibonacci series up to n."""
a, b = 0, 1
while a < n:
print(a, end=' ')
... | 283ea5f3b2b6a18605b8598a979afe263b0f21ce | ce740d46246b28bb675ba9d62214b59be9b8411e |
python/cpython | python__cpython-125717 | # Whitespace-only lines in PDB cause a line continuation when taken from history
# Bug report
### Bug description:
The issue happens *only* when pulling a line from history.
Typing 4 spaces or a Tab and hitting Enter when at the PDB prompt is interpreted the same as hitting Enter without entering whitespace.
Howeve... | 8f5e39d5c885318e3128a3e84464c098b5f79a79 | 4c53b2577531c77193430cdcd66ad6385fcda81f |
python/cpython | python__cpython-130471 | # Use 4 spaces for indentation in PDB
# Feature or enhancement
### Proposal:
It looks like PDB evolved the ability to handle multi-line Python expressions in Python 3.13. I didn't see this mentioned in [the release notes](https://docs.python.org/3/whatsnew/3.13.html#pdb), but I'm excited to see this feature. Tha... | b6769e9404646e38d9c786984ef308c8e9747b91 | c989e74446836ce8a00ae002d4c229c81e1f7905 |
python/cpython | python__cpython-125356 | # Rewrite parse_intermixed_args() in argparse
`parse_intermixed_args()` and `parse_known_intermixed_args()` are implemented by parsing command lines twice -- first only optional arguments, then the remaining is parsed as positional arguments. This approach has some issues.
* The parser is temporary modified to supp... | 759a54d28ffe7eac8c23917f5d3dfad8309856be | 57e3c59bb64fc2f8b2845a7e03ab0abb029ccd02 |
python/cpython | python__cpython-125482 | # `from __future__ import barry_as_FLUFL` doesn't work
# Bug report
### Bug description:
```
% ./python.exe -c 'from __future__ import barry_as_FLUFL; print(1 <> 2)'
File "<string>", line 1
from __future__ import barry_as_FLUFL; print(1 <> 2)
^^
SyntaxError: i... | 3bd3e09588bfde7edba78c55794a0e28e2d21ea5 | 05e89c34bd8389f87bd6c9462d5a06ef9e1a65ab |
python/cpython | python__cpython-125324 | # Unsafe DECREFs of borrowed references in the interpreter.
# Bug report
### Bug description:
It is unsafe to borrow a `PyObject *` reference from a `_PyStackRef` and `Py_DECREF` the `PyObject *` reference and not close the `_PyStackRef`. This is quite a common pattern in bytecodes.c, and prevents any optimizations ... | 4b358ee647809019813f106eb901f466a3846d98 | b52c7306ea4470f9d7548655c2a1b89a07ff5504 |
python/cpython | python__cpython-126141 | # The platform module can cause crashes in Windows due to slow WMI calls
# Crash report
### What happened?
When running on a virtual machine where WMI calls seems to have very variable performance the WMI C module can cause Python to crash.
If you have (or can simulate slow WMI calls) then simple python code ... | 60c415bd531392a239c23c754154a7944695ac99 | c29bbe21018dc1602ea70f34621de67cce782ed2 |
python/cpython | python__cpython-125317 | # Deprecation of `Py_GetPrefix`-family APIs should document the `sys.base_*` counterparts
# Documentation
Documentation suggests `sys.prefix` as an alternative to `Py_GetPrefix` in the deprecation note [here](https://docs.python.org/3/c-api/init.html#c.Py_GetPrefix)
> Deprecated since version 3.13, will be remov... | 7d88140d5299bd086434840db66ede8ccd01a688 | ded105a62b9d78717f8dc64652e3903190b585dd |
python/cpython | python__cpython-125749 | # Behaviour of os.kill() on Windows may be misunderstood
The [latest os.kill() document](https://docs.python.org/3/library/os.html#os.kill) says “The Windows version of kill() additionally takes **process handles** to be killed,” but the `kill()` function actually does not accept process handles instead of process IDs... | 75ffac296ef24758b7e5bd9316f32a8170ade37f | 6ec886531f14bdf90bc0c3718ac2ae8e3f8823b8 |
python/cpython | python__cpython-125297 | # Argparse docs have a strange fragment identifier for `name or flags`
# Bug report
### Bug description:
Clicking on the "name or flags" parameter under the `add_argument `method docs links to [#id5](https://docs.python.org/3/library/argparse.html#id5) instead of #name-or-flags. The jump target isn't broken, but... | c1913effeed4e4da4d5310a40ab518945001ffba | 2f8301cbfbdd2976d254a4a772b4879069dd4298 |
python/cpython | python__cpython-125292 | # Possible mis-leading sample code in Doc/library/asyncio-task.rst
In the [Coroutines and Tasks](https://docs.python.org/3.13/library/asyncio-task.html), there is a possible semantic bug in one of sample codes.
In the [Awaitables](https://docs.python.org/3.13/library/asyncio-task.html#awaitables) subsection, the sa... | fa52b82c91a8e1a0971bd5fef656473ec93f41e3 | 4a2282b0679bbf7b7fbd36aae1b1565145238961 |
python/cpython | python__cpython-125368 | # Increase minimum supported Sphinx to 7.2.6
# Documentation
Python 3.13 has been released, so I looked to review the minimum Sphinx version.
Using the same survey as https://github.com/python/cpython/issues/109209#issuecomment-1713859051 and #117928:
Distro | CPython| Sphinx
-- ... | 2bb7ab7ad364ec804eab8ed6867df01ece887240 | 322f14eeff9e3b5853eaac3233f7580ca0214cf8 |
python/cpython | python__cpython-125416 | # cross-compile error: undefined reference to `__atomic_load_8'
# Bug report
### Bug description:
Should not configure script check if `-latomic` is needed?
getting build error when cross-compile:
```
arm-linux-gnueabi-gcc -L/opt/zlib-arm-linux-gnueabi/lib -L/opt/xz-arm-linux-gnueabi/lib -L/opt/readline-arm-linux-g... | 8d42e2d915c3096e7eac1c649751d1da567bb7c3 | 0b28ea4a35dc7c68c97127f7aad8f0175d77c520 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.