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-133184
# iOS compiler stubs override environment-based minimum version specifications # Bug report ### Bug description: Python includes shims for compiler tools on iOS to match GNU conventions for compiler names (e.g., `arm64-apple-ios-clang`) to avoid encoding a user-specific location to a compiler in sysconfig, and to av...
6e907c4d1f8583a3fc80ad70232981c589900378
811edcf9cda5fb09aa5189e88e693d35dee7a2d1
python/cpython
python__cpython-133187
# Compilation failure with --enable-optimizations and --without-doc-strings. # Bug report ### Bug description: `--without-doc-strings` breaks compilation with `--enable-optimizations` as `PROFILE_TASK` has failures, presumably, due to the missing doc strings. 3.12 does not have this problem as `PROFILE_TASK` is allo...
cc39b19f0fca8db0f881ecaf02f88d72d9f93776
8b26b23a9674a02563f28e4cfbef3d3e39876bfe
python/cpython
python__cpython-133240
# PyType_GetModuleByDef can return NULL without exception set The [documentation](https://docs.python.org/3/c-api/type.html#c.PyType_GetModuleByDef) does not mention that this is possible, but if the object passed in is not a heap type it returns `NULL` without setting an exception: ``` PyObject * PyType_GetModuleByD...
fa52f289a36f50d6d10e57d485e5a4f58261222b
662dd294563ce86980c640ad67e3d460a72c9cb9
python/cpython
python__cpython-133170
# Add a C API function to detect temporaries # Feature or enhancement ### Proposal: NumPy has an optimization to detect temporaries created via the NumPy C API (e.g. in NumPy internals) and elide them. This can lead to a significant performance improvement for some operations. In https://github.com/numpy/numpy/issu...
f2379535fe2d2219b71653782d5e31defd9b5556
4701ff92d747002d04b67688c7a581b1952773ac
python/cpython
python__cpython-134047
# UBsan: Remove _Py_NO_SANITIZE_UNDEFINED # Bug report Split out from the #111178 monster-issue: We use the macro `_Py_NO_SANITIZE_UNDEFINED` to disable the UB sanitizer in some hard-to-fix cases, so that we can get a stable, regression-monitoring checker sooner. To fully fix UBsan failures, we should get rid of the...
0a160bf14c4848f50539e52e2de486c641d122a2
22e4a40d9089dde2f1578c4b320f27b20e2e125b
python/cpython
python__cpython-133176
# Line beginning `<tab>` gives completion instead of indentation in pdb multi-line input after `interact` # Feature or enhancement ### Proposal: Line beginning `<tab>` in multi-line input has inconsistent behavior between before and after the `interact` command. ``` python -c 'import pdb; breakpoint()' for i in ran...
327f5ff9fa4291e66079c61c77b273cb953c302f
0e21ed7c09c687d62d6bf054022e66bccd1fa2bc
python/cpython
python__cpython-133368
# test_external_inspection: test_async_global_awaited_by() fails on s390x Fedora Stable Refleaks 3.x Example: https://buildbot.python.org/#/builders/1641/builds/199 ``` FAIL: test_async_global_awaited_by (test.test_external_inspection.TestGetStackTrace.test_async_global_awaited_by) -----------------------------------...
8eaaf1640232191319f83917ef72e7853af25681
a36367520eb3a954c94c71a6b2b64d2542283e38
python/cpython
python__cpython-133144
# Adding an unstable C API for unique references # Feature or enhancement ### Proposal: In #132070, there was a race brought up in free-threading through use of `Py_REFCNT(op) == 1`. The fix is to use `_PyObject_IsUniquelyReferenced`. There were a couple additional comments about how we should handle this for the p...
b275b8f34210bae2fc1e0af23515df5efe911c8e
0eeaa0ef8bf60fd3b1448a615b6b1662d558990e
python/cpython
python__cpython-133145
# Add curses.assume_default_colors() # Feature or enhancement This is a refinement of the `curses.use_default_colors()` function which allows to change the color pair 0. <!-- gh-linked-prs --> ### Linked PRs * gh-133145 <!-- /gh-linked-prs -->
7363e8d24d14abf651633865ea959702ebac73d3
3e256b9118eded25e6aca61e3939fd4e03b87082
python/cpython
python__cpython-133132
# iPhone SE simulator no longer available by default in Xcode 16.4 # Bug report ### Bug description: The iOS testbed attempts to select the "iPhone SE (3rd generation)" simulator as a default option if no simulator is explicitly specified. However, with the release of the iPhone 16e, Xcode 16.3 no longer ships with...
42b0b0667e67ff444a03d0e7b217e77f3aae535d
c46635aa5a20fc1b4c5e85370fa0fa2303c47c14
python/cpython
python__cpython-133118
# Enable type checking of `tomllib` stdlib folder Following example of https://github.com/python/cpython/pull/131509 I propose to add mypy type checking in CI for `tomllib`. It is fully typed already, we just need to run the CI if something changes. <!-- gh-linked-prs --> ### Linked PRs * gh-133118 * gh-133192 * gh-...
5ea9010e8910cb97555c3aef4ed95cca93a74aab
fd0f5d0a5eba0cc8cce8bed085089b842f45e047
python/cpython
python__cpython-133103
# Negative run-time reported by `subprocess.run`'s `TimeoutExpired` exception when setting `timeout=0` # Bug report ### Bug description: ```python import subprocess subprocess.run(['echo', 'hi'], timeout = 0) # subprocess.TimeoutExpired: Command '['echo', 'hi']' timed out after -0.00010189996100962162 seconds # sub...
b64aa302d7bc09454ba8d5b19922ff6a4192dd96
78adb63ee198c94c6ce2a1634aa7ea1d47c011ad
python/cpython
python__cpython-133080
# Remove Py_C_RECURSION_LIMIT & PyThreadState.c_recursion_remaining Both were added in 3.13, are undocumented, and don't make sense in 3.14 due to changes in the stack overflow detection machinery. (On current main they contain dummy values.) SC exception for removal without deprecation: https://github.com/python/ste...
0c26dbd16e9dd71a52d3ebd43d692f0cd88a3a37
208d06fd515119af49f844c7781e1eb2be8a8add
python/cpython
python__cpython-133074
# Undefined behavior `NULL + 0` in `list_extend_{set,dict,dictitems}` # Bug report Found by @emmatyping. ### Bug description: This affects `list_extend_{set,dict,dictitems}`, e.g.: ```c static int list_extend_set(PyListObject *self, PySetObject *other) { Py_ssize_t m = Py_SIZE(self); Py_ssize_t n = PySet_G...
a99bfaa53cbbb2ebd35bd94237a11bfaefe32665
4ebbfcf30e0e2d87ff6036d4d1de0f6f0ef7c46a
python/cpython
python__cpython-133062
# Show value of `UINT32_MAX` in HMAC error messages # Bug report ### Bug description: Following https://github.com/python/cpython/pull/133027#discussion_r2062730124 and https://github.com/python/cpython/pull/133027#discussion_r2062730751, we should avoid having the textual "UINT32_MAX" or any C constant in a user-fa...
1b7470f8cbff4bb9e58edd940a997a3647e285e4
cd76eff26e5f700ffb715d9d096d2e28744d0594
python/cpython
python__cpython-133055
# Always skip `pyrepl` tests that contain `"can't use pyrepl"` # Bug report Right now there's a pattern in https://github.com/python/cpython/blob/main/Lib/test/test_pyrepl/test_pyrepl.py that looks like this: ```python output, exit_code = self.run_repl(commands, env=env) if "can't use pyrepl" in output: self.sk...
b739ec5ab78ed55367516de7a11e732cb3f1081d
58567cc18c5b048e08307b5ba18a9934a395ca42
python/cpython
python__cpython-133084
# PEP 649: class __annotate__ is shadowed by compiler-generated one # Bug report ### Bug description: I'm playing around with PEP 649, PEP 749 annotations and I found this surprising behaviour: ```python class C: x: str def __annotate__(format): if format != 1: raise NotImplementedError(...
345fdce1d024f238c53bc355e90ec1c17e12ec20
245cd6c53278006fa34fd7799d32f0884eb7e75d
python/cpython
python__cpython-133038
# Deprecate `codecs.open()` Discussion: https://discuss.python.org/t/deprecating-codecs-open/88135/ `codecs.open()` is used a lot because it was recommended in Python 2. But `open()` (or `io.open()`) is recommended since Python 3. It is a time to deprecate `codecs.open()`. Since it is still widely used, we won't sch...
4e294f6feb3193854d23e0e8be487213a80b232f
732d1b02417e91d6a4247879e290065287cc6b51
python/cpython
python__cpython-133034
# `TypeIgnore` is not documented # Documentation In [the document of ast module](https://docs.python.org/3.14/library/ast.html), the class `TypeIgnore` is listed in the abstract grammar, but there is no document entry on this page. <!-- gh-linked-prs --> ### Linked PRs * gh-133034 * gh-133078 <!-- /gh-linked-prs -->...
4e04511cb9c176c32d6f3694f426750d710121cd
af3f6fcb7ecd3226b0067e0e1a9a6bfb0657a9ba
python/cpython
python__cpython-133252
# Improve the error message for invalid typecodes in `multiprocessing.{Array,Value}` # Feature or enhancement ### Proposal: More discussion: https://github.com/python/cpython/pull/132504#issuecomment-2802448414 This is the current message which is not very clear (it comes from `ctypes.sizeof`): ```python >>> from m...
f52de8a937e89a4d1cf314f12ee5e7bbaa79e7da
2cd24ebfe9a14bd52cb4d411c126b6a2dac65ae0
python/cpython
python__cpython-133019
# Test Asyncio Utils References futures.TimeoutError Which Does Not Exist # Bug report ### Bug description: https://github.com/python/cpython/blob/632524a5cbdd3e999992d0e9e68fe8b464ed16ec/Lib/test/test_asyncio/utils.py#L107C1-L107C37 ``asyncio.futures.TimeoutError`` does not exist AFAIK -- we can reproduce this fai...
8d6d7386a35b4a6fdd7d599f2184780bb83cc306
5e96e4fca80a8cd25da6b469b25f8f5a514de8be
python/cpython
python__cpython-133010
# UAF: `xml.etree.ElementTree.Element.__deepcopy__` when concurrent mutations happen # Crash report ### What happened? Reproducer: ```py import xml.etree.ElementTree as ET from copy import deepcopy class Evil(ET.Element): def __deepcopy__(self, memo): root.clear() return self root = ET.Element...
116a9f9b3775c904c98e390d896200e1641498aa
d13d5fdf610a294a6c3dc125e0856fb7fdd41e49
python/cpython
python__cpython-133014
# test_remote_exec fails on Android with PermissionError Example: https://buildbot.python.org/#/builders/1591/builds/1914 ``` ERROR: test_breakpoints (test.test_remote_pdb.PdbConnectTestCase.test_breakpoints) Test setting and hitting breakpoints. ---------------------------------------------------------------------- ...
0eb0e70ca073cc3eb26611963301ca8258217505
314f4b9716c2a3f49f7834d1e12bb2ee6c24a588
python/cpython
python__cpython-133007
# tarfile: Support `preset` argument to `tarfile.open(mode="w|xz")` # Feature or enhancement ### Proposal: Currently, `tarfile.open()` doesn't support specifying a compression level / preset when using `mode="w|xz"`. Technically this is documented (via not listing `w|xz` among the modes supporting either `compressle...
019ee49d50b6466f2f18035c812fa87d20c24a46
146b981f764cc8975910066096dc2f6cb33beec6
python/cpython
python__cpython-132997
# Upgrade bundled pip to 25.1.1 # Feature or enhancement ### Proposal: `ensurepip`'s bundled version of pip gets updated to the current latest 25.1.1. ### Has this already been discussed elsewhere? No response given ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linke...
a512905e156bc09a20b171686ac129e66c13f26a
ddac7ac59a7dfa4437562b6e705e64865c3b1e9a
python/cpython
python__cpython-132999
# Expose C constant `HASHLIB_GIL_MINSIZE` # Feature or enhancement ### Proposal: In `hashlib.h`, we have a HASHLIB_GIL_MINSIZE constant that we could expose as `hashlib.GIL_MINSIZE`. For now it's a read-only constant since the constant is shared across multiple modules (`_hashlib` and HACL*-based primitives). Since...
3695ba93d54f82d9aaa3e88a246596f69a8c948f
019ee49d50b6466f2f18035c812fa87d20c24a46
python/cpython
python__cpython-132998
# Add `socket.IP_FREEBIND` constant # Feature or enhancement ### Proposal: The socket options exposed by CPython's socket module do not include `IP_FREEBIND`, meaning the option number has to be hardcoded. Examples of this in the wild can be find using GitHub's code search. ### Has this already been discussed else...
314f4b9716c2a3f49f7834d1e12bb2ee6c24a588
bd2e5f044c9cb08b8725ab45b05de0115d014bbe
python/cpython
python__cpython-132988
# Support __index__() for unsigned integer converters in PyArg_Parse and Argument Clinic The `__index__()` special method was introduced to make other integer-like types which are not `int` subclasses to be accepted as integer arguments. It is supported by all `PyArg_Parse` format units for integers, except `k` (long...
632524a5cbdd3e999992d0e9e68fe8b464ed16ec
e714ead7a2895799b7f2cbded086378d92625a3a
python/cpython
python__cpython-133018
# Implement PEP 784 - Adding Zstandard to the Python standard library # Feature or enhancement This is a tracking issue for implementing [PEP 784](https://peps.python.org/pep-0784/). See the PEP text for more details. Since the diff is significant (~10k lines) I wanted to split up the PRs a bit. ### Implementation ...
20be6ba61ac8a0a5d6242701c4186579cfa653f0
6d53b752831c453da115dd4ce54a0d121d9990cd
python/cpython
python__cpython-133223
# Remote PDB can't interrupt an infinite loop in an evaluated command # Bug report ### Bug description: As @gaogaotiantian pointed out in https://github.com/python/cpython/pull/132451#discussion_r2055068762 PDB's new remote attaching feature can enter an uninterruptible infinite loop if you type `while True: pass` ...
9434709edf960307431cedd442b22c5b28d03230
24ebb9ccfdf78be09253e8a78a906279a1b3e21e
python/cpython
python__cpython-133067
# shutil.which doesn't work in Docker container # Bug report ### Bug description: ``` import shutil target_fp = shutil.which(head_proc) if target_fp is not None: perm = os.stat(target_fp) # This checks the permission bits as an extra check. # In a Docker container "which" was not returning # executa...
d13d5fdf610a294a6c3dc125e0856fb7fdd41e49
832058274dd99e30321a5f9a3773038cd0424c11
python/cpython
python__cpython-132951
# test_remote_pdb fails on FreeBSD: Remote debugging is not supported on this platform Example: https://buildbot.python.org/#/builders/1223/builds/5984 ``` ERROR: test_keyboard_interrupt (test.test_remote_pdb.PdbConnectTestCase.test_keyboard_interrupt) Test that sending keyboard interrupt breaks into pdb. -----------...
947c4f19d969578242ccc454ecc4b04c51408b03
2a28b21a517775120a7a720adc29cf85111e8bf4
python/cpython
python__cpython-133032
# test_opcache fails randomly (failure or crash) On a Free Threaded build: ``` $ ./configure --with-pydebug --disable-gil $ make $ ./python -m test test_opcache --forever -v ``` Error 1 (easy to reproduce): ``` FAIL: test_load_global_module (test.test_opcache.TestRacesDoNotCrash.test_load_global_module) -----------...
31d1342de9489f95384dbc748130c2ae6f092e84
fe462f5a9122e1c2641b5369cbb88c4a5e822816
python/cpython
python__cpython-132931
# Implement PEP 773 # Feature or enhancement For tracking work (assuming the PEP is still accepted today as planned - just getting things in place before I go away for the weekend). - [x] Mark existing installer as deprecated in installer - [x] Mark existing installer as deprecated in docs - [x] Add `--preset-pymana...
e20ca6d1b006674be23d16083f273e8a7b8f77b6
11f457cf41beede182d7387080f35c73f8f4a46f
python/cpython
python__cpython-132923
# test_peg_generator fails when using -Werror: dep_util is Deprecated Example: https://buildbot.python.org/#/builders/146/builds/11260 ``` ERROR: test_advanced_left_recursive (test.test_peg_generator.test_c_parser.TestCParser.test_advanced_left_recursive) --------------------------------------------------------------...
1a70f66ea856de1b1b0ca47baf9ee8ba6799ae18
79ba56433e5ced7740866d1112b0cead86f627f6
python/cpython
python__cpython-133399
# GC performance regression in free threaded build # Bug report ### Bug description: I've identified a significant performance regression when using Python's free-threaded mode with shared list appends. In my test case, simply appending to a shared list causes a 10-15x performance decrease compared to normal Python ...
5c245ffce71b5a23e0022bb5d1eaf645fe96ddbb
8e08ac9f32d89bf387c75bb6d0710a7b59026b5b
python/cpython
python__cpython-132919
# Detect buffer overflow in fcntl.fcntl() and fcntl.ioctl() `fcntl()` and `ioctl()` take an argument which can be a pointer to a buffer of unspecified length, depending on operation. They can also write in that buffer, depending on operation. A temporary buffer of size 1024 is used, so a chance of directly overflowing...
c2eaeee3dc3306ca486b0377b07b1a957584b691
0f84f6b334e4340798fb2ec4e1ca21ad838db339
python/cpython
python__cpython-132914
# test_remote_pdb hangs randomly Example on "Hypothesis tests on Ubuntu": https://github.com/python/cpython/actions/runs/14660752238/job/41144501229?pr=132906 ``` (...) 0:46:29 load avg: 0.00 running (1): test_remote_pdb (43 min 3 sec) 0:46:59 load avg: 0.00 running (1): test_remote_pdb (43 min 33 sec) 0:47:29 load a...
eb2e430b88afa93e7bfc05f4346e8336c2c31b48
e8cf3a1a641d6fa0bfa84a4f8363ff1e42abda30
python/cpython
python__cpython-132911
# Possible (benign) overflow for 'K' format code in `do_mkvalue` # Bug report ### Bug description: This is probably not an issue but here are the known "temporary" overflows: ```c // format = 'K' return PyLong_FromUnsignedLongLong((long long)va_arg(*p_va, unsigned long long)); ``` Note that `va_arg(*p_va, unsigned...
3fa024dec32e2ff86baf3dd7e14a0b314855327c
de6482eda3a46cc9c9a03fb9ba57295ab99b4722
python/cpython
python__cpython-132935
# Have math.isnormal() and, perhaps, math.issubnormal()? # Feature or enhancement ### Proposal: Of course, these functions can be emulated in pure-Python. On another hand, people can reasonably expect these classifiers as "The [math](https://docs.python.org/3.14/library/math.html#module-math) module consists mostly...
5f61cde80a9b33c8e118b1c009fe2aaa4bb87356
128195e12eb6d5b9542558453df7045dd7aa1e15
python/cpython
python__cpython-137118
# REPL: AttributeError: module `__mp_main__` has no attribute `is_prime` in `ProcessPoolExecutor` example # Bug report ### Bug description: python version:3.12.9 An error occurred when running as a standalone script. An error message is reported when running the sample code of the python document: Traceback (most r...
4e40f2bea7edfa5ba7e2e0e6159d9da9dfe4aa97
6784ef7da7cbf1a944fd0685630ced54e4a0066c
python/cpython
python__cpython-132895
# Improve accuracy of NormalDist.cdf ### Proposal: Replace the `1 + erf(s)` computation with `erfc(-s)` as suggested in this [StackOverflow discussion](https://stackoverflow.com/questions/37891569) and hinted in this [John Cook blog post](https://www.johndcook.com/blog/2010/06/07/). The core idea is to exploit the i...
63da5cc1504f066b31374027f637b4b021445d6b
b1fc8b69ec4c29026cd8786fc5da0c498c7dcd57
python/cpython
python__cpython-133208
# Socket file descriptor races in GIL-enabled build # Bug report In the free threading build, but not the default GIL-enabled build, the reads and writes `sock_fd` use relaxed atomics. This can lead to data races because the `sock_fd` field is read when the GIL is released. https://github.com/python/cpython/blob/e...
2d82ab761ab8051440e486ca68355514f3df42aa
7d129f99ab8e7ef9382e5e5c7bb4e51ecf74e894
python/cpython
python__cpython-132883
# [3.14 regression] Cannot copy Union containing objects that do not implement `__or__` # Bug report ### Bug description: In 3.13 it was possible to copy a Union containing any object: ``` >>> copy.copy(typing.Union[b"x", b"y"]) typing.Union[b'x', b'y'] ``` But in main this fails: ``` >>> copy.copy(typing.Union[b...
e1c09fff054ebcb90e72bba25ef7332bcabec92b
9f5994b94cb6b8526bcb8fa29a99656dc403e25e
python/cpython
python__cpython-133135
# math.ldexp gives incorrect results on Windows # Bug report ### Bug description: ```python >>> import math >>> math.ldexp(6993274598585239, -1126) 5e-324 >>> ``` The correct result would be 1e-323. This is obviously a bug in the Windows ldexp implementation (it works fine on Linux). But it would be good, if it coul...
cf8941c60356acdd00055e5583a2d64761c34af4
0e3bc962c6462f836751e35ef35fa837fd952550
python/cpython
python__cpython-132872
# Use _Alignof to query alignments in the struct module # Feature or enhancement ### Proposal: The struct module uses pre-C11 hacks to determine alignment for types: https://github.com/python/cpython/blob/580888927c8eafbf3d4c6be9144684117f0a96ca/Modules/_struct.c#L79-L106 Now we can use `_Alignof` operator, as C11-...
ecd03739f87889bb2f173e0a476d26b468c776c9
c292f7f56311b305c673415651c919a7633d36cc
python/cpython
python__cpython-132860
# sys.remote_exec() scripts run in the `__main__` namespace # Bug report ### Bug description: The scripts injected by `sys.remote_exec` run in the context of the `__main__` module, meaning that they unintentionally overwrite variables used in the main script. For instance, given a `loop_forever.py` containing: ```py...
a94c7528b596e9ec234f12ebeeb45fc731412b18
402dba29281c1e1092ff32875c91f23bacabb677
python/cpython
python__cpython-132828
# "unhashable type" is a beginner-unfriendly error message # Feature or enhancement ### Proposal: Every time I'm teaching dicts and sets to beginners, someone tries to use lists or other mutable data structures as dict keys or set members. The error message in that case is unhelpful, because it describes the problem...
426449d9834855fcf8c150889157af8c39526b81
b2e666f30aa66b3f5e7ccbcf4e5f21e2d89e39a8
python/cpython
python__cpython-135606
# test__opcode fails with missing 'jump_backward' in specialization stats # Bug report ### Bug description: When running the `test__opcode` test with a build that uses `--enable-pystats`, there is a mismatch between the expected specialized opcodes and the actual ones. The test is expecting `jump_backward` in the sp...
a9e66a7c506680263b39bc8c150ddc5e72213c45
acc20a83f4d93682e91c4992c785eaf7e3d0c69c
python/cpython
python__cpython-133209
# `csv.writer` with `QUOTE_NONE` still requires non-emtpy `quotechar` and `escapechar` # Bug report ### Bug description: I'd like to output all quotes verbatim, without any escaping/quoting, but this fails: ```python import csv w = csv.writer(open('test.tsv', 'w'), delimiter = '\t', quoting = csv.QUOTE_NONE) w.writ...
536a5ff15357a7d616c8226a642443e699f30244
980a56843bf631ea80c1486a367d41031dec6a7e
python/cpython
python__cpython-132799
# Schedule removal of PyUnicode_AsDecoded/Encoded functions - PyUnicode_AsDecodedObject - PyUnicode_AsDecodedUnicode - PyUnicode_AsEncodedUnicode - PyUnicode_AsEncodedObject Were deprecated in 3.6 in https://github.com/python/cpython/commit/0093907f0ed88c6aa3561cc4328154ae907bc976 by @serhiy-storchaka They have...
f6fb498c9759bc4ab615761639c5147d2d870c56
8783cec9b67b3860bda9496611044b6f310c6761
python/cpython
python__cpython-132782
# NotShareableError Should Inherit from TypeError # Bug report ### Bug description: Shareability is a feature of types, not values, so `NotShareableError` should be a subclass of `TypeError`, not `ValueError`. ### CPython versions tested on: 3.14, CPython main branch ### Operating systems tested on: _No response...
ca12a744abd02d0d36adfb1444c1ba31623d617d
8a4d4f37abb9fa639fdc5d7003c4067904cdcc6b
python/cpython
python__cpython-132780
# Tools/build/generate_global_strings.py Doesn't Handle Duplicates Correctly # Bug report ### Bug description: I'll have a fix up shortly. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-132780 <!-- /gh-linked-prs -->
9be364568835e467199ccd65bbcd786f9c8171dc
09b624b80f54e1f97812981cfff9fa374bd5360f
python/cpython
python__cpython-132779
# memoryview Cross-Interpreter Data Has Some Minor Issues # Bug report ### Bug description: * dealloc is incomplete * errors aren't handled quite right * buffer not cleaned up if xidata never used * some minor cleanup is needed ### CPython versions tested on: CPython main branch ### Operating systems tested on: ...
b5bf8c80a921679b23548453565f6fd1f79901f2
a4ea80d52394bafffb2257abbe815c7ffdb003a3
python/cpython
python__cpython-132974
# Improvements to test.support.interpreters.Interpreter `Interpreter.call()` should be able to support arbitrary callables, full args, and return values. <!-- gh-linked-prs --> ### Linked PRs * gh-132974 * gh-132977 * gh-132978 * gh-132979 * gh-132981 * gh-133101 * gh-133107 * gh-133108 * gh-133128 * gh-133221 * gh-1...
6f0432599297635492597e3766259390e8331c62
b739ec5ab78ed55367516de7a11e732cb3f1081d
python/cpython
python__cpython-132770
# Static analysis reveals that `tok_mode->last_expr_buffer[i] != '\0' && i < input_length` is not safe # Bug report This code can be improved: https://github.com/python/cpython/blob/132b6bc98f47a4d897dead8635b5a50a0baee485/Parser/lexer/lexer.c#L143 It would be safer to first check the value of `i` and then try to a...
ea8ec95cfadbf58a11ef8e41341254d982a1a479
8516343d3aeb12e5871ecd1701649fd1fcf46fc0
python/cpython
python__cpython-133627
# dict_set_fromkeys() calculates size of dictionary improperly # Bug report ### Bug description: The function dict_set_fromkeys() in the file dictobject.c adds elements of an iterable to an existing dictionary. The size of the expanded dictionary is estimated as PySet_GET_SIZE(iterable) and the size of the existing ...
421ba589d02b53131f793889d221ef3b1f1410a4
2d82ab761ab8051440e486ca68355514f3df42aa
python/cpython
python__cpython-132759
# Build fails with --enable-pystats and --with-tail-call-interp due to undeclared lastopcode variable # Bug report ### Bug description: When attempting to build CPython with both the `--enable-pystats` and `--with-tail-call-interp` options, the build fails with errors about an undeclared identifier `lastopcode`. #...
6430c634da4332550744fe8f50b12c927b8382f6
de9deb7ca7120fbb5cbbb53044ce91087065e723
python/cpython
python__cpython-132772
# SIGSEV with method descriptors called without a second argument # Crash report ### What happened? Since Python 3.12, the following code triggers a segmentation fault: ```python import _io, sys; _io._TextIOBase.detach.__get__(sys.stderr) ``` ### CPython versions tested on: 3.9, 3.11, 3.12, 3.13, 3.14 ### Opera...
fa70bf85931eff62cb24fb2f5b7e86c1dcf642d0
c8e0b6e6849fc3d93c33050b43fe866391625157
python/cpython
python__cpython-132756
# Rewrite the fcntl module The current code of the `fcntl` module is a little mess. This was caused particularly by the nature of the underlying C API (`fcntl()` and `ioctl()` take an argument as a C int or a pointer to a structure, and the type of the argument, as well as the size of the structure is not explicitly s...
a04390b4dad071195f834db347aa686292811051
78cfee6f0920ac914ed179c013f61c53ede16fa9
python/cpython
python__cpython-132738
# cProfile cannot run code that pickles objects defined in __main__ # Bug report ### Bug description: ```python import pickle import sys from dataclasses import dataclass, field @dataclass class State: x: list[int] = field(default_factory=list) print(pickle.dumps(State([0]))) ``` The following code will run ...
c7a7aa9a57c25ef2666f7dbf62edab882747af6b
e1c09fff054ebcb90e72bba25ef7332bcabec92b
python/cpython
python__cpython-132735
# Add constants for Bluetooth socket support The support of Bluetooth sockets was fixed and many new features were added in the last month. But while code was changed, the constants that can be used with it were not always added. The proposed PR adds a lot of constants and updates the documentation. <!-- gh-linked-pr...
e84624450dc0494271119018c699372245d724d9
05d0559db04743aa47d485d53437edbb31d8e967
python/cpython
python__cpython-133035
# Improve `sysconfig` CLI ### Proposal: Currently, the `sysconfig` module's CLI is fairly hidden and inaccessible. I think there are two main issues with the module CLI. 1. There is no "Command Line Interface" section of the [docs](https://docs.python.org/dev/library/sysconfig.html) (only have [example](https://docs...
0f84f6b334e4340798fb2ec4e1ca21ad838db339
ee9102a53565f694c37ca1bcc6bb1239db7207d9
python/cpython
python__cpython-132774
# AMD64 FreeBSD14/15 3.x multiprocessing test failures # Bug report ### Bug description: I don't know which one is the faulty commit so I'm tagaging everyone involved in the recent failures of this build bot. The build bot is failing since https://github.com/python/cpython/commit/0c356c865a6d3806724f54d6d463b2e5289...
c8e0b6e6849fc3d93c33050b43fe866391625157
01317bb449612ea1dbbf36e439437909abd79a45
python/cpython
python__cpython-132801
# Segfault in `union_repr` from `list_repr_impl` in free-threaded build # Crash report ### What happened? Calling `repr` in many threads on a list containing a large `typing.Union` segfaults in a free-threaded build: ```python import abc import builtins import collections.abc import itertools import types import ty...
a4ea80d52394bafffb2257abbe815c7ffdb003a3
722c501dba2db391012aa1530144ecdfbddec9e8
python/cpython
python__cpython-132901
# uuid.getnode() is not tied to MAC address when using `libuuid` # Bug report ### Bug description: According to the docs, [uuid.getnode()](https://docs.python.org/3/library/uuid.html#uuid.getnode) is meant to return a number based on the MAC address of the network interface. However, if Python is built with `libuuid...
9eb84d83e00070cec3cfe78f1d0c7a7a0fbef30f
cb8045e86c4fadfd847d614193f2b38ec03933b8
python/cpython
python__cpython-132690
# data race in PyMember_GetOne with _Py_T_OBJECT When running ctypes tests using parallel threads the following data race is reported: ```console WARNING: ThreadSanitizer: data race (pid=73865) Read of size 8 at 0x7fadbc570760 by thread T1391: #0 PyMember_GetOne /home/realkumaraditya/cpython/Python/structmember...
7fd708b727fe19403726da6cb912b81768a96946
e77d6784e754d9d656238bb5691534857598c000
python/cpython
python__cpython-132790
# Enum `_missing_` function changes `__contains__` behaviour # Bug report ### Bug description: I observed different behavior for Enum `__contains__` in 3.13.2 and 3.13.3 if there is `_missing_` method implemented: ```python from enum import Enum class Color(Enum): RED = 1 @classmethod def _missing...
22bc953aa9be3039629dd1315f856d2522619412
63da5cc1504f066b31374027f637b4b021445d6b
python/cpython
python__cpython-132679
# Add --prioritize to regrtest From the added help: ``` --prioritize TEST1,TEST2,... select these tests first, even if the order is randomized. --prioritize is used to influence the order of selected tests, such that the tests listed as an argument are executed first. This is especially useful when c...
a594008d9e6c4d37ff6fd698395cd318d7ec3300
d134bd272f90bfc2dfb55b126d4552c996251fc1
python/cpython
python__cpython-132675
# Compiler warnings on free-threaded build for `_hashopenssl.c` # Bug report ### Bug description: I get the following warnings since https://github.com/python/cpython/pull/128886, which was backported to 3.13. ```text ./Modules/_hashopenssl.c:416:69: warning: passing 'const EVP_MD *' (aka 'const struct evp_md_st *'...
2df0f8804701cc17674e5b4e90499e9fac71d0e1
379352620ce4d77f7248939a4cf211db48fdd241
python/cpython
python__cpython-132676
# `_align_ = 0` segfaults when used with empty filed list (`_fields_ = []`) # Crash report ### What happened? Tested on the latest `ubuntu:25.04` docker image. ```python from ctypes import Structure class MyStructure(Structure): _align_ = 0 _fields_ = [] ``` Crashes with `Floating point exception` on CPyth...
678b8e165646e72a2f39f017ad237210d3d481ef
40ae88988c61638ee8625e5c0ee73606ede307bb
python/cpython
python__cpython-132669
# Outdated description in `library/dis.rst` # Documentation In [`POP_JUMP_IF_NOT_NONE` document](https://docs.python.org/3/library/dis.html#opcode-POP_JUMP_IF_NOT_NONE) and `POP_JUMP_IF_NONE` document, the part "This opcode is a pseudo-instruction, ..." is now incorrect as mentioned in the immediately following note....
7e2672cfcf993e957c9966a88931fe6571affd24
2df0f8804701cc17674e5b4e90499e9fac71d0e1
python/cpython
python__cpython-132650
# PC/layout script forcibly disables --include-tcltk on ARM64 # Bug report This was important back before it would build, but we should allow including it now. <!-- gh-linked-prs --> ### Linked PRs * gh-132650 * gh-132656 <!-- /gh-linked-prs -->
b87189deae7cdd65083da60cf3ba6e5bba117663
cf59bc3ae7d34060e55542b6df6786aa2d9a457c
python/cpython
python__cpython-132653
# Possible data race between specialize_attr_loadclassattr and ensure_nonmanaged_dict under free-threading # Bug report ### Bug description: I built main branch and observed the following races under free-threading in cpython 3.14 (Python 3.14.0a7+ experimental free-threading build (heads/main:e42bda94411, Apr 17 20...
f3d877a27abca355f9d05decf3e2ce0874983288
80295a8f9b624c8d962b1df6bc9b89049e11bcf5
python/cpython
python__cpython-133825
# Document how to format a `timedelta` in human-readable form ### Bug description: ```python dt_utc = datetime.now(timezone.utc).replace(microsecond=1) dt_utc_str = dt_utc.strftime("%Y-%m-%d %H:%M:%S") print(f"timenow : dt_utc_str : {dt_utc_str}") if self.timezone: print(f"timenow : timezone : {self.timezone}") ...
efcc42ba70fb09333a2be16401da731662e2984b
76c0b01bc401c3e976011bbc69cec56dbebe0ad5
python/cpython
python__cpython-133787
# Data race between compare_generic and insert_combined_dict under free-threading # Bug report ### Bug description: I built main branch and observed the following races under free-threading in cpython 3.14 (Python 3.14.0a7+ experimental free-threading build (heads/main:e42bda94411, Apr 17 2025, 14:08:39) [Clang 18.1...
9ad0c7b0f14c5fcda6bfae6692c88abb95502d38
35f47d05893e012e9f2b145b934c1d8c61d2bb7d
python/cpython
python__cpython-132640
# Add PyLong_AsNativeBytes and PyLong_FromNativeBytes to the stable ABI # Feature or enhancement As was originally planned. These have been out in 3.13, and while it is most prominently used in Cython, has been broadly validated to be safe enough for stable ABI addition. <!-- gh-linked-prs --> ### Linked PRs * gh-13...
09b624b80f54e1f97812981cfff9fa374bd5360f
70b322d3138311df53bc9fc57f174c8e9bdc2ab5
python/cpython
python__cpython-134815
# `dict.update()` mutation check too broad # Bug report The [`dict.update()`](https://docs.python.org/3/library/stdtypes.html#dict.update) modification check can be erroneously triggered by modifications to *different* dictionaries that happen to [share the underlying keys objects](https://peps.python.org/pep-0412/)....
d8994b0a77cc9821772d05db00a6ab23382fa17d
4c15505071498439407483004721d0369f110229
python/cpython
python__cpython-132609
# A sample code for `ast.While` should be colored correctly like the other examples. # Documentation A sample code for [ast.While](https://docs.python.org/3/library/ast.html#ast.While) currently looks like this: ![Image](https://github.com/user-attachments/assets/de87716c-de8d-41ae-944f-abd510cbfed3) Currently, all...
f5512a2498d0d99197f4f12b37d004fdf6deec85
25717ff4bfcd5621eddb9439c690da8fa206ea10
python/cpython
python__cpython-132586
# The new `multiprocessing.[R]Lock.locked()` method fails. # Bug report ### Bug description: Maybe I didn't quite understand what this feature did, but I think there's a bug when using the `locked()` method with a `multiprocessing.[R]Lock`. Here is an example: ``` import multiprocessing as mp def acq(lock, event):...
15c75d7a8b86d9f76982f70a00b69b403458694f
0c356c865a6d3806724f54d6d463b2e5289f6afa
python/cpython
python__cpython-132663
# Mysterious /home/buildbot/.debug/ directory is filling the disk of AArch64 Fedora buildbots On two AArch64 Fedora buildbot workers, there is a mysterious `/home/buildbot/.debug/` directory which contains more than 70 GB of random files. I don't know what created these files but there are filling the disk. It may be...
e01e5829020e517eb68a47da4dd65926a9d144de
7e2672cfcf993e957c9966a88931fe6571affd24
python/cpython
python__cpython-132616
# Segfault/abort from calling `BytesIO` `unshare_buffer` in threads on a free-threaded build # Crash report ### What happened? This seems to be almost the same issue as https://github.com/python/cpython/issues/111174, but for free-threaded builds. In a free-threaded build it's possible to segfault (rare on debug bu...
5dd3a3a58cca4798ebfc2edd673211067453e81e
bd7c5859c6c4f23877afdf6ab7b8209de50127a6
python/cpython
python__cpython-132701
# threading.Thread.native_id for forking thread wrong after fork # Bug report ### Bug description: On Linux, native thread IDs are unique across processes. This means that the native thread ID of a forking thread necessarily changes at forking. The threading module initializes the thread ID only when the thread is s...
6b735023132a4ac9dc5b849d982104eeb1e8bdad
86397cf65d024a39ae85b81d7f611ad4864a78b4
python/cpython
python__cpython-132537
# PY_THROW event can't be turned off for pdb's monitoring backend # Bug report ### Bug description: ```python def gen(): yield 1 def f(): breakpoint() g = gen() try: g.throw(TypeError) except TypeError: pass # line 10 f() ``` ``` b 10 c ``` ``` Traceback (most recent call las...
d19af00b90d94cd987293c479b8c3ef698bf7d3e
4f10b93d1b2f887b42ad59168a9fcbe75bdaaf87
python/cpython
python__cpython-132572
# test_timeout fails with "ENV CHANGED" # Bug report ### Bug description: When upgrading python 3.13 for openSUSE it suddenly fails with `== Tests result: ENV CHANGED then ENV CHANGED ==` Despite the error, I have not been able to collect any more reasonable error message in [our build log](https://github.com/user-a...
82f74eb2344cdb3197c726d1216e413ee61a30b3
4b15d105a2b954cce2d97646ebf9e672d3a23b45
python/cpython
python__cpython-132529
# Outdated error message when passing an invalid typecode to `array.array` constructor # Bug report ### Bug description: This issue is suitable for a first-time contributor. The `'w'` typecode is [supported](https://docs.python.org/3.14/library/array.html#module-array) but the error message does not mention it: ``...
52454c5d59c50147233f4229497a655e6e8c8408
eb2e430b88afa93e7bfc05f4346e8336c2c31b48
python/cpython
python__cpython-132516
# `test_dataclass_derived_generic_from_slotted_base` is duplicated # Bug report ### Bug description: `test_dataclass_derived_generic_from_slotted_base` is duplicated (regression introduced in fa9b9cb11379806843ae03b1e4ad4ccd95a63c02): ```py def test_dataclass_derived_generic_from_slotted_base(self): T = typing....
45c447bf91ffabe4c0ba6d18f37d4e58925d5c91
4865c09cf3055de2f69abda27c9e971b0fcf98bd
python/cpython
python__cpython-132545
# Exception unwinding might be broken when handling a memory error. # Bug report ### Bug description: Exception unwinding can sometimes push an integer to the stack to support re-raising an exception from an earlier position. Creating this integer might need memory allocation and could fail when handling a memory er...
ccf1b0b1c18e6d00fb919bce107f2793bab0a471
caee16f05229de5bc5ed2743c531f1696641888a
python/cpython
python__cpython-132492
# annotationlib: Rename value_to_string to type_repr See https://github.com/python/typing_extensions/issues/544 <!-- gh-linked-prs --> ### Linked PRs * gh-132492 <!-- /gh-linked-prs -->
11f66038453dff51ba4ee80460e30acf276d472a
5e80fee41a61bbb39c6054c5a5d82dc80b1adf8a
python/cpython
python__cpython-132778
# SystemError: compiler_lookup_arg(name='name_1') with reftype=7 failed in <genexpr> # Crash report ### What happened? I found the following issue by fuzzing with pysource-codegen. This script failed to compile the given code to bytecode: ``` python code=""" (name_3): name_5 name_4: ( name_4 async for ( ...
01317bb449612ea1dbbf36e439437909abd79a45
08e331d05e694b5ed3265556ea345b9b19a187da
python/cpython
python__cpython-132475
# Building a `ctypes.CField` with wrong `byte_size` aborts # Crash report ### What happened? The following code will cause an abort due to `byte_size` not matching the size of `ctypes.c_byte`, failing an assertion that `byte_size == info->size`. ```python import ctypes ctypes.CField(name="a", type=ctypes.c_byte, by...
3b4b56f46dbfc0c336a1f70704f127593ec1f4ce
f663b2c56a2eecc258d2abd54ed33836d070e6f5
python/cpython
python__cpython-132460
# Consider making `staticmethod` and `classmethod` generic # Feature or enhancement Typeshed defines `staticmethod` and `classmethod` as generics: 1. https://github.com/python/typeshed/blob/f6216ec6230aa51fe7e23afca30a8f5b18ace476/stdlib/builtins.pyi#L137 2. https://github.com/python/typeshed/blob/f6216ec6230aa51fe7e...
a36367520eb3a954c94c71a6b2b64d2542283e38
c8f233c53b4634b820f2aa0efd45f43d9999aa1e
python/cpython
python__cpython-132450
# Improve syntax error messages for keywords with typos Currently, when users make typos in Python keywords, they receive generic "invalid syntax" error messages without any helpful suggestions about what might be wrong. This creates a frustrating experience, especially for beginners who might not immediately recogni...
bf3a0a1c0f2f63867c537d80cc7163ea8426bf2a
3cfab449ab1e3c1472d2a33dc3fae3dc06c39f7b
python/cpython
python__cpython-132440
# New REPL on Windows swallows characters entered via AltGr # Bug report ### Bug description: E.g. on my keyboard with German layout, `{` is usually entered via pressing the [AltGr key](https://en.wikipedia.org/wiki/AltGr_key) and `7`, i.e. `AltGr+7`. Likewise, `}`, `[`, `]`, `\` and some more can only be entered ...
07f416a3f063db6b91b8b99ff61a51b64b0503f1
b6c2ef0c7a1e344681f9a8649bb662208ffd01cf
python/cpython
python__cpython-132436
# Test syntax warnings emitted in a `finally` block This is a followup to https://github.com/python/cpython/pull/131993 For context: https://github.com/python/cpython/pull/131993#issuecomment-2798777909 > Please add also a compile() test for a warning emitted in the finally block. Currently it is emitted twice becau...
887eabc5a74316708460120d60d0fa4f8bdf5960
fc7e4e7bbd5d459b76b96991413569a5b7889fbe
python/cpython
python__cpython-132431
# Bluetooth socket support is disabled on NetBSD and DragonFly BSD Despite that there is a code to support Bluetooth sockets on NetBSD and DragonFly BSD, it did not work from 2010 (see 2501aca6281500ecc31cccdd4d78977c84c9e4f6, 3e85dfd15e36b7d890fb70a6c9edf0b1e6bbff6c) due to error in conditional compilation. Condition...
f2f86d3f459a89273ea22389bb57eed402908302
9634085af3670b1eb654e3c7820aca66f358f39f
python/cpython
python__cpython-132418
# ctypes: NULL-dereference when using py_result restype # Crash report ### What happened? When using `ctypes` with a function which returns a `PyObject *`, using `restype` `ctypes.py_object`, and the function returns `NULL`, there's a `Py_DECREF` of the result, leading to a segfault: ```python import ctypes PyErr_O...
2aab2db1461ef49b42549255af16a74b1bf8a5ef
e0dffc54b888a18ad22e83411c2b615cc94a1fdf
python/cpython
python__cpython-132400
# UBSan: undefined behaviours when using `-fsanitize=undefined -fno-sanitize-recover` on free-threaded build # Bug report ### Bug description: This issue mirrors #111178 but is dedicated to tracking UB failures for the free-threaded build. There should be only two free-threaded-specific issues and the rest are track...
a81232c769a4f67ee312c5c67a2148c54c6570d0
292a7248cda89f497e06eff4aa0147d6ff22f6bb
python/cpython
python__cpython-132397
# Lint `Lib/test` with existing `ruff` configuration # Feature or enhancement ### Proposal: There is an existing `.ruff.toml` file in `Lib/test` with some todo to fix. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous di...
1d5dc5f1c37ce28a635386189020cf49b3f7f1c3
4c3d187d9f143eee930a88a38b90f4842911b8be
python/cpython
python__cpython-132391
# Lint `Tools/build` using existing ruff configuration # Feature or enhancement ### Proposal: There is an existing `Tools/build/.ruff.toml` that is for now only used by the `check-warnings.py` script. I've tried to minimize the number of changes but I ran `ruff check Tools/build` and selectively disabled some existi...
5d8e432d9ffa8285ca67833a54a07c52c58d79f3
246ed23456658f82854d518ad66d52652f992591