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-128873
# Unsused argument in `_PyCode_Quicken` `_PyCode_Quicken` in `specialize.c` accepts `PyObject *consts` but does not use it. Not sure which type of issue to use, so creating blank one. <!-- gh-linked-prs --> ### Linked PRs * gh-128873 <!-- /gh-linked-prs -->
e6c76b947b2d0708cea1d5e090d02e79fda1cc26
ecd2f84555bf494007420ba5a37adf8d1c23e856
python/cpython
python__cpython-128864
# [C API] Deprecate private functions which have a public replacement Hi, Python 3.13 and 3.14 added public functions to replace private functions. For example, a public function `PyBytes_Join()` was added to replace the private function `_PyBytes_Join()`. I propose to deprecate the private functions which have a pu...
9012fa741d55419dc77c5c191794eb93e71ae9a4
470a0a68ebbbb4254f1a3e8e22cce0c3a0827055
python/cpython
python__cpython-128926
# Make `_Py_TryIncref` public as an unstable API as `PyUnstable_TryIncref()` # Feature or enhancement We should make `_Py_TryIncref` public as function with the following signature: ```c int PyUnstable_TryIncref(PyObject *op); ``` **EDIT**: Renamed to `PyUnstable_TryIncref` in accordance with Victor's suggestion. ...
d23f5701ad2a64c7877bb37258420c417357423e
7dd0a7e52ee832559b89d5ccba732c8e91260df8
python/cpython
python__cpython-128941
# JIT: implement memory pystats collection # Feature or enhancement ### Proposal: In order to improve the JIT memory allocation, we need to know how much memory it uses. Specifically it would be useful to know the following metrics: * code total memory * data total memory * trampoline total memory * padding total m...
567394517a10c9a9f3af25a31009589ae2c50f1b
e6c76b947b2d0708cea1d5e090d02e79fda1cc26
python/cpython
python__cpython-128841
# IPv6 address parsing doesn't limit buffer size # Bug report ### Bug description: IPv6 addresses have a maximum length (8 colon-separated parts) but the current implementation doesn't limit the length. Similar issue to https://github.com/django/django/commit/ca2be7724e1244a4cb723de40a070f873c6e94bf ### CPython ver...
47f1161d3a2bec52b5b5e952150141709c247da2
973b8f69d31b4d86c37e0b7194a209f4f2efff06
python/cpython
python__cpython-128817
# test_doctests failure when running tests with -werror on platforms without readline (win32, wasi) # Bug report ### Bug description: ``` ====================================================================== FAIL: test_lineendings (test.test_doctest.test_doctest) Doctest: test.test_doctest.test_doctest.test_lineend...
599be687ec7327c30c6469cf743aa4ee9e82232d
1a1056d394a489d229b26c06c7c79aa9c06696f6
python/cpython
python__cpython-131703
# Deprecate PyComplexObject.cval and soft-deprecate _Py_c*() API ### Proposal: Suggested by @vstinner in https://github.com/python/cpython/pull/124829#issuecomment-2588284712. I would agree, as these routines could be useful (and it seems, they are used by few projects) to implement mathematical functions just like ...
79f7c67bf607f9d4f39a299aa9a1a4f7b317617c
5ffb89420c3fb41cb6cc795c9f983a8b5cc207ab
python/cpython
python__cpython-128808
# Add marking phase to free-threaded cyclic GC # Feature or enhancement ### Proposal: Like gh-126491 but implemented for the free-threaded version of the cyclic GC. This is likely a performance win for mostly the same reasons. In the free-threaded version, the marking phase avoids iterating over the mimalloc arena...
080f444a58dae1bb76a87ce746a09fd499792cfb
8d8b854824c4723d7c5924f1d5c6a397ea7214a5
python/cpython
python__cpython-128971
# Unexpected location of naked exception wrapped in except* block # Bug report ### Bug description: When an `ExceptionGroup` is implicitly constructed by catching a naked exception in an `except*` block, the traceback of the `ExceptionGroup` seems to point to the stackframe above where it is logically created: ```p...
c39ae8922bad3e5ceeafa05891536c1584b6f3db
9e52e553f4a906c120f807e940891f7325011b67
python/cpython
python__cpython-129184
# Python 3.14.0a3 regression: creating venv with `--system-site-packages` doesn't work (system packages are not detected) # Bug report ### Bug description: venv created with `--system-site-packages` in Python 3.14.0a3 doesn't really see the site packages. This happens also with the current main. Bisected to c...
a549f439384b4509b25639337ffea21c2e55d452
99849ee0d3ebcddc97b6aeaf389f43a12f541068
python/cpython
python__cpython-128726
# configure warnings as errors in the test suite # Feature or enhancement ### Proposal: It's very easy (especially when deprecating something) to introduce a lot of noisy test output with new warnings, eg: https://github.com/python/cpython/issues/127949#issuecomment-2558227488 I think it would be useful to either c...
76856ae1659dbba066e51f353b31cb7cf0a8a5fe
939df0f9f6a76e0916b3ba53841e1413ab90952e
python/cpython
python__cpython-128764
# Race on tp_version_tag under free threading # Bug report ### Bug description: TSAN reports a data race for the following program in a free-threaded build: ```python import collections.abc import concurrent.futures import functools import threading num_threads = 8 def closure(b, x): b.wait() for _ in range(1...
6e1e78054060ad326f26dd8dbf12adfedbb52883
d0ecbdd838034c1f061e9b4e9b54a900141458c3
python/cpython
python__cpython-128735
# ResourceWarning in urllib tests Many `urllib` tests produce resource warnings. For example (there are much more cases): ```console $ ./python -We -m test -vuall test_urllib test_urllib2 test_urllib2_localnet test_urllib_response test_urllibnet ... test_geturl (test.test_urllib.urlopen_DataTests.test_geturl) ... ...
5ace71713b03cb37d829f50c849a8bb8a518738d
cb72feb8a30edb448bc8dc31330ed7420279d7c2
python/cpython
python__cpython-128733
# ResourceWarning in test_robotparser # Bug report ```console $ ./python -We -m test -vuall test_robotparser ... test_read_404 (test.test_robotparser.NetworkTestCase.test_read_404) ... Warning -- Unraisable exception Exception ignored in: <function _TemporaryFileCloser.__del__ at 0x7ff389434dd0> Traceback (most recen...
5e65a1acc0b630397f1d190aed279114e6e99612
f6c61bf2d7d8b66ccd9f16e723546bdcc251a3d0
python/cpython
python__cpython-128730
# RuntimeWarning in test_unittest ```console $ ./python -We -m test -vuall test_unittest -m test_deprecation_of_return_val_from_test_async_method ... test_deprecation_of_return_val_from_test_async_method (test.test_unittest.test_case.Test_TestCase.test_deprecation_of_return_val_from_test_async_method) ... Warning -...
cb72feb8a30edb448bc8dc31330ed7420279d7c2
30268b5d2fbb1a5e6c876f0cdc4cbdb5d93315e6
python/cpython
python__cpython-128721
# Top-level code environment docs are outdated for Python 3.13+ # Bug report ### Bug description: Ref: https://docs.python.org/3/library/__main__.html There is a script and entry-point example which has a conditional upon `__main__.__file__` and also a remark like: > Note that in this case the `__main__` s...
a4760ef8e5463116b3076e0f5e3c38b314f7b20f
01d91500ca5b40bd84ef27fdf1f858a25c602bdb
python/cpython
python__cpython-128741
# Race between Py_SetRecursionLimit and _Py_LeaveRecursiveCallPy under free-threading # Bug report ### Bug description: Under Python 3.13 at commit 65da5db28a39cb0d9ee311206bdc8745b482c56f, we see the following TSAN race: ```python import concurrent.futures import functools import sys import threading num_threads ...
f6c61bf2d7d8b66ccd9f16e723546bdcc251a3d0
ff39e3ff7bebc9d700d89c5cd22145db2c879cf2
python/cpython
python__cpython-129016
# Race in func_get_annotations under free-threading # Bug report ### Bug description: With CPython 3.13 from commit 65da5db28a39cb0d9ee311206bdc8745b482c56f TSAN reports the following race, which looks right: the initialization of `p->func_annotations` is racy. Reproducer: ```python import concurrent.futures impor...
55f17b77c305be877ac856d6426b13591cbc7fc8
63f0406d5ad25a55e49c3903b29407c50a17cfd5
python/cpython
python__cpython-128854
# Windows 10 Mimetypes for .webp return empty # Bug report ### Bug description: on Windows 10 [`guess_file_type()`](https://github.com/python/cpython/blob/3.13/Lib/mimetypes.py#L151) checking `.webp` file return `tuple('', None)` not `tuple('image/webp', None)` The problem is `db.read_windows_registry()` over...
303043f5062c1e7ffb7907abde61dbf13c98f8e9
3402e133ef26736296c07992266a82b181a5d532
python/cpython
python__cpython-128701
# sysconfig.get_platform(): specify result for Windows ARM64 https://docs.python.org/3/library/sysconfig.html#sysconfig.get_platform currently says for Windows: > Windows will return one of: > - win-amd64 (64bit Windows on AMD64, aka x86_64, Intel64, and EM64T) > - win32 (all others - specifically, sys.platform...
553cdc6d6856c1b4539a45eb90d0769f7c629355
1b39b502d33c68f52fd775c4e6c2174baddd40bd
python/cpython
python__cpython-128702
# `./python.exe -m test test_types test_inspect` fails as `(env changed)` # Bug report ``` » ./python.exe -m test test_types test_inspect Using random seed: 1107570136 0:00:00 load avg: 3.01 Run 2 tests sequentially in a single process 0:00:00 load avg: 3.01 [1/2] test_types 0:00:00 ...
65b484db97b170af0f0e50655c4dcc6b9b1af8e9
2fcdc8488c32d18f4567f797094068a994777f16
python/cpython
python__cpython-128693
# `threading.local()` access should scale well from multiple threads Currently, accessing a `threading.local()` from multiple threads doesn't scale well because of reference count contention on the shared `_thread._local` object. We should use deferred reference counting on `_thread._local` to avoid this bottleneck. ...
c1417487e98e270d614965ed78ff9439044b65a6
087bb48acac997c06e69dae25bae2dd75194b980
python/cpython
python__cpython-128708
# `LOAD_CONST_IMMORTAL` doesn't survive being instrumented and de-instrumented. # Bug report ### Bug description: When instrumenting, instructions are first de-optimized to their base instruction. When instrumentation is removed we assume that specialization will restore the specialized instruction. However, that do...
ddd959987c557beaf823b681bf5e5e573ad657ac
29fe8072cf404b891dde9c1d415095edddbe19de
python/cpython
python__cpython-128674
# `typing.get_type_hints` is not fully covered <img width="1338" alt="Снимок экрана 2025-01-09 в 15 23 03" src="https://github.com/user-attachments/assets/027336ba-bcbf-4156-b3bf-7b657fc74b63" /> I will send a PR with a new test. <!-- gh-linked-prs --> ### Linked PRs * gh-128674 <!-- /gh-linked-prs -->
43ac9f505903ba806aa6a5d93e6a67beb04bebc4
ea39c8b08d8f025273bfa5b7a95f7b5984dc1e86
python/cpython
python__cpython-128663
# `typing.evaluate_forward_ref` is not fully covered Right now it is: <img width="1341" alt="Снимок экрана 2025-01-09 в 11 36 03" src="https://github.com/user-attachments/assets/6a44ec6e-3012-46ed-9e90-cac2e6a6d767" /> I have a PR ready. <!-- gh-linked-prs --> ### Linked PRs * gh-128663 * gh-128930 <!-- /gh-linke...
b725297cee9e5608b709f3c7291d974c97f68fff
43ac9f505903ba806aa6a5d93e6a67beb04bebc4
python/cpython
python__cpython-128886
# Race in py_digest_by_name, _hashopenssl.c under free-threading # Bug report ### Bug description: I built cpython (3.13 branch) with free-threading and TSAN. The following python code from time to time reports TSAN warnings: ```python import hashlib import concurrent.futures import threading def _hash_string(hash...
c1f352bf0813803bb795b796c16040a5cd4115f2
5ce70ad129d2e34a09f8ae6ee0542f4f996fb8ec
python/cpython
python__cpython-128651
# incorrect statement in partial documentation # Documentation Now: ```rst ...; without :data:`!Placeholder`, only the first positional argument can be pre-filled. ``` Should be: ```rst ...; without :data:`!Placeholder`, only the chosen number of leading positional arguments can be pre-filled. ``` <...
8af57810946c216b3e18c94c8f0ee3c0c96566a9
7dc41ad6a7826ffc675f088972de96624917696e
python/cpython
python__cpython-128647
# GzipFile.readinto reads full file before copying into the provided buffer # Bug report ### Bug description: gzip.GzipFile uses the BufferedIOBase implementation of `.readinto()`, which simply calls `.read` and copies the result into a buffer. This negates the purpose of using `.readinto()` at all. This may be con...
72e5b25efb580fb1f0fdfade516be90d90822164
78790811989ab47319e2ee725e0c435b3cdd21ab
python/cpython
python__cpython-129596
# Significant Configparser Performance Regression # Bug report ### Bug description: Hello, @jaraco! The following commit https://github.com/python/cpython/commit/019143fecbfc26e69800d28d2a9e3392a051780b slows down `ConfigParser.read()` from 2 to 6 times. `_Line` is created many times when reading a file and t...
cd6abe27a2582786da7b4b8bb008910563f31735
071820113f11b8f6a21f98652d0840e10268114c
python/cpython
python__cpython-128744
# NULL ptr deref in _PyCode_ConstantKey when compiling code # Crash report ### What happened? Unfortunately it's a slightly large minimal reproducer. You can use `xxd -r` to go from the hexdump to the actual binary. ``` ~/p/cpython ❯❯❯ xxd ~/Downloads/clusterfuzz-testcase-minimized-fuzz_pycompile-5092056728403968 ...
891c61c1fa480928dd60cce8bbc8764630c95025
d1db43c139121202898e2d75df43ed2eb06a8470
python/cpython
python__cpython-128630
# Add Py_PACK_VERSION macros Add these to limited API: * `Py_PACK_FULL_VERSION(x, y, z, level, serial)`: pack a version number from components into the format used by `Py_VERSION_HEX` and `Py_LIMITED_API`. For example, `Py_PACK_FULL_VERSION(3, 14, 0, 0xA, 1)` evaluates to 0x030E00A1. * `Py_PACK_VERSION(x, ...
1439b81928f1b52c5a0ac7fd81fdd66afd5f72da
4685401845ba3e2ab8c9f4a9a10aa2969b11985f
python/cpython
python__cpython-128628
# Emscripten: Use wasm-gc for call trampolines instead of JS type reflection Followup to: #121698. WebAssembly in the browser is soon gaining stack switching support, but we're not allowed to stack switch through JS frames. The stack switching support used to require the wasm-js-type-reflection proposal, so in #121698...
d0ecbdd838034c1f061e9b4e9b54a900141458c3
5e65a1acc0b630397f1d190aed279114e6e99612
python/cpython
python__cpython-128618
# `test_typing.test_readonly_inheritance` does not work correctly # Bug report https://github.com/python/cpython/blob/cdfb8bc93a4d8c06d2404ba2d243937ba209438c/Lib/test/test_typing.py#L8904-L8921 Notice that it always tests `Child1` and never `Child2` Refs https://github.com/python/cpython/commit/df4784b3b7519d137ca...
971a52b5495e3d596e599faa1f31d4671897026d
474e419792484d1c16e7d9c99b7bf144136b9307
python/cpython
python__cpython-128616
# Pickling of `ParamSpecArgs` and `ParamSpecKwargs` is not covered <img width="519" alt="Снимок экрана 2025-01-08 в 12 17 31" src="https://github.com/user-attachments/assets/8e7e8e45-0849-46ee-af3b-ea044f72364c" /> I also tried to remove these lines and executed (just to be sure): ``` ./python.exe -m test tes...
74a517181a9bb65a1f6da149af7427a9fcb3add3
95cd9c669cdc7718198addb1abb49941a2c61fae
python/cpython
python__cpython-128614
# `typing.Concatenate` is not fully covered Coverage reports: <img width="1324" alt="Снимок экрана 2025-01-08 в 11 59 22" src="https://github.com/user-attachments/assets/667eb627-c4ff-4106-be5c-ad6e4d10400a" /> I think that we need to cover these lines in tests. PR is ready. <!-- gh-linked-prs --> ### Linked PRs...
eb26e170695f15714b5e2ae0c0b83aa790c97869
971a52b5495e3d596e599faa1f31d4671897026d
python/cpython
python__cpython-128498
# Default to stdout isatty for colour detection instead of stderr # Bug report ### Bug description: The terminal colour detection defaults to checking `stderr`'s `isatty`, rather than `stdout`. As suggested at https://github.com/python/cpython/issues/128317#issuecomment-2569566697, let's default to checking `stdout...
6f167d71347de6717d9f6b64026e21f23d41ef0b
a42915979796565635dcfcd45d2b62b3e5e46eba
python/cpython
python__cpython-129063
# Cancellation leaks out of asyncio.TaskGroup on 3.12 when using eager tasks # Bug report ### Bug description: ```python import sys import asyncio if sys.platform == "win32": EventLoop = asyncio.ProactorEventLoop else: EventLoop = asyncio.SelectorEventLoop async def demo(): class MyError(Exception): ...
ed6934e71e55d398df8263f4697f58e4a3815f69
ab61d3f4303d14a413bc9ae6557c730ffdf7579e
python/cpython
python__cpython-128718
# A new tail-calling interpreter for significantly better interpreter performance # Feature or enhancement ## Proposal Prior discussion at: https://github.com/faster-cpython/ideas/issues/642 I propose adding a tail-calling interpreter to CPython for significantly better performance on compilers that support it. Th...
cb640b659e14cb0a05767054f95a9d25787b472d
555dc50c811e3e9ebdc30a1d511cf48a32666d6f
python/cpython
python__cpython-128604
# tkinter widget instance name sometimes duplicated on inherited class # Bug report ### Bug description: If you run de following code: ```python import tkinter as tk class Label2(tk.Label): def __init__(self, top, text): tk.Label.__init__(self, top, text=text, bg='Yellow') w = tk.Tk() ...
da8825ea95a7096bb4f933d33b212a94ade10f6e
402b91da87052878b4e7e8946ba91bdf4ee4bebe
python/cpython
python__cpython-128560
# Asyncio should not import typing at runtime # Feature or enhancement ### Proposal: Currently, asyncio.timeout imports final, Type, and Optional from typing. final has no impact on type checkers, as they use the typeshed for the standard library, and type and optional can be written without importing from typing. ...
7363476b6405e3d288a61282aa7bc6aca9c2114d
61c1a2478e6da8dc6dbdce4d6ac66b03d5963710
python/cpython
python__cpython-128553
# TaskGroup's task's exception's participate in a reference cycle, via TaskGroup.create_task -> task -> exception and loop.create_task -> task -> exception # Bug report ### Bug description: the following test fails when run with eager tasks ```python async def test_exception_refcycles_parent_task(self): ...
61b9811ac6843e22b5896ef96030d421b79cd892
6ea04da27036eaa69d65150148bb8c537d9beacf
python/cpython
python__cpython-130569
# Find a way to handle branch events in `async for` When instrumenting regular `for` loops, we instrument the `FOR_ITER` instruction as the `LEFT` branch and the `POP_ITER` instruction as the `RIGHT` branch. This doesn't work for `async for` as it uses exceptions to exit the loop. Raising an exception is the docum...
2a18e80695ac1f05c95ea3b1cfe29defd45e2f71
fda056e64bdfcac3dd3d13eebda0a24994d83cb8
python/cpython
python__cpython-128554
# `NOT_TAKEN` instructions need to be added after optimization The `NOT_TAKEN` instruction is added during code gen, but can be left when jumps are removed by the optimizer. We should probably add the `NOT_TAKEN` instructions in the assembler after optimization, as suggested in https://github.com/python/cpython/pul...
2434fd2d50b8b770585ad5949a664e4bbab4bde1
b6c919b674549d519efbbc378588ca6d3efc7242
python/cpython
python__cpython-128521
# Update the docstring of `untokenize()` to match the docs # Documentation In https://github.com/python/cpython/issues/128031, it was deemed too risky to change `untokenize()` to more closely match the original input string. We should update the docstring of `untokenize` to reflect that and prevent confusion in the...
aef52ca8b334ff90e8032da39f4d06e7b5130eb9
a62ba52f1439c1f878a3ff9b8544caf9aeef9b90
python/cpython
python__cpython-128845
# Test BOLT builds in CI # Feature or enhancement As part of https://github.com/python/cpython/issues/101525, we should run BOLT optimizations in CI. It looks like optimizations aren't tested in CI right now, just on the build bots? I could use some guidance on the best place for this. <!-- gh-linked-prs --> ### Li...
9ed7bf2cd783b78b28f18abc090f43467a28f4aa
3829104ab412a47bf3f36b8c133c886d2cc9a6d4
python/cpython
python__cpython-128510
# Add an API for determining if an object is immortal # Feature or enhancement ### Proposal: Immortal objects might lead to some unexpected results for users that are (unfortunately) messing with reference count details, as seen in #127191; but currently, there's no way to determine what objects are actually immorta...
9ba281d871c4df3a3ac4cb7896d24ba0d42751a3
60a85415aeb5a8be54b3c412d19a7444bf5ac757
python/cpython
python__cpython-128506
# Upgrade doctest CI to Ubuntu-24.04 # Feature or enhancement ### Proposal: As title, since most of CI run in `ubuntu-24.04`, and Doctest CI was pinned to `ubuntu-22.04` according to #125236. Maybe we can upgrade it now. ### Has this already been discussed elsewhere? No response given ### Links to previous disc...
2228e92da31ca7344a163498f848973a1b356597
ae23a012e6c8aadc4a588101cbe7bc86ede45627
python/cpython
python__cpython-131633
# Race in _ctypes_alloc_callback and libffi under free-threading # Bug report ### Bug description: I built libffi with TSAN and cpython (3.13 branch) with free-threading and TSAN. The following python code reports TSAN warnings: ```python import ctypes import concurrent.futures import threading def te...
04d4aacaacbe26146e9b5ff6b0043f86f3c543d4
9c4fb92e126000650a8efb4d27c4e3d1af82f71e
python/cpython
python__cpython-128484
# Missing documentation for `traceback.FrameSummary.end_{col,line}no` attributes These attributes were added in Python 3.11, as part of [PEP-657](https://peps.python.org/pep-0657/), and I believe they're intended to be public API. If so, adding them to the `__init__` docstring would be nice! (prompted by checking ...
051f0e5683fec3840fa7fc99723741dd2d701eae
37145cb89fe806377a5e9ed1fdac92dd3a5df2c0
python/cpython
python__cpython-128475
# asyncio.staggered.staggered_race can log NameError: cannot access free variable 'exceptions' where it is not associated with a value in enclosing scope # Bug report ### Bug description: https://github.com/Chia-Network/chia-blockchain/actions/runs/12586550910/job/35084132471#step:16:1813 ``` ______ test_long_reorg...
ec91e1c2762412f1408b0dfb5d281873b852affe
cf0b2da1e6947aa15be119582c2017765ab46863
python/cpython
python__cpython-128511
# BOLT fails with `--enabled-shared` on LLVM 19 with "unable to get new address" # Bug report ### Bug description: As originally reported in https://github.com/astral-sh/python-build-standalone/pull/463 > LLVM 19.x has a hard error when handling PIC compiled functions containing computed gotos. It appears pri...
24b147a19b360c49cb1740aa46211d342aaa071f
953b49e5468d02afaddadc2307f4763422078603
python/cpython
python__cpython-128457
# BOLT uses deprecated option `-reorder-functions=hfsort+` # Bug report ### Bug description: Building with BOLT optimizations emits the following warning ``` BOLT-WARNING: '-reorder-functions=hfsort+' is deprecated, please use '-reorder-functions=cdsort' instead ``` From the usage at https://github.com/python/cpyt...
4974bbdb290b61a2d8860de490fde1228c296753
befcfdfdaba15ecae38739ecabebd8046c1b1977
python/cpython
python__cpython-129478
# New warning in the main (b4f799b1e7): ./Modules/socketmodule.c # Bug report ### Bug description: ./configure -q && make -s give me ``` [...] ./Modules/socketmodule.c: In function ‘sock_accept’: ./Modules/socketmodule.c:474:23: warning: ‘ctx.result’ may be used uninitialized [-Wmaybe-uninitialized] 474 | # defin...
c07ac3c86a8f5021e27bf2c27c6bf0a25229d846
10ee2d9d3bcde27c75f179214ad41c00e4852a7a
python/cpython
python__cpython-128450
# Skip Windows CI for `configure`/`Makefile` changes # Feature or enhancement There should be no need to run the Windows CI for \*nix build system changes. Suggesting we skip the Windows CI for `configure`/Make related changes. <!-- gh-linked-prs --> ### Linked PRs * gh-128450 * gh-130434 * gh-130435 * gh-131702 * g...
b05fa90b21dd01bb836285cdd41920320b09e681
06ac157c53046f4fcad34383ef131f773085f3d5
python/cpython
python__cpython-128455
# Bolt instrumentation missing `-update-debug-sections` # Bug report ### Bug description: The following warning is displayed during BOLT instrumentation ``` BOLT-WARNING: debug info will be stripped from the binary. Use -update-debug-sections to keep it. ``` The flag is provided during "apply" https://github.com/...
b60044b838f3ea97395cd6f3adbd5330356fc273
0cafa97932c6574734bbaa07180bbd5a762b01a6
python/cpython
python__cpython-128429
# Support Nil and Max UUID formats from RFC 9562 # Feature or enhancement ### Proposal: RFC 9562 defines Nil and Max UUID formats: - https://www.rfc-editor.org/rfc/rfc9562.html#name-nil-uuid - https://www.rfc-editor.org/rfc/rfc9562.html#name-max-uuid I've often had a need to use these as placeholders, sentinels or...
8ec76d90340287eb3587f0ae388bbfe158fb28d8
d8e16ef7037ac254e4799d2991c7fc3fe576c545
python/cpython
python__cpython-128428
# Free-threading C API HOWTO should mention PySequenceFast API Right now [this page](https://docs.python.org/3/howto/free-threading-extensions.html#general-api-guidelines) says that macros that access the internal state of data structures are thread-unsafe, but because `PySequenceFast` is a function I completely misse...
e7adeecc2b318505eb53bc779320f028be40cccc
8eebe4e6d02bb4ad3f1ca6c52624186903dce893
python/cpython
python__cpython-128728
# data races in frame inspection and tracebacks Run the tests with https://github.com/python/cpython/pull/128147 and tsan enabled: ```console env TSAN_OPTIONS=suppressions={$PWD}/Tools/tsan/suppressions_free_threading.txt ./python -m test test_asyncio -F ``` TSAN Warnings: <details> ``` WARNING: ThreadSani...
75214f87f1ddd1d7b9a5b663a9c688b1bd41c098
bf64a582f00a030fee11b7f89c6a02ea967990ca
python/cpython
python__cpython-128410
# Document `pdb.post_mortem()` accepts exceptions on Python 3.13+ # Documentation Some change in Python 3.13 (maybe 5f3433f210d25d366fcebfb40adf444c8f46cd59 or related) allows `pdb.post_mortem()` to accept an exception object, as well as a traceback object. This could be useful to use for chained exception access, ...
1b39b502d33c68f52fd775c4e6c2174baddd40bd
802556abfa008abe0bdd78e6f9e18bef71db90c1
python/cpython
python__cpython-128422
# Crash when using _Py_DumpTracebackThreads # Crash report ### What happened? ```python # triggering program # based on test.test_faulthandler.FaultHandlerTests.test_dump_traceback_threads import faulthandler from threading import Thread, Event class Waiter(Thread): def __init__(self): Thread.__init_...
c9356feef28e6dfc4dc32830d3427a5ae0e426e2
a626f9a67b76e5fe69677afd5f8317d8c61de8de
python/cpython
python__cpython-132218
# Suggest `async with` when `with` finds no `__enter__`/`__exit__` # Bug report ### Bug description: (This is *not* an asyncio bug! I am just using `asyncio.TaskGroup()` as an example.) ```python import asyncio def foo(): with asyncio.TaskGroup() as g: # BUG: should be `async with` pass ``` This curren...
8a9c6c4d16a746eea1e000d6701d1c274c1f331b
95800fe6e719c829acf52fbb00198135b78719b4
python/cpython
python__cpython-130235
# PEP 667 + PEP 709 segfaults from accessing closure variables bound by any inlined comprehensions # Bug report ### Bug description: The segfault described here is related to PEP-667 and PEP-709. I think I experienced a couple of similar but not same segfaults, and this here is just one of a few of them. I mi...
ccf17323c218a2fdcf7f4845d3eaa74ebddefa44
5f00501a940a0fb97870e70066fb301909320388
python/cpython
python__cpython-128389
# `pyrepl` on Windows: add Ctrl+← and Ctrl+→ word-skipping and other keybindings # Feature or enhancement ### Proposal: Currently, `_pyrepl/windows_console.py` is very limited compared to `_pyrepl/unix_console.py`, for example, it doesn't support the `Ctrl`+`←` and `Ctrl`+`→` word-skipping keybindings (see also #119...
688f3a0d4b94874ff6d72af3baafd8bbf911153e
baf65715fc9002e43cd0e1010b8dba9b4c84d503
python/cpython
python__cpython-128378
# `test_cmd_line.test_non_interactive_output_buffering` fails when `PYTHONUNBUFFERED` is enabled # Bug report ### Bug description: Reproducer: ```bash ➜ cpython git:(main) ✗ export PYTHONUNBUFFERED=1 ➜ cpython git:(main) ✗ python3 -m test test_cmd_line Using random seed: 2481773783 Raised RLIMIT_NOFILE: ...
30268b5d2fbb1a5e6c876f0cdc4cbdb5d93315e6
22a442181d5f1ac496dac08e24fd852de404882f
python/cpython
python__cpython-128445
# Performance of instrumented `FOR_ITER` is poor as `DISABLE` doesn't remove the instrumentation. Disabling the "not taken" branch of an instrumented `FOR_ITER` does not de-instrument the `FOR_ITER`, it only de-instruments the `NOT_TAKEN` which prevents specialization and JIT compilation of the `FOR_ITER`. It is only ...
f826beca0cedb8e4b92896544c75fd0d9dcb0446
b9c693dcca01537eee1ef716ffebc632be37594b
python/cpython
python__cpython-130724
# `test_concurrent_futures.test_wait.ThreadPoolWaitTests.test_timeout` flakes frequently on free-threaded Windows x64 # Bug report ### Bug description: The following test fails frequently, but not consistently: ``` test_timeout (test.test_concurrent_futures.test_wait.ThreadPoolWaitTests.test_timeout) ... FAI...
5221d9ce0e2beb0fe04bed072e1bb448fd522882
cfa0b1dc375e63cde28e61a47108c645b0e74834
python/cpython
python__cpython-128361
# Migrate from `PyGILState_Check` to thread state checks internally # Feature or enhancement ### Proposal: In some older areas of the codebase, we have the following to ensure that the caller holds the GIL (or really, an [attached thread state](https://github.com/python/cpython/pull/127990)): ```c assert(PyGILState...
4d0a6595a06c554c57ebd90ee64ff4c2bec239b8
c6b570e5e3b214d2038645c5fa7806e0fb3f7dcd
python/cpython
python__cpython-128359
# `LDFLAGS` and `LIBS` not used consistently in `configure` # Bug report ### Bug description: Following up on #128322, I noticed that the same pattern of setting `LDFLAGS` instead of `LIBS` is used frequently. Additionally, there is not consistency in the ordering of the added libraries, e.g., `LIBS="$LIBS ..."` vs ...
b75ed951d4de8ba85349d80c8e7f097b3cd6052f
4974bbdb290b61a2d8860de490fde1228c296753
python/cpython
python__cpython-128379
# Docs: decimal.BasicContext etc. are not classes # Documentation The `decimal` module exports three constants `BasicContext`, `ExtendedContext` and `DefaultContext`, which are instances of `Context`: ``` $ python3 Python 3.13.1 (main, Dec 20 2024, 10:15:12) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin Type...
60c65184695a3eab766b3bc26fc99f695deb998f
c810ed7c8e0a7464d19700ba1c8668a406f1c042
python/cpython
python__cpython-128344
# GIL is not properly disabled for _freeze_module.vcxproj # Bug report ### Bug description: The _freeze_module.vcxproj file is looking for `#undef Py_GIL_DISABLED`, but that was changed to `/* #define Py_GIL_DISABLED 1 */` some time ago, so the build system ends up looking to replace a line that doesn't exist, t...
c26bed1160978fe8b1844878b8123778e47870c6
a13460ac4427892be613bf0e2988f5a2b2364602
python/cpython
python__cpython-128343
# Timeout unit isn't specified in subprocess docstrings # Documentation Timeout unit isn't specified in subprocess docstrings. For example here: ``` def run(*popenargs, input=None, capture_output=False, timeout=None, check=False, **kwargs): """Run command with arguments and return a CompletedProcess...
dafe7a44630aa32bb411cceb45c7b7df725e3fe3
47d2cb8eb7595df5940225867dbb66b6dd59413a
python/cpython
python__cpython-128331
# Terminal settings are not correctly restored on repl exit # Bug report ### Bug description: I am working on updating the version of Python that ships in [OmniOS](https://omnios.org) -- an illumos distribution -- from 3.12 to 3.13 and have encountered a problem with terminal settings not being properly restored...
0b15d9c0d2d30c7d3f17ebb90dd822ef32f977cc
ec91e1c2762412f1408b0dfb5d281873b852affe
python/cpython
python__cpython-128322
# Statically linked `sqlite3` fails checks due to missing `-lm` # Bug report ### Bug description: On Linux, if I build a static version of sqlite3 (e.g., `./configure --disable-shared && make` from a sqlite3 tarball) You can see that `./configure` for CPython fails the SQLite checks (added back in https://git...
81376fef76a53fb79893bfa9c9db18d97c228fbe
ef63cca494571f50906baae1d176469a3dcf8838
python/cpython
python__cpython-128318
# Highlight today in colour in calendar's CLI output # Feature or enhancement In Python 3.13 we added colour output to the new REPL, tracebacks and doctest, and in 3.14 to unittest and `test.regrtest`, which can also be controlled with the `PYTHON_COLORS`, `NO_COLOR` and `FORCE_COLOR` environment variables: * https:...
f21af186bf21c1c554209ac67d78d3cf99f7d7c0
fa985bee6189aabac1c329f2de32aa9a4e88e550
python/cpython
python__cpython-128768
# asyncio eager tasks' names are set too late # Bug report ### Bug description: consider: ```python import asyncio async def main(): names = [] async with asyncio.TaskGroup() as tg: async def append_name(): names.append(asyncio.current_task().get_name()) tg.create_task(append_n...
38a99568763604ccec5d5027f0658100ad76876f
6c914bf85cc3a07e22e4618d0b5607c158e3cf66
python/cpython
python__cpython-128306
# add eager_start parameter to loop.create_task # Feature or enhancement ### Proposal: We want to be able to opt in and opt out of eager tasks anywhere in the asyncio call stack, eg in some asyncio library, and not rely on some other asyncio framework setting the default. ### Has this already been discussed e...
08d7687094c6acb8c2ea1925a292a94ce1246c82
c4cc5d58aee6a3be55a95efee6ec25d5774f7b5f
python/cpython
python__cpython-128284
# Bug in `xml.dom.xmlbuilder.DOMBuilder.parse()` # Bug report ### Bug description: I believe there is a bug in `xml.dom.xmlbuilder.parse()`. `xml.dom.xmlbuilder` is not documented by python, we don't have any tests for them, and I can't find evidence on github of these classes being in use. That's okay, bec...
6ea04da27036eaa69d65150148bb8c537d9beacf
145276a072ae058bac42ee43a4235cd4eda2726b
python/cpython
python__cpython-128280
# Build failure on NetBSD: Incorrect number of arguments to 'pthread_setname_np' in _threadmodule.c # Bug report ### Bug description: ```sh ./configure --with-pydebug && make -j3 ``` Output: ```sh gcc -pthread -fno-strict-overflow -Wsign-compare -g -Og -Wall -O2 -std=c11 -Wextra -Wno-unused-parameter -Wno-missing...
492b224b991cd9027f1bc6d9988d01e94f764992
2cf396c368a188e9142843e566ce6d8e6eb08999
python/cpython
python__cpython-128286
# Make `socket` module thread safe While working on https://github.com/python/cpython/issues/128002, I am seeing many tsan warning because of socket modules. This issue tracks work for making it thread safe. <!-- gh-linked-prs --> ### Linked PRs * gh-128286 * gh-128304 * gh-128305 <!-- /gh-linked-prs -->
e389d6c650ddacb55b08b657f1e4e9b1330f3455
b2ac70a62ad1be8e037ce45ccf5f1b753ea5e64b
python/cpython
python__cpython-128264
# Remove un-necessary socket requirements in pdb async tests ### Proposal: the pdb async tests should run coroutines using coro.send(None) because they don't need an async framework to run. This would remove asyncio from the tests and support running on emscripten/wasi ### Has this already been discussed elsewher...
aab51c3414bc815c4c31e8ef2a9003f4a546faa9
aeb9b65aa26444529e4adc7d6e5b0d3dd9889ec2
python/cpython
python__cpython-128263
# Classes with __slots__ ought to be specialized when constructing instances # Feature or enhancement ### Proposal: Right now simple classes have the `CALL_ALLOC_AND_ENTER_INIT` specialization when calling their constructor. This however, blocks classes with `__slots__`. I propose relaxing the requirement and allowi...
7ef49074123511003c8b7f7f3ba2a4e05285e8dc
dafe7a44630aa32bb411cceb45c7b7df725e3fe3
python/cpython
python__cpython-95888
# Remove un-necessary socket requirements in `contextlib` async tests ### Proposal: the contextlib async tests should run coroutines using coro.send(None) because they don't need an async framework to run. This would remove asyncio from the tests and support running on emscripten/wasi <!-- gh-linked-prs --> ### Li...
81636d3bbd7f126692326bf957707e8a88c91739
76f1785657fde0ebee082b0df54da8f7c911c369
python/cpython
python__cpython-129488
# In the new REPL, multiline input execution should fail fast # Bug report ### Bug description: To reproduce, simply paste this to the new REPL: ```py raise Exception print("But I'm powerful enough to bypass it") ``` Make sure what you are seeing is: ```pycon >>> raise Exception ... print("But I'm ...
7ed3dc6392613832f66c63507385b1da109cbf21
9f25c1f012c8d432a93bf2dcad5f19a64dc00d3c
python/cpython
python__cpython-128228
# `Doc/requirements-oldest-sphinx.txt` needs to be regenerated # Bug report ### Bug description: Due to https://github.com/python/cpython/security/dependabot/12 and https://github.com/python/cpython/security/dependabot/11, the dependency file must be regenerated (it's fine if those links go nowhere, only triager...
7985d460c731b2c48419a33fc1820f9512bb6f21
7ed6c5c6961d0849f163d4d449fb36bae312b6bc
python/cpython
python__cpython-128367
# Race between ` PyUnicode_SET_UTF8` and `_PyUnicode_CheckConsistency` # Bug report ### Bug description: Reproducible by running : 1. `env CC=clang CXX=clang++ ./configure --disable-gil --with-thread-sanitizer --with-pydebug && make -j` 2. `env TSAN_OPTIONS=suppressions=${PWD}/Tools/tsan/suppressions_free_threadin...
8eebe4e6d02bb4ad3f1ca6c52624186903dce893
c9356feef28e6dfc4dc32830d3427a5ae0e426e2
python/cpython
python__cpython-128202
# ``test_pdb`` raises a ``DeprecationWarning`` # Bug report ### Bug description: ```python eclips4@nixos ~/p/p/cpython (main)> ./python -m test -v test_pdb -m test_pdb_next_command_for_coroutine == CPython 3.14.0a3+ (heads/main:180d417e9f9, Jan 1 1980, 00:00:00) [GCC 13.3.0] == Linux-6.6.63-x86_64-with-glibc2.40 lit...
d9ed42bc00c74b3150be2a0eb28da03e01dffcc7
418114c139666f33abff937e40ccbbbdce15bc39
python/cpython
python__cpython-128199
# Add missing error checks for usages of `PyIter_Next` # Bug report ### Bug description: Not all usages of `PyIter_Next` in the codebase comply with specified behavior: https://github.com/python/cpython/blob/180d417e9f9456defd4c5b53cae678c318287921/Objects/abstract.c#L2905-L2919. One example would be: https://github...
5c814c83cdd3dc42bd9682106ffb7ade7ce6b5b3
81636d3bbd7f126692326bf957707e8a88c91739
python/cpython
python__cpython-128203
# Add `_REPLACE_WITH_TRUE` to the tier 2 optimizer # Feature or enhancement ### Proposal: `_REPLACE_WITH_TRUE` is not currently in the tier 2 optimizer's known list, resulting in some missed opportunities. To add it, here are the following steps: 1. Add a new bytecode definition `_REPLACE_WITH_TRUE` in `Python/opti...
30efede33ca1fe32debbae93cc40b0e7e0b133b3
d61542b5ff1fe64705e5ce1bcc53048f14098dba
python/cpython
python__cpython-128193
# Support HTTP digest authentication algorithm SHA-256 as per RFC-7617 # Feature or enhancement ### Proposal: Support SHA-256 digest authentication following RFC7616 - https://datatracker.ietf.org/doc/html/rfc7616 CPython currently supports MD5 and SHA1 only. Other possible methods include `SHA-256-ness`, `SHA-512...
f9a5a3a3ef34e63dc197156e9a5f57842859ca04
492b224b991cd9027f1bc6d9988d01e94f764992
python/cpython
python__cpython-128490
# `ctypes` pointer writes are not thread safe # Bug report ### Bug description: Part of #127945. `ctypes` C data objects have an internal pointer for what they're looking at (`b_ptr`). This field itself is generally fine to read non-atomically, because ctypes objects don't tend to overwrite the pointer that t...
8dfc743a1dae499d3b116b81ef6aad78708c45bc
5044c2245c1519e117ba3977a4c8f608785326e7
python/cpython
python__cpython-128680
# Use of `ffi_type_complex_double` is unguarded # Bug report ### Bug description: e.g. ``` -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -Werror=unguarded-availability-new -I./Include/internal -I./Include/inte...
d3b1bb228c951f8245f36ee28d9b175786522730
7239da75592081b6e8d0917a2cd2bf19907c8165
python/cpython
python__cpython-128151
# Improve performances of `uuid.*` functions # Feature or enhancement The dedicated UUID constructors (e.g., `uuid.uuid4()`) generate bytes and pass them to the `UUID` constructor. However, the latter performs multiple and redundant checks. We can by-pass those checks since we are actually creating manually the UUI...
6ff8f82f92a8af363b2bdd8bbaba5845eef430fc
39fc7ef4fe211e8f7d3b5a6e392e475ecdfbce72
python/cpython
python__cpython-128165
# 3.14 build error after recent commit: `pylifecycle.c:50:12: fatal error: os/log.h: No such file or directory` # Bug report ### Bug description: The recent commit https://github.com/python/cpython/commit/2041a95e68ebf6d13f867e214ada28affa830669 has broken the build of Python for a number of macOS versions, since `<...
e837a1f71e832ce8f551a6fac05e346f654457e0
24b147a19b360c49cb1740aa46211d342aaa071f
python/cpython
python__cpython-128196
# Race in PyUnicode_InternFromString under free-threading # Bug report ### Bug description: Here's a race reported by thread sanitizer that I haven't been able to find a small reproducer for, but it does look racy reading the code. ``` WARNING: ThreadSanitizer: data race (pid=1575489) Read of size 4 at 0x7fb14614...
ae23a012e6c8aadc4a588101cbe7bc86ede45627
b60044b838f3ea97395cd6f3adbd5330356fc273
python/cpython
python__cpython-128412
# Race in bytes_hash under free-threading # Bug report ### Bug description: Run the following reproducer under Python 3.13.1t with free-threading enabled: ```python import concurrent.futures import functools import threading num_threads = 8 def closure(b, x): b.wait() x.__hash__() with concurrent.futures.Thre...
0706bab1c0985761cdbc07ab448f98c717276b36
b49c68a1b3dfd2c2567c38b2d044c4a1c14a26a7
python/cpython
python__cpython-129975
# Race on `_PyRuntime.signals.unhandled_keyboard_interrupt` when calling `eval()` concurrently in free-threading mode # Bug report ### Bug description: Run the following code under Python 3.13.1t with thread-sanitizer enabled: ```python from collections import namedtuple import concurrent.futures import functools i...
451f291baaff918228ace4e8257be42737d7654a
aa284232013693103431fb672a0bcabac3d4200b
python/cpython
python__cpython-128119
# Improve performance of copy.copy # Feature or enhancement ### Proposal: Similar to the approached used for `copy.deepcopy` in #114266 we can simplifly the implementation of `copy.copy` and improve performance by checking on the type of the argument using a lookup. ### Has this already been discussed elsewhere? ...
34b85ef26c44bbbd8a05d3e7dee6997b3623aab0
348012432155271cfbee71a78d0c27254fc230e2
python/cpython
python__cpython-128120
# [PPC64LE buildbots] test_socket: VSOCK testStream(): recv fails with EACCES on Fedora 41 Example of failure: https://buildbot.python.org/#/builders/1467/builds/303/steps/6/logs/stdio ``` Traceback (most recent call last): File ".../Lib/test/test_socket.py", line 550, in testStream msg = self.conn.recv(10...
cbfe3023e46b544b80ea1a38a8c900c6fb881554
0974d7bb866062ed4aaa40f705d6cc4c294d99f1
python/cpython
python__cpython-128106
# `test_strftime_y2k` fails while cross-compiling 3.14a3 for `x86_64_v2` and `x86_64_v3` on Linux # Bug report ### Bug description: The PGO test suite fails on the `test_datetime` tests; in particular, the `test_strftime_y2k` test cases. It looks like the padding is wrong: ``` cpython-3.14> AssertionError: '...
bb2dfadb9221fa3035fda42a2c153c831013e3d3
bb73426cafb78691b249ffa50f1872ab6f899d4a
python/cpython
python__cpython-128297
# Race between _PyObject_GenericGetAttrWithDict and ensure_nonmanaged_dict under free-threading # Bug report ### Bug description: Under Python 3.13.1t build with thread-sanitizer: ```python import concurrent.futures import functools import threading num_threads = 100 def closure(b, o): b.wait() getattr(o, "fo...
47d2cb8eb7595df5940225867dbb66b6dd59413a
fe4dd07a84ba423179a93ed84bdcc2b4c99b35a9