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-137655
# flow-graph fails to re-initialize removed instructions to 0 resulting in re-used exception handler # Bug report ### Bug description: ```python # pyre-ignore-all-errors def foo(): try: [x for x in abc] except OSError: pass return import dis dis.dis(foo) ``` When this code gets compiled...
b78e9c05b627f2b205fa43f31d4d3d14ad3eb13b
089a324a4258fd5783b7e65acc29231d1042646e
python/cpython
python__cpython-137669
# ord() for bytes and bytearray is not documented `ord()` is only documented for one-character strings, but it works also for `bytes` and `bytearray` objects of length 1. <!-- gh-linked-prs --> ### Linked PRs * gh-137669 * gh-137703 * gh-137704 <!-- /gh-linked-prs -->
35759fe2faf1443455dfcb15ef7c435e34b492c7
639df39bf0b7e1172ebc4df84c1ae097ea7c0c22
python/cpython
python__cpython-137588
# Regression in ssl module between 3.13.5 and 3.13.6: reading from a TLS-encrypted connection blocks # Bug report ### Bug description: The script below works with 3.13.5 and fails with 3.13.6. It's a straightforward socket server and client with TLS enabled. Under 3.13.5, it runs successfully. Under 3.13.6, when th...
55788a90967e82a9ea05b45c06a293b46ec53d72
046a4e39b3f8ac5cb13ea292418c9c3767b0074d
python/cpython
python__cpython-137515
# Use a common interface for FT-only mutexes Throughout the codebase, there are two common patterns for using a mutex only on the free-threaded build: 1. ```c #ifdef Py_GIL_DISABLED PyMutex_Lock(/* ... */); #endif /* ... */ #ifdef Py_GIL_DISABLED PyMutex_Unlock(/* ... */); #endif ``` 2. ```c #ifdef Py_GIL_DISABLED...
082f370cdd0ec1484b033c70ec81b4b7a972ee2c
dec624e0afe6d22d38409d2e7dd9636ea0170378
python/cpython
python__cpython-137500
# Dead link in the time library page # Documentation https://docs.python.org/3/library/time.html#time.CLOCK_TAI The description of `time.CLOCK_TAI` includes a link to a "page not found" at NIST The current link https://www.nist.gov/pml/time-and-frequency-division/nist-time-frequently-asked-questions-faq#tai Leads to a...
3c1471d971ea2759d9de76e22230cd71cf4b7a07
3000594e929aea768fe0dd2437e0722ecfa2dbdc
python/cpython
python__cpython-137467
# Remove deprecated and undocumented `glob.glob0` and `glob.glob1` functions # Feature or enhancement These were deprecated in #117337 <!-- gh-linked-prs --> ### Linked PRs * gh-137467 <!-- /gh-linked-prs -->
f0a3c6ebc9bee22ddb318db1143317dc2cf06de1
481d5b54556e97fed4cf1f48a2ccbc7b4f7aaa42
python/cpython
python__cpython-137567
# `importlib.abc.SourceLoader` issues `DeprecationWarning` because it inherits from `ResourceLoader` # Bug report ### Bug description: Problem --- - `importlib.abc.SourceLoader` itself does not seem to be deprecated as far as the docs go, either in 3.14 or 3.15. - However, since it inherits from the deprecated `impo...
7140b99b0d0952167f7fdd747e6c28a8c8a2d768
0c83daaf458389517989bc28625e8ba8cf24e651
python/cpython
python__cpython-137413
# `test_hashlib` has incorrect `default_builtin_hashes` values # Bug report ### Bug description: In `test_hashlib`, we have ```py default_builtin_hashes = {'md5', 'sha1', 'sha256', 'sha512', 'sha3', 'blake2'} ``` which is a relicate when we had 2 distinct modules for SHA-2 and one for SHA-3 only. Now we have 'sha2...
deb385a14337bc3e38442b4cee3aac4a57364adc
375f484f976a1ed84c145a6ce4e467cd5b57db75
python/cpython
python__cpython-137398
# test_os_open in SocketEINTRTest hangs indefinitely on NetBSD # Bug report ### Bug description: The `SocketEINTRTest.test_os_open` test in `test_eintr` hangs indefinitely on NetBSD 10.0(x86_64). This appears to be a NetBSD-specific issue with FIFO operations under frequent signal interruption, similar to the issue ...
7f416c867445dd94d11ee9df5f1a2d9d6eb8d883
0af7556b94eac47041957f36e98e230650b56bbf
python/cpython
python__cpython-137342
# Duplicated words again # Bug report ### Bug description: ```python # Add a code block here, if required ``` In the documentation, under [BaseHandler.http_error_default()](https://docs.python.org/3/library/urllib.request.html#urllib.request.BaseHandler.http_error_default), it said 'as as'. [BaseHandler Objects](htt...
1612dcbafe763014deefd679fe75ac5831a14a43
0153d82a5ab0c6ac16c046bdd4438ea11b58d59d
python/cpython
python__cpython-137328
# Raw f-string format spec undocumented behavior change between 3.11 and 3.12 # Bug report ### Bug description: I found this while working on https://github.com/astral-sh/ruff/pull/19546 . Between 3.11 and 3.12, the behavior of raw f-string format specifiers changed. On 3.11 and earlier, the rawness of the f-strin...
0153d82a5ab0c6ac16c046bdd4438ea11b58d59d
676748d4da3671205f537ecd61a492861e37b77b
python/cpython
python__cpython-137318
# `compile` fails on 3.14 on a valid expression when `-OO` is set # Bug report ### Bug description: Given the following code snippet: ```python import ast source = b'class A:\n """\n """\n' compile(ast.parse(source), "a", "exec") ``` `python3.13 -OO test.py` passes, but `python3.14 -OO test.py` fails, with:...
b74f3bed51378896f2c7c720e505e87373e68c79
fe0e921817a7f96c62c91085884ab910859328ce
python/cpython
python__cpython-137292
# Support perf profiler with an evaluation hook # Feature or enhancement ### Proposal: Currently the perf profiler doesn't support running with an evaluation hook in place. But this is easy to do - it just needs to capture the previous one and forward to it. ### Has this already been discussed elsewhere? No respo...
375f484f976a1ed84c145a6ce4e467cd5b57db75
e3ad9003c5af314ae82d4e9f40d9c0375a34149f
python/cpython
python__cpython-137310
# Python implicit boolean conversion in logical operations bypasses try/except on 3.14.0rc1 # Bug report ### Bug description: Throwing an exception during an implicit cast to a boolean as part of a logical operation (`or`, `and`) bypasses surrounding try/except statements. The following example works on Python 3.1...
1f2026b8a239b3169c0cad0157eb08358152b4c1
525784aa65d35a5609aba53c873a9a3a578f992b
python/cpython
python__cpython-137214
# Tab completion / dir broken on concurrent.futures # Bug report ### Bug description: I just noticed that in 3.14rc1, tab completion is broken on `concurrent.futures`. Trying `dir`, I got: ``` >>> import concurrent.futures >>> dir(concurrent.futures) Traceback (most recent call last): File "<python-input-2>", lin...
2a87af062b79d914ce0120f1f1763213c1ebe8c4
d18f73ae1349ed005fa05ea2d852e1ab51dbc087
python/cpython
python__cpython-137277
# Micro-ops that have side-exits are sometimes marked as "escaping", when they should not be. We tag micro-ops as "escaping", using `HAS_ESCAPES_FLAG`, when they call out to a function that might change the state of the world. However, if that call only happens on an exit branch, then there is no escape if execution ...
801cf3fcdd27d8b6dd0fdd3c39e6c996e2b2f7fa
7475887e1e5d7abc0e48c8ea50e4fe123582cdbd
python/cpython
python__cpython-137300
# locale.setlocale() crashes on Windows for long locale name # Crash report `locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF-8@devanagari')` crashes. `locale.setlocale(locale.LC_CTYPE, 'ks_IN.UTF8@devanagari')` just raises a locale.Error. It's not just about length. Standard locale names in Windows (like 'English_Unite...
718e0c89ba0610bba048245028ac133bbf2d44c2
e99bc7fd44bbbf2464c37d5a57777ac0e1264c37
python/cpython
python__cpython-137258
# Update bundled pip to 25.2 # Feature or enhancement ### Proposal: `ensurepip`'s bundled version of pip gets updated to the current latest release, 25.2. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of t...
506542b5966073203f0da71a487de24e596b7979
57eab1b8f78039142d58d207d39ae734d67952cf
python/cpython
python__cpython-137186
# Android CI and binary releases ### Proposal: At the PyCon US language summit a couple of months ago, we discussed adding the following features to the mobile platforms: * Continuous integration on GitHub Actions * Official binary releases on python.org Details of the discussion are in the link below, but I think ...
f660ec37531b5e368a27ba065f73d31ff6fb6680
be56464c4b672ada378d3b9cc8076af56d96cf7b
python/cpython
python__cpython-137241
# heapq __all__ not updated for the maxheap methods Currently we have: ```python >>> import heapq >>> heapq.__all__ ['heappush', 'heappop', 'heapify', 'heapreplace', 'merge', 'nlargest', 'nsmallest', 'heappushpop'] ``` This should be: ```python ['heapify', 'heapify_max', 'heappop', 'heappop_max', 'heappush', 'heapp...
5f35f9b8fad50670604552062c1df8fbdff835ab
dc05d475c149289749f6131e3c0c4c1d2c492c8e
python/cpython
python__cpython-137227
# ForwardRef.evaluate() mishandles type_params # Bug report ### Bug description: The implementation of `annotationlib.ForwardRef.evaluate` handles its `type_params` argument in a complex yet incorrect way. Fixing this unfortunately leads to some test failures in `typing.get_type_hints()` because it does additional c...
089a324a4258fd5783b7e65acc29231d1042646e
70730ad0414e4661d2e94710d865edf1f7f164a1
python/cpython
python__cpython-137229
# Setting the frame's line number causes `SystemError` to be raised if done in callback from `BRANCH_LEFT` or `BRANCH_RIGHT` event # Bug report ### Bug description: https://github.com/python/cpython/blob/main/Objects/frameobject.c#L1711 The two two new events `BRANCH_LEFT` and `BRANCH_RIGHT` should be added under `...
d18f73ae1349ed005fa05ea2d852e1ab51dbc087
438cbd857a875efc105b4215b1ae131e67af37e1
python/cpython
python__cpython-137195
# test.support.requires_debug_ranges raise SkipTest not returning decorator when `_testcapi` doesn't exist # Bug report ### Bug description: ```python @requires_debug_ranges() class ...: ``` `requires_debug_ranges` here is expected to skip the decorated test. But when `_testcapi` doesn't exist, it raises `unittest.S...
0282eef880c8c8db782a2088b0257250e0f76d48
b723c8be071afcf3f865c55a5efb6da54f7695a0
python/cpython
python__cpython-137281
# `TypeError` when omitting a `Protocol` type argument with default # Bug report ### Bug description: This is as minimal as I was able to get the repro. I'm suppose it speaks for itself: ```python from typing import Generic, Protocol, TypeVar T1 = TypeVar("T1") T2 = TypeVar("T2", default=object) class A(Protocol[...
158b28dd1906c5d3fac7955f87ba808f1e89fdad
801cf3fcdd27d8b6dd0fdd3c39e6c996e2b2f7fa
python/cpython
python__cpython-137184
# The `w` typecode of `array.array` is new in Python 3.13 # Documentation The `w` typecode was added in Python 3.13, but the docs do not mention it. Furthermore, the documentation on `u` recommends using `w` as an alternative in a note that applies to Python 3.3+, which gives the impression that `w` has been availab...
0b4e13c2658c5a267fc50ee045ffb7b6408b2e3b
11a8652e25341e696b06d8dc7a18e8c3ee8059e4
python/cpython
python__cpython-137135
# Update macOS and Windows installers to SQLite 3.50.4 # Bug report ### Bug description: We need to update the SQLite version shipped with our binary releases to 3.50.3+ to pickup upstream security updates. https://nvd.nist.gov/vuln/detail/CVE-2025-6965 ### CPython versions tested on: CPython main branch ### Oper...
532c37695d03f84fc6d12f891d26b901ef402ac4
44ff6b545149ea59837fc74122d435572f21e489
python/cpython
python__cpython-137094
# `test_embed.test_bpo20891` is racy under free-threading # Bug report ### Bug description: I haven't seen this in CI, but when running regrtest locally, I noticed a crash on `test_embed.test_bpo20891` regarding unlocking a mutex that wasn't locked. The two offending pieces of code are here: https://github.com/pyt...
9b451fb457a5de9ed535a0e2f41161dfaa9a419a
fece15d29f28e89f1231afa80508c80ed28dc37d
python/cpython
python__cpython-137091
# Remove redundant statement # Documentation > All that said, interpreters do naturally support certain flavors of > concurrency, as a powerful side effect of that isolation. > **There's a powerful side effect of that isolation.** It enables a > different approach to concurrency than you can take with async or > thr...
1e69cd1634e4f0f8c375be85d11925bd12deef23
e047a35b23c1aa69ab8d5da56f36319cec4d36b8
python/cpython
python__cpython-137085
# [refactoring] Do not call get_gc_state from inside loop in expand_region_transitively_reachable # Feature or enhancement ### Proposal: It is minor refactoring. But I believe it is worth to do in the light of increasing usage of Immortal objects. `get_gc_state` is not so lightweight and may have extra costs when ca...
d7db0ee7ee2af48f666a8b5a9321161b2dbd85ab
9b451fb457a5de9ed535a0e2f41161dfaa9a419a
python/cpython
python__cpython-137060
# `url2pathname()` mishandles URL with Windows drive in netloc # Bug report ### Bug description: Windows-specific regression in Python 3.14 caused by d783d7b51d31db568de6b3438f4e805acff663da Some programs generate file URLs by adding a `file://` prefix to a path. On Windows, this can result in URLs like `file://C:/...
10a925c86db4cbcb9324c7269f69f813d3e7ed79
ae8b7d710020dfd336edd399fa35525dfe8fc049
python/cpython
python__cpython-137127
# `pyport.h`: use `__STDC_VERSION__ >= 202311L` instead of `__STDC_VERSION__ > 201710L` # Bug report ### Bug description: This code in `pyport.h` neds to be updated: ```c // Static inline functions should use _Py_NULL rather than using directly NULL // to prevent C++ compiler warnings. On C23 and newer and on C++11...
cfd6da849a3c40904cddd23ae1700605877673fb
9cbf46d9920c269fe736ed689236d00223545f73
python/cpython
python__cpython-137057
# DTrace Build Fails on NetBSD # Bug report ### Bug description: CPython fails to build with DTrace support on NetBSD. 1. `System library conflicts` - NetBSD dtrace requires `-x nolibs` flag to avoid system library conflicts 2. `Make automatic variable expansion failure` - `$<` automatic variable doesn't expand pro...
54a5fdffc8e20f111e7a7d2df352e8be057177ff
c2428ca9ea0c4eac9c7f2b41aff5f77660f21298
python/cpython
python__cpython-137055
# Remove obsolete counting of objects in young generation of GC # Feature or enhancement ### Proposal: There is no template and label for refactoring yet. I have found a dead code in gc.c for young generation. https://github.com/python/cpython/blob/ec7fad79d24e79961b86e17177a32b32bb340fe5/Python/gc.c#L1334-L1342 I...
e93c30d4666f925c6a5a2cc4952f69782760d101
ec02db5caa546cb4759999453bd6efc1d517b95c
python/cpython
python__cpython-137042
# Free-threading documentation should mention PyList_GET_ITEM https://docs.python.org/3/howto/free-threading-extensions.html#borrowed-references mentions that PyList_GetItem is thread-unsafe due to borrowed references. PyList_GET_ITEM should be added next to it. <!-- gh-linked-prs --> ### Linked PRs * gh-137042 * gh-...
38b936cc9912fc6847265917f94af53f0bf228e9
80a7017d2649ad5d7d1f83758eeeef50e5eba6b1
python/cpython
python__cpython-137215
# Documentation enhancement proposal: explainer for asyncio # Documentation I've used Python's asyncio a couple times now, but never really felt confident in my mental model of how it fundamentally works and therefore how I can best leverage it. The official docs provide decent documentation for each specific functio...
3964f974894eff1653913dda437971e0bbfa8ccc
d7dbde895884d58e3da7ed4107fd33171afad7cb
python/cpython
python__cpython-137040
# `http.cookies` should mention that `samesite=None` is valid as per RFC6265bis # Documentation The http.cookies.rst mentions this: > The attribute [:attr:`samesite`](https://github.com/python/cpython/blob/main/Doc/library/http.cookies.rst#id39) specifies that the browser is not allowed to send the cookie along with...
ae8b7d710020dfd336edd399fa35525dfe8fc049
cfd6da849a3c40904cddd23ae1700605877673fb
python/cpython
python__cpython-136981
# Unused C tracing code in bdb # Feature or enhancement ### Proposal: Remove unused C tracing code in bdb The `c_call`, `c_return`, and `c_exception` events have historically (since c69ebe8d50529eae281275c841428eb9b375a442) been dispatched to `c_profilefunc` and never `c_tracefunc`. Dead codes related to `c_tracef...
dc27218225fc3cfc452c46764e7cb0c1a52792b3
ec7fad79d24e79961b86e17177a32b32bb340fe5
python/cpython
python__cpython-136999
# Typo "algorthm" in 7 zstd module prologue comment files The top comment in 7 zstd module files has a typo "algorthm" instead of "algorithm" (missing i). Example: https://github.com/python/cpython/blob/9a21df7c0a494e2819775eabd522ebec994d96c0/Modules/_zstd/zstddict.h#L1 Introduced 2 months ago in https://github.com...
b6d324224474c54061a6aaeace50bc5666dc1779
c13cc4af793ba4ae27521df1693653920cafbf99
python/cpython
python__cpython-136973
# Fortify usages of macros in cryptographic modules # Feature or enhancement ### Proposal: I love macros because I can reduce the number of duplicated code to write. But at the same, macros make the code harder to read, especially because of the lack of IntelliSense. Therefore, I suggest to convert macros in hashlib...
eefd70f0ed51e46fa9ff3d465dcf977bd4af28de
4e40f2bea7edfa5ba7e2e0e6159d9da9dfe4aa97
python/cpython
python__cpython-136933
# Ensure that `hashlib.<name>` does not raise `AttributeError` # Feature or enhancement ### Proposal: Let's summarize the current behavior of hashlib. We have two interfaces for getting digests: `hashlib.new(digest, ...)` and `hashlib.<digest>()`. With `hashlib.new()` it depends on the presence of OpenSSL. If Open...
7ce2f101c4b1c123860c90bf67ccc20a7805ea48
ea06ae5b5e7b335efbdff03c087fad9980a53f69
python/cpython
python__cpython-136930
# DocTests for functools.cache()-decorated functions have no line number # Bug report ### Bug description: (edited to reflect discussion comments) doctests of functions decorated with `functools.cache` (or `lru_cache()`) do not get their line number retrieved, e.g.: ```python # file /tmp/t.py import functools @fun...
fece15d29f28e89f1231afa80508c80ed28dc37d
d5e75c07682864e9d265e11f5e4730147e7d4842
python/cpython
python__cpython-136885
# Replace reference to Google Groups # Documentation [Google is ending the support for](https://support.google.com/groups/answer/11036538?visit_id=638886377438342734-2695709570&p=usenet&rd=1) their Usenet client. There's a reference in the logging documentation which says Usenet is available under that group link. We...
1e672935b44e084439527507a865b94a4c1315c3
5798348a0739ccf46f690f5fa1443080ec5de310
python/cpython
python__cpython-136875
# `url2pathname()` doesn't handle URL query or fragment components # Bug report ### Bug description: `urllib.request.url2pathname()` incorrectly treats URL query (`?a=b&c=d`) and fragment (`#anchor`) components as part of the URL path ```python >>> from urllib.request import url2pathname >>> url2pathname('file://l...
80b2d60a51cfd824d025eb8b3ec500acce5c010c
4b68289ca6954b8d135e2ee2344e67fae38239fd
python/cpython
python__cpython-136951
# data races in instrumentation when running coverage under TSAN When running the test suite of [python-isal](https://github.com/pycompression/python-isal) which uses coverage.py, there are multiple data races reported under a TSAN build: Races: <details> ```console #9 _PyEval_Vector ceval.c:1977 (python.exe:ar...
f183996eb77fd2d5662c62667298c292c943ebf5
322442945084ea9055f86a17fa5096b11ba5b344
python/cpython
python__cpython-136864
# Improve `StrEnum` documentation The `StrEnum` docs include a note that references `str(StrEnum.member)`, which can seem like `member` is a method of the `StrEnum` class. Also, unlike `IntEnum`, there is no illustrative example. <!-- gh-linked-prs --> ### Linked PRs * gh-136864 * gh-136936 * gh-136937 <!-- /gh-link...
5f9e38f9b9f2b82e841f1b11a8300f2cacd76a36
58d305cf387816c559602a95ba850856dc9b8129
python/cpython
python__cpython-136856
# Prevent `make venv` from saying it succeeded when it failed As reported in https://github.com/python/devguide/issues/1607, if an error happens when executing `make venv`, it will still be reported as successful ("The venv has been created in the ./venv directory"). The `set -e` option should be enabled to exit on e...
9c2f91cde80a6758e0c1390323bf6f7eb4b5d6b5
dda9d0011fc3d3f561ca00ac83bf7a55a6325aa9
python/cpython
python__cpython-136853
# Emscripten buildbot should run against node 24 We want to support pyrepl #124621 but it will require JSPI which requires node 24. So to test this we should run tests against node 24. <!-- gh-linked-prs --> ### Linked PRs * gh-136853 * gh-136907 * gh-136909 <!-- /gh-linked-prs -->
9c7b2af73dee2b99793637c3b70f724641b84349
cf19b6435d02dd7be11b84a44f4a8a9f1a935b15
python/cpython
python__cpython-136811
# minor cleanup: dict .update({x: y}) calls with a single item dict literal @disconnect3d was analyzing stdlib code and noted several places with an old code pattern of a dict's .update method being called with a single element dict literal `d.update({key: value})` instead of just `d[key] = value` assignment. see PR ...
69ea1b3a8f45fec46add3272ad47f14ff5321ae8
67036f1ee1c23257d320a80c152090235b8ca892
python/cpython
python__cpython-136804
# Repl syntax highlighting fails in pattern matching when the previous case spans across multiple lines # Bug report ### Bug description: There is a bug in the new repl syntax highlighting when using pattern matching with cases spawning across new lines. To reproduce: ```python def status(code): match code: ...
3a648445337098abf22c7faa296389dab597797c
6a1c93af806d0ca5d3fb86cd183d00013bbf28d1
python/cpython
python__cpython-136829
# One million hertz # Documentation https://docs.python.org/3.15/whatsnew/3.15.html says of the new sampling profiler: > This approach provides virtually zero overhead while achieving sampling rates of **up to 200,000 Hz**, making it the fastest sampling profiler available for Python (at the time of its contribution...
1ba23244f3306aa8d19eb4b98cfee6ad4cf514c9
6293d8a1a648a498b7ac899631b74fa25c71c1ac
python/cpython
python__cpython-136802
# Align `ValueError` exception messages when a hash digest is not available ### Proposal: Currently, we have a bit of different messages when a hash algorithm is not supported. It's annoying because the user does not necessarily know what is what. Also, unfortunately, since OpenSSL 3.0, when a digest is not supported...
6be49ee517258281357aa6846d2564bc5626b7ca
800d37feca2e0ea3343995b3b817b653db2f9034
python/cpython
python__cpython-136784
# ctypes docs should list fixed-size integer types in table for "fundamental data types" See https://docs.python.org/3.15/library/ctypes.html#fundamental-data-types. Fixed-size types, like [c_int32](https://docs.python.org/3.15/library/ctypes.html#ctypes.c_int32) - are missing here. They can be found below in sectio...
acefb978dcb5dd554e3c49a3015ee5c2ad6bfda1
263e451c4114ac98add1f1e8aa9ee030e054bdfd
python/cpython
python__cpython-136774
# Misleading comment in `enum.verify.__call__` I saw some nonsense in a comment. ```py if enum_type == 'flag': # check for powers of two for i in range(_high_bit(low)+1, _high_bit(high)): if 2**i not in values: missing.appe...
6a1c93af806d0ca5d3fb86cd183d00013bbf28d1
f575588ccf27d8d54a1e99cfda944f2614b3255c
python/cpython
python__cpython-136794
# IPv4 addresses in 0.0.0.0/8 should be marked reserved # Bug report ### Bug description: According to https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml and https://en.wikipedia.org/wiki/Reserved_IP_addresses 0.0.0.0/8 and other ranges should be reserved. `ipaddress.IPv4Ad...
6293d8a1a648a498b7ac899631b74fa25c71c1ac
57acd65a30f8cb1f3a3cc01322f03215017f5caa
python/cpython
python__cpython-136709
# `os.chdir` docstring is invalid rst # Bug report ### Bug description: ```python >>> from docutils.core import publish_doctree >>> from posix import chdir >>> publish_doctree(chdir.__doc__) <string>:5: (ERROR/3) Unexpected indentation. ``` ### CPython versions tested on: CPython main branch ### Operating system...
bde808ad6ba5eee8a6201983cf071449d7ce7e39
2f0db9b05f0598548c0c136571c31065ecf961e5
python/cpython
python__cpython-136747
# `sys.monitoring.register_callback()` audit event not documented in the table # Documentation Summary ---- `sys.monitoring.register_callback()` is mentioned in the [`sys.monitoring` docs](https://docs.python.org/3/library/sys.monitoring.html#sys.monitoring.register_callback) as a function which generates audit event...
28937d3a21cf8168c853ae43374a8287c21f71c9
eddc8c0a1d274ff6393c6fa233e535360c0dd07b
python/cpython
python__cpython-136683
# os.path.samestat incorrectly states "Accepts a path-like object" # Documentation Unless I am in some way confused, that statement is incorrect. The function only accepts `stat` objects. https://github.com/python/cpython/blob/624bf52c83abcb1f948f9059e29729fa94d38086/Lib/genericpath.py#L121-L126 <!-- gh-linked-prs ...
7e10a103dfe52feb0ef3d541e08abc2640838101
624bf52c83abcb1f948f9059e29729fa94d38086
python/cpython
python__cpython-136670
# build `_asyncio` module as static module Currently `_asyncio` is built as a shared library module which causes it to use slower functions calls for getting the thread state whereas if it is built as static module then it can read the current thread state by using faster segment registers directly. This affects both ...
b7d722547bcc9e92dca4837b9fdbe7457788820b
69d8fe50ddc4dbe757c9929a532e2e882f0261ba
python/cpython
python__cpython-136664
# Signature of `PyFloat_Pack{2,4,8}` inconsistent with documentation According to the documentation (https://docs.python.org/3/c-api/float.html#c.PyFloat_Pack2), the signature of `PyFloat_Pack{2,4,8}` is ``` int PyFloat_Pack2(double x, unsigned char *p, int le) ``` Note that the second parameter is of type `unsign...
e4654e0b3e7d802c8fe984cf39a36a42b67de1ad
db2032407a0c4928f3bdff63bba0456bf99e257e
python/cpython
python__cpython-136592
# Avoid using `ERR_func_error_string` and `EVP_MD_CTX_md` with OpenSSL 3.0+ # Feature or enhancement ### Proposal: In `_hashlib`, we use `EVP_MD_CTX_md` and `ERR_func_error_string` but those functions are deprecated since OpenSSL 3.0. The task is to remove their usage while retaining backward compatibility, as for #...
9be3649f5eccfbda1b3c9c3195927951a9ae9b90
be2c3d284ecce67474a260b8c37e2f1e0628a9cf
python/cpython
python__cpython-136587
# `winreg`'s docstring is not up to date It's missing the newly added `CreateKeyEx`, `DeleteKeyEx`, `DeleteKeyEx`, `EnableReflectionKey`, `QueryReflectionKey`. <!-- gh-linked-prs --> ### Linked PRs * gh-136587 <!-- /gh-linked-prs -->
d53199101c7e74273d4d550456a994de01b6e3f1
377b78761814e7d848361e642d376881739d5a29
python/cpython
python__cpython-136573
# Convert more datetime constructors and methods to Argument Clinic The `datetime` module was partially converted to Argument Clinic. The following PR converts more functions. This adds signatures for some classes and methods. As a side effect, this may improve performance. Usually we avoid behavior changes in conver...
046a4e39b3f8ac5cb13ea292418c9c3767b0074d
af15e1d13ea26575afbb94b814e541586547a706
python/cpython
python__cpython-136780
# `Tools/cases_generator/interpreter_definition.md` lacks information about some prefixes So far it's seem that we haven't any documentation for: * `specializing` * `replicate` * ~`split`~ (Actually, it has been removed in 7ebd71ee14a497bb5dc7a693dd00f074a9f4831f) * `no_save_ip` <!-- gh-linked-prs --> ### Linked PRs...
406dc714f6b4dbc18d4e5119a10621386bccbee3
13e21b2fd6343ba8309ed857a2cbf6d6995ca5f2
python/cpython
python__cpython-136566
# Improve and amend `hashlib.__doc__` # Feature or enhancement ### Proposal: There are a few typos in `hashlib.__doc__` and I would like the usage example to be consistent (one example is MD5 while the other, introduced by "more condensed:" is using SHA-224). We also say: > Choose your hash function wisely. Some h...
83d04a29a64eedc55d0a8d93aaae43d6069729e3
c7d24b81c376b0cf0b34f861cb18c1b1e4eac27b
python/cpython
python__cpython-136559
# Failure when running `test_inspect` locally # Bug report ### Bug description: When running `test_inspect` locally (either via `unittest` or via executing `Lib/test/test_inspect/test_inspect.py`), I see this failure: ``` ERROR: test_threading_module_has_signatures (__main__.TestSignatureDefinitions.test_threading_...
be2c3d284ecce67474a260b8c37e2f1e0628a9cf
5e1e21dee35b8e9066692d08033bbbdb562e2c28
python/cpython
python__cpython-136570
# Allow tests to temporarily disable specific hash algorithms # Feature or enhancement ### Proposal: This is feature I needed in order to test my fix for #136134. The idea is to simulate a disabled algorithm due to FIPS reasons on a machine that enables it. However, to that end, we need to mock multiple entry points...
9e5cebd56d06e35faeca166813215d72f2f8906a
0d4fd10fbab2767fad3eb27639905c8885b88c89
python/cpython
python__cpython-136500
# perf trampolines are not reliable in aarch64 # Bug report ### Bug description: The perf trampolines can randomly fail in some aarch64 systems ### CPython versions tested on: 3.15, 3.14, CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-136500 * gh-13...
236f733d8ffb3d587e1167fa0a0248c24512e7fd
7de8ea7be6c19f21c090f44a01817fab26c1f095
python/cpython
python__cpython-136529
# Exception raised from `Wave_write.__del__()` after failed attempt to open file for write operation # Bug report ### Bug description: Consider a Python script with the following content: ```python import wave try: with wave.open('/unwritable_path.wav', 'wb') as f: pass # Not reachable, open() should ...
171de05b4884d1353044417ea51a4efcb55ba633
42b251bcebd749eceeb62389e413a3be37cff343
python/cpython
python__cpython-136518
# Print uncollectable objects if DEBUG_UNCOLLECTABLE mode was set # Bug report ### Bug description: There was a typo, and uncollectable objects printed only if DEBUG_COLLECTABLE mode is set. Affected main and 3.14 (183b020cb5960e17b87c34a98ec02fcf2b840578) https://github.com/python/cpython/blob/59acdba820f75081cfb4...
c560df9658f1a24edea995fe6f9c84c55b37cfb3
59acdba820f75081cfb47ad6e71044d022854cbc
python/cpython
python__cpython-136546
# FrameLocalsProxy (PEP 667) is not registered as a subclass of abc.Mapping # Bug report ### Update Turns out it is correctly registered as a subclass of Mapping of Python 3.13.2 (at least) - which was the original report - but then it should be exposed in `types`. ### Bug description: Although the FrameLocalsP...
8f59fbb082a4d64619aeededc47b3b45212d2341
e24c66d55a4fd2c56017f8f4e1bcb154db4ba50a
python/cpython
python__cpython-136483
# get_async_stack_trace is missing part of the graph # Bug report ### Bug description: In `Modules/_remote_debugging_module.c` the `get_async_stack_trace` is missing part of the graph because it doesn't properly recurse over all tasks. ### CPython versions tested on: 3.14, 3.15 ### Operating systems tested on: ...
ea45a2f97cb1d4774a6f88e63c6ce0a487f83031
9c4d28777526e9975b212d49fb0a530f773a3209
python/cpython
python__cpython-136472
# `InterpreterPoolExecutor`'s default thread name prefix is invalid # Bug report ### Bug description: ```python from concurrent.futures import InterpreterPoolExecutor def w(): import time time.sleep(100) executor1 = InterpreterPoolExecutor() executor1.submit(w) executor1.submit(w) executor2 = Interpreter...
246be21de1e2a51d757c747902108dfec13e0605
aec7f5f8b2e8b5e02869cdb4e1f8a9ef87c9f953
python/cpython
python__cpython-136461
# Consider enabling perf trampoline on macOS # Feature or enhancement ### Proposal: Currently perf trampoline (with `PYTHONPERFSUPPORT=1`) is Linux only. I assume it's mainly because `perf` is a Linux-only tool. But since then more non-Linux only profilers added support for Linux perf maps. For example [`samply`](ht...
e41c1ce585827f92dab9b7a7fc3df2bda2f817fe
b13a5df52fc854d1097e8b5419cb8802dc4059e0
python/cpython
python__cpython-136448
# asyncio REPL: Use `self.loop` instead of global `loop` variable in `AsyncIOInteractiveConsole` I'm trying to extend the asyncio REPL (yes, I know this is an unsupported use case) by doing the following: - `from asyncio.__main__ import AsyncIOInteractiveConsole` - Copy the `if __name__ == '__main__'` block into my o...
77fa7a4dcc771bf4d297ebfd4f357483d0750a1c
797abd1f7fdeb744bf9f683ef844e7279aad3d72
python/cpython
python__cpython-136812
# Different parameter names in `os.path` documentation vs. runtime [normcase](https://docs.python.org/3/library/os.path.html#os.path.normcase) must be `os.path.normcase(s)` [basename](https://docs.python.org/3/library/os.path.html#os.path.basename) must be `os.path.basename(p)` <!-- gh-linked-prs --> ### Linked PRs *...
b5428bb0e786f5b67c6077472c0068cadd0b5ea9
a10960699a2b3e4e62896331c4f9cfd162ebf440
python/cpython
python__cpython-136435
# `./python.exe -OO -m test test_concurrent_futures` fails # Bug report This happens because `-OO` mode is not handled. I have a PR ready. Output: ``` » ./python.exe -OO -m test test_concurrent_futures Using random seed: 2576397461 0:00:00 load avg: 2.18 Run 9 tests sequentially in a single process 0:00:00 loa...
3343fce05acb29a772599ce586abd43edf40bae6
975b57d945c84000949f241ded8f44413ecc6217
python/cpython
python__cpython-136903
# Performance improvement to uuid8 on “What’s New” page # Documentation The [_What’s new in Python 3.14_ page](https://docs.python.org/3.14/whatsnew/3.14.html#id4) currently states: > [uuid4()](https://docs.python.org/3.14/library/uuid.html#uuid.uuid4) and [uuid8()](https://docs.python.org/3.14/library/uuid.html#uui...
5798348a0739ccf46f690f5fa1443080ec5de310
c5e77af131aa0c8832a9ee50c4410731254e4209
python/cpython
python__cpython-136411
# Switching between the JIT and interpreter is too slow. A key part of the original design thesis for the JIT was that it was OK to jit small sections of code, provided that the cost of entering and exiting jjitted code was small enough. Ideally, entering (and exiting) jitted code should cost no more than 2 or 3 instr...
e7b55f564dbf5a788e8f6edc55ef441d6afad01c
718e0c89ba0610bba048245028ac133bbf2d44c2
python/cpython
python__cpython-136525
# Bug with per-thread bytecode and profiling/instrumentation in freethreading # Bug report ### Bug description: A bunch of the instrumentation state is per-code object, such as the active montiors. The modifications also typically happen lazily when a code object is executed after instrumentation is enabled/disabled...
d995922198304a6de19ac1bec3e36d1e886d8468
3d8c38f6db0fea7845aafb92fe6bc795b536a367
python/cpython
python__cpython-136432
# compression.zstd tests: test_compress_locking sometimes fail on free-threading builds # Bug report ### Bug description: I am suspicious about the purpose of the `test_compress_locking` test in `test_zstd.py`, and actually found a race condition in it, when using a freethreaded build. From my understanding, it is ...
f519918ec6c125715d4efc9713ba80e83346e466
d754f75f42f040267d818ab804ada340f55e5925
python/cpython
python__cpython-136381
# Inconsistent import behavior when concurrent.futures.InterpreterPoolExecutor not exist # Bug report ### Bug description: When the `_interpreters` module which under the hood to implement `InterpreterPoolExecutor` does not exist, `import concurrent.futures.InterpreterPoolExecutor` will result `None`, instead of `Im...
490eea02819ad303a5042529af7507b7b1fdabdc
ba9c1986305517ed88470129fe7c71aaec22d08d
python/cpython
python__cpython-136319
# 3.14 regression with `typing._eval_type()` # Bug report ### Bug description: I'm in the process of adding 3.14 support to Pydantic. To evaluate type annotations, we make use of the private `typing._eval_type()` function. In an ideal we shouldn't, but this is very hard to change now (and still, we need evaluate "st...
9312702d2e12c2f58f02bfa02877d0ec790d06bd
c89f76e6c4ca9b0200d5cc8cf0a675a76de50ba8
python/cpython
python__cpython-136320
# Test test_zstd_multithread_compress is always skipped # Bug report ### Bug description: The test `test_zstd_multithread_compress` is always skipped, even when it should be run. This comes from [`SUPPORT_MULTITHREADING` being initiated to `False`](https://github.com/python/cpython/blob/v3.14.0b3/Lib/test/test_zstd...
5dac137b9f75c5c1d5096101bcd33d565d0526e4
887e5c8646dfc6dd3d64b482c5310a414ac9162b
python/cpython
python__cpython-136307
# Add support in SSL module for getting/setting groups used for key agreement # Add support for getting/setting groups used for key agreement ### Proposal: This feature proposal is an expansion of the feature proposed in issue #109945. It began as a discussion on the PR where I provided some suggestions on generaliz...
377b78761814e7d848361e642d376881739d5a29
59e2330cf391a9dc324690f8579acd179e66d19d
python/cpython
python__cpython-136301
# Not all C tests conform to PEP-737 # Bug report ### Bug description: A few C tests do not conform to PEP-737 in that they don't: - Use %T format specifier instead of %s and Py_TYPE(x)->tp_name. - Use legacy %.200s format specifier for truncating type names. Example patch that needs applying: ```patch PyErr_F...
7de8ea7be6c19f21c090f44a01817fab26c1f095
3343fce05acb29a772599ce586abd43edf40bae6
python/cpython
python__cpython-136298
# `test_zoneinfo_property.py` misses tests with all `pickle` protocols https://github.com/python/cpython/blob/d1d5dce14f90d777608e4403d09079421ff55944/Lib/test/test_zoneinfo/test_zoneinfo_property.py#L145-L162 We should add all protocols to the test, since it might affect the property based testing. <!-- gh-linked-p...
5de7e3f9739b01ad180fffb242ac57cea930e74d
d1d5dce14f90d777608e4403d09079421ff55944
python/cpython
python__cpython-136326
# test_sqlite3 fails on ZFS # Bug report ### Bug description: If I build CPython 3.13.5 on my Linux workstation in my home directory, `test_sqlite3` fails. If I build CPython 3.13.5 in `/tmp`, `test_sqlite3` works fine. My `/home` partition uses ZFS, which is somewhat rare, so I'm betting that's why it fails for m...
85b817da94cf911a964d42e81a57e1de9ab71ef9
9312702d2e12c2f58f02bfa02877d0ec790d06bd
python/cpython
python__cpython-136286
# `test_interpreters` misses tests with all `pickle` protocols There are multiple places in `test_interpreters` where `pickle` only tests the default protocol. Like: https://github.com/python/cpython/blob/8ac7613dc8b8f82253d7c0e2b6ef6ed703a0a1ee/Lib/test/test_interpreters/test_api.py#L413-L417 I guess that we can ...
06e347b84648f3f8e144e8f70671d610da082b77
1953713d0d67a4f54ff75bf8449895a2f08cc750
python/cpython
python__cpython-136252
# Fixes and Improvements for Emscripten WASM REPL # Feature or enhancement ### Proposal: I recently ran into some issues with building and using the demo WASM REPL in `Tools/wasm/emscripten/web_example/` using the instructions from [this page](https://devguide.python.org/getting-started/setup-building/index.html#ems...
d1d526afe7ce62c787b150652a2ba136cb949d74
9c7b2af73dee2b99793637c3b70f724641b84349
python/cpython
python__cpython-136230
# Remove Platform Emscripten is not supported warning Since Emscripten is now tier 3. <!-- gh-linked-prs --> ### Linked PRs * gh-136230 * gh-136445 <!-- /gh-linked-prs -->
6ea425828540d7a19296183c3410283897767d9a
77d25e5b169f7c306d3a6d9ca6777c0a0be80d8f
python/cpython
python__cpython-136210
# No Sphinx markup for PyExc_* C variables for exceptions and warning categories (`PyExc_*`) are documented in prose, but lack Sphinx markup that would mark them as C variables. For example, searching for [`PyExc_BlockingIOError`](https://docs.python.org/3/search.html?q=PyExc_BlockingIOError) yields full-text results ...
85bc89f35f40c844df74d913fd32b2b1475fc942
c17654334946b232aa296696cf70ec93a09d8156
python/cpython
python__cpython-136204
# Improve error message when comparing two `mappingproxy` objects # Feature or enhancement Current message: ```python >>> import types >>> types.MappingProxyType({}) > types.MappingProxyType({}) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: '<' not supported between instances of...
41a9b46ad4787b58b51227929fd1876286448523
fa43a1e0f8caf00a15898fa719e31767c866bd90
python/cpython
python__cpython-136195
# Improve error message when comparing two `types.SimpleNamespace` objects # Feature or enhancement Following https://github.com/python/cpython/issues/136109#issuecomment-3024770506 Old error message: ```python In [1]: from types import SimpleNamespace In [2]: a = SimpleNamespace(a=1, b=2) In [3]: b = SimpleNamespa...
ab7196a2f535f181abd50ccbf1b3b224bbd5eee0
51ab66b3d519d3802430b3a31a135d2670e37408
python/cpython
python__cpython-136347
# test_external_inspection.test_only_active_thread is flaky # Bug report ### Bug description: ``` test test_external_inspection failed -- Traceback (most recent call last): File "/home/runner/work/cpython/cpython/Lib/test/test_external_inspection.py", line 991, in test_only_active_thread self.assertEqual(len(g...
ba9c1986305517ed88470129fe7c71aaec22d08d
0152df5fffb5fc4e538f62543a658d3980079de5
python/cpython
python__cpython-136184
# The JIT's "pure" `_BINARY_OP` evaluation produces UB (and incorrect results) # Crash report This code snippet crashes when the JIT is enabled: ```py for _ in range(4096): 2 ** 65 ``` I believe this is caused by GH-132733. Specifically, the abstract interpreter generator "thinks" that the operation itself can ...
b3308973e382d1a3c1627903779fcb89a40d7645
f41e9c750e6971c165e055374a1014d6afd2d50e
python/cpython
python__cpython-136172
# `fractions.Fraction.from_float` parameter `f` is documented as `flt` # Documentation [`fractions.Fraction.from_float`](https://docs.python.org/3/library/fractions.html#fractions.Fraction.from_float)’s parameter is documented as `flt`, but [it is actually named `f`](https://github.com/python/cpython/blob/3.13/Lib/fr...
9c0cb5beb893284c5d49f947bbd81dfe081a5d71
28940e8e4884eb3444a8ea15a5634f76b154d7ed
python/cpython
python__cpython-136164
# `encodings` module is not documented # Feature or enhancement `encodings` contains several public and documented (at the module level) functions: https://github.com/python/cpython/blob/23caccf74ce2c8dc5d9c5eb6350d21ef20c6ea0b/Lib/encodings/__init__.py#L1-L29 But, only its submodules are documented in `codecs.rst`:...
ffd7f2f231f5543e6863c6c85e86f72233229771
b6b99bf7f1edab77c485faf4e23da868f3a7b68c
python/cpython
python__cpython-136146
# Define "standard library" and "stdlib" in the glossary # Documentation As suggested by @JulienPalard in response to @adorilson's question in https://discuss.python.org/t/what-means-stdlib/97201/6 PR incoming for bikeshedding :) <!-- gh-linked-prs --> ### Linked PRs * gh-136146 * gh-136485 * gh-136486 <!-- /gh-li...
92f392ad9e5e10ff98eac319e58ec79df5951ce0
e697f5e7c05c48d98188b4d144a71f6d3a6e724f
python/cpython
python__cpython-136137
# Doc: Some broken links Similar to #136122 /Doc/installing/index.rst ``` .. other questions: Once the Development & Deployment part of PPUG is fleshed out, some of those sections should be linked from new questions here (most notably, we should have a question about avoiding depending on PyPI that links ...
135ba86212ad116af3cc4a6ba656bc8cfaab131a
7afe1adb0089d0f2df2add79bbc2300c2f236d90
python/cpython
python__cpython-136127
# Use stackref version for LOAD_ATTR to handle cases we can't specialize for # Feature or enhancement ### Proposal: This helps the FT build in cases where specialization fails. ### Has this already been discussed elsewhere? No response given ### Links to previous discussion of this feature: _No response_ <!-- g...
e0d6500b2d9a08beb7b607b846d1eeaa26706667
17cf0a343b13b6f38a8ecf28b0dc892a4b456ca7