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-126686
# `ctypes`: Make `COMError`, mentioned in the "Function prototypes" section of documentation, public. # Documentation I have been part of a project that handles COM with Python for several years now. When I first joined the project, `_ctypes.COMError` was a "mysterious error" to me. Over time, by implementin...
5b4502560ba83274badac46ad7f263402f7ad269
9d2a879affe790b44880d4e786b801c80cf6f7a9
python/cpython
python__cpython-126627
# Corrupt .pyc files stay on disk after failed writes # Bug report ### Bug description: If writing a `.pyc` file fails (in my case due to a file size limit imposed by `ulimit`), it can leave corrupt data sitting on disk. This causes a crash the _second_ time you run the program, when the interpreter tries to load t...
c695e37a3f95c225ee08d1e882d23fa200b5ec34
f6b0361c17552197f44be16435e4a5cb4b1d60ca
python/cpython
python__cpython-126760
# urllib.request.pathname2url() raises on NTFS alternate data stream # Bug report ### Bug description: On Windows, `urllib.request.pathname2url()` raises `OSError` when given a path with a colon in any position other than the second character. This excludes paths with [NTFS alternate data streams](https://learn....
fd133d4f21cd7f5cbf6bcf332290ce52e5501167
e8bb05394164e7735f7a9de80a046953606a38eb
python/cpython
python__cpython-126853
# Remove the `_PyOptimizer` APIs We should rip the `_PyOptimizer` API out, and just keep all of the code that does that actual optimizing. The API itself is unstable, constantly changing, poorly-defined, and undocumented. There's a bunch of infrastructure required just to test the API (not the actual optimizations ...
b44ff6d0df9ec2d60be63e5a106ca079464ece52
27494dd9ad6032c29e273cd7f45c204c00d6512c
python/cpython
python__cpython-126617
# Failed assertion in `itertoolsmodule.c: itertools_count_impl` for `count(sys.maxsize)` # Crash report ### What happened? Calling `itertools.count(sys.maxsize)` aborts with the following message: ``` python -c "from sys import maxsize; from itertools import count; count(maxsize)" python: ./Modules/itertoolsmodule....
6e3bb8a91380ba98d704f2dca8e98923c0abc8a8
37c57dfad12744608091653fd753a1f770e2479b
python/cpython
python__cpython-126754
# Failed assertion in typeobject.c::wrap_buffer for `b"".__buffer__(-2**31 - 1)` # Crash report ### What happened? Calling `bytes_object.__buffer__(large_negative_number)` in a debug build aborts with this message: ```python >>> b"".__buffer__(-2**31 - 1) python: Objects/typeobject.c:9321: wrap_buffer: Asse...
84f07c3a4cbcfe488ccfb4030571be0bc4de7e45
b3687ad454c4ac54c8599a10f3ace8a13ca48915
python/cpython
python__cpython-126586
# Add EHWPOISON to errno module # Feature or enhancement ### Proposal: ```python # Add a code block here, if required ``` Currently, the attribute about EHWPOISON is missing in errno ``` EHWPOISON Memory page has hardware error. ``` from https://man7.org/linux/man-pages/man3/errno.3....
84ff1313d04e8cbeec7b2cbe4503d86f1f5b449d
35d37d6592d1be71ea76042165f6cbfa6c4c3a17
python/cpython
python__cpython-126580
# Adapt sys.audit() to Argument Clinic It requoired support of var-positional parameters, which are now supported. <!-- gh-linked-prs --> ### Linked PRs * gh-126580 <!-- /gh-linked-prs -->
a93fc0969e4d57a2ecfe18cbba7de2d5ee757e2c
a3e8e7bbc3d39e9e6cfa5605df9524076176a041
python/cpython
python__cpython-126576
# zipfile.Path.open is slow when opening for writing in a ZIP with many entries # Bug report ### Bug description: I'm using the `zipfile` module to create a ZIP file with thousands of members. Each file is created by creating a corresponding `zipfile.Path` object first and then calling `.open()` on it. The im...
160758a574d12bf0d965d8206136e7da4f4fd6c3
450db61a78989c5a1f1106be01e071798c783cf9
python/cpython
python__cpython-126555
# ctypes: We do not correctly handle NULL dlsym() return values # Bug report ### Bug description: The man(3) page for `dlsym()` states: ``` In unusual cases (see NOTES) the value of the symbol could actually be NULL. Therefore, a NULL return from dlsym() need not indicate an error. The correct way to distinguish ...
8717f792f7cc343599dc60daf80630cceb66145b
c0f045f7fd3bb7ccf9828f4bfad55347d097fd41
python/cpython
python__cpython-136704
# `importlib.reload` is not thread-safe # Bug report ### Bug description: There are two problems with `importlib.reload` regarding thread safety, and both are race conditions. I naturally assume the function _should_ be thread-safe, consistently with other components of `importlib`. I never ran into someone re...
69d8fe50ddc4dbe757c9929a532e2e882f0261ba
dcd27aace180737adaddc79c00c181816fc6e162
python/cpython
python__cpython-126551
# Pre-allocate version numbers for common builtin classes. We use the `tp_version` field of class objects for quite a few of our optimizations, so it gets set for almost classes. If we pre-allocate the version for common classes, like `int`, `float`, `tuple`, etc, then we can use the version number to speedup dispatc...
fa4092259763ffad45a5bb9ef55f515dc6a69ad2
fd5580cd151e07c690e9d7594513be5fa3102a2e
python/cpython
python__cpython-126584
# The docs for the typing stdlib module use the phrase "bound type var" to mean two distinct things # Documentation Follow-up of: https://discuss.python.org/t/a-typevar-with-a-bound-is-a-bounded-typevar-or-a-bound-typevar/69966 As discussed above, in some places the stdlib docs for the typing module use the phra...
434b29767f2fdef9f35c8e93303cf6aca4a66a80
f435de6765e0327995850d719534be38c9b5ec49
python/cpython
python__cpython-126530
# Guides to the parser and grammar contain obsolete links to devguide # Documentation Mentioned it for parsed.md in this Issue #126509 Closed in this PR #126510 Found the same issue in compiler.md, and searched through InternalDocs for any other appearance of devguide links, found nothing except two in compil...
19c248185343dfad046bbe4046b2b900e7405666
e3510bd3dd9ea8f2a30cb1128470aee3a48d8880
python/cpython
python__cpython-126526
# `make regen-unicodedata` produces different file on macos and windows # Bug report 1. https://github.com/python/cpython/blob/2a6b6b33dfe0f3c435abf2829b62ef3f1ef12cd3/Tools/unicode/makeunicodedata.py#L38 2. https://github.com/python/cpython/blob/2a6b6b33dfe0f3c435abf2829b62ef3f1ef12cd3/Tools/unicode/makeunicodedata....
f223efb2a2d6a3e86556be7295cbbd3ef839f489
feb3e0b19cb03f06364a3f5e970f0861b8883d1c
python/cpython
python__cpython-126517
# SET_OPCODE_OR_RETURN undefined if configured with --disable-gil # Bug report ### Bug description: The latest commit seems to have broken `specialized.c` when the GIL is disabled. ``` gcc -c -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -D_Py_TIER2=1 -D_Py_JIT -std=c11 -Wextra -W...
6e03ff2419a7faf514ad833dc513175c4f7e9bc7
8fa4dc4ba8646c59f945f2451c53e2919f066065
python/cpython
python__cpython-126510
# Guide to the parser contains an obsolete link to Changing CPython's grammar # Documentation cpython/InternalDocs/parser.md line 20 ```md See the devguide's [Changing CPython's grammar](https://devguide.python.org/developer-workflow/grammar/#grammar) ``` The link refers to https://devguide.python.org/developer...
b9082958ef7dfb57d0fef745a5bf2521546a0dd6
6e03ff2419a7faf514ad833dc513175c4f7e9bc7
python/cpython
python__cpython-126503
# test_ssl: ConnectionHandler shuts down ThreadedEchoServer Recently, `test_ssl` has been failing intermittently but frequently on macOS buildbots, see for example [here](https://buildbot.python.org/#/builders/725/builds/8906) (but look at the *first* failure; the re-run is #126499). If `read()` in a `ThreadedE...
c9cda1608edf7664c10f4f467e24591062c2fe62
78ad7e632248dc989378cabeb797b9f3d940d9f2
python/cpython
python__cpython-126501
# test_ssl: `non_linux_skip_if_other_okay_error` assumes err.reason is a string Recently, `test_ssl` has been failing intermittently but frequently on macOS buildbots, see for example [here](https://buildbot.python.org/#/builders/725/builds/8906). Since #108315, there's some code to *skip* tests, which does `getatt...
78ad7e632248dc989378cabeb797b9f3d940d9f2
1fe67df8e373a5177143e4a310c83438e79f9b77
python/cpython
python__cpython-126556
# Cannot create venv due to missing `venvlaunchert_d.exe` for Python 3.13td venv on Windows # Bug report ### Bug description: When Python 3.13 is installed with both `Include_debug=1` and `Include_freethreaded=1` (i.e. `cp313td`), there should be a corresponding `venvlaunchert_d.exe` for it. https://github.co...
fd5580cd151e07c690e9d7594513be5fa3102a2e
75ffac296ef24758b7e5bd9316f32a8170ade37f
python/cpython
python__cpython-126490
# Python implementation of pickle calls persistent_id() for a persistent id # Bug report Pickle allows to define the `persistent_id()` method in the `Pickler` class. If it is defined, it is called for every pickled object, and its result will be pickled instead if it is not None. In the Python implementation `persist...
8fa4dc4ba8646c59f945f2451c53e2919f066065
e56fd449fbb9ac099f389806d4c494fa66fca248
python/cpython
python__cpython-132694
# [FreeThreading] test_ssl fails with env_changed: warnings.filters was modified by test_ssl On a Free Threaded build, test_ssl fails with: ``` $ ./python -m test test_ssl --fail-env-changed -m test_ssl_in_multiple_threads (...) Warning -- warnings.filters was modified by test_ssl Warning -- Before: (2199023...
40c8be0008ecadb5d0dc9a017434b1133a3a6e06
bc00ce941e03347dade3faa8822f19836b5bbfe4
python/cpython
python__cpython-126484
# No proper validation for month in Calendar Module # Bug report ### Bug description: In the calendar module, `IllegalMonthError` is not handled properly. For months greater than 12, an IndexError is raised instead. `formatmonthname ` do not raise IndexError for negative integer because list support negative intege...
3be7498d2450519d5d8f63a35ef298db3b3d935b
a2c180f4e768267b12beda7f02436eb4a481dbe2
python/cpython
python__cpython-126473
# Unnecessary error-checking branch in `lexer.c`. # Bug report ### Bug description: In file lexer.c we have ```c Py_ssize_t invalid = _PyUnicode_ScanIdentifier(s); if (invalid < 0) { Py_DECREF(s); tok->done = E_ERROR; return 0; } ``` [link](https://github.com/python/cpython/blob/m...
c810ed7c8e0a7464d19700ba1c8668a406f1c042
a327810169982e3782bdefc2247789a71aa79b43
python/cpython
python__cpython-126465
# `aarch64-apple-darwin/clang` JIT CI is broken This it seems that this started happening a bit after LLVM 19.1.3 was released. Failures look like this: https://github.com/python/cpython/actions/runs/11686618553/job/32543252335#step:6:1233 For some reason, `assert.h` can't be found. So it appears that something ...
a204c63919ca7ce528d8e3ab4196a4aa1a2b6ac4
83ba8c2bba834c0b92de669cac16fcda17485e0e
python/cpython
python__cpython-126485
# Calling `_pickle.load` with a `MagicMock` results in `SystemError`/aborts # Crash report ### What happened? Calling `_pickle.load(MagicMock())` with a results in an abort in debug builds and a `SystemError` in non-debug. In debug builds: ```python python -c "from unittest.mock import MagicMock as MM; from _pickle...
a1c57bcfd2bcbc55ff858407e09c1d8d8cee44e6
9cba47d9f151734815a61e32391ea7fca877ea55
python/cpython
python__cpython-126512
# HACL SIMD support incorrectly detected under WASI # Bug report ### Bug description: I'm getting a lot of: ``` /opt/wasi-sdk/bin/clang -c -I../../Modules/_hacl -I../../Modules/_hacl/include -D_BSD_SOURCE -D_DEFAULT_SOURCE -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -Wno-unused-value...
2a6b6b33dfe0f3c435abf2829b62ef3f1ef12cd3
5dc36dc5658f6ba9cfd9d7a2771baaf17d2ee23a
python/cpython
python__cpython-126472
# `_pyrepl._minimal_curses.tigetstr` segfaults # Crash report ### What happened? Calling `tigetstr` from the `_pyrepl._minimal_curses` module segfaults, on free-threading or normal builds: ``` python -c "from _pyrepl._minimal_curses import tigetstr; tigetstr('')" Segmentation fault ``` It happens in the return line...
b2bbdc56e3276f3b37ea5cf5f73f49c4cce6d9f6
d00878b06a05ea04790813dba70b09cc1d11bf45
python/cpython
python__cpython-126481
# Calling many methods on `_ssl._SSLSocket()` segfaults # Crash report ### What happened? Calling many different methods on a `_ssl._SSLSocket()` instance causes a segfault, for example: ```python import _ssl s = _ssl._SSLSocket() s.shutdown() # Segmentation fault ``` Other methods known to segfault are `do_handsha...
b1c4ffc20573befb4db66bbbdd569b9bd13bb127
09d7083962062acfef7e7a9a309a01fb70ad8276
python/cpython
python__cpython-126452
# register contextvars.Context to collections.abc.Mapping # Feature or enhancement ### Proposal: `contextvars.Context` is documented as implementing the collections.abc.Mapping interface. I believe we should register it to the abc, so an `isinstance` check can work. This is similar to https://github.com/python/cpyt...
5dc36dc5658f6ba9cfd9d7a2771baaf17d2ee23a
b9082958ef7dfb57d0fef745a5bf2521546a0dd6
python/cpython
python__cpython-126444
# Compile warnings in "i686-pc-windows-msvc/msvc (Debug)" # Bug report Link: https://github.com/sobolevn/cpython/actions/runs/11679282454/job/32520346523#step:4:793 ``` D:\a\cpython\cpython\Modules\blake2module.c(477,23): warning C4018: '>': signed/unsigned mismatch [D:\a\cpython\cpython\PCbuild\pythoncore.vcxproj] ...
0b67ce930a56c4ffd597b1a658ddcbacfb40e798
bbfd9c92fa3e3d77a86c7858617eb3d09de44fd1
python/cpython
python__cpython-126426
# Several problems with `_lsprof_Profiler_enable` # Bug report There are several problems that I see with `_lsprof.Profiler.enable()` method: - https://github.com/python/cpython/blob/d3840503b0f590ee574fbdf3c96626ff8b3c45f6/Modules/_lsprof.c#L783-L787 This code implictly overrides the set exception, I would prefer t...
75872605aa78dbdfc5c4f025b0f90a7f37ba10c3
78842e4a98994a218a93992a2a1e3ca3eaa28e79
python/cpython
python__cpython-126419
# Register multiprocessing proxy types to an appropriate collections.abc class # Feature or enhancement ### Proposal: For consistency with the types that they proxy, I believe that `multiprocessing.managers.ListProxy` should be registered to `collections.abc.MutableSequence` and `multiprocessing.managers.DictProxy` ...
78842e4a98994a218a93992a2a1e3ca3eaa28e79
1371295e678f00a7c89dc5bb2ab61ede9adbc094
python/cpython
python__cpython-126416
# New warning: `'initializing': conversion from '__int64' to 'int', possible loss of data` # Bug report ### Bug description: Popped up in https://github.com/python/cpython/pull/126414/files ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ...
78015818c2601db842d101cad6ce2319c921935f
532fc08102d62c04d55f5b8aac00bd9e7e12ff4b
python/cpython
python__cpython-126698
# Add translation tests for getopt and optparse # Feature or enhancement ### Proposal: Follow up from https://github.com/python/cpython/issues/124295 Now that we have translation tests for argparse, we should add translation tests for getopt and optparse as well. Small note on the implementation: given that the tes...
dff074d1446bab23578a6b228b0c59a17006299c
b697d8c48e5e47c37fdd5dd74de40dfb4d6c0d01
python/cpython
python__cpython-126733
# UAF in `asyncio.Future` when removing a callback while `fut->fut_callbacks` length is 1 # Crash report ### What happened? This bug boils down to a missing incref on the callback before calling `PyObject_RichCompareBool`. Although we can't directly control the callbacks list with `fut._callbacks` ever since it was ...
37c57dfad12744608091653fd753a1f770e2479b
0ef84b0e2bf511b2cb5268a9ce64d7f2209fb3c4
python/cpython
python__cpython-126716
# Support socket timeout in SysLogHandler to prevent indefinite blocking on socket creation # Feature or enhancement ### Proposal: Hi, In the current implementation of the SysLogHandler class from the logging.handlers module, if the specified address does not respond or is unreachable, the createSocket method may bl...
fdcedfd3cf1a645634dee354ee349d966c56348f
002c4e2982910937f35a4b80ab94b07c3c16067f
python/cpython
python__cpython-126393
# Preserving order of options and nonoption arguments in gnu_getopt() # Feature or enhancement by default GNU `getopt()` permutes the contents of argv as it scans, so that eventually all the nonoptions are at the end. It supports two other scanning modes -- one compatible with Posix `getopt()` (stop at first nonoptio...
35010b8cf2e6f5f2791fb336951c518e4f087a43
12ca7e622ff21ba3b7c90c62be6f6f82d543f25b
python/cpython
python__cpython-126610
# Add tests to verify the behavior of basic COM methods. # Feature or enhancement ### Proposal: I am one of the maintainers of [`comtypes`](https://github.com/enthought/comtypes/). `comtypes` is based on `ctypes` to implement [`IUnknown`](https://learn.microsoft.com/en-us/windows/win32/api/unknwn/nn-unknwn-iunkn...
7725c0371a93be3ccfaff4871014a80bdf0ea274
0cb20177d667f0058f3d8d808abaf340e8345f04
python/cpython
python__cpython-126375
# Support options with optional arguments # Feature or enhancement GNU `getopt` supports options with optional arguments. For example GNU `grep` can be used with option `--color=auto` and with just `--color`. Unix `getopt` does not need it, because it stops after encountering first nonoption argument, but GNU `getopt...
25aee21aa84061b5d8e08247c8581da1459f37e8
79805d228440814c0674ab5190ef17f235503d2e
python/cpython
python__cpython-126369
# Abort in free-threaded build due to mutation of `ChainMap` of a `Counter` in threads ### What happened? The code below, in a no-gil debug build with `PYTHON_GIL=0`, results in the following abort: ``` python: ./Include/internal/pycore_stackref.h:99: _PyStackRef_FromPyObjectSteal: Assertion `obj != NULL' failed....
1371295e678f00a7c89dc5bb2ab61ede9adbc094
407c0366d9ccd2a36c6cc8bf92324856b16fd604
python/cpython
python__cpython-126364
# Speed up pattern parsing in `pathlib.Path.glob()` `pathlib.Path.glob()` converts a given string pattern to a `Path` object: https://github.com/python/cpython/blob/dcae5cd6abaae4f73e656ebc054f30d3f15ca7b8/Lib/pathlib/_local.py#L644-L645 Which has the following drawbacks: - It instantiates a `Path` object, wh...
9b7294c3a560f43f1e26a0f48c258829076d6464
2e95c5ba3bf7e5004c7e2304afda4a8f8e2443a7
python/cpython
python__cpython-126358
# Remove obsolete import guards around `gettext` in `getopt` and `optparse` # Feature or enhancement ### Proposal: In `getopt` and `optparse`, there are import guards around `gettext`: https://github.com/python/cpython/blob/556dc9b8a78bad296513221f3f414a3f8fd0ae70/Lib/getopt.py#L37-L41 https://github.com/python/cp...
ac556a2ad1213b8bb81372fe6fb762f5fcb076de
19d935843727fff93b2c0e09a63fd32c0d97098d
python/cpython
python__cpython-126354
# Remove implicit creation of event loop from `asyncio.get_event_loop` Remove implicit creation of event loop from `asyncio.get_event_loop` as deprecated from Python 3.12. <!-- gh-linked-prs --> ### Linked PRs * gh-126354 <!-- /gh-linked-prs -->
fe5a6ab7bea927e887b7b3c2d4e8fe8eac7106c3
0d80777981f95bbc79b146fc78b2189c82521ab9
python/cpython
python__cpython-126350
# Turtle context managers for `fill`, `poly` and `tracer` # Feature or enhancement ### Proposal: When I taught Python with Turtle, I always had to find other examples when I got to context managers. This is a shame, as there are several places in the Turtle module where context managers make sense. The most obvious ...
d3adf02c90a570c5ee5d9b8cefe9b10305cff9e6
4dade055f4e18a7e91bc70293abb4db745ad16ca
python/cpython
python__cpython-126759
# `SystemError` from calling `__iter__` on a released `memoryview` # Crash report ### What happened? The code below causes a `SystemError` on all tested Python versions in Windows and Linux. In a no-gil debug build of main, besides the expected abort, sometimes a segfault occurs. ```python from threading import Thr...
a12690ef49e8fc8a3af4c5f1757eb3caffb35e03
ba088c8f9cf7163b0f28c507cb1343befe21997e
python/cpython
python__cpython-126650
# 3.13.0 REPL crashes on double ctrl+z in line overflow # Bug report ### Bug description: The new REPL in 3.13.0 crashes on pressing ctrl+Z twice at the end of a overflowing line, refer to the attachment https://github.com/user-attachments/assets/13301701-9821-483a-bd3d-dbe2522c98f9 ### CPython versions tested on:...
d147e5e52cdb90496ae5fe85b3263cdfa9407a28
f18b2264929c56360c868d7ad77508035d751352
python/cpython
python__cpython-126323
# Simplify stdlib code by using `itertools.batched()` #98364 introduced `itertools.batched()` but since it's pretty new it's still rarely used inside the standard library. [`pickle.py` includes a custom version](https://github.com/python/cpython/blob/f0c6fccd08904787a39269367f09f263d496114c/Lib/pickle.py#L1038-L104...
bd4be5e67de5f31e9336ba0fdcd545e88d70b954
10eeec2d4ffb6b09a6d925877b6d9ef6aa6bb59d
python/cpython
python__cpython-126351
# `curses.napms()` aborts with a `SystemError` # Crash report ### What happened? The abort happens on normal and no-gil debug builds, release builds also hit the `SystemError`. ```python import curses curses.napms(37) ``` Error is: ``` Fatal Python error: _Py_CheckFunctionResult: a function returned a result with ...
19d935843727fff93b2c0e09a63fd32c0d97098d
dcae5cd6abaae4f73e656ebc054f30d3f15ca7b8
python/cpython
python__cpython-126338
# GC aborts in debug no-gil build # Crash report ### What happened? In debug no-gil builds with `PYTHON_GIL=0`, it's possible to trigger the three assertions here with simple code: https://github.com/python/cpython/blob/c84a136511c673f495f466887716b55c13b7e3ac/Python/gc_free_threading.c#L550-L558 For this code: ```...
d4c72fed8cba8e15ab7bb6c30a92bc9f2c8f0a2c
8717f792f7cc343599dc60daf80630cceb66145b
python/cpython
python__cpython-126336
# An os.sched_param object can be dumped with pickle, but loading raises TypeError # Bug report ### Bug description: While working on an experiment with different scheduler priorities and the **multiprocessing.Pool**, I found out that using an **os.sched_param** object as one of the **initargs** parameters raised th...
d3840503b0f590ee574fbdf3c96626ff8b3c45f6
d9602265479bcd96dc377d92a34556baf34ac3cd
python/cpython
python__cpython-126398
# Constant slices are deduplicated too aggressively # Bug report ### Bug description: I try to build numpy with Python 3.14.0a1 and encounter very strange test failures regarding array slicing. The offending tests source code can be found [here](https://github.com/numpy/numpy/blob/v2.1.2/numpy/_core/tests/test_i...
a38e82bd8c249c126ab033c078170b6dea27a619
9357fdcaf0b08dac9396c17e8695b420fad887f8
python/cpython
python__cpython-126260
# Doctest warning in `sqlite3.rst`: "unclosed database in sqlite3.Connection" # Bug report Link: https://github.com/python/cpython/actions/runs/11619995124/job/32360863917?pr=126257#step:8:481 ``` Document: library/sqlite3 ------------------------- 3 items passed all tests: 77 tests in default 3 tests in sqlit...
295262c8ecb085b4fea552bc6229af3551bbaf7a
260843df1bd8a28596b9a377d8266e2547f7eedc
python/cpython
python__cpython-126257
# `time.rst` uses `the same than`, which is grammatically incorrect # Documentation The [`time` documentation](https://docs.python.org/3.13/library/time.html#time.monotonic) uses `the same clock than time.monotonic` instead of `the same clock as time.monotonic`, which is [grammatically false](https://dictionary.cam...
d0abd0b826cfa574d1515c6f8459c9901939388f
dd3c0fa3fd2795326dae0e0ed63c668f5506cf32
python/cpython
python__cpython-126302
# `test_embed.InitConfigTests.test_initconfig_api` fails when cpython is built with `--enable-experimental-jit=interpreter` # Bug report ### Bug description: The `test_embed.InitConfigTests.test_initconfig_api` is failing on main when cpython is built with `--enable-experimental-jit=interpreter` at commit `0e8665554...
f0c6fccd08904787a39269367f09f263d496114c
8477951a1c460ff9b7dc7c54e7bf9b66b1722459
python/cpython
python__cpython-126241
# Possible null pointer dereference of variable args in _PyPegen_collect_call_seqs # Crash report ### What happened? *args* [can be NULL as a result of](https://github.com/python/cpython/blob/d467d9246cbe0ce5dc149c4c74223bb8374ece73/Parser/action_helpers.c#L1130) `_Py_asdl_expr_seq_new`, and then [dereference happe...
94639f6b7182c2e1a82f2f907b03b5b15202acfa
01415213d72504eafc159721a8f55d57b374fd9c
python/cpython
python__cpython-126239
# Possible null pointer dereference of freevars in _PyCompile_LookupArg # Bug report ### Bug description: *freevars* is [checked for null](https://github.com/python/cpython/blob/d467d9246cbe0ce5dc149c4c74223bb8374ece73/Python/compile.c#L893C1-L895C10), but later [possible dereference happens](https://github.com/pyth...
8525c9375f25e6ec0c0b5dfcab464703f6e78082
0b67ce930a56c4ffd597b1a658ddcbacfb40e798
python/cpython
python__cpython-126224
# `SystemError` caused by `_interpreters.create()` with invalid unicode argument # Bug report ### Bug description: It's possible to make a debug build of Python abort by passing an invalid Unicode argument to `_interpreters.create()`, resulting in `SystemError: <built-in function create> returned a result with an ex...
01415213d72504eafc159721a8f55d57b374fd9c
8c22eba877225ab29cd64672dcb97f09a5f7336f
python/cpython
python__cpython-126507
# JIT error stubs don't account for peeks # Crash report When deciding how many stack items to pop in an `_ERROR_POP_N` stub, we use `_PyUop_num_popped`. However, for opcodes with "peeked" items that never get popped, this is incorrect. For example, consider `SET_ADD(2)`. It has three inputs and two outputs. How...
85036c8d612007356d2118eb25b460505078b023
c9cda1608edf7664c10f4f467e24591062c2fe62
python/cpython
python__cpython-126233
# `_lsprof.Profiler._creturn_callback()` segfaults # Crash report ### What happened? It's possible to crash Python by simply calling the `._creturn_callback()` or the `._ccall_callback()` methods of the `Profiler` class in either `_lsprof` or `cProfile`. ```python from _lsprof import Profiler Profiler()._creturn_ca...
c806cd5af677c385470001efc68da38a32919196
3032fcd90ecb745b737cbc93f694f9a802062a3a
python/cpython
python__cpython-126214
# urllib.request.pathname2url() and url2pathname() remove slashes on Windows # Bug report ### Bug description: `urllib.request.pathname2url()` unexpectedly removes doubled and trailing slashes, but only on Windows, and only for DOS device paths (not UNC paths): ```python >>> from urllib.request import pathna...
54c63a32d06cb5f07a66245c375eac7d7efb964a
fa4092259763ffad45a5bb9ef55f515dc6a69ad2
python/cpython
python__cpython-126213
# cases_generator inserts code to save the stack pointer in the incorrect location when statements containing escaping calls are next to preprocessor directives # Bug report ### Bug description: The cases generator will insert code to save the stack pointer at the incorrect location if the statement containing an es...
821759d63101334fa8a1863135429c341ca0b234
32e07fd377f81cbeb8c108fc791a3e7d631319b6
python/cpython
python__cpython-126329
# warnings.warn's skip_file_prefixes doesn't work when provided `__file__`. # Bug report ### Bug description: I was attempting to make warning.warn skip all frames in the calling file by setting `skip_file_prefixes=(__file__,)`. Frustratingly it wasn't working as expected and was blaming an intermediate frame in the...
0ef84b0e2bf511b2cb5268a9ce64d7f2209fb3c4
f223efb2a2d6a3e86556be7295cbbd3ef839f489
python/cpython
python__cpython-126244
# `make regen-all` doesn't pass `-f` to argument clinic # Bug report ### Bug description: Output: ```none python3.13 ./Tools/clinic/clinic.py --make --exclude Lib/test/clinic.test.c --srcdir . Error in file 'Modules/posixmodule.c' on line 13087: Checksum mismatch! Expected '9756767bdbdabe94', computed '1da...
43447cb63421fb4db5411c1e74bdd8a4cfcf9263
295262c8ecb085b4fea552bc6229af3551bbaf7a
python/cpython
python__cpython-126208
# urllib.request.pathname2url() mishandles UNC paths # Bug report ### Bug description: When given a Windows UNC path, `urllib.request.pathname2url()` incorrectly generates a URI that begins with four slashes. The correct number is two, see [ref1](https://learn.microsoft.com/en-us/archive/blogs/ie/file-uris-in-window...
951cb2c369e8b8fb9f93662658391a53fd727787
2b2d607095335024e5e2bb358e3ef37650536839
python/cpython
python__cpython-126805
# Upgrade bundled pip to 24.3 # Feature or enhancement ### Proposal: `ensurepip`'s bundled version of pip gets updated to the current latest 24.3. ### Background: The pip 24.2 wheel bundled into current python releases is broken and does not work at all on old macOS releases (like e.g. macOS Sierra / High ...
f6b0361c17552197f44be16435e4a5cb4b1d60ca
142104ce78a8717f99eb42ce030eb29775dd550c
python/cpython
python__cpython-126190
# Provide a script to create a complete emscripten build This is based on https://github.com/python/cpython/issues/103065 but for Emscripten. Create a script `Tools/wasm/emscripten.py` that automates building for Emscripten. <!-- gh-linked-prs --> ### Linked PRs * gh-126190 <!-- /gh-linked-prs -->
f8276bf5f37ef12aa0033634151fa33a6f7bd4f2
54c63a32d06cb5f07a66245c375eac7d7efb964a
python/cpython
python__cpython-126179
# NFC Separate Emscripten and WASI standard lib disables in configure In `configure.ac` in the "Modules that are not available on some platforms" we `PY_STDLIB_MOD_SET_NA` a bunch of standard library modules that either won't compile or won't work in Emscripten and WASI. Currently these two targets are overlapped, so ...
b3122aa6132de263f389317efe9dcf2b14c6b393
ac3a2c8abceeec44848635c26f09ff382bbcab73
python/cpython
python__cpython-126428
# Add attributes to tomllib.TOMLDecodeError # Feature or enhancement ### Proposal: Add the same attributes to `tomllib.TOMLDecodeError` that `json.JSONDecodeError` also has, namely: `msg`, `doc`, `pos`, `lineno`, `colno`. This will help user facing apps show customized errors to users. [This draft PR](https://githu...
29b5323c4567dc7772e1d30a7ba1cbad52fe10a9
a12690ef49e8fc8a3af4c5f1757eb3caffb35e03
python/cpython
python__cpython-127203
# PYTHON_BASIC_REPL env var not fully documented # Documentation In Python 3.13, a new REPL was introduced. There now also exists a way to switch back and forth between the two using PYTHON_BASIC_REPL. In the [documentation](https://docs.python.org/3/using/cmdline.html#envvar-PYTHON_BASIC_REPL) entry for PYTHON_BAS...
f18b2264929c56360c868d7ad77508035d751352
610584639003317193cdcfe38bbdc8268b612828
python/cpython
python__cpython-126566
# Core dump with specific call of find_frozen # Crash report ### What happened? ```bash >>> from importlib import _imp >>> _imp.find_frozen("zipimport", withdata=True) python3: Objects/memoryobject.c:733: PyMemoryView_FromMemory: Assertion `mem != ((void *)0)' failed. Aborted (core dumped) ``` python is ...
9ecd8f7f40e6724a1c1d46c2665147aaabceb2d2
06a8b0bb5ee0d01ed93315137c41c104a11e4640
python/cpython
python__cpython-126169
# Genericize iOS testbed app # Feature or enhancement ### Proposal: In order to run the CPython test suite, CPython source includes an Xcode project that is able to start a Python interpreter and run the equivalent of `python -m test`. The *Python* test suite is wrapped in an Xcode XCTest suite that contains a singl...
500a4712bb42355eeb785ed5b9d71507384d18bc
0c5c80928c476ac0dcb9a053b15a562af899cfba
python/cpython
python__cpython-126215
# The return value of function `math.isclose` can be somewhat misleading # Documentation The following example may be misleading to people who are not familiar with the function: ```python >>> math.isclose(math.sin(0), 0) ... True >>> math.isclose(math.sin(math.pi), 0) ... False >>> ``` To a newbie, th...
081706f873b7d1a10b27016a9ed350b20c719709
9441993f272f42e4a97d90616ec629a11c06aa3a
python/cpython
python__cpython-126157
# `Morsel.__init__` loops reserved values and could be replaced with a simple dict update https://github.com/python/cpython/blob/224c370a3680132997f1e43d20a3b4ca95a060ab/Lib/http/cookies.py#L276 Backstory: https://github.com/aio-libs/aiohttp/pull/9594 Processing cookies is a significant part of the `aiohttp` req...
dd3c0fa3fd2795326dae0e0ed63c668f5506cf32
0e8665554b2f1334e530fd6de5b3a4e908405419
python/cpython
python__cpython-126147
# Remove `__cmp__` method from some test cases # Feature or enhancement ### Proposal: A `__cmp__` method was removed in 3.0, but it is still present in some test cases: * https://github.com/python/cpython/blob/main/Lib/test/test_descr.py#L3242 * https://github.com/python/cpython/blob/main/Lib/test/test_richcmp.py#...
4877e33708b3723d4b4069ca5c5f090d0b8dcec6
b1f13bce62ff666f59286e8325011d8e9e0ddca7
python/cpython
python__cpython-126140
# Improve error message locations for future statements with unknown future features # Feature or enhancement ### Proposal: Currently, attempting to use a future statement with an unknown future feature produces a syntax error with the error location set to the start of the line: ```none $ python3 example.py File ...
224c370a3680132997f1e43d20a3b4ca95a060ab
9dfef4e5f4ac3c1ce494c48f2476a694c12d72a5
python/cpython
python__cpython-126305
# UAF when using a malicious `__getattribute__` when calling a class's `cancel` function in `task_step_handle_result_impl` in `_asynciomodule.c` # Crash report ### What happened? This is the bug I mentioned I was looking into in https://github.com/python/cpython/issues/126080#issuecomment-2441969209, but it's the sa...
f032f6ba8fec6fab35edeec0eb40cd73e9d58928
914356f4d485e378eb692e57d822b893acc0c0da
python/cpython
python__cpython-128666
# Improve `asyncio.loop.add_read` and `asyncio.loop.add_writer` documentation # Documentation The documentation for add_read/add_writer (https://docs.python.org/3/library/asyncio-eventloop.html#watching-file-descriptors ) does not specify what happens if you add two different callbacks for the same fd. Do both cal...
b2adf556747d080f04b53ba4063b627c2dbe41d1
1439b81928f1b52c5a0ac7fd81fdd66afd5f72da
python/cpython
python__cpython-126236
# Use static copyright years # Short version Each January we update the PSF copyright years in the repo: ``` Copyright © 2001-2024 Python Software Foundation. All rights reserved. ``` 2025 is [approaching](https://hugovk.github.io/year-progress-bar/). Can we get permission from the PSF to adopt a copyrig...
91f4908798074db6c41925b4417bee1f933aca93
8ff7efb46d34ee454239bd86ff5136f386b9749b
python/cpython
python__cpython-135681
# test_os.TimerfdTests is flaky # Bug report ### Bug description: When compiling `dev-lang/python-3.13.0` on Gentoo, the following tests failed: ``` ====================================================================== FAIL: test_timerfd_interval (test.test_os.TimerfdTests.test_timerfd_interval) ---------...
5c25c884b93eb79f640c47d6dba20f11fdf0ade4
7a20c72cb612653fa46c41c3a969aefa2b52738b
python/cpython
python__cpython-126118
# Potential null pointer dereference in `PySys_AddWarnOptionUnicode` # Bug report ### Bug description: Pointer *tstate* is compared to a NULL value [here](../blob/3.11/Python/sysmodule.c#L2300), but above there is a [dereference](../blob/3.11/Python/sysmodule.c#L2298). Stack trace: *_PySys_AddWarnOptionWithError* ->...
fad36bf38248130bc48b81a5e7c31a7649a6456e
7eaef74561c27865496505913d19eec7bb3fbcf5
python/cpython
python__cpython-126982
# COPYRIGHT file not found # Bug report ### Bug description: The file, https://github.com/python/cpython/blob/v3.11.4/Modules/config.c.in refers to a file, 'Misc/COPYRIGHT' for information on license of the contents of the file. However, the file COPYRIGHT is not in the source code. We could find the file at https...
5d9b62005a110164c6be5bf412d344917e872e10
b543b32eff78ce214e68e8c5fc15a8c843fa8dec
python/cpython
python__cpython-126111
# Potential null pointer dereference in `PySSLSession_richcompare` # Bug report ### Bug description: Pointer *left* is dereferenced [here](../blob//3.11/Modules/_ssl.c#L5027), but null-pointer check [is done later](../blob//3.11/Modules/_ssl.c#L5029). Correct code should look like this: ```c int result; if ...
a64a1c920660b0c1e4dd5a9573004cd527e15184
9b14083497f50213f908c1359eeaf47c97161347
python/cpython
python__cpython-126115
# Segmentation fault after deleting __fields__ attribute from ast.AST # Crash report ### What happened? ```bash >>> import ast >>> dir(ast.AST) ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '...
b2eaa75b176e07730215d76d8dce4d63fb493391
0bbbe15f5688552236c48f2b6e320c5312720b8e
python/cpython
python__cpython-127981
# Unpacking TypeAliasType to tuple of types using * errors at runtime, Unpack doesn't # Bug report ### Bug description: Discussed in microsoft/pyright#9343 @JelleZijlstra [asked](https://github.com/microsoft/pyright/discussions/9343#discussioncomment-11077428) me to open this issue. I'm writing classes using ...
e091520fdbcfe406e5fdcf66b7864b2b34a6726b
d8a1cf469e40b538a84e583ac1d5d34418ed9a6a
python/cpython
python__cpython-126088
# pythonw.exe from venv in 3.13 always creates console window # Bug report ### Bug description: In 3.13.0a4 yet another form of launcher executable was added, apparently called "venvlauncher". This latest creation is apparently unaware that pythonw (the GUI subsystem, no-console-window form of interpreter) exists an...
802d405ff1233a48004a7c9b302baa76291514d1
9effa0ff06047f3d957bf37267742a98106581ff
python/cpython
python__cpython-126103
# Bug: Reference leak in `_asyncio_Task___init___impl` in `_asynciomodule.c` # Bug report ### Bug description: I discovered this while working on https://github.com/python/cpython/issues/126080. If the func is given a context that isn't `None`, instead of doing `Py_XSETREF` it'll just do a regular assignment meaning...
d07dcce6935364cab807e0df931ed09b088ade69
d467d9246cbe0ce5dc149c4c74223bb8374ece73
python/cpython
python__cpython-126120
# Crash: UAF in `task_call_step_soon` in `_asynciomodule.c` (with admittedly ridiculous setup) # Crash report ### What happened? This is basically an extension to https://github.com/python/cpython/issues/125984 but it took me a bit to get a working PoC because I have never used asyncio.Task ever. The crash is cause...
0e8665554b2f1334e530fd6de5b3a4e908405419
3275cb19530fb5c7115cf8313f1ada9621ed3a92
python/cpython
python__cpython-126077
# Account for relocated objects in tracemalloc There are many places where we resize/reallocate memory for objects inline and we are not properly telling tracemalloc of their destruction, resulting in invalid object counting <!-- gh-linked-prs --> ### Linked PRs * gh-126077 * gh-127823 <!-- /gh-linked-prs -->
30aeb00d367d0cc9e5a7603371636cddea09f1c0
899fdb213db6c5881c5f9c6760ead6fd713d2070
python/cpython
python__cpython-126143
# Embeddable distribution for 3.13 includes Tcl/Tk DLL files # Bug report ### Bug description: I noticed that the size of the embeddable distribution for Windows increased by roughly 2 MB between 3.12 and 3.13 (in the 32-bit distribution when unpacked), despite the PEP 594 dead batteries removal. This turns out to b...
f51fd84034e2cbf458321c25ba6fd085a39d6f6f
ff8349979c2ca4e442afc583e1217519611c6c48
python/cpython
python__cpython-126101
# The method for storing docstrings in code objects is awkward and prevents optimizations. Currently, the zeroth constant in a code object's `co_consts` tuple is the docstring, iff it is a string. This means that any code object without a docstring must not have a string as its first constant. To guarantee this we ...
35df4eb959b3923c08aaaeff728c5ed1706f31cf
2ab377a47c8290f8bf52c8ffb5d7fc4c45452611
python/cpython
python__cpython-126073
# Improve formatting of the argparse documentation The proposed PR improves formatting of the `argparse` documentation. * Use appropriate roles for ArgumentParser, Action, etc. * Remove superfluous repeated links. * Explicitly document signatures and add index entries for some methods and classes. * Make it more...
2ab377a47c8290f8bf52c8ffb5d7fc4c45452611
00e5ec0d35193c1665e5c0cfe5ef82eed270d0f4
python/cpython
python__cpython-126069
# Fix exceptions in argparse # Bug report There are several issues with exceptions in the `argparse` module: * Only error messages for ArgumentError and ArgumentTypeError should be translated. These exceptions are the part of the user interface of the program that uses `argparse`. Other exceptions indicate logical ...
cc9a1839930d30450b12c460eee58137e3a3d6f1
1f16df4bfe5cfbe4ac40cc9c6d15f44bcfd99a64
python/cpython
python__cpython-126065
# Add PyLong_IsPositive/Zero/Negative() functions as alternative API to PyLong_GetSign(). It seems, C-API WG is positive on this, see https://github.com/capi-workgroup/decisions/issues/29. This issue will track implementation. <!-- gh-linked-prs --> ### Linked PRs * gh-126065 * gh-126788 <!-- /gh-linked-prs -->
8ff7efb46d34ee454239bd86ff5136f386b9749b
abb90ba46c597a1b192027e914ad312dd62d2462
python/cpython
python__cpython-126067
# os.walk() example of an implementation of shutil.rmtree() is incomplete # Documentation In this section: https://docs.python.org/3.9/library/os.html?highlight=os%20walk there is a code example at the bottom that claims to be "a simple implementation of `shutil.rmtree()`". However it is incomplete. Reason:...
597d814334742dde386a4d2979b9418aee6fcaba
4f826214b30ad50365f45bf07e4a02f34f897ab5
python/cpython
python__cpython-127964
# UAF: `xml.etree.ElementTree.Element.find*` when concurrent mutations happen # Crash report ### What happened? Similar to https://github.com/python/cpython/issues/126033, the following crashes: ```py import xml.etree.ElementTree as ET class EvilTag(str): def __eq__(self, other): base.clear() r...
c57623c221d46daeaedfbf2b32d041fde0c882de
6aa88a2cb36240fe2b587f2e82043873270a27cf
python/cpython
python__cpython-126036
# Missing whitespaces when using `Py_CheckRecursiveCall` & co # Bug report ### Bug description: The message must be prefixed by a whitespace since `_Py_CheckRecursiveCall` directly appends them to "maximum recursion depth exceeded": https://github.com/python/cpython/blob/dc76a4ad3c46af3fb70361be10b8a791cd126931/Pyt...
19e93e2e269889ecb3c4c039091abff489f247c2
6870eb3f7322ed64a1ca8bbda5cf4e121e181b54
python/cpython
python__cpython-126025
# Improve UTF-8 decode speed # Feature or enhancement ### Proposal: DuckDB and orjson don't use PyUnicode_FromStringAndSize() but PyUnicode_4BYTE_DATA() because they think Python UTF-8 decoder is slow. ## vs DuckDB * DuckDB decoder: https://github.com/duckdb/duckdb/blob/e791508e9bc2eb84bc87eb794074f4893093...
322b486010095f89271fba51b4b23c35d87c0595
bfabf96b50b7d6a9c15b298a86ba3633b05a1fd7
python/cpython
python__cpython-126020
# `sys.audit(0)` aborts due to an assertion in debug build # Crash report ### What happened? There is an assert in `sysmodule.c` that makes the interpreter abort when calling `sys.audit` with a non-string value in debug builds: https://github.com/python/cpython/blob/f6cc7c8bd01d8468af70a65e550abef3854d0754/Python/sy...
80eec52fc813bc7d20478da3114ec6ffd73e7c31
dc76a4ad3c46af3fb70361be10b8a791cd126931
python/cpython
python__cpython-126066
# Ignore directories containing only `__pycache__` in `test_makefile_test_folders` # Feature or enhancement ### Proposal: While working on some tests, sometimes when switching branches I have a leftover `__pycache__` directory in an otherwise empty test folder. This can happen for example when converting a test file...
aeafaf4cda5bfce44bb054b4c530696901646abe
dc2552d429c91310b0c410c3e856728d8866b05f