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-127357
# gettext Make target replaces SPHINXOPTS from command line # Documentation Running `make gettext` will override any value provided in SPHINXOPTS. The Makefile currently has `gettext: SPHINXOPTS += -d build/doctrees-gettext` since fb0cf7d (edited with 315a933) and it doesn't append such value, but replaces instead....
a880358af03d9cab37f7db04385c5a97051b03b6
11c01092d5fa8f02c867a7f1f3c135ce63db4838
python/cpython
python__cpython-127354
# Unable to force color output on Windows # Bug report ### Bug description: In [can_colorize function](https://github.com/python/cpython/blob/3a77980002845c22e5b294ca47a12d62bf5baf53/Lib/_colorize.py#L34), nt._supports_virtual_terminal call takes precedence over checking of environment variables. If the terminal...
a8ffe661548e16ad02dbe6cb8a89513d7ed2a42c
ed037d229f64db90aea00f397e9ce1b2f4a22d3f
python/cpython
python__cpython-127821
# _Py_wfopen no longer exported # Bug report ### Bug description: _Py_wfopen in no longer exported since 3.13. I'm using embed version and I can not use fopen or _wfopen. Please reconsider decision to remove _Py_wfopen since it is only way to open file when used in embed mode and fopen/_wfopen is not available. ...
f89e5e20cb8964653ea7d6f53d3e40953b6548ce
7e8c571604cd18e65cefd26bfc48082840264549
python/cpython
python__cpython-127387
# PyREPL crashes when there aren't enough columns # Bug report ### Bug description: ### To reproduce <sub>(order doesn't matter)</sub> * Open the new REPL * Resize the terminal emulator window to be less than 5 cells wide ### Traceback ``` Traceback (most recent call last): File "<frozen runpy>", line 198, in _ru...
510fefdc625dd2ed2b6b3975314a59e291b94ae8
4ca9fc08f89bf7172d41e523d9e520eb1729ee8c
python/cpython
python__cpython-127348
# Document `traceback.print_list` `traceback.print_list` is currently [undocumented](https://docs.python.org/3.14/library/traceback.html), let's fix that! I'll send a PR shortly :) <!-- gh-linked-prs --> ### Linked PRs * gh-127348 * gh-127569 * gh-127570 <!-- /gh-linked-prs -->
8ba9f5bca9c0ce6130e1f4ba761a68f74f8457d0
412e11fe6e37f15971ef855f88b8b01bb3297679
python/cpython
python__cpython-127310
# Clinic causes compiler warnings when using a getter and setter with a docstring # Bug report ### Bug description: I noticed this while working on GH-126890, as some odd macro redefinition warnings came up from the generated clinic file. As it turns out, clinic has a bug where using *both* `@getter` and `@sette...
99490913a08adcf2fe5e69b82772a829ec462275
762c603a866146afc7db2591fb49605e0858e9b1
python/cpython
python__cpython-127331
# Add support for OpenSSL 3.4 # Feature or enhancement OpenSSL 3.4 is out and it needs: - new error information - adding to multissltests I plan to document what I learned about the process in `make_ssl_data.py` and point to that from all the places that need changing. <!-- gh-linked-prs --> ### Linked PRs * gh-12...
db5c5763f3e3172f1dd011355b41469770dafc0f
3a77980002845c22e5b294ca47a12d62bf5baf53
python/cpython
python__cpython-127457
# Setting `f_trace_opcodes` to `True` can lead to `f_lineno` being removed in some cases (using `breakpoint()`/`pdb.set_trace()`) # Bug report ### Bug description: Since https://github.com/python/cpython/pull/118579 (introduced in 3.13), `Bdb.set_trace` will call `Bdb.set_stepinstr` instead of `Bdb.set_step` (on L40...
1bc4f076d193ad157bdc69a1d62685a15f95113f
a880358af03d9cab37f7db04385c5a97051b03b6
python/cpython
python__cpython-135405
# Python 3.14.0a2 should have raised exception when a socket is already in used, shouldn't it? # Bug report ### Bug description: In earlier versions of Python all the way to 3.13, it would not allow a server to listen on a port that has already been used, and rightfully so. ```bash $ python -m http.server 8000 Serv...
2bd3895fcabb2dfdae5c0c72e60483e3d3267f0f
8979d3afe376c67931665070a79f6939ebcd940b
python/cpython
python__cpython-127399
# [FreeThreading] object_set_class() fails with an assertion error in _PyCriticalSection_AssertHeld() # Crash report ### What happened? On a free-threaded debug build, even with `PYTHON_GIL=1`, it's possible to abort the interpreter by calling `_DummyThread._after_fork` after a `__reduce__` call: ```python import t...
45c5cba318a19dda3ee6f9fc84781cc7a2fbde80
b14fdadc6c620875a20b7ccc3c9b069e85d8557a
python/cpython
python__cpython-127315
# Change error message for a `NULL` thread state on the free-threaded build # Feature or enhancement ### Proposal: In the C API, this message tends to be shown if you call a function without an active thread state: ``` the function must be called with the GIL held, after Python initialization and before Python fina...
12680ec5bd45c85b6daebe0739d30ef45f089efa
a353455fca1b8f468ff3ffbb4b5e316510b4fd43
python/cpython
python__cpython-127304
# Document `token.EXACT_TOKEN_TYPES` # Documentation `token.EXACT_TOKEN_TYPES` isn't documented but it's the only way to get to the string representation of every token in Python. It has existed since at least Python 3.9. <!-- gh-linked-prs --> ### Linked PRs * gh-127304 * gh-127390 * gh-127391 <!-- /gh-linked-prs -...
dd3a87d2a8f8750978359a99de2c5cb2168351d1
b83be9c9718aac42d0d8fc689a829d6594192afa
python/cpython
python__cpython-127297
# ctypes: Switch field accessors to fixed-width integers # Feature or enhancement I believe the next step toward untangling `ctypes` should be switching `cfield.c` to be based on fixed-width integer types. This should be a pure refactoring, without user-visible behaviour changes. Currently, we use traditional native...
78ffba4221dcb2e39fd5db80c297d1777588bb59
ba45e5cdd41a39ce0b3de08bdcfa9d8e28e0e4f3
python/cpython
python__cpython-127286
# Wrong ARM platform configuration in pcbuild.sln https://github.com/python/cpython/blob/4fd9eb2aca21489ea0841155cdb81cb30dda73d3/PCbuild/pcbuild.sln#L1102C70-L1102C75 <!-- gh-linked-prs --> ### Linked PRs * gh-127286 <!-- /gh-linked-prs -->
6da9d252ac39d53342455a17bfec7b1087fba697
987311d42e3ec838de8ff27f9f0575aa791a6bde
python/cpython
python__cpython-128012
# Defer functions defined in nested classes in free-threaded builds # Feature or enhancement ### Proposal: We currently only defer functions that do not have the `CO_NESTED` flag set: https://github.com/python/cpython/blob/26ff32b30553e1f7b0cc822835ad2da8890c180c/Objects/funcobject.c#L213-L218 This also excludes f...
255762c09fe518757bb3e8ce1bb6e5d8eec9f466
e163e8d4e1a9844b8615ef38b9917b887a377948
python/cpython
python__cpython-127272
# PyCell_GET/SET are not thread-safe in free-threaded builds # Bug report ### Bug description: The `PyCell_GET` and `PyCell_SET` macros are not safe for free-threading builds. First, they don't the correct locking. Second, `PyCell_GET` returns a borrowed reference. For CPython internals, the usages of these macro...
fc5a0dc22483a35068888e828c65796d7a792c14
276cd66ccbbf85996a57bd1db3dd29b93a6eab64
python/cpython
python__cpython-131174
# Type slots are not thread-safe in free-threaded builds # Bug report ### Bug description: Modification of type slots is protected by the global type lock, however, type slots are read non-atomically without holding the type lock. For example, in `PyObject_SetItem`: https://github.com/python/cpython/blob/5bb059fe60...
eecafc33800c84ecb67f5d3ed819fbed057677ab
219b1f9d1d97e271213fe324b94ed544e890630b
python/cpython
python__cpython-127267
# Confusing single quotes and/or apostrophe # Documentation The first apostrophe threw me off, and I realized it doesn't make sense for the second apostrophe to indicate the possessive case either. Then I realized the "apostrophes" are supposed to be single quotes around the word `arrow`. Nowhere else in the docs i...
26ff32b30553e1f7b0cc822835ad2da8890c180c
5bb059fe606983814a445e4dcf9e96fd7cb4951a
python/cpython
python__cpython-130134
# Inconsistent behavior of `fromisoformat` methods in `datetime` module implementations # Bug report ## Bug description: ### 1. Incorrect timezone validation in `_pydatetime` (solved) As far as I understand, the [documentation](https://docs.python.org/3.14/library/datetime.html) says that `Z` char should mean that `...
427dd10250f94d79bad7927d6ea231950c395bd6
46ac85e4d9fcffe1a8f921989414a89648b5501a
python/cpython
python__cpython-127259
# [tests] asyncio: test_staggered_race_with_eager_tasks() fails randomly AMD64 Windows11 Refleaks 3.x build: https://buildbot.python.org/#/builders/920/builds/1141 ``` FAIL: test_staggered_race_with_eager_tasks (test.test_asyncio.test_eager_task_factory.PyEagerTaskFactoryLoopTests.test_staggered_race_with_eager_ta...
770617b23e286f1147f9480b5f625e88e7badd50
77b20f099e6cbad346b18c0e6db94b6ab7fd4d39
python/cpython
python__cpython-127360
# [tests] test_poplib fails with "env changed" on Arch Linux with OpenSSL 3.4: [SYS] unknown error (_ssl.c:2634) First failure: https://buildbot.python.org/#/builders/484/builds/6224 Example of failure: ``` test_stls_context (test.test_poplib.TestPOP3Class.test_stls_context) ... Warning -- Uncaught thread ex...
802556abfa008abe0bdd78e6f9e18bef71db90c1
688f3a0d4b94874ff6d72af3baafd8bbf911153e
python/cpython
python__cpython-127275
# Make `CopyComPointer` public and add to `ctypes` doc. # Feature or enhancement ### Proposal: As with `COMError` in gh-126615 and gh-126686, I think `CopyComPointer` should also be made public and documented. Tests covering the behavior of this API have already been added in gh-127183 and gh-127184. I plan t...
412e11fe6e37f15971ef855f88b8b01bb3297679
979bf2489d0c59ae451b97d7e3c148f47e259f0b
python/cpython
python__cpython-127254
# Clarify stability of Stable ABI I used some unfortunate wording in the docs: > The extension will work without recompilation with all Python 3 releases from the specified one onward [...] Clarify that compiling for the Stable ABI will prevent ABI issues (missing symbols or data corruption due to changed layout...
35d37d6592d1be71ea76042165f6cbfa6c4c3a17
8c3fd1f245fbdc747966daedfd22ed48491309dc
python/cpython
python__cpython-127249
# Correct name of zconf.in.h is zconf.h.in The file zconf.in.h should be renamed to zconf.h.in (https://github.com/python/cpython-source-deps/blob/4dc98e1909830e2bdc2a9cc2236e3c5d5037335b/zconf.h.in). https://github.com/python/cpython/blob/c595eae84c7f665eced09ce67a1ad83b7574d6e5/PCbuild/pythoncore.vcxproj#L418 <!...
3e7ce6e9aed8616c8ce53eaef4279402d3ee38ec
d9331f1b16033796a3958f6e0b12626ed7d3e199
python/cpython
python__cpython-127241
# sys.set_int_max_str_digits ValueError Message is Inaccurate The sys.set_int_max_str_digits ValueError message is shown to be inaccurate in the following Python interpreter execution sequence: ``` >>> import sys >>> sys.set_int_max_str_digits(maxdigits=639) Traceback (most recent call last): File "<stdin>", ...
c595eae84c7f665eced09ce67a1ad83b7574d6e5
17c16aea66b606d66f71ae9af381bc34d0ef3f5f
python/cpython
python__cpython-127194
# `urllib.request.pathname2url()`: generate RFC 1738 URLs where possible # Feature or enhancement ### Proposal: [`urllib.request.pathname2url`](https://docs.python.org/3/library/urllib.request.html#urllib.request.pathname2url) currently generates [RFC 1738](https://www.rfc-editor.org/rfc/rfc1738#section-3.10)-co...
5bb059fe606983814a445e4dcf9e96fd7cb4951a
a2ee89968299fc4f0da4b5a4165025b941213ba5
python/cpython
python__cpython-127223
# Add colour to unittest output # Feature or enhancement In Python 3.13, we added colour output to the new REPL, tracebacks and doctest, that can also be controlled with the `PYTHON_COLORS`, `NO_COLOR` and `FORCE_COLOR` environment variables: * https://docs.python.org/3/whatsnew/3.13.html#summary-release-highlights ...
23f2e8f13c4e4a34106cf96fad9329cbfbf8844d
d958d9f4a1b71c6d30960bf6c53c41046ea94590
python/cpython
python__cpython-127218
# pathname2url() does not work if path starts with // # Bug report For example: ```pycon >>> from urllib.request import pathname2url >>> 'file:' + pathname2url('//foo/bar') 'file://foo/bar' ``` This is a file URI with path "/bar" and authority "foo". Non-empty authority other than "localhost" are usually rejected. Th...
97b2ceaaaf88a73a45254912a0e972412879ccbf
2bb7846cacb342246aada5ed92d323e54c946063
python/cpython
python__cpython-127400
# `ExtensionFileLoader.load_module` aborts when initialized with a path containing null-bytes # Crash report ### What happened? It's possible to abort a debug build by initializing a `_frozen_importlib_external.ExtensionFileLoader` with a path containing null-bytes, then calling `load_module()`: ```python import _f...
b14fdadc6c620875a20b7ccc3c9b069e85d8557a
3afb639f39e89888194d8e74cc498c8da3a58d8e
python/cpython
python__cpython-127220
# `_interpreters.exec` with invalid dict as `shared` segfaults # Crash report ### What happened? Passing a dict with an invalid key as the `shared` parameter to `_interpreters.exec` segfaults the interpreter (or aborts in a debug build): ```python import _interpreters _interpreters.exec(0, "1", {"\uFD7C\u5124\u7B91...
087bb48acac997c06e69dae25bae2dd75194b980
8af57810946c216b3e18c94c8f0ee3c0c96566a9
python/cpython
python__cpython-127366
# Segfault from `asyncio.events._running_loop.__setattr__` with invalid name # Crash report ### What happened? It's possible to segfault the interpreter by calling `asyncio.events._running_loop.__setattr__` with a special class as `name`, as in this example: ```python import asyncio.events class Liar1: def __e...
20657fbdb14d50ca4ec115da0cbef155871d8d33
49fee592a4fad17781bb4a78f95085d6edbb24d5
python/cpython
python__cpython-127184
# Add tests to verify the behavior of `_ctypes.CopyComPointer`. # Feature or enhancement ### Proposal: There are other untested features related to COM besides [`COMError`](https://docs.python.org/3.14/library/ctypes.html#ctypes.COMError). [`_ctypes.CopyComPointer`](https://github.com/python/cpython/blob/39e60aeb38...
c7f1e3e150ca181f4b4bd1e5b59d492749f00be6
f4f075b3d5a5b0bc1b13cc27ef2a7de8c103fd04
python/cpython
python__cpython-127219
# Assertion failure from `StringIO.__setstate__` # Crash report ### What happened? It's possible to abort the interpreter by calling `StringIO.__setstate__` with a non-string `initial_value`: ```python python -c "from io import StringIO; StringIO().__setstate__((None, '', 0, {}))" python: Objects/unicodeobject.c:25...
a2ee89968299fc4f0da4b5a4165025b941213ba5
d3da04bfc91ec065fe587451409102213af0e57c
python/cpython
python__cpython-127640
# recommend what to use instead of asyncio.get_event_loop in 3.14 what's new Could you please mention what should be used instead? _Originally posted by @hroncok in https://github.com/python/cpython/pull/126354#discussion_r1853686937_ <!-- gh-linked-prs --> ### Linked PRs * gh-12764...
0581e3f52b6116774698761088f0daa7ec23fc0b
329165639f9ac00ba64f6493dbcafcef6955e2cb
python/cpython
python__cpython-127199
# Segfault in invalid `concurrent.futures.interpreter.WorkerContext` # Crash report ### What happened? It's possible to segfault the interpreter by calling `initialize()` on a `concurrent.futures.interpreter.WorkerContext` instance that was created with the `shared` argument being a dict containing the null byte as ...
46bfd26fb294a8769ef6d0c056ee6c9df022a037
328187cc4fcdd578db42cf6a16c197c3382157a7
python/cpython
python__cpython-127212
# Turn off PGO for JIT CI I don't think we need PGO turned on in JIT CI for non-debug jobs. It's mostly just a waste of time, and doesn't really give us any additional information. @mdboom, I know that the Windows PGO builds were a nice canary for "breaking" ceval.c under MSVC (since it's not tested in CI or any bu...
2247dd0f11058502f44b289df0e18ecc08be8657
78cb377c622a98b1bf58df40c828e886575a6927
python/cpython
python__cpython-127151
# Emscripten: Get test suite passing First I'd like to get the test suite to run all the way through, then to pass. cc @freakboy3742 #### Update 2025/01/30 Emscripten 4.0.2 has fixes for all of the file system bugs I've looked into. There are still problems with nonblocking I/O which I haven't looked into. <!-- ...
43634fc1fcc88b35171aa79258f767ba6477f764
2f1cee8477e22bfc36a704310e4c0f409357e7e9
python/cpython
python__cpython-127137
# Document forward compatibility for `suggest_on_error` Support for `suggest_on_error` was added in https://github.com/python/cpython/pull/124456. There's been some demand to document how users can opportunistically add this to their code. <!-- gh-linked-prs --> ### Linked PRs * gh-127137 <!-- /gh-linked-prs -->
a13e94d84bff334da3da2cab523ba75b57e0787f
39e60aeb3837f1f23d8b7f30d3b8d9faf805ef88
python/cpython
python__cpython-127186
# Raise exception when nesting argument groups and mutually exclusive groups The ability to nest argument groups and mutually exclusive groups was deprecated in 3.11 via https://github.com/python/cpython/pull/30098. At present, we raise warnings to let users know this has been deprecated. I'd like to remove the lo...
2104bde572aa60f547274fd529312c5708599001
f7bb658124aba74be4c13f498bf46cfded710ef9
python/cpython
python__cpython-127118
# The Last Fields of PyInterpreterState and of _PyRuntimeState Should Not Change The last field of `PyInterpreterState` should be `_initial_thread` and the last field of `_PyRuntimeState` should be `_main_interpreter`. Respectively, they are the preallocated struct values that are used for the "main" thread and main ...
5ba67af006079915af0a1312735efc40fa36c4f3
a5440d4a38316cc709ce0304175beda124b8e7f4
python/cpython
python__cpython-127113
# Emscripten: Make the web example work again My recent changes to the Emscripten build broke the web example. I'll fix it and also move all of the components of the web example into a subfolder under `Tools/wasm/emscripten`. <!-- gh-linked-prs --> ### Linked PRs * gh-127113 * gh-127551 * gh-127666 <!-- /gh-linked-pr...
bfb0788bfcaab7474c1be0605552744e15082ee9
edefb8678a11a20bdcdcbb8bb6a62ae22101bb51
python/cpython
python__cpython-127228
# ConfigParser replaces unnamed section on every read call # Bug report ### Bug description: ```python from configparser import ConfigParser config = ConfigParser(allow_unnamed_section=True) config.read(['first.ini', 'second.ini']) # now the unnamed section contains values ​​only from the second file: p...
914c232e9391e8e5014b089ba12c75d4a3b0cc7f
5d9b62005a110164c6be5bf412d344917e872e10
python/cpython
python__cpython-127091
# urllib.request.urlopen('file:...').url incorrect value # Bug report ### Bug description: When a `file:` URL is given to `urllib.request.urlopen()`, it returns an [`addinfourl`](https://docs.python.org/3/library/urllib.request.html#urllib.response.addinfourl) object. This object's `url` attribute (and its deprecate...
79b7cab50a3292a1c01466cf0e69fb7b4e56cfb1
27d0d2141319d82709eb09ba20065df3e1714fab
python/cpython
python__cpython-127100
# Add missing description for codes in `http.HTTPStatus` # Bug report ### Bug description: We have Enum of **`62`** HTTP status codes. They stores in `http.HTTPStatus` class and **`14`** of them don't have description field. I think it is not-obvious behavior when calling the description field, one code returns...
71de839ec987bb67b98fcfecfc687281841a713c
0b5f1fae573a2c658eb000433ad7b87e9c40c697
python/cpython
python__cpython-127412
# Calling `ShareableList.count` in threads aborts: `Assertion 'self->exports == 0' failed` # Crash report ### What happened? It's possible to abort the interpreter by calling `multiprocessing.shared_memory.ShareableList.count` in threads with `PYTHON_GIL=0` in a debug build: ```python import gc import multiprocessi...
4937ba54c0ff7cc4a83d7345d398b804365af2d6
1d276ec6f8403590a6a1a18c560ce75b9221572b
python/cpython
python__cpython-127099
# Replacing "Windows only: ..." with the `.. availability:: Windows` directive in `ctypes` doc. # Documentation This is a follow-up to gh-126615. In the `ctypes` documentation, the supported platforms were previously described in plain text. This will be replaced with a more modern approach using directives. ...
3c770e3f0978d825c5ebea98fcd654660e7e135f
89125e9f9f3d3099267ddaddfe72642e2af6495c
python/cpython
python__cpython-127132
# urllib.request.url2pathname() mishandles a UNC URI variant # Bug report ### Bug description: On Windows, `urllib.request.url2pathname()` mishandles an uncommon file URI variant encoding a UNC path. Specifically, a URI with _five_ leading slashes should be converted to a UNC path with _two_ leading slashes, but `ur...
8c98ed846a7d7e50c4cf06f823d94737144dcf6a
ebf564a1d3e2e81b9846535114e481d6096443d2
python/cpython
python__cpython-127086
# FileIO Strace test fails on Gentoo (test_fileio test_syscalls_read) # Bug report ### Bug description: Initially reported in PR comments: https://github.com/python/cpython/pull/123413 There looks like three cases to investigate/work on from this: 1. Gentoo + `musl` -> there is an extra mmap call 2. Gentoo + sand...
ff2278e2bf660155ca8f7c0529190ca59a41c13a
1629d2ca56014beb2d46c42cc199a43ac97e3b97
python/cpython
python__cpython-127256
# Outdated `socket.NETLINK_*` constants # Feature or enhancement ### Proposal: When working through the constants in `socket` for typeshed, I found that these appear to be obsolete: ```python NETLINK_ARPD: int # linux 2.0 to 2.6.12 (EOL August 2005) NETLINK_ROUTE6: int # linux 2.2 to 2.6.12 (EOL August 2...
6d3b5206cfaf5a85c128b671b1d9527ed553c930
71ede1142ddad2d31cc966b8fe4a5aff664f4d53
python/cpython
python__cpython-127109
# `methodcaller` is not thread-safe (or re-entrant) # Bug report **EDIT**: edited to clarify that the issue is in the C implementation of `operator.methodcaller`. Originally reported by @ngoldbaum in https://github.com/crate-py/rpds/issues/101 <details> <summary>Reproducer</summary> ```python from oper...
f83ca6962af973fff6a3124f4bd3d45fea4dd5b8
3c770e3f0978d825c5ebea98fcd654660e7e135f
python/cpython
python__cpython-127024
# Simplify `PyStackRef_FromPyObjectSteal` # Feature or enhancement Currently, `PyStackRef_FromPyObjectSteal` checks if the object is immortal in order to set the `Py_TAG_DEFERRED` bit. https://github.com/python/cpython/blob/29cbcbd73bbfd8c953c0b213fb33682c289934ff/Include/internal/pycore_stackref.h#L96-L105 This ch...
4759ba6eec9f0b36b24b8eb7e7b120d471c67e82
8214e0f709010a0e1fa06dc2ce004b5f6103cc6b
python/cpython
python__cpython-127043
# `PyCode_GetCode` is not thread-safe and causes assertion fail with Python 3.13td # Crash report ### What happened? Race condition here: https://github.com/python/cpython/blob/60403a5409ff2c3f3b07dd2ca91a7a3e096839c7/Objects/codeobject.c#L1663-L1665 Core dump and backtrace: https://github.com/metaopt/optree/acti...
3926842117feffe5d2c9727e1899bea5ae2adb28
dc7a2b6522ec7af41282bc34f405bee9b306d611
python/cpython
python__cpython-127027
# Remove lazy dictionary tracking # Feature or enhancement ### Proposal: In order to reduce the overhead of cycle GC detection for objects that cannot be part of cycles, we lazily untrack tuples and dictionary that only refer to objects that cannot be part of a cycle. This is fine for tuples, but dictionaries are m...
aea0c586d181abb897511b6b46d28bfbe4858f79
7191b7662efcd79f2f19821c9b9fa2155df6f698
python/cpython
python__cpython-127035
# shutil.which() can return non-executable path starting with 3.12 on Windows # Bug report ### Bug description: Starting with Python 3.12 if a file is in PATH that does not end with PATHEXT, but happens to be named the same as the searched command it is returned instead of the real command later in PATH which in...
8899e85de100557899da05f0b37867a371a73800
615abb99a4538520f380ab26a42f1506e08ffd09
python/cpython
python__cpython-127062
# Pickletools Default Encoding # Bug report ### Bug description: When unpickling using `_pickle.c` or `pickle.py` through `load`/`loads`, an encoding can be specified using the `encoding` argument, with the default being ASCII. However, pickletools does not support custom encodings and instead makes assumptions abou...
eaf217108226633c03cc5c4c90f0b6e4587c8803
ff2278e2bf660155ca8f7c0529190ca59a41c13a
python/cpython
python__cpython-127042
# Pickle `INT`/`LONG` base discrepancy # Bug report ### Bug description: The `INT` opcode in pickle is the `I` character followed by an ASCII number and a newline. There are multiple comments asking if the base should be explicitly set to 10, or kept as 0. However, a discrepancy exists between pickle implementat...
ce76b547f94de6b1c9c74657b4e8f150365ad76f
d5d84c3f13fe7fe591b375c41979d362bc11957a
python/cpython
python__cpython-126990
# Missing Py_DECREF for load_build in _pickle.c # Bug report ### Bug description: In the `load_build` function of [`Modules/_pickle.c`](https://github.com/python/cpython/blob/3.11/Modules/_pickle.c#L5168), if setting a value in a dictionary fails, the `dict` variable does not have its reference counter decreased. P...
29cbcbd73bbfd8c953c0b213fb33682c289934ff
c5c9286804e38c95fe717f22ce1bf2f18eee5b17
python/cpython
python__cpython-126988
# Crash in _PyXI_ApplyErrorCode() # Crash report ### Bug description: This is a problem in Python/crossinterp.c, as exposed by the _interpreters module. reproducer: 1. interp is running as "main" in thread 1 2. thread 2 calls `_PyXI_Enter()`, which emits the `_PyXI_ERR_ALREADY_RUNNING` error code 3. thread 1 finis...
d6b3e78504b3168c432b20002dbcf8ec9a435e61
0063f5f314350ad5122a86f31df65f5dff4f4e5c
python/cpython
python__cpython-126987
# Make `pyvenv.cfg`-relocation part of the interpreter initialization instead of the `site` module # Feature or enhancement ### Proposal: Currently, the mechanism behind virtual environments is implemented in the `site` module. This means that disabling the `site` initialization (passing `-S`) disables virtual e...
2b0e2b2893a821ca36cd65a204bed932741ac189
ab237ff81d2201c70aaacf51f0c033df334e5d07
python/cpython
python__cpython-126981
# `bytearray().__buffer__(256)` crashes # Crash report Code says that it cannot fail: https://github.com/python/cpython/blob/4cd10762b06ec57252e3c7373e74240b4d0c5ed8/Objects/bytearrayobject.c#L44-L56 But, it can: https://github.com/python/cpython/blob/4cd10762b06ec57252e3c7373e74240b4d0c5ed8/Objects/abstract.c#...
3932e1db5353bbcf3e3c1133cc9d2cde654cb645
4d771977b17e5ffaa9c2e8a2e6f5d393f68fc63c
python/cpython
python__cpython-126949
# Typecheck can be added to _pydatetime.timedelta.__new__ # Feature or enhancement ### Proposal: It seems that a typecheck can be added as suggested by the existing comment ```python def __new__(cls, days=0, seconds=0, microseconds=0, milliseconds=0, minutes=0, hours=0, weeks=0): # Doing...
8da9920a80c60fb3fc326c623e0f217c84011c1d
88dc84bcf9fef32afa9af0ab41fa467c9733483f
python/cpython
python__cpython-126871
# Error message in getopt.do_longs can be improved based on the existing comment # Feature or enhancement ### Proposal: `getopt.do_longs` raises an error when there are 2 or more possibilities for a given long option. Currently the error only shows the user input, but not the possibilities. For example, `option --he...
f46d8475749a0eadbc1f37079906a8e1ed5d56dc
733fe59206e04141fd5cf65606ebd3d42a996226
python/cpython
python__cpython-126938
# Struct fields with size > 65535 bytes throw TypeError # Bug report ### Bug description: `PyCField_new_impl()` processes these fields with size > 65535 bytes as bitfields, due to relying on the `NUM_BITS()` function. It throws a `TypeError` because such fields aren't a valid bitfield type. ### Minimal Example...
cef0a90d8f3a94aa534593f39b4abf98165675b9
f4b31edf2d9d72878dab1f66a36913b5bcc848ec
python/cpython
python__cpython-127592
# "make testios" fails with Xcode 16+ due to changes in xcresulttool As of Xcode 16, Apple has changed the command interface to `xcresultool` such that the way it is invoked when running the `testios` recipe in `Makefile.pre.in` is no longer valid, causing the iOS test step to fail while attempting to extract the resu...
2041a95e68ebf6d13f867e214ada28affa830669
d8d12b37b5e5acb354db84b07dab8de64a6b9475
python/cpython
python__cpython-126913
# Update "credits" command output # Bug report ### Bug description: ```python credits ``` Returns `Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information.` Which should be updated as the BeOpen.com domain has changed ...
8fe1926164932f868e6e907ad72a74c2f2372b07
b0fcc2c47a34a69c35c1a8031cd0589d3747c1af
python/cpython
python__cpython-126930
# test_os.ExtendedAttributeTests fail on filesystems with low xattr limits (e.g. ext4 with small blocks) # Bug report ### Bug description: This is roughly the same as #66210, except that bug was closed due to "not enough info", and I'm here to provide "enough info", and I can't reopen that one. I'm seeing the follo...
2c0a21c1aad65ab8362491acf856eb574b1257ad
f9c5573dedcb2f2e9ae152672ce157987cdea612
python/cpython
python__cpython-126900
# Add `**kw` to `tkinter.Misc.after` and `tkinter.Misc.after_idle` # Feature or enhancement ### Proposal: Add the argument `**kw` to the method `after` so that the keyword argument can passed to `func` Conveniently. The current function definition of the `after` is as follows: ```python def after(self, ms...
7ea523f47cdb4cf512a1e2ae1f93f5d19a48945d
04673d2f14414fce7a2372de3048190f66488e6e
python/cpython
python__cpython-126903
# Emscripten support: Use es6 modules We are in the future and ES6 module support is finally universal in mainstream JavaScript runtimes (Firefox was the straggler but finally added Module WebWorker support in v114 released on June 6 2023). They have many benefits, such as fewer global variables and more sanity. We s...
1629d2ca56014beb2d46c42cc199a43ac97e3b97
32428cf9ea03bce6d64c7acd28e0b7d92774eb53
python/cpython
python__cpython-126897
# Outdated docs about `asyncio.start_server()` # Documentation Since 3.13, the function `asyncio.start_server()` has added a parameter named `keep_alive` (see https://github.com/python/cpython/pull/112485), but the docs didn't completely update in that PR, so the website still shows the old function signature (see ht...
0c5c80928c476ac0dcb9a053b15a562af899cfba
9d6366b60d01305fc5e45100e0cd13e358aa397d
python/cpython
python__cpython-131208
# Segfault/aborts calling `readline.set_completer_delims` in threads in a free-threaded build # Crash report ### What happened? Calling `difflib._test` in threads in a free-threaded build (with `PYTHON_GIL=0`) will result in aborts or segfaults, apparently related to memory issues: ```python from threading import T...
863d54cbaf6c0b45fff691ab275515c1483ad68d
9a634c5c0cde70a0575c006d04e4cfe917f647ef
python/cpython
python__cpython-126893
# Warmup counters should be reset when JIT compiling code When we tier up into the JIT, we don't reset the warmup counter to a non-zero value. This means that after JIT code is invalidated (either because of watchers or because it's cold), we'll re-JIT that code the very next time it's hit. That's not ideal. <!-- gh-...
48c50ff1a22f086c302c52a70eb9912d76c66f91
addb225f3823b03774cddacce35214dd471bec46
python/cpython
python__cpython-127281
# Restore docstrings in `ssl` # Bug report ### Bug description: As mentioned [here](https://github.com/python/cpython/issues/124984#issuecomment-2477870588), apparently I stripped some of the docstrings while switching things over to argument clinic in the big SSL thread safety fix (GH-124993). I'm not certain how...
c112de1da2d18e3b5c2ea30b0e409f18e574efd8
bf21e2160d1dc6869fb230b90a23ab030835395b
python/cpython
python__cpython-127242
# `datetime.fromisoformat()` parses offset minutes outside 00-59 range # Bug report ### Bug description: ```python >>> datetime.fromisoformat('2020-01-01T00:00+00:90') datetime.datetime(2020, 1, 1, 0, 0, tzinfo=datetime.timezone(datetime.timedelta(seconds=5400))) ``` expected result: `ValueError` (90 minutes is out...
71c42b778dfc0831734bb7bc6121ffd44beae1d3
8d490b368766ee7b28d2ccf47704b1d4b5f1ea23
python/cpython
python__cpython-126887
# Internal docs: Update code blocks in `garbage_collector.md` to improve syntax highlighting Code blocks in [garbage_collector.md](https://github.com/python/cpython/blob/main/InternalDocs/garbage_collector.md) are annotated with `pycon` which doesn't play well GitHub's syntax highlighting (and neither with VS Code's M...
14a05a8f433197c40293028f01797da444fb8409
58e334e1431b2ed6b70ee42501ea73e08084e769
python/cpython
python__cpython-126968
# Assertion failure for `socket` with too large default timeout (larger than INT_MAX) # Crash report ### What happened? A debug build will abort when calling `socket._fallback_socketpair()` after a call to `socket.setdefaulttimeout` with too high a value: ```python python -c "import socket; socket.setdefaulttimeout...
b3687ad454c4ac54c8599a10f3ace8a13ca48915
d6b3e78504b3168c432b20002dbcf8ec9a435e61
python/cpython
python__cpython-126865
# Add freelist for compact int objects # Feature or enhancement ### Proposal: By adding a freelist for compact int objects we can improve performance. More details in the draft PR. ### Has this already been discussed elsewhere? No response given ### Links to previous discussion of this feature: _No response_ <...
5fc6bb2754a25157575efc0b37da78c629fea46e
9b4bbf4401291636e5db90511a0548fffb23a505
python/cpython
python__cpython-127523
# Possible overflow in typeobject.c:tail_contains # Bug report ### Bug description: [whence+1](https://github.com/python/cpython/blob/c0f045f7fd3bb7ccf9828f4bfad55347d097fd41/Objects/typeobject.c#L2867C14-L2867C22) could lead to overflow for large value of _whence_. I think [changing type from](https://github.com/py...
2fcdc8488c32d18f4567f797094068a994777f16
c1417487e98e270d614965ed78ff9439044b65a6
python/cpython
python__cpython-126880
# Provide visualizations of executor graphs # Feature or enhancement ### Proposal: Visualizations can help us understand what is going on with executors. How they link to each other, where they drop to tier 1, etc, etc. ### Has this already been discussed elsewhere? This is a minor feature, which does not ...
e62e1ca4553dbcf9d7f89be24bebcbd9213f9ae5
5fc6bb2754a25157575efc0b37da78c629fea46e
python/cpython
python__cpython-127755
# Add option for redirecting stdout and stderr to the system log # Feature or enhancement ### Proposal: Python currently assumes that stdout and stderr are streams that are universally available. This is true for most systems. However, on iOS, stdout/stderr content is only really visible while in Xcode. When an app...
51216857ca8283f5b41c8cf9874238da56da4968
035f512046337e64a018d11fdaa3b21758625291
python/cpython
python__cpython-126808
# pygettext: false positives when extracting messages # Bug report ### Bug description: Originally came up here: https://github.com/python/cpython/pull/126755#issuecomment-2471298923 To summarize, pygettext produces a warning for this code: ``` def _(x): pass ``` The reason is that it confuses the function de...
9a456383bed52010b90bd491277ea855626a7bba
cae9d9d20f61cdbde0765efa340b6b596c31b67f
python/cpython
python__cpython-126816
# Use a higher tier-up threshold for JIT code Our current tier-up threshold is 16, which was chosen a while ago because: - in theory, it gives some of our 16-bit branch counters time to stabilize - it seemed to work fine in practice It turns out that we're leaving significant performance and memory improvements o...
4cd10762b06ec57252e3c7373e74240b4d0c5ed8
933f21c3c92f758fb0615d6a4cca10249c686ae7
python/cpython
python__cpython-126801
# Fix `ntpath.normpath()` for drive-relative paths # Bug report ### Bug description: from @eryksun (https://github.com/python/cpython/pull/117855#discussion_r1581286073): > Note that the behavior for normalizing drive-relative paths is currently wrong in this case on Windows: > > ``` > >>> nt._path_normpath('C:./s...
60ec854bc297e04718fe13db3605d0465bf8badb
0c5556fcb7315f26aa4b192e341cb2a72bb78f41
python/cpython
python__cpython-126776
# linecache.checkcache() is not threadsafe or GC finalizer re-entrancy safe # Bug report ### Bug description: ```python import linecache import weakref def gen_func(n): func_code = """ def func(): pass """ g = {} exec(func_code, g, g) func = g['func'] filename = f"<genera...
2233c303e476496fc4c85a29a1429a7e4b1f707b
3983527c3a6b389e373a233e514919555853ccb3
python/cpython
python__cpython-126767
# urllib.request.url2pathname() mishandles empty authority sections (mostly) # Bug report ### Bug description: File URIs that start with 3+ slashes should be parsed as having an empty authority section ([ref](https://datatracker.ietf.org/doc/html/rfc8089#section-3)), but `urllib.request.url2pathname()` incorrect...
cae9d9d20f61cdbde0765efa340b6b596c31b67f
47cbf038850852cdcbe7a404ed7c64542340d58a
python/cpython
python__cpython-126758
# Indentation fix to one line of the source code? Hi, is there a reason that this [line](https://github.com/python/cpython/blob/03924b5deeb766fabd53ced28ba707e4dd08fb60/Python/bltinmodule.c#L3339) is indented differently? If not, will it be ok if I open a PR to make it align with others? (Not really a big deal.....
8cc6e5c8751139e86b2a9fa5228795e6c5caaff9
4b00aba42e4d9440d22e399ec2122fe8601bbe54
python/cpython
python__cpython-126746
# Allow to set non-UTF8 exception messages # Feature or enhancement ### Proposal: This is a follow-up to the discussion in https://github.com/python/cpython/pull/126555#discussion_r1837812348. `dlerror()` may return non-UTF-8 messages, possibly translated. We should be able to set exception messages accordin...
7303f06846b69016a075bca7ad7c6055f29ad024
b9a492b809d8765ee365a5dd3c6ba4e5130a80af
python/cpython
python__cpython-126732
# Outdated `pprint.pp` doc example about pypi `sampleproject` version # Documentation Currently, the examples in `pprint` that demonstrate the `pprint.pp` function are outdated. The last edit was in 2018, six years ago, and the JSON link in the example now points to `sampleproject` (see https://github.com/python/cp...
6a93a1adbb56a64ec6d20e8aab911439998502c9
4ae50615d2beef0f93d904ccbce44bbf7500b94a
python/cpython
python__cpython-126730
# locale.nl_langinfo(locale.ERA) does not work for past eras # Bug report According to the Posix specification (https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap07.html#tag_07_03_05_02), `nl_langinfo(ERA)` should return a string containing semicolon separated era description segments. But in Glibc ...
4803cd0244847f286641c85591fda08b513cea52
eaf217108226633c03cc5c4c90f0b6e4587c8803
python/cpython
python__cpython-127741
# Missing explanation about math.fmod # Documentation This issue was first raised in a [PR](https://github.com/python/cpython/pull/126337), but it is preferred to be modified independently as per this [comment](https://github.com/python/cpython/pull/126337#discussion_r1835301380). This issue is created to track the...
f28d471fbe99f9eaac05d60ed40da47b0b56fe86
fd94c6a8032676d0659aa9e38cdaa7c17093119c
python/cpython
python__cpython-126706
# Make os.Pathlike more similar to a Protocol # Feature or enhancement ### Proposal: https://github.com/python/cpython/issues/83066 considered making `os.Pathlike` a protocol, but rejected the idea due to not wanting to import typing into os.py. As an alternative, I propose making more it more protocol-like in two ...
a83472f49b958c55befd82c871be26afbf500306
73cf0690997647c9801d9ebba43305a868d3b776
python/cpython
python__cpython-126912
# pygettext: Add support for multi-argument gettext functions # Feature or enhancement ### Proposal: This came up while adding translation tests for various stdlib modules: https://github.com/python/cpython/issues/124295 and https://github.com/python/cpython/pull/126698. More specifically: https://github.com/python/...
0a1944cda8504ba0478a51075eba540576570336
f83ca6962af973fff6a3124f4bd3d45fea4dd5b8
python/cpython
python__cpython-126702
# Protocols can't inherit from AsyncIterator # Bug report ### Bug description: AsyncIterator was removed from `_PROTO_ALLOWLIST` by https://github.com/python/cpython/pull/15647, without any discussion. It looks like an accident to me. ```python from typing import AsyncIterator, Protocol class MyProto(AsyncIterator,...
feb3e0b19cb03f06364a3f5e970f0861b8883d1c
0052a8c638518447baf39ae02b6ff6a309efd4ce
python/cpython
python__cpython-126787
# Emscripten support: Remove `--with-emscripten-target` It's possible to support both node and the browser with a single configuration, for instance Pyodide does this. I think this is preferable since it's fewer options to have test coverage for or to not cover and be in doubt about whether they work. Requires refacto...
544b001b233ac57dfce17587ffbd10a70abe3ab0
d6bcc154e93a0a20ab97187d3e8b726fffb14f8f
python/cpython
python__cpython-126692
# CPython should not assume that pthread_self returns the same value in fork parent and child Summarized from https://github.com/SerenityOS/serenity/issues/25263 by request of @colesbury: It seems that at least Python 3.13 relies on pthread_self returning the same value in both the parent and the child process. [P...
5610860840aa71b186fc5639211dd268b817d65f
bf224bd7cef5d24eaff35945ebe7ffe14df7710f
python/cpython
python__cpython-126665
# Use `else` instead of `finally` in "The with statement" documentation. # Documentation In [8.5 The `with` statement](https://docs.python.org/3.13/reference/compound_stmts.html#the-with-statement), we can use `else` instead of `finally`. ```python manager = (EXPRESSION) enter = type(manager).__enter__ exit = typ...
228f275737615cc9be713a8c3f9325b359bf8aec
8d9f52a7be5c09c0fd4423943edadaacf6d7f917
python/cpython
python__cpython-126678
# `_interpreters.exec` with invalid parameters segfaults # Crash report ### What happened? The code below segfaults on non-debug builds and aborts on debug builds. ```python import _interpreters _interpreters.exec(False, "aaaa", 1) ``` The abort looks like: ``` python: ./Modules/_interpretersmodule....
9fc2808eaf4e74a9f52f44d20a7d1110bd949d41
6ee542d491589b470ec7cdd353463ff9ff52d098
python/cpython
python__cpython-126648
# `Doc/using/configure.rst` missing an entry for `--enable-experimental-jit` option <!-- gh-linked-prs --> ### Linked PRs * gh-126648 * gh-126655 <!-- /gh-linked-prs -->
f435de6765e0327995850d719534be38c9b5ec49
ca878b6e45f9c7934842f7bb94274e671b155e09
python/cpython
python__cpython-126677
# NamedTemporaryFile doesn't issue a ResourceWarning when left unclosed on POSIX # Bug report ### Bug description: ```python import sys import tempfile def main(): tempfile.NamedTemporaryFile() if __name__ == "__main__": sys.exit(main()) ``` when run with `python -Werror demo.py` nothing happens if you ...
bad3cdefa840ff099e5e08cf88dcf6dfed7d37b8
2610bccfdf55bc6519808f8e1b5db2cfb03ae809
python/cpython
python__cpython-126625
# Expose error code `XML_ERROR_NOT_STARTED` of Expat >=2.6.4 # Bug report ### Bug description: The error code was introduced by a security fix (at https://github.com/libexpat/libexpat/commit/51c7019069b862e88d94ed228659e70bddd5de09) but the [XML_StopParser C-API](https://libexpat.github.io/doc/api/latest/#XML_St...
8e48a6edc75ca67a34924bbe54463ca913ae6e58
a3711d1541c1b7987941b41d2247f87dae347117
python/cpython
python__cpython-126792
# Please upgrade bundled Expat to 2.6.4 (e.g. for the fix to CVE-2024-50602) # Bug report ### Bug description: Hi! :wave: Please upgrade bundled Expat to 2.6.4 (e.g. for the fix to CVE-2024-50602). - GitHub release: https://github.com/libexpat/libexpat/releases/tag/R_2_6_4 - Change log: https://github.c...
3c9996909402fadc98e6ca2a64e75a71a7427352
8c9c6d3c1234e730c0beb2a6123e68fe98e57ede