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-132389
# Increase test coverage for HMAC # Feature or enhancement ### Proposal: After implementing HACL* HMAC in #99108, I've observed that I didn't test all code paths and that some tests I assumed were a bit incorrect (some redundancy was done). This is an issue to track all improvements done to HMAC tests (I'm planning ...
a1cd4ca7f46eafe61dc7f26692896a4a95c7e947
084d6dc122c761b90cba620eac2f25dc1660b7f1
python/cpython
python__cpython-132412
# Segfault or failed assertion (`obj != NULL`) in `PyStackRef_FromPyObjectSteal` # Crash report ### What happened? It's possible to segfault or abort the interpreter with the following code: ```python class WeirdDict(dict): pass ns = {} exec("def __create_fn__():\n return a", WeirdDict({None: None}), ns) ns['__cre...
e6ef47ac229b5c4a62b9c907e4232e350db77ce3
deda47d6e18d61e982045b795e3599838823db6a
python/cpython
python__cpython-132387
# Instance attr error suggestions can execute `__getattr__` # Bug report ```python >>> class A: ... def __getattr__(self, key): ... if key == 'foo': raise SystemExit('bye') ... def bar(self): ... foo ... >>> A().bar() bye # interperter exits :( ``` Originally found by @millerdev ...
641253cfac789e57c2b0c16047bdbf355535f60f
20f8ed595d176d951a09eba045cd69ca62981b18
python/cpython
python__cpython-132357
# test_pathlib - test_group_no_follow_symlinks resolves group name from uid rather than gid # Bug report ### Bug description: In Fedora 43 `test_group_no_follow_symlinks` started failing with a peculiar failure for Python 3.14 and Python 3.13: ```pytb ================================================================...
3e1a47bdb468d02665c137d84dd44500a557b58b
f23052591a60f588c432795f1ac687e709d97386
python/cpython
python__cpython-132374
# AsyncIO-Docs: Task.cancel return value not documented # Documentation The documentation of [`asyncio.Task.cancel`](https://docs.python.org/3/library/asyncio-task.html#asyncio.Task.cancel) does not mention that there is a return value of True/False. The return value functions like the one of [`asyncio.Future.cancel`...
64b066ad298506f715647c9a2524c9fbbc764cc2
f69b344e0944bd8d59d2dc4d98e988cc4dbfadf3
python/cpython
python__cpython-132352
# Reference counting related regression in Python 3.14a7? # Bug report ### Bug description: Dear Python team, I am the lead of the [nanobind](https://github.com/wjakob/nanobind) project, which is a C++<->Python binding tool. I always try to follow recent Python versions to react to any API/ABI changes and catch iss...
3dbe02ccd3eefc48ac9fa14427bb4cdb82d1ebae
9e5cebd56d06e35faeca166813215d72f2f8906a
python/cpython
python__cpython-132332
# `typestruct.h` is outdated compared to implementation # Documentation `Doc/includes/typestruct.h` contains a copy of `_typeobject` from `Include/cpython/object.h`, but it is currently outdated. <!-- gh-linked-prs --> ### Linked PRs * gh-132332 <!-- /gh-linked-prs -->
e329f74e7d24be6ae1782b5ab90e20723aa47bcd
d687900f98114bb5910daad9553ae381d7daf94b
python/cpython
python__cpython-132348
# Test failures when hypothesis is available but cannot reach GitHub # Bug report ### Bug description: Hi, we recently started seeing several tests (namely `test_binascii`, `test_math_property`, `test_tools` and `test_zoneinfo`) to fail due to hypothesis warnings (which were recently turned into errors with https://...
fcf2d07228ada64bc864380cd8e3e304d9768caa
65357032e80f8750dd102c82a8adc54de067fc38
python/cpython
python__cpython-132363
# `TracebackException` swallows attributes of falsey Exception and falsey ExceptionGroup. # Bug report ### Bug description: # Description ``` import traceback as tb class FalseyLenException(Exception): def __len__(self): return 0 class FalseyBoolException(Exception): def __bool__(self): re...
69cda31261dd98b0462dc5ca63bdbcd0954dfa77
427e7fc099e61d9a3d1f04e2fbde8b749e5fcf0a
python/cpython
python__cpython-132324
# Inconsistent code found by static analyzers at base_events.py Greetings! I've been analyzing Cpython with Svace static analyzer. It has found a code inconsitency issue at the `asyncio` library in the following method: https://github.com/python/cpython/blob/7ebbd271444d89218870169624921b795a717470/Lib/asyncio/base_e...
a214db0c5406254d293f33622ce2cbd8233b52a5
1557da622c89985d14b781bef91e9aaa6e1f88c4
python/cpython
python__cpython-132306
# Argument Clinic code is incompatible with older Python Until recently I used Python 3.11 to regenerate Argument Clinic code. But `make clinic` stopped to work because Python code for some Argument Clinic converted uses syntax incompatible with 3.11. We should be conservative with Python code that is used to build P...
487cf3c1702836dfce0025208b989853681d2cd9
4a919dd6eef1e5dbaddfd749f385f49cedc076a9
python/cpython
python__cpython-132286
# `__annotate__` corner case when deleting `__annotations__` Consider this example: ```python >>> class A: ... def __annotate__(format): ... print(f'{format=}') ... return {'a': int} ... >>> A.__annotations__ format=1 {'a': <class 'int'>} >>> A.__annotations__ {'a': <class 'int'>} ...
254110356d17204d2aebb9e74b6074cc6ef6382e
1f5682f3a27516833f7c317707dd359280dba6e7
python/cpython
python__cpython-132329
# Py_TYPE(lhs)->tp_as_mapping->mp_subscript is not the same as Dict_Type.tp_as_mapping->mp_subscript when it should be A dict subclass which does not override `__getitem__` (like `collections.Counter`) should have `Dict_Type.tp_as_mapping->mp_subscript` as its `Py_TYPE(lhs)->tp_as_mapping->mp_subscript`, but they are...
a23ed8b3793aa684e312711cfda9c9fd76168399
5707837049e8eade92e29f20f055112821b75cd0
python/cpython
python__cpython-132345
# [3.14] annotationlib - calling `get_annotations` on instances gets an unexpected error # Bug report ### Bug description: In 3.13, `inspect.get_annotations` would fail if called on instances and give you a `TypeError` explaining as much. In 3.14 if you call `annotationlib.get_annotations(inst, format=Format.STRING...
07b8d3117fdbc4e5be55aab0be428c278ec84e12
e5f68fd29b3bd867207f23608a8dbc5759a056ed
python/cpython
python__cpython-132258
# Our GCC LTO flags can be improved # Feature or enhancement ### Proposal: @thesamesam pointed out to me that our GCC LTO configuration builds serially and as a single translation unit IIUC. This is the slowest configuration possible. On GCC 15, the LTO build takes 10m14.972s, in my first PR, it takes 2m28.287s. Thi...
bc0b94b30c9d65ba550daee2c2ef20035defd980
07b8d3117fdbc4e5be55aab0be428c278ec84e12
python/cpython
python__cpython-132251
# `_ccall_callback` method of `_lsprof.Profiler` causes Fatal Python error # Crash report ### What happened? When a `_lsprof.Profiler` is enabled and a `TypeError` is raised from mismatching descriptor and target, a Fatal Python error happens due to `_ccall_callback ` returning a result with an exception set: ```py...
ab64130b572424695bf072f7608a536997dce14f
efd8aca62c214dde6115822a659403fb05340680
python/cpython
python__cpython-132247
# Add PEP 688 special buffer methods to C API Type Object and Buffer Protocol docs # Documentation Two special methods, `__buffer__` and `__release_buffer__` were added to Python 3.12 by PEP-688. The C API Type Object documentation for slots includes `tp_as_buffer`, and sub-slots `bf_getbuffer`, `bf_releasebuffer` bu...
b529b60fc239d19245e5fafd0514d90097c2eb40
d862b6de1bcff01229318d7138ddaab755723a43
python/cpython
python__cpython-132222
# `dataclasses` docs do not mention that `kw_only` fields are ignored from `__match_args__` # Bug report # Documentation Docs right now: https://docs.python.org/3.14/library/dataclasses.html#dataclasses.dataclass ``` match_args: If true (the default is True), the [__match_args__](https://docs.python.org/3.14/refere...
8b62374b344f5da852bed9f16619736d4d43936b
e80ed2cf75384bab09e70f0f04d17e92183fdf12
python/cpython
python__cpython-132215
# Data race between set_richcompare and frozenset_hash under free-threading # Bug report ### Bug description: We have the following TSAN report from coming JAX CI: ``` ================== WARNING: ThreadSanitizer: data race (pid=40645) Read of size 8 at 0x7fffb6bdc1a0 by thread T6 (mutexes: read M0): #0 set_...
ed99e28d5b5613f7c13691fd854195719d7bff1f
fd1b98dd1df14c8e4138d779166635c98926197b
python/cpython
python__cpython-132212
# Abort when using a tuple subclass instance as the `bases` parameter for `type` # Crash report ### What happened? The interpreter will abort when a new type is created using an instance of a subclass of `tuple` as the `bases` parameter due to a `PyTuple_CheckExact(bases)` assertion: ```python class weird_tuple(tupl...
b6c552f9e614bab4acf21584baed997f57e74114
e10fe81cc6ae0979938eb3925139d56a74c620e3
python/cpython
python__cpython-132175
# Incorrect function name in error message of `_interpreters.run_string` While working on https://github.com/python/cpython/pull/132173 I've noticed that this error message mentions the wrong function: ```python >>> import _interpreters >>> _interpreters.create() 1 >>> _interpreters.run_string(1, '') Traceback (most ...
f2daa96c81a45b26bdcf3d5c3887cec02137974e
af8d1b95377917036aaedf18b9cc047d8877259c
python/cpython
python__cpython-132173
# Assertion failure calling `_interpreters.run_string` with a string subclass instance # Crash report ### What happened? It's possible to make the interpreter abort by calling `_interpreters.run_string` with an instance of a subclass of `str` as the `script` argument: ```python import _interpreters class weird_str...
398071871066548954f4c51e8250d13b7c9659e0
895d983b5c9716aaaab34d14d278084b9b6730d8
python/cpython
python__cpython-132169
# Add `__class_getitem__` support to `ctypes.py_object` # Feature or enhancement ### Proposal: [`ctypes.py_object`](https://docs.python.org/3/library/ctypes.html#ctypes.py_object) is [generic in typeshed](https://github.com/python/typeshed/blob/1c17cd429c2f91b0066547deb99c537af3e54d39/stdlib/ctypes/__init__.pyi#L253...
e2476398ee9911b6b0b80e3ca182647805fde81f
0788948dcb980c7648b29ca363390b696d7f188f
python/cpython
python__cpython-132164
# Tests for Py_Universalnewlinefgets Cover by tests Py_Universalnewlinefgets as mentioned at [TODO](https://github.com/python/cpython/blob/c0661df42ad20e488dbfa3e0fec22462833fc3d6/Lib/test/test_capi/test_file.py#L297) <!-- gh-linked-prs --> ### Linked PRs * gh-132164 <!-- /gh-linked-prs -->
d7365e60500bea91383010a4bf9e26ff3acdfaa1
06a26fda607fb1a5e108cf82a0458c8ebf97f5d2
python/cpython
python__cpython-132160
# Do not shadow user arguments in generated `__new__` by `@warnings.deprecated` # Bug report ### Bug description: Follow comment https://github.com/python/cpython/pull/132055#discussion_r2029062118 ```python from warnings import deprecated @deprecated("MyMeta will go away soon") class MyMeta(type): def __new_...
7bb1e1a23634bae81bf76fdb34e9f9f7e59b3793
c0661df42ad20e488dbfa3e0fec22462833fc3d6
python/cpython
python__cpython-132248
# `test.test_sys.TestRemoteExec` fails with `AssertionError` # Bug report ### Bug description: The test case `test_sys` failed when I ran `rt.bat test_sys`. The unittest report is as follow ```cmd FAIL: test_remote_exec_raises_audit_event (test.test_sys.TestRemoteExec.test_remote_exec_raises_audit_event) Test remot...
d6078ed6d0cb8745460769bbb5dd2392c91c2f55
e294e161a86b325e634b001e1edafdb1cb7d40c4
python/cpython
python__cpython-132146
# `typing.Union` does not support attribute assignment post gh-105511 # Bug report ### Bug description: Before #105511, `typing.Union` is implemented in Python, and custom attributes can be assigned to a `Union` variable. - #105511 ```python ta = Union[int, str] ta.__some_attribute__ = (int, str) ``` However, aft...
dbfc6a417a5db237ff16a8a75f09c1bd5d5bd349
0dba59e6899cd0b1717e3c1dc6110b18c91b0f8f
python/cpython
python__cpython-132135
# Add .cache directory to .gitignore # Bug report ### Bug description: For now, there are many people use vscode + clangd to developer cpython. But the clangd will generate a `.cache` directory under the base directory and the behavior could not be customized. So I think maybe we can add the `.cache` to the `.giti...
86804003ed70acbf8a2531c6784895d750c50456
85bc489b649fe261f9625163c684a69a470b3dc1
python/cpython
python__cpython-134085
# Ensure that `multiprocessing.util.get_temp_dir()` can be used to create socket files with limited path length # Bug report ### Bug description: I must admit that this issue only happens in very specific conditions, namely when using the multiprocessing lib on a system where the temp folder is set to a long path by...
1a07a01014bde23acd2684916ef38dc0cd73c2de
e1f891414b2329414a6160ed246f5f869a218bfd
python/cpython
python__cpython-132122
# pygettext: Always escape non-printable characters regardless of the `--escape` option # Feature or enhancement ### Proposal: For context: https://github.com/python/cpython/pull/131902#discussion_r2022611826 > [...] but I think that non-printable characters should always be escaped. The POT file should be human re...
a693eaa7104f3d2e42a3a1e0347775a3d2757b05
7bb1e1a23634bae81bf76fdb34e9f9f7e59b3793
python/cpython
python__cpython-132446
# dataclasses.InitVar undocumented # Documentation dataclasses.InitVar is mentioned in https://docs.python.org/3.14/library/dataclasses.html#init-only-variables but not itself documented or linkable to <!-- gh-linked-prs --> ### Linked PRs * gh-132446 * gh-132483 <!-- /gh-linked-prs -->
281fc338fdf57ef119e213bf1b2c772261c359c1
1d97488c957f4595f8c3ea42e24c1995b23e39d4
python/cpython
python__cpython-132107
# Allow logging.handlers.QueueListener to be used as a context manager # Feature or enhancement ### Proposal: This is a simple change that would allow: ```python with QueueListener(queue, handler1) as listener: # the listener has started ... # the listener has stopped ```...
517e96b9ed9f2b808ce499d01f6b5db5635218e3
ad3bbe8fbcc9045c436b0c5e49b1aec018c59c2d
python/cpython
python__cpython-132118
# Inconsistency in handling Bluetooth addresses # Bug report 1. The format accepted by BTPROTO_HCI protocol is incorrectly documented. * it accepts a bytes object `bdaddr`, not a tuple. * `bdaddr` is a bytes object, not a string. 2. Some protocols accept `bdaddr` as a string, others accept it as a bytes object....
1d97488c957f4595f8c3ea42e24c1995b23e39d4
c7f6535e4a3b447fbd67bf98eea82fd243e780be
python/cpython
python__cpython-131605
# UBSan: runtime undefined behaviours when using `-fsanitize=undefined -fno-sanitize-recover` # Bug report ### Bug description: We finally managed to fix gh-111178, but this is assuming that Python is compiled with `-fsanitize=function`. When compiling Python as follows (with clang 18.1.8): ```sh ./configure \ -q ...
50e518e886e6dde5542a2372d5b04acbdda4fc7d
ea23c897cd25702e72a04e06664f6864f07a7c5d
python/cpython
python__cpython-132076
# Possible use of unitialized socked address # Bug report New Bluetooth tests added in #132023 fail on Fedora based platforms. It looks that the `hci_channel` member of the `sockaddr_hci` structure is not initialized. This may be a cause of the failure. On NetBSD and DragonFly `sockaddr_hci` is an alias of `sockaddr...
345baa77ba2ce3b8ea8f2fad84754e5cc0b10938
255eb375a7cc3cb16698bebf42689e8bc783ed93
python/cpython
python__cpython-132195
# `singledispatch.register` fails for `lru_cache` decorated functions # Bug report Function decorated with both `@singledispatch.register` and `@lru_chache` fails with a cryptic error message. EDIT: In python 3.14a6. It works in python 3.9~3.13. ### Bug description: ```python import sys from functools import lru_c...
4d3ad0467e5cb145b1f4bde4be5eb776946a4269
a1cd4ca7f46eafe61dc7f26692896a4a95c7e947
python/cpython
python__cpython-132129
# ProcessPoolExecutor swallows falsy Exceptions # Bug report ### Bug description: ```python import sys import concurrent.futures class MyException(Exception): def __bool__(self): return False def raiser(): raise MyException("foo") def main(): with concurrent.futures.ProcessPoolExecutor() as ...
933c6653cba235b3af2250bb19713694b560c367
c5e856a5dc8eed4813ecb8fbf4120411af9a6130
python/cpython
python__cpython-132056
# Add `application/yaml` to `mimetypes` ### 1. Summary It would be nice if Python will associate popular configuration extensions `.yaml` and `.yml` with the `application/yaml` media type. ### 2. Behavior #### 2.1. Current ```python >>> import mimetypes >>> mimetypes.guess_file_type("KiraGoddess.yaml") (None, None...
132b6bc98f47a4d897dead8635b5a50a0baee485
fee808936fd04e850a62c9610498bbb2360efd31
python/cpython
python__cpython-132039
# test_perf_profiler test failure if installed perf version string contains commit hash # Bug report ### Bug description: In some installations, the installed `perf` version string may contain a commit hash, for example: ```sh >perf --version perf version 6.12.9.g242e6068fd5c ``` this causes the `test_perf_profile...
b6c92ec419cfa1e4483b072996bab403c9970a5d
5518c2ae09cd8f135981f362dabd000d44d26cac
python/cpython
python__cpython-132027
# _MIPS_SIM comparison may contain undefined identifiers for _ABI # Bug report ### Bug description: ```c #include <Python.h> ``` When built on a MIPS architecture, `_MIPS_SIM` is used to determine [architecture specifics](https://wiki.debian.org/ArchitectureSpecificsMemo#Summary). The value is expected to match eit...
6985e2e6dea67630cf13fc02b7ca727af383207b
20be6ba61ac8a0a5d6242701c4186579cfa653f0
python/cpython
python__cpython-132048
# Inconsistency in json.JSONEncoder Description Regarding skipkeys Behavior > If skipkeys is false (the default), a [TypeError](https://docs.python.org/3.13/library/exceptions.html#TypeError) will be raised when trying to encode keys that are not [str](https://docs.python.org/3.13/library/stdtypes.html#str), [int](htt...
403886c28ddb350bbcaea478f8d754ed14e10337
f7305a06c7a322d23b39ad9d16af814d467624c6
python/cpython
python__cpython-132918
# Error traceback when interrupting+terminating python # Bug report ### Bug description: How to reproduce: - start python3 - interrupt with ^Z - resume with `fg` - immediately press ^D (EOF) ```python $ python3 >>> ^Z Stopped $ fg ^D Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_mo...
e4561da886717ddd01ab0970452a14a1531e874d
d48616e08cbf069847026a2ee35017ad5cbe12a8
python/cpython
python__cpython-132014
# TSAN race in frozenset_hash # Bug report ### Bug description: Frozenset's hash has code to cache the hash computation that is not thread-safe under free-threading: https://github.com/python/cpython/blob/b0f77c4d250789fd1deaab4912919e2e6b89e583/Objects/setobject.c#L796 TSAN report from JAX test suite under Python ...
76f6b5e64a8b6ea5a88606f3665cd9f52c2c2798
b0f77c4d250789fd1deaab4912919e2e6b89e583
python/cpython
python__cpython-132018
# Failed assertion in `_PyEval_EvalFrameDefault`: `self_o != NULL` # Crash report ### What happened? It's possible to make the interpreter exit with a failed assertion by running the following code: ```python import difflib obj = difflib.HtmlDiff(None, None, None, None,) try: for x in range(3): obj._s...
c0661df42ad20e488dbfa3e0fec22462833fc3d6
42e3a8410b7dbc960b3b7c335f2bbb516c8caf6e
python/cpython
python__cpython-132003
# Segfault deallocating a `ContextVar` built with `str` subclass # Crash report ### What happened? Creating a `ContextVar` with an instance of a subclass of `str` leads to a segfault during its deallocation: ```python from _contextvars import ContextVar class weird_str(str): def __eq__(self, other): pa...
ab2a3dda1d3b6668162a847bf5b6aca2855a3416
87d9983994e9a423e9e0050b1bbee52ebaf84367
python/cpython
python__cpython-132000
# The interpreter crashes when specializing bound method calls on unbound objects # Crash report ### What happened? The following code segfaults the interpreter: ```python import glob for x in range(3): str_globber = glob._StringGlobber(None, None) str_globber.selector(set()) try: str_globber.selector([Tr...
ac3c439cdfee8452f2bcceacd67a1f4e423ac3cf
3eda1460359c7e6af4c5b125a63388635a3ed477
python/cpython
python__cpython-131991
# Compilation on Windows fails with assert in generated_cases.c.h # Bug report ### Bug description: Command line: `.\PCBuild\build.bat -p x64 -d -r` ``` python.c python.vcxproj -> D:\Sources\_pythonish\cpython\PCbuild\amd64\python_d.exe Assertion failed: WITHIN_STACK_BOUNDS(), file D:\Sources\_pythonish\cpyth...
cd69d55f64087f74da816eaf20c34ddeabfdb2bb
c2ac662f284b7c3f0701173f2467bf1e18aad2e2
python/cpython
python__cpython-131975
# `ctypes.Pointer.get_contents` doesn't hold the object's lock for long enough # Bug report ### Bug description: As @kumaraditya303 [mentioned](https://github.com/python/cpython/pull/128490/files#r2022613718), `ctypes.Pointer.get_contents` has a thread safety bug that I missed when I originally fixed it. https://git...
6e91d1f9aafc6e375092b8c14f6e30ebc74e4004
25275bda790e8a689092e83855d6d0574f26061b
python/cpython
python__cpython-132126
# Color in json.tool CLI # Feature or enhancement ### Proposal: apologies if this is not the right place to ask for enhancement requests. since python3.13 added support for colorization in repl, i was wondering if some basic colorization could be added for the python's cli json tool? jq[0] does this, the keys are b...
71da68d5887b6c05890757d676b452ede3120617
e7c5f60efc149dda3d3592fa2001f4583b128512
python/cpython
python__cpython-131944
# Use the Python-specific `Py_DEBUG` macro rather than `_DEBUG` in Windows-related C code Follow the discussion at https://github.com/python/cpython/pull/131799#discussion_r2021223342. Currently, the Windows-related C code is mixed using the Python-specific `Py_DEBUG` macro and non-Python-specific `_DEBUG` macro. Th...
f0f93ba5fa53ef5724250dd9f791d89abca04fa7
e15bbfafbcc9153fa0b05beb806984e288fdefe4
python/cpython
python__cpython-131972
# Update `Element.remove` exception message when an element is not found ### Proposal: In `xml.etree.ElementTree.Element.remove`, the exception message is `"list.remove(x): x not in list"`. It was suggested to change it to `"Element.remove(x): x not in list"` (https://github.com/python/cpython/pull/126124#discussion_...
04bc681e7cf5b7effd99e676b7deceb27fb34434
df59226997e067adcfa1bc8d045b7cc1de08906c
python/cpython
python__cpython-131941
# 3.14 regression: `Union[int, str] is Union[int, str]` does not hold # Bug report ### Bug description: ### Python 3.13.2 ```pycon >>> from typing import Union >>> Union[int, str] is Union[int, str] True ``` ### Python 3.14.0a6 ```pycon >>> from typing import Union >>> Union[int, str] is Union[int, str] False ```...
7473c600a5890ffd87e8761c418bf3312ce7f38c
ac3a7bfeccb752a59d88861e45b454db360aa69d
python/cpython
python__cpython-131993
# Compilation emits multiple warnings in the finally block # Bug report This code produces two `SyntaxWarning`s in the new REPL: ```python >>> def some(): ... try: ... return 1 ... finally: ... return 2 ... <python-input-14>:5: SyntaxWarning: 'return' in a 'finally' block <python-inp...
3d08c8ad20dfabd4864be139cd9c2eb5602ccdfe
d4e2cdc15bdfe84486b885eca885c44bc378fc41
python/cpython
python__cpython-132453
# Add `multiprocessing.Process.interrupt` # Feature or enhancement ### Proposal: We have `.terminate()` and `.kill()` but not `.interrupt()` for terminating `multiprocessing.Process`. I believe the latter could be a useful addition when we have a python subprocess that we want to terminate in a "normal" way: i.e. tr...
77605fa3bb4e380d5448665f70d73c8d3fcc2e75
862fd890361005598a6f4614ea0608c8447831c2
python/cpython
python__cpython-132030
# Move description of grouping options in format specification docs The form of format specifier is the following ``` [[fill]align][sign]["z"]["#"]["0"][width][grouping_option]["." precision][type] ``` Docs describe each option in the following order: 1. `align` and `fill`. 2. `sign`. 3. Option `z`. 4. Option `#`. 5....
06a110f5227ba9d52f6205fde55924a14cab36ff
ac14d4a23f58c1f3e1909753aa17c1c302ea771d
python/cpython
python__cpython-132022
# CPython fails to compile when the internal `Py_STACKREF_DEBUG` macro is defined # Bug report ### Bug description: When the `Py_STACKREF_DEBUG` macro is defined here: https://github.com/python/cpython/blob/c432d0147bdf1a66604e7a3d6a71660ae79b5f45/Include/internal/pycore_structs.h#L57-L58 CPython fails to compile:...
275056a7fdcbe36aaac494b4183ae59943a338eb
b3e3cc054c2c7718c0ad7c4690f76716649a2588
python/cpython
python__cpython-131903
# Tail-calling interpreter `configure` failures on x86_64/aarch64 apple-darwin/clang # Bug report ### Bug description: The configure step fails. I've rerun it once but it still failed. - https://github.com/python/cpython/actions/runs/14138795354/job/39616444240#step:6:232 - https://github.com/python/cpython/actions...
39fa19a4ccb4c75d2421187e5b8d83c73b48ca4d
2c3e3fe54ce9aaa57b1e870c450d4cad4db4b208
python/cpython
python__cpython-131889
# intermittent ResourceWarning in test_ftplib Hi! The buildbot **PPC64LE Fedora Stable LTO 3.13** (tier-2) has failed when building commit 07d4c7e7dbdb4e676acab386d1a5bf8e4ac16898. You can take a look at the buildbot page here: https://buildbot.python.org/#/builders/1492/builds/501 Summary of the results of the ...
b0f77c4d250789fd1deaab4912919e2e6b89e583
ab2a3dda1d3b6668162a847bf5b6aca2855a3416
python/cpython
python__cpython-132200
# `json.dump()` with `indent` and `skipkeys` can be formatted incorrectly # Bug report ### Bug description: ```python >>> import json >>> print(json.dumps({b"": 0}, indent=4, skipkeys=True)) { } ``` Related: #123183 ### CPython versions tested on: 3.13 ### Operating systems tested on: Windows <!-- gh-link...
ec12559ebafca01ded22c9013de64abe535c838d
485b499610eefe362faf171f258b3a3588378ff1
python/cpython
python__cpython-131901
# New REPL on Windows exits when accented character is pasted/typed # Crash report ### What happened? When pasting an accented character like ñ or é, or typing one such as ´p and pressing Enter, then up arrow, the new REPL on Windows will exit with the following error: ```python Python 3.14.0a6+ (heads/fix_non_stri...
0c5151bc81ec8e8588bef4389df12a9ab50e9fa0
d6078ed6d0cb8745460769bbb5dd2392c91c2f55
python/cpython
python__cpython-131866
# Systemtap on linux does not properly apply hardening CFLAGS when compiling using --with-dtrace # Bug report ### Bug description: When compiling using --with-dtrace, Linux uses the systemtap script which utilizes a common default CFLAGS set to provide the object file. When extra hardening flags are passed during th...
0cd4befb02df07c0b320cd6246227c13e57b2efb
51e0f2b06c042b8742145ce094323a34b61f02aa
python/cpython
python__cpython-131854
# `msgfmt.py`: Test validity of generated file # Feature or enhancement ### Proposal: Test the header of the binary .mo file is generated correctly and is as expected for example the start of a `msgfmt.py` generated file: ``` de12 0495 0000 0000 0900 0000 1c00 0000 6400 0000 0000 0000 0000 0000 0000 0000 ``` de12 0...
fccf9ab33d0b16e6171c533d139b6118503197c1
be2d2181e62cd138b0cdf80ebc0dd4058187c52a
python/cpython
python__cpython-131880
# `msgfmt.py`: Handling of header inconsistent with GNU `msgfmt` # Bug report ### Bug description: Running our current tests with a GNU generated `general.mo` we have a failure: <details> ```python SubTest failure: Traceback (most recent call last): File "/home/stan/PycharmProjects/cpython/Lib/unittest/case.py",...
ad6a032cebf59d1668caa7e726aa5da72e1cbb5c
376631829aab72e320e19102fc55cbca5af8c733
python/cpython
python__cpython-131833
# Implement PEP 758 – Allow except and except* expressions without parentheses See PEP-758 <!-- gh-linked-prs --> ### Linked PRs * gh-131833 <!-- /gh-linked-prs -->
c2ac662f284b7c3f0701173f2467bf1e18aad2e2
053c285f6b41f92fbdd1d4ff0c959cceefacd7cd
python/cpython
python__cpython-136270
# Fix sqlite timezone-naive adapter recipe # Documentation This recipe for an adapter does not work as advertised: ``` def adapt_datetime_iso(val): """Adapt datetime.datetime to timezone-naive ISO 8601 date.""" return val.isoformat() ``` from: https://github.com/erlend-aasland/cpython/blob/a3711d15...
6a6cd3c07c0300c8799878a48d555470be2a52f7
3c43df4dbdb0a41b8e5503b7fa4741a29b6007e0
python/cpython
python__cpython-131819
# `python -I`'s help message missing imply `-P` # Feature or enhancement ### Proposal: According to the [doc](https://docs.python.org/3/using/cmdline.html#cmdoption-I), > -I Run Python in isolated mode. This also implies [-E](https://docs.python.org/3/using/cmdline.html#cmdoption-E), [-P](https://docs.python.org/3/...
8bd88e2827b2a887c2ea8e5ed0c0575704bfacdf
af2afd7c224389856e118d3f544c9621a016599f
python/cpython
python__cpython-132192
# Please upgrade bundled Expat to 2.7.1 # Bug report ### Bug description: Hi! 👋 Please upgrade bundled Expat to 2.7.1 (e.g. for the fix to what can be argued a [regression](https://github.com/libexpat/libexpat/issues/980) that came with the fix for CVE-2024-8176 in Expat 2.7.0). * GitHub release: https://github.c...
c0de6500249469e6fc5b458d6afb6bad1b6755cd
f0dcb29d3affbbe1ec25b922235f0556bd695067
python/cpython
python__cpython-131808
# ResourceWarning in test.test_ucn.UnicodeNamesTest.test_named_sequences_full (when http request 404s) # Bug report ### Bug description: ``` $ PYTHONTRACEMALLOC=25 ./python -Walways -m unittest test.test_ucn -vvv test_aliases (test.test_ucn.UnicodeNamesTest.test_aliases) ... ok test_aliases_names_in_pua_range (test....
adb67ed7e465410829ac0b1f903ec5678e0e51cc
27d1443897daff65e8a42269b591097f29d310c6
python/cpython
python__cpython-131859
# `signal.set_wakeup_fd` does not work unless you register a no-op signal handler for the relevant signal # Bug report ### Bug description: Consider this program that uses `signal.signal.set_wakeup_fd`: `demo.py`: ```python import os import signal import struct pipe_r, pipe_w = os.pipe() os.set_blocking(pipe_w, ...
939476bbbb57ec3348c60df7c8f67c92038c8c89
8768df2fe94a8444baff47a5b8c7414a2118731a
python/cpython
python__cpython-131783
# Cast error with _Py_TryIncrefCompareStackRef and -Wc++11-narrowing # Bug report ### Bug description: The current `main` branch fails to build if the `-Wc++11-narrowing` option is used: ``` internal/pycore_stackref.h:649:39: error: non-constant-expression cannot be narrowed from type 'intptr_t' (aka 'long') to 'uin...
c824d8e6f96a2c36c9f955f3be6138caaae35bfa
151d1bfd1bb7ca9a36bb0f2bd6df53d64a1ba2f2
python/cpython
python__cpython-131844
# Parser stack overflow on WASI with `--with-pydebug` # Bug report ### Bug description: ```pytb $ python Tools/wasm/wasi.py configure-build-python -- --with-pydebug ... $ python Tools/wasm/wasi.py make-build-python ... $ python Tools/wasm/wasi.py configure-host -- --with-pydebug ... $ python Tools/wasm/wasi.py make-...
6ab4acecf91413fccd39f78ff14775d83498dab5
0dbaeb94a8b39972ebda7782b50bb49488951e3c
python/cpython
python__cpython-131765
# Unnecessary NULL check for `code->_co_monitoring` in `remove_tools` If [monitoring](https://github.com/python/cpython/blob/ac12de2e6a6f5c1da83de0412bb7d03c28fdab63/Python/instrumentation.c#L837) variable is equal to NULL then we'll get segmentation fault in [line 843](https://github.com/python/cpython/blob/ac12de2e...
151d1bfd1bb7ca9a36bb0f2bd6df53d64a1ba2f2
52b5eb95b770fa00ebbd449ba40cab4a0e7c7df7
python/cpython
python__cpython-131764
# Dereferencing the pointer 'parser_token->metadata' with a NULL value After having been assigned to a NULL value https://github.com/python/cpython/blob/ac12de2e6a6f5c1da83de0412bb7d03c28fdab63/Parser/pegen.c#L194 pointer 'parser_token->metadata' is passed as 3rd parameter in call to function 'Py_DECREF': https://git...
2c686a9ac243800b630d4a09622c8eb789f5b354
67fbfb42bd5dfe861d0c58d9e6c48d8eef033d24
python/cpython
python__cpython-131758
# functools.lru_cache prevents function being cached from executing concurrently under free-threading # Feature or enhancement ### Proposal: `functools.lru_cache` was made free-thread safe but is not so in an efficient way. It works currently by serializing the function being cached and preventing it from executing ...
4c12a2db15639fe1b28f1f0f807a18fb7b71d851
45c447bf91ffabe4c0ba6d18f37d4e58925d5c91
python/cpython
python__cpython-131742
# "What's new" notes for 3.12 don't mention `platform` changes regarding Windows 11 detection # Documentation Python 3.12 updated `platform` to the (at the time) latest state, which added platform string changes to support Windows 11. We have code that was written prior to 3.12's release that worked around `platform`...
b9ca438daab6a4e2513ab38171e94c75da03d6e3
2d83891dfd51f595de68b0336b3bfc876f7b2507
python/cpython
python__cpython-131744
# PyUnstable_GC_VisitObjects should traverse the permanent generation as well # Bug report ### Bug description: This function is meant to walk the heap and visit all GCable objects. It currently ignores the permanent / frozen generation, which is a problem when calling code expects to get all extant objects. As a ...
7bb41aef4b7b8f3c3f07c11b801c5b7f8afaac7f
a26a301f8b09c1825b288fc8649f8174576361f4
python/cpython
python__cpython-131737
# optimize any/all/tuple calls with a generator expression arg See discussion in https://github.com/faster-cpython/ideas/issues/545. <!-- gh-linked-prs --> ### Linked PRs * gh-131737 <!-- /gh-linked-prs -->
2c8f329dc634290fb88636f85c05e473bc0104d5
674dbf3b3a72bd3d17298c2ead79f32edcff774a
python/cpython
python__cpython-131739
# Only do seclevel workaround if seclevel greater than 1 # Feature or enhancement ### Proposal: We propose checking libssl's current security level before performing [our ubuntu workaround](https://github.com/python/cpython/blob/main/Lib/test/test_ssl.py#L153) in `test_ssl.py`, and skipping the workaround if it's un...
3b3720f1a26ab34377542b48eb6a6565f78ff892
23a658b9af410b72beeb28ba4ace2d83896c5631
python/cpython
python__cpython-131732
# Generated interpreter does not spill the correct value of the stack pointer for output arrays. # Bug report ### Bug description: The generated C code for `UNPACK_SEQUENCE_TUPLE` saves the stack pointer before increasing it to account for the output array. This could result in some of the items being prematurely de...
1b8bb1ed0c4243796af531a35de982bc4f028215
b9ca438daab6a4e2513ab38171e94c75da03d6e3
python/cpython
python__cpython-136814
# http.client._MAXHEADERS = 100 limit no longer sufficient # Bug report ### Bug description: This hard-coded sanity check for HTTP response headers is no longer sufficient to fetch a Microsoft 365 page. https://github.com/python/cpython/blob/0a91456ad14bb598646f50bf8f034e8887c0c468/Lib/http/client.py#L112 I do h...
958657bbc3351c66dd8e319503675521bfdea49a
18a7f5dad832488e8965fe29159a62abc18368e2
python/cpython
python__cpython-131720
# _PyMem_FreeDelayed() missing a NULL pointer check # Bug report ### Bug description: Normally this is not a problem but if `_PyMem_FreeDelayed(NULL)` is called an (quite!) improbably high number of times in a single thread it can lead to memory exhaustion because the NULL is added to a queue. Fix is just to add a N...
0a91456ad14bb598646f50bf8f034e8887c0c468
44605aa93d31d6dff64dab96126942f94cf1dfe9
python/cpython
python__cpython-131759
# `_suggestions` module missing on Windows, untested # Bug report ### Bug description: The `_suggestions` module isn't available in Windows builds because it's missing from `PC/config.c`. Since it's not tested and only imported in `traceback.py` in a `try:` block guarding against `ImportError`, it's easy to not dete...
9ef9d687ff7cfc4bbf422ba61db04207b7f343d2
d836d287a7bd1392f6d011888a7469854b0f4325
python/cpython
python__cpython-131713
# Using a null pointer in set_tp_mro https://github.com/python/cpython/blob/6fb5f7f4d9d22c49f5c29d2ffcbcc32b6cd7d06a/Objects/typeobject.c#L1673 In the **mro_hierarchy** function the **old_mro** variable can get a null value from the **mro_internal** call. [There is a check for NULL](https://github.com/python/cpython/...
44605aa93d31d6dff64dab96126942f94cf1dfe9
f1967e72498209e42f7cf5eeff0cd84d1ec10d18
python/cpython
python__cpython-131708
# RuntimeWarning in test_coroutines.CoroutineTest.test_await_17 # Bug report ### Bug description: ``` test_await_17 (test.test_coroutines.CoroutineTest.test_await_17) ... Warning -- Unraisable exception Exception ignored while finalizing coroutine <coroutine object CoroutineTest.test_await_17.<locals>.A.__anext__ at...
6fb5f7f4d9d22c49f5c29d2ffcbcc32b6cd7d06a
7d9442f0d55a7169940b9371d6e58a7c2ec1fa8a
python/cpython
python__cpython-131730
# clang-cl on Windows incorrectly compiles SEH (structured exception handling) # Bug report ### Bug description: clang-cl incorrectly handles SEH exception handling: https://github.com/llvm/llvm-project/issues/62606 E.g. in https://github.com/python/cpython/blob/7c3692fe275088e986f92cec34dcccb823b31fa2/Modules/mmapm...
488174dc68f90217fd43aa95d87441cc6bad6a29
90b82f2b61219c8f94e2deddc989a4c4fe9ea7c7
python/cpython
python__cpython-131690
# Windows tail-call CI does not run the test cases Excerpts from here https://github.com/python/cpython/pull/131526#issuecomment-2745152513: See e.g. https://github.com/python/cpython/actions/runs/14006628024/job/39221297660 and https://github.com/python/cpython/actions/runs/13954576580/job/39062383429#step:4:326. A...
ce77da5871334bffea722984cb705fd20a763a1f
adb67ed7e465410829ac0b1f903ec5678e0e51cc
python/cpython
python__cpython-131679
# Flaky test `test_lru_cache_threaded3` # Bug report Seen locally. The `with self.subTest():` is not safe to call from multiple threads concurrently because `subTest` modifies `self._subtest`, so you might end up with the wrong or `None` subtest in the call to `testPartExecutor`. https://github.com/python/cpython/bl...
a1232459860235f4fb7896cc95966d87a51cbe32
7c3692fe275088e986f92cec34dcccb823b31fa2
python/cpython
python__cpython-131784
# build: big endian ARM builds fail with mimalloc enabled # Bug report ### Bug description: Preface: I'm aware that big-endian ARM is not listed in PEP 11 where it's assumed that binaries are little endian by default. I wrote an upstream issue to track this as well: https://github.com/microsoft/mimalloc/issues/1046...
03f6c8e239723637811fd8d278661f5292351197
0cd4befb02df07c0b320cd6246227c13e57b2efb
python/cpython
python__cpython-131682
# `anext(A(), default)` crashes when `StopAsyncIteration` is raised by a synchronous `__anext__` # Crash report ### What happened? ```py Python 3.14.0a6+ (heads/main:0e53038ea82, Mar 24 2025, 14:56:34) [GCC 7.5.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> class A: ... de...
929afd1d6ee4fb89ac818037effe6577947103de
5fef4ff9ed47e82bce0696672eb2e4bd8953bb1e
python/cpython
python__cpython-131671
# `anextawaitable_close()` should be a `METH_NOARGS` not `METH_VARARGS` # Bug report ### Bug description: See https://github.com/python/cpython/pull/131609#discussion_r2009832215. We can backport it because a TypeError is already raised (it's not raised by `anext_awaitable.close`, but rather by `coroutine_wrapper`)...
1393bd35485d9a8aa99ceb7389fece91bb3fdefa
c3b8d73208a25735b6355de73297a51e9c1306b3
python/cpython
python__cpython-131653
# Remove duplicated bits in `Lib/test/clinic.test.c` # Feature or enhancement ### Proposal: We have some duplicated bits in `Lib/test/clinic.test.c`. This file should only consist of clinic directives and no actual code as it's never compiled (it will never compile as we never implement the functions). We have some ...
9888f175de5a942c76aec7fb11fae7ede367997b
ecd03739f87889bb2f173e0a476d26b468c776c9
python/cpython
python__cpython-131650
# SyntaxWarning in test_string_literals # Bug report ### Bug description: ``` ./python -m unittest test.test_string_literals -vvv /home/graingert/projects/cpython/Lib/test/test_string_literals.py:180: SyntaxWarning: "\ " is an invalid escape sequence. Such sequences will not work in the future. Did you mean "\\ "? A...
2d83891dfd51f595de68b0336b3bfc876f7b2507
5abff6960b4aecb0d5c81c7482cf3faa74e1983d
python/cpython
python__cpython-131648
# ImportWarning in test_importlib ... test_permission_error_cwd # Bug report ### Bug description: ``` test_permission_error_cwd (test.test_importlib.import_.test_path.Source_FindModuleTests.test_permission_error_cwd) ... /home/graingert/projects/cpython/Lib/importlib/_bootstrap_external.py:1227: ImportWarning: sys.p...
8ada7a9e1435302ec2cb73375122072d0e1cdd6f
ea0453ee979174d6fc14aae0fd85e4ede6742a86
python/cpython
python__cpython-131646
# ResourceWarning(s) from test_asyncio.test_events.TestPyGetEventLoop.test_get_event_loop_new_process # Bug report ### Bug description: ``` PYTHONTRACEMALLOC=25 ./python -m unittest test.test_asyncio.test_events -vvv test_not_implemented (test.test_asyncio.test_events.AbstractEventLoopTests.test_not_implemented) ......
71ce4acb25eb640a4582904172d2bb9600983f4c
01ea4c77e51d6a36000da7da7bfb48c58591b225
python/cpython
python__cpython-131625
# posix_spawn and posix_spawnp tests failing on NetBSD with stack limit assertions # Bug report ### Bug description: Multiple tests in `test_posix` for `posix_spawn` and `posix_spawnp` functionality are failing on NetBSD with stack limit-related assertions in the spawned processes. All failing tests show child proce...
c7f6535e4a3b447fbd67bf98eea82fd243e780be
00cf5eacc52d4790c23a24c835fb6b048cb27d8c
python/cpython
python__cpython-131588
# Use stackrefs in `_PyType_LookupRef` and related functions # Feature or enhancement The [`object_lookup_special`](https://github.com/python/cpython/blob/56d0f9af147b2280ea0af7af5e57df1a01271991/Tools/ftscalingbench/ftscalingbench.py#L61-L66) microbenchmark in [`Tools/ftscalingbench/ftscalingbench.py`](https://githu...
67fbfb42bd5dfe861d0c58d9e6c48d8eef033d24
3d4ac1a2c2b610f35a9e164878d67185e4a3546f
python/cpython
python__cpython-131567
# `tracemalloc.start()` and `tracemalloc.stop()` race condition This occurs in both the GIL-enabled build and the free threaded build. It only happens in release builds, because `test_tracemalloc.test_tracemalloc_track_race` is skipped in debug builds. Tracemalloc modifies the global "raw" memory allocator. The modif...
18249d938335312d618a3962ec7590bea709d58e
996246994341c91308364f3ed018cf9b7fec9bc8
python/cpython
python__cpython-132015
# `PyType_AddWatcher` and friends are not thread safe in free-threading `PyType_AddWatcher` and `PyType_ClearWatcher` are not thread safe as it modifies the interp's type watchers non-atomically. `PyType_AddWatcher`: https://github.com/python/cpython/blob/d3f6063af18a008e316e4342492e877ee51463e2/Objects/typeobject.c...
25275bda790e8a689092e83855d6d0574f26061b
e8085319eb20aca7c0f8507aece505461db4f578
python/cpython
python__cpython-131551
# html.parser produces different output than documented When parsing &gt;&#62;&#x3E; using html.parser, the actual output differs from the expected behavior as documented. Run the following code: ```python from html.parser import HTMLParser from html.entities import name2codepoint class MyHTMLParser(HTMLParser): ...
ee76e36d76a0e6916c0afc41228b043ab5174685
77b14a6d58e527f915966446eb0866652a46feb5
python/cpython
python__cpython-131532
# Android cibuildwheel support # Feature or enhancement ### Proposal: This issue will link together a number of PRs required to support running cibuildwheel for Android. Specifically, we need the following features: * Produce a release package containing a pre-compiled Python for Android. * Enable the testbed app t...
fe5c4c53e7bc6d780686013eaab17de2237b2176
45a3ab5a81769eadd94da3e26eb9bb2f3ae80fb1