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-134987
# `test_perf_profiler` fails under Windows Subsystem for Linux # Bug report The culprit is that for some reason calling `perf` from the WSL raises a `PermissionError`, rather than `FileNotFoundError` or `CalledProcessError` when `perf` is not available. Example output: ``` $ which perf # not present $ ./python -m t...
6ab842fce50a6125797bcddfc4a4b2622aa6c6a9
0d9d48959e050b66cb37a333940ebf4dc2a74e15
python/cpython
python__cpython-134979
# Deprecate support for `string` named-parameter in hash functions constructors # Feature or enhancement This is a follow-up to https://github.com/python/cpython/issues/134696. After c6e63d9d351f6d952000ec3bf84b3a7607989f92, it's now possible to use the following forms: - `hashlib.new(name, data)` - `hashlib.new(nam...
ee65ebdb50005655d75aca1618d3994a7b7ed869
ac7511062bf8e16ad489b17990d99abd3b4351f5
python/cpython
python__cpython-134977
# Add notes about `s[i]` in `Common Sequence Operations` # Documentation | Operation | Result | Notes | |-----------|-----------------------------|-------| | `s[i]` | *i*th item of *s*, origin 0 | (3) | 3. If *i* or *j* is negative, the index is relative to the end of sequence *s*: `len(s) ...
158e5162bfaa8a49178ce2c3f2455c3e03b60157
1cb716387255a7bdab5b580bcf8ac1b6fa32cc41
python/cpython
python__cpython-134971
# argparse: Unexpanded replacements in "unknown action" exception # Bug report ### Bug description: https://github.com/python/cpython/blob/ad39f017881e0bd8ffd809755ebf76380b928ad3/Lib/argparse.py#L1536-L1537 There is a missing `f` there, so the replacements don't happen. Noticed accidentally because it broke snakeo...
965c48056633d3f4b41520c8cd07f0275f00fb4c
cebae977a63f32c3c03d14c040df3cea55b8f585
python/cpython
python__cpython-134955
# test_subprocess can timeout on systems with excessive max file descriptors # Bug report ### Bug description: On some systems, `os.sysconf("SC_OPEN_MAX")` may return a very large value (i.e. 2**30), leading to the subprocess test timing out (or run forever). ### CPython versions tested on: CPython main branch, 3...
f58873e4b2b7aad8e3a08a6188c6eb08d0a3001b
5507eff19c757a908a2ff29dfe423e35595fda00
python/cpython
python__cpython-135010
# Add set_pledged_input_size to ZstdCompressor # Feature or enhancement ### Proposal: pyzstd's ZstdCompressor class had a method `_set_pledged_input_size`, which allowed users to set the amount of data they were going to write into a frame so it would be written into the frame header. We should support this use case...
4b44b3409ac026e7f13054a3daa18ab7ee14d85c
3d396ab7591d544ac8bc1fb49615b4e867ca1c83
python/cpython
python__cpython-134924
# Update MSVC PGO options The linker options we currently use for PGO on Windows are deprecated and should be updated to [`/GENPROFILE`](https://learn.microsoft.com/en-us/cpp/build/reference/genprofile-fastgenprofile-generate-profiling-instrumented-build?view=msvc-170) and [`/USEPROFILE`](https://learn.microsoft.com/e...
8865b4f95b32097099d252111669b88ec7c1eb7f
310c8cd5e5dcb0fb9509e08c0d5cf32075416878
python/cpython
python__cpython-134919
# Fix and improve doctest's documentation When working on #108885 I found several issues in the `doctest` documentation. * `doctets.failureException` does not exist. The referred exception is `unittest.TestCase.failureException`. * Several copy-paste and markup errors. * Example for float formatting is outdated since...
3c66e5976669a599adfb260514c03815b1a9e4e9
68784fed78aa297f0de0d038742495709185bef5
python/cpython
python__cpython-134910
# Crash when calling `textiowrapper_iternext` and writing to a text file simultaneously in ft build Running this script under free-threading build: ```python import os import tempfile import threading N=2 COUNT=100 def writer(file, barrier): barrier.wait() for _ in range(COUNT): f.write("x") def rea...
44fb7c361cb24dcf9989a7a1cfee4f6aad5c81aa
055827528fa50c9a7707792f5fe264c4e20c07e9
python/cpython
python__cpython-134907
# Document zstd flag CompressionParameter.content_size_flag # Documentation The initial documentation for `compression.zstd` did not document `CompressionParameter.content_size_flag`, as I wanted to audit which scenarios it would take effect under. This issue is to track adding the docs for parameter. <!-- gh-linke...
5f60d0fcccbf6676f5bc924f05452bd5321446f0
381020d41fb1f8b33421f01c609ba0d0edb99764
python/cpython
python__cpython-134892
# Add `PyUnstable_Unicode_GET_CACHED_HASH` # Feature or enhancement ### Proposal: I'd like to add a quick way to maybe get a `str` hash, so that advanced users don't need to reach into the undocumented-but-public `PyASCIIObject->hash`. ```c Py_hash_t PyUnstable_Unicode_GET_CACHED_HASH(PyObject *str) ``` If the has...
e413e2671916ed8f4513af92830f4fb2bc59b1d2
343182853f19a42c0ba8980d3104076a8c7bcfe7
python/cpython
python__cpython-134958
# Python 3.14+: `python: Objects/unicodeobject.c:10387: _PyUnicode_JoinArray: Assertion `res_data == PyUnicode_1BYTE_DATA(res) + kind * PyUnicode_GET_LENGTH(res)' failed.` in sqlglot # Crash report ### What happened? The pure Python code in `sqlglot` package manages to trigger an assertion in CPython: ``` python: O...
6b77af257c25d31f1f137e477cb23e63692ddf29
e598eecf4c97509acef517e94053e45db51636fb
python/cpython
python__cpython-134886
# zstd should use Py_XSETREF # Bug report ### Bug description: There is a theoretical crash path in the new zstd module that can be avoided with Py_XSETREF. PR incoming. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-...
45c6c48afc13f9897010e32171a3e02d0624258c
b367e27af9b52528e395f95b277ec7b69e98e287
python/cpython
python__cpython-134897
# "Virtual" iterators cause odd behavior with sys.monitoring # Bug report ### Bug description: Starting with CPython commit f6f4e8a6622d556641799b02aed7ac018d878cdc, the coverage.py test suite fails when using sys.monitoring. A loop seems to execute one time too many: ``` ___________________________________________...
ce6a6371a23dc57ed4257eb102ebfb2827477abf
c600310663277e24607890298e6d9bf7e1d4f584
python/cpython
python__cpython-134878
# python -m pdb -p fails when CONFIG_CROSS_MEMORY_ATTACH not set in kernel config # Bug report ### Bug description: It's possible that a Linux kernel is built with the kernel config variable `CONFIG_CROSS_MEMORY_ATTACH` not set. (This is the case for the kernel that comes with Flatcar Container Linux and for CoreOS,...
ac9c3431cc5916a795c42b3e2b965233ceffe6f0
24069fbca861a5904ee7718469919e84828f22e7
python/cpython
python__cpython-134994
# 3.14.0b2 fails to build with strictly C11 compliant compiler # Bug report ### Bug description: With a compiler that implements `atomic_load_explicit` as specified in the C11 standard (such as many older versions of clang), Python 3.14.0b2 fails to build: ``` In file included from Parser/pegen.c:3: In file included...
b525e31b7fc50e7a498f8b9b16437cb7b9656f6f
0ac9e17fb47075c9446b99da4dffe4cad993b97a
python/cpython
python__cpython-134858
# Improved error reporting for doctests run with unittest There are several issues with error reports when doctests are wrapped in `DocTestCase`. * When error happens during compilation or execution an example, the traceback contains several lines from `doctest.py`: File ... exec(compile(exampl...
cb8a72b301f47e76d93a7fe5b259e9a5758792e1
dafd14146f7ca18932894ea445a2f9f98f2a8b01
python/cpython
python__cpython-134849
# audit_events Sphinx extension appends to 'sources' list infinitely # Bug report My Sphinx builds are taking a long time after a bunch of runs. With @AA-Turner we tracked it down to the AuditEvents extension appending new values in each run to a list that's persisted in the environment pickle. Adam, over to you :) ...
b265a7ddeb12b2040d80b471d447ce4c3ff4bb95
4635115c3f1495fa20e553937df37861fffa7054
python/cpython
python__cpython-134844
# Update the outdated list of HTTP status codes in the docs # Documentation In recent years, more missing HTTP status codes have been gradually added to https://github.com/python/cpython/blob/main/Lib%2Fhttp%2F__init__.py#L54, such as https://github.com/python/cpython/commit/61ac612e78e4f2625977406fb6f366e0a644673a, ...
3704171415c1ea6ebbeb2f992758b6565f42e378
f58873e4b2b7aad8e3a08a6188c6eb08d0a3001b
python/cpython
python__cpython-134834
# Detail `del s[i:j]` in `Mutable Sequence Types` # Documentation In [Mutable Sequence Types](https://docs.python.org/3.15/library/stdtypes.html#mutable-sequence-types): The description of `del s[i:j]` is "same as s[i:j] = []". This is not clear enough. We should make it consistent with `del s[i:j:k]` ("removes the ...
609d5adc7cc241da8fe314a64ddd2c8a883ee8b7
46707d241a9eef4713450fa3ccbe490e48c8b722
python/cpython
python__cpython-134818
# Document `RotatingFileHandler.shouldRollover()` and `TimedRotatingFileHandler.shouldRollover()` # Documentation The [RotatingFileHandler](https://docs.python.org/3/library/logging.handlers.html#timedrotatingfilehandler) and [TimedRotatingFileHandler](https://docs.python.org/3/library/logging.handlers.html#timedrota...
7be5916f6dc3db95744b5fec945327d82cce0183
d7256ae4d781932b3b43b162e8425abdb134afa6
python/cpython
python__cpython-134772
# `time_clockid_converter()` selects the wrong type for clockid_t on Cygwin. # Bug report ### Bug description: Building Python from the main branch on Python fails with the following error: ```sh gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-fi...
d96343679fd6137c9d87d1bb120228b162ea0f8c
f49a07b531543dd8a42d90f5b1c89c0312fbf806
python/cpython
python__cpython-134769
# Build failure on main and latest Python 3.14 beta (missing mt_continue_should_break) # Bug report ### Bug description: The `3.14` branch and `main` both fail to build with `--enable-assertions`: ```console $ ./configure --with-assertions $ make [...] gcc -fno-strict-overflow -Wsign-compare -g -O3 -Wall -std=c1...
2f2bee21118adce653ee5bc4eb31d30327465966
5f60d0fcccbf6676f5bc924f05452bd5321446f0
python/cpython
python__cpython-136071
# `UnboundLocalError` in `email.message.Message.get_payload` # Bug report ### Bug description: ```python html_body = part.get_payload(decode=True).decode() File "/usr/local/lib/python3.8/email/message.py", line 282, in get_payload return quopri.decodestring(bpayload) ``` ### CPython versions tested on: ...
25335d297b5248922a4c82183bcdf0c0ada8352b
5a20e7972505c6953e7c7f434f42d62cab3795f3
python/cpython
python__cpython-134747
# Change PyThread_allocate_lock() implementation to PyMutex # Feature or enhancement ### Proposal: `PyMutex` is a fast and portable lock implementation. I propose to change the `PyThread_allocate_lock()` implementation to reuse `PyMutex`. ### Has this already been discussed elsewhere? No response given ### Links ...
ebf6d13567287d04683dab36f52cde7a3c9915e7
45c6c48afc13f9897010e32171a3e02d0624258c
python/cpython
python__cpython-134748
# Abort in `_PyEval_EvalFrameDefault` originating on calling `fcntl.ioctl` # Crash report ### What happened? There are two ways to get aborts starting from `fcntl.ioctl`: one happens in `_PyEval_EvalFrameDefault`, the other results in a `Fatal Python error`. Not sure this is a single issue, so reporting both ways. ...
9300a596d37d058e6e58d00a2ad70617c863a3de
176b059fa03b3d6abd58c6711bb24111f2245706
python/cpython
python__cpython-134926
# `ast.dump()` elision of empty values should use field types # Bug report ### Bug description: In 3.13 we changed `ast.dump()` to not show empty values (`None` or the empty list) by default. However, this is based purely on the value of individual attributes: ``` >>> ast.dump(ast.Name(id="x")) "Name(id='x', ctx=Lo...
cc344e8dd0a6fdc83a032c229f9b3cf53f76a887
ce6a6371a23dc57ed4257eb102ebfb2827477abf
python/cpython
python__cpython-134713
# Clinic signatures of HACL* hash functions are inconsistent with OpenSSL implementation ### Bug description: According to its [docstring](https://github.com/python/cpython/blob/cf8941c60356acdd00055e5583a2d64761c34af4/Modules/clinic/_hashopenssl.c.h#L165), the function `hashlib.shake_128(...).hexdigest()` should acc...
c6e63d9d351f6d952000ec3bf84b3a7607989f92
4d31d19a1df0a6e658e6a320cde8355f5f6ea27b
python/cpython
python__cpython-134694
# `‘address_of_code_object’ may be used uninitialized in this function [-Wmaybe-uninitialized]` warning in `_remote_debugging_module.c` <img width="994" alt="Image" src="https://github.com/user-attachments/assets/24d8a1f4-2b8d-40eb-abe5-a274fdfc0c3c" /> See https://github.com/python/cpython/blob/cf8941c60356acdd00055...
806107d7a2fa9baa76d4025f46fab2c8725963f4
f2ce4bbdfdfa2b658fbeef66f414be2ecf7981dd
python/cpython
python__cpython-134811
# Assertion failed: Python/qsbr.c in _Py_qsbr_poll # Crash report Seen in https://github.com/python/cpython/actions/runs/15239974615/job/42858835898 ``` 0:07:45 load avg: 8.75 [57/60/1] test_free_threading worker non-zero exit code (Exit code -6 (SIGABRT)) -- running (2): test_socket (1 min 55 sec), test_threading (...
a4d37f88b66bc9a66b2ab277aa66a2a6b20821fa
967f361993c9c97eb3ff3076a409b78ea32938df
python/cpython
python__cpython-134734
# tokenize._all_string_prefixes does not list t-string prefixes # Bug report ### Bug description: `tokenize._all_string_prefixes()` does not include t-string prefixes. ```python $ ./python.bat Running Release|x64 interpreter... Python 3.15.0a0 (heads/main-dirty:7b1a7002312, May 25 2025, 22:44:32) [MSC v.1929 64 bit...
08c78e02fab4a1c9c075637422d621f9c740959a
c60f39ada625562bff26400f304690c19fe9f504
python/cpython
python__cpython-134750
# asyncio.start_unix_server() cleanup_socket defaulting to true in 3.13 is not documented # Documentation In 3.13 a feature where unix sockets are automatically cleaned up was added in asyncio. It was seen as a compatibility break but was recent enough that we could not do anything specifically about it at the time. ...
92ea1eb38ff97ac046a0031d505c30a51f58a43f
9bf03c6c30c9ee2979061410651c3f6132683640
python/cpython
python__cpython-134665
# asyncio has underscored names in its `__all__` # Bug report ### Bug description: asyncio has several names in its `__all__` that start with an underscore. ``` Python 3.15.0a0 (heads/assignannos:9081715ff82, May 25 2025, 08:33:06) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin Type "help", "copyright", "credits" or "...
797abd1f7fdeb744bf9f683ef844e7279aad3d72
f1dcf3c7bf90961b8d5475154d3f28cfef0a054f
python/cpython
python__cpython-134702
# 3.14t vs 3.13t cuts IOCP performance in half # Bug report ### Bug description: This is about 3.14.0bl vs 3.13.1, free threaded in both cases. Microsoft Windows [Version 10.0.19045.4529] I run and maintain an IOCP server in python 3.13.1t. There are no 3rd party libraries being used. The Problem: Using the exact ...
3c0525126ef95efe2f578e93db09f3282e3ca08f
56743afe879ca8fc061a852c5c1a311ff590bba1
python/cpython
python__cpython-134650
# Export `zlib.{adler,crc}32_combine` # Feature or enhancement ### Proposal: This is already provided by zlib, and is useful for computing a crc32 in multiple chunks (not linearly). What I currently do is use ctypes, but that doesn't work on all environments (like Windows). I don't think we'll need a pure python f...
737b4ba020ecaf4b30d5a4c8f99882ce0001ddd6
8704d6b39139d2b1c3dd871590188fb7deb8aaad
python/cpython
python__cpython-134633
# PEP 739 / `build-details.json`: `c_api.headers` does not include the `pythonX.Y` directory # Bug report ### Bug description: Sorry I didn't notice this while fixing #134455 but `c_api.headers` key contains the path to top-level system include directory, i.e.: ```json { "c_api": { "headers": "/usr/local/incl...
0d582def34babca7417ece8a9e4e16cc2a752d44
c51f241c97c5bcc8ae6830842db5b00f76d6a592
python/cpython
python__cpython-134598
# Update HOWTO to reflect change in CIBW option # Documentation Python documentation in [‎Doc/howto/free-threading-extensions.rst](https://github.com/python/cpython/blob/main/Doc/howto/free-threading-extensions.rst?plain=1) states at lines 397-399 > [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) supports ...
7b1010a57db9405f277139abef4016ba987b75fc
80284b5c5eebd0e603c38322f94a97a2853ceeba
python/cpython
python__cpython-134624
# Add `__attribute__((noreturn,cold))` for `_mi_assert_fail` # Feature or enhancement > [!NOTE] > I already have a PR ready in case this is accepted ### Proposal: Because `_mi_assert_fail` is not marked as a `noreturn` function, the assertion is not understood by CLion and I have some false positives telling me "th...
c600310663277e24607890298e6d9bf7e1d4f584
ebf6d13567287d04683dab36f52cde7a3c9915e7
python/cpython
python__cpython-134765
# The devcontainer doesn't include the bits to build the _zstd module # Bug report ### Bug description: A direct build in the devcontainer: ```shell ... Written build/lib.linux-aarch64-3.15/_sysconfigdata_d_linux_aarch64-linux-gnu.py Written build/lib.linux-aarch64-3.15/_sysconfig_vars_d_linux_aarch64-linux-gnu.jso...
9bf03c6c30c9ee2979061410651c3f6132683640
96905bdd273d2e5724d2c1b6b0f95ecb0daeaabe
python/cpython
python__cpython-134603
# untokenize() round-trip fails for t-strings (with only type + string) # Bug report ### Bug description: Found when investigating [test.test_tokenize.TestRoundtrip.test_random_files](https://github.com/python/cpython/actions/runs/15209215387/job/42779254060?pr=134577#step:22:490) failing on #134577 ```python def ...
52509cc94b1a18cb325dbfa7e5f830b32759a903
3e562b394252ff75d9809b7940020a775e4df68b
python/cpython
python__cpython-134581
# Modernizing `difflib.HtmlDiff` for HTML Output # Feature or enhancement ### Proposal: Previously, I added dark mode support to the HTML export feature of `difflib`, and during that process, I uncovered several issues. By opening the browser's developer tools (F12) and inspecting the generated HTML, you can observ...
7ca6d79fa32d7203ee8d64f47b6b3539a027fdea
a4d37f88b66bc9a66b2ab277aa66a2a6b20821fa
python/cpython
python__cpython-134579
# Mark more slow tests I noticed that `test_capi` "freezes" even when ran with `-u-cpu`. So I measured durations of all tests again and found yet few slow tests. They should be marked as requiring the `cpu` resource. <!-- gh-linked-prs --> ### Linked PRs * gh-134579 * gh-134590 * gh-134592 <!-- /gh-linked-prs -->
77eade39f972a4f3d8e9fec00288779f35ceee21
fc0c9c24121c1a62b25b79062286f976699b59e9
python/cpython
python__cpython-134570
# Expose log format to users in assertLogs # Feature or enhancement ### Proposal: ## Use-case Someone works in an organisation with a custom log formatter. They want to make assertions about logs in a particular test and would like the assertions to match the format used in the org. Currently the format is static i...
51ab66b3d519d3802430b3a31a135d2670e37408
b19c9da401b9e81078103861f55e0762b93453f0
python/cpython
python__cpython-134566
# unittest.doModuleCleanups() swallows all but first exception # Feature or enhancement Currently, `unittest.doModuleCleanups()` swallows all but first exception raised in the cleanup code. With ExceptionGroup we can handle multiple exceptions. <!-- gh-linked-prs --> ### Linked PRs * gh-134566 <!-- /gh-linked-prs --...
393773ae8763202ecf7afff81c4d57bd37c62ff6
77eade39f972a4f3d8e9fec00288779f35ceee21
python/cpython
python__cpython-134599
# Refleaks on free-threaded builds # Bug report ### Bug description: The nogil refleak buildbots have started failing for main and 3.14 with leaks in `test_sys`, `test_capi` and a few others. See e.g. https://buildbot.python.org/#/builders/1714/builds/90 I bisected this to 09e72cf091d03479eddcb3c4526f5c6af56d31a0...
56743afe879ca8fc061a852c5c1a311ff590bba1
08c78e02fab4a1c9c075637422d621f9c740959a
python/cpython
python__cpython-134552
# `-m pdb -p` -- other side cannot read debug script due to too-strict permissions # Bug report ### Bug description: 1. run `python3.14` 2. find its pid 3. `sudo python3.14 -m pdb -p $pid` the `pdb` tab will hang, the other side will display similar to: ``` Python 3.14.0b1 (main, May 8 2025, 08:57:13) [GCC 13.3....
74a9c60f3ee2195e506144c3811090f1334c996b
47f1161d3a2bec52b5b5e952150141709c247da2
python/cpython
python__cpython-135540
# shutil.rmtree - link to example for windows readonly file handling in function docs # Documentation The python docs for the `shutil` module include an example of how to use `rmtree` on a windows folder that contains read-only files: https://docs.python.org/3/library/shutil.html#rmtree-example However, there is no...
e9b647dd30d22cef465972d898a34c4b1bb6615d
17ac3933c3c860e08f7963cf270116a39a063be7
python/cpython
python__cpython-134487
# _ctypes fails to import on NetBSD due to a missing `alloca` symbol # Bug report ### Bug description: After running `./configure && gmake` on a NetBSD 10 machine, the build finishes with the following warning: ```sh Written build/lib.netbsd-10.0-evbarm-3.15/_sysconfigdata__netbsd10_.py Written build/lib.netbsd-10....
b8f55266bf873bc101c3aab7aa868b909ecbcb99
99a9ab1c64dce26c0f2dce7621b4d7f75da69856
python/cpython
python__cpython-134456
# PEP 739 / `build-details.json`: `c_api.include` is used instead of `c_api.headers` # Bug report ### Bug description: [PEP 739](https://peps.python.org/pep-0739/) specifies that the CPython header directory is included in the [`c_api.headers` key](https://peps.python.org/pep-0739/#c-api-headers). However, it seems ...
d706eb9e0f99924b628da4a8afe8e23cff8b801b
458e33018a2f4f4b3d9a2c8f6e70dcce31f34005
python/cpython
python__cpython-134513
# Using a frozen attributes to Exception class # Bug report ### Bug description: `CycleFoundException` in asyncio has frozen attributes, which has a problem related https://github.com/python/cpython/issues/99856 https://github.com/python/cpython/blob/e1f891414b2329414a6160ed246f5f869a218bfd/Lib/asyncio/tools.py#L16...
f9324cb3cb4d9bb9f0aef2e48b8afa895bde4b0d
5804ee7b467d86131be3ff7d569443efb0d0f9fd
python/cpython
python__cpython-134608
# Error in Format Specification Mini-Language concerning `precision_with_grouping` in 3.14 # Documentation On this page: https://docs.python.org/3.14/library/string.html#grammar-token-format-spec-format_spec ```py format_spec: [options][width_and_precision][type] options: [[fill]align][si...
7828d52680907d1661ff6993e540f7026461c390
ee65ebdb50005655d75aca1618d3994a7b7ed869
python/cpython
python__cpython-134415
# `Python/instrumentation.c`: ensure non-NULL `PyLong_FromLong` results when possible https://github.com/python/cpython/blob/c740fe3bd092911d9e474bcc0eed2a009482be9f/Python/instrumentation.c#L2566 Since PyLong_FromLong can return NULL, it is necessary to use Py_XDECREF, as stated in refcount.h. https://github.com/p...
cf19b6435d02dd7be11b84a44f4a8a9f1a935b15
1e672935b44e084439527507a865b94a4c1315c3
python/cpython
python__cpython-134514
# Not able to start an instantiated Thread in a child process through multiprocessing.Process in python 3.13 # Bug report ### Bug description: I'm experiencing an issue specifically in python 3.13 regarding Threads in the context of multiprocessing. The following code is working in python < 3.13 ```python from multi...
9a2346df861f26d5f8d054ad2f9c37134dee3822
05a19b5e56894fd1e63aff6b38fb23ad7c7b3047
python/cpython
python__cpython-134371
# `logging.Formatter` docstring missing processName attribute. # Documentation The docstring for `logging.Formatter` class is missing the `processName` attribute that is available in `LogRecord` and documented in the official Python documentation. ## Issues The `processName` attribute is documented in the [LogRecor...
c740fe3bd092911d9e474bcc0eed2a009482be9f
1298511b41ec0f9be925c12f3830e94fe8f7e7dc
python/cpython
python__cpython-134368
# The new `threading.RLock.locked()` method fails # Bug report ### Bug description: ```python import threading def main(): r = threading.RLock() print(f"{r = }") t = threading.Thread(target=r.acquire) t.start() t.join() print(f"{r = }") print(f"{r.locked() = } at {hex(id(r))}") if __nam...
3effede97cc13fc0c5ab5dcde26cc319f388e84c
bd4046f4f869039a1a2ebe2d1d18bfbc2a2951b6
python/cpython
python__cpython-134389
# `repr` of `threading.RLock` is erronous with the `_thread` module # Bug report ### Bug description: ```python import threading r = threading.RLock() print(f"{r = }") ``` output is: ``` r = <unlocked _thread.RLock object owner=0 count=1 at 0x105a98720> ``` The `threading.RLock.__repr__` seems to me erronous bec...
fade146cfb1616ad7b3b918bedb86756dedf79e6
4a4ac3ab4d2a34af99af9e948be9cd1257ed4186
python/cpython
python__cpython-134310
# CI testing for pull requests can fail if multiple workloads exist with the same name # Bug report ### Bug description: If more than one PR is opened from branches with the same name, CI testing fails due to mandatory tests being canceled. This is due to the way concurrency groups are named; there is a PR coming wi...
979d81a17905e922d32fb1671f9ed394e0ffbda6
296a66051ede5cc112ca38d17304e518ffb02e23
python/cpython
python__cpython-134284
# Use borrowed references for `LOAD_CONST` # Feature or enhancement ### Proposal: We now support borrowed (tagged) references on the stack. Like `LOAD_FAST_BORROW` we can use borrowed references in `LOAD_CONST` as the value in the constants array is guaranteed to outlive any variables in the frame. ### Has this al...
6dcb0fdfe0a2de083f0f1f9a568dd0a19541b863
f695eca60cfc53cf3322323082652037d6d0cfef
python/cpython
python__cpython-134982
# `~bool` deprecation not reported for literals # Bug report ### Bug description: Related to: https://github.com/python/cpython/pull/103487 ```py # literal.py print(~False) print(~True) # var.py a = True print(~a) b = False print(~b) ``` A DeprecationWarning is reported for `var.py`, but not for `literal.py`. `...
86c3316183a79867e3c666d0830f897e16f0f339
e0d6500b2d9a08beb7b607b846d1eeaa26706667
python/cpython
python__cpython-134263
# Add retries to downloads of Windows dependencies `generate_sbom.py` downloads sources to verify their hashes. Sometimes these downloads flake, like in https://github.com/python/cpython/actions/runs/15118338626/job/42494602073?pr=134253 I've made a PR to add retries with exponential backoff: <!-- gh-linked-prs --> ...
0c5a8b0b55238a45b9073d06a10c3a59568cdf3c
b8998fe2d8249565bf30ce6075ed678e1643f2a4
python/cpython
python__cpython-134871
# Python 3.15.0: test_sys.test_getallocatedblocks() fails if run after test_collections.test_odd_sizes() # Bug report ### Bug description: test_sys fails while running the test suite of python 3.15.0 when --with-pydebug and --enable-optimizations are both enabled. I get consistent failure of the test suite, but wh...
54ca55978e305ebb099d1b49633211597625bd52
3612d8f51741b11f36f8fb0494d79086bac9390a
python/cpython
python__cpython-134237
# `Tests / Check if generated files are up to date` fails since recent commits # Bug report Link: https://github.com/python/cpython/actions/runs/15115778970/job/42485985691?pr=134230 Output: ```diff diff --git a/Include/internal/pycore_opcode_metadata.h b/Include/internal/pycore_opcode_metadata.h index 7185947..178...
a36ce264a9b6b0a18b78d3b0d79d2b11a685b801
c45e661226558e997e265cf53ce1419213cc10b7
python/cpython
python__cpython-134277
# PyREPL: autocomplete built-in modules # Feature or enhancement ### Proposal: Currently, built-in modules (i.e. `sys`) are not autocompleted in the new REPL. For instance, typing `import sy<tab>` does not offer `sys` as a completion possibility. This is because we use `pkgutil.iter_modules` under the hood. Since b...
8421b03b16a4852a527256cb7cdce2ab2d318548
470941782f74288823b445120f6383914b659f23
python/cpython
python__cpython-134267
# PyREPL: Do not show underscored modules by default during autocompletion # Feature or enhancement ### Proposal: Attribute autocomplete in the new REPL does not show underscored names unless specifically asked for: ```python >>> class Foo: ... _foo = 2 ... foo = 3 ... >>> Foo.<tab> Foo.foo Foo.mro()...
a3a3cf6d157948ed64ae837d6310b933a39a2493
c91ad5da9d92eac4718e4da8d53689c3cc24535e
python/cpython
python__cpython-134223
# Incorrect test in `test_pyrepl` # Bug report ### Bug description: In this test: https://github.com/python/cpython/blob/605022aeb69ae19cae1c020a6993ab5c433ce907/Lib/test/test_pyrepl/test_pyrepl.py#L1051-L1063 The second and third assert is not rerunning the `ImportParser` so it's not actually testing anything rig...
faebf87b3716f7103ee5410456972db36f4b3ada
cc9add695da42defc72e62c5d5389621dac54b2b
python/cpython
python__cpython-134326
# `_curses.window.getch` does not check for interruption signals as `_curses.window.{getkey,get_wch}` do # Bug report ### Bug description: In `_curses.window.{getkey,get_wch}`, we are checking for possible interrupting signals and say: > In no-delay mode, an exception is raised if there is no input However, in `ge...
51762b6cadb8f316dd783716bc5c168c2e2d07f0
579686d9fb1bccc74c694d569f0a8bf28d9ca85a
python/cpython
python__cpython-134283
# Possible loss of large text data in `_curses.window.{instr,getstr}` # Bug report ### Bug description: `_curses.window.instr` is meant to extract a string of characters between two positions and we have a maximum number of allowed characters which is 1023. However, this limit is *not* enforced, namely we do the fol...
aadda87b3d3d99cb9e8c8791bb9715a3f0209195
a3a3cf6d157948ed64ae837d6310b933a39a2493
python/cpython
python__cpython-134325
# Argument Clinic dead code in `_cursesmodule.c` # Bug report ### Bug description: There are some occurrences of `/*[-clinic input]`, such as - `_curses.window.chgat` - `_curses.window.getstr` - `_curses.window.instr` In particular, those are misleading as one could assume that it's being handled by clinic but it...
29e81159644cf78d958e30aaef208e22a04a8b25
fb09db1b934a51e52e46dc64d7e5e84fe69e6160
python/cpython
python__cpython-134288
# Document base85 and Ascii85 in the base64 module In the `base64` standard library module, the functions relating to base64, base32, and base16 encoding and decoding are well documented: the documentation links to [RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648.html), which lays out those formats in the usua...
66aaad61037785639aec393be7618cb54b1372dc
46d7c114d8cd25e5135bcdf2ea799eea43a41a67
python/cpython
python__cpython-134174
# concurrent.futures→asyncio state transfer is a bottleneck # Bug report ### Bug description: The current `_copy_future_state` implementation requires multiple method calls and lock acquisitions to retrieve the source future's state: 1. `done()` - acquires lock to check state 2. `cancelled()` - acquires lock again ...
53da1e8c8ccbe3161ebc42e8b8b7ebd1ab70e05b
f2de1e6861c27bd498f598efc01600450979b5f9
python/cpython
python__cpython-134183
# Add colorization of exceptions in default `sys.unraisablehook` # Bug report ### Bug description: There are no colored exceptions in atexit module. Like this: ```python import atexit def foo(): raise Exception('foo') atexit.register(foo) ``` ``` Exception ignored in atexit callback <function foo at 0x00000114C7...
e8251dc0ae6a85f6a0e427ae64fb0fe847eb3cf8
8943bb722f2f88a95ea6c5ee36bb5d540740d792
python/cpython
python__cpython-134169
# http.server with HTTPS fails to bind IPv6 addresses # Bug report ### Bug description: When HTTPS is enabled, the command-line interface of `http.server` can't bind IPv6 addresses correctly and the `--directory` flag doesn't work. ### bind IPv6 HTTPS server throw an exception when I was trying to bind a IPv6 addre...
2fd09b011031f3c00c342b44e02e2817010e507c
5d9c8fe3f6168785cb608dddd3010042f39bb226
python/cpython
python__cpython-134159
# PyREPL doesn't correctly color double braces in f-strings / t-strings # Bug report ### Bug description: Syntax highlighting in PyREPL (added in https://github.com/python/cpython/issues/131507) does not correctly color the double-braces used for escaping braces in f-strings or t-strings: ![Image](https://github.co...
71ea6a6798c5853ed33188865a73b044ede8aba8
b22460c44d1bc597c96d4a3d27ad8373d7952820
python/cpython
python__cpython-134194
# `AttributeError` in `email._header_value_parser.get_address` # Bug report ### Bug description: During fuzzing of Python standard libraries, the following code snippet causes an `AttributeError` with the following message: `AttributeError: 'InvalidHeaderDefect' object has no attribute 'all_defects'`. This occurs in...
d9cad074d52fe31327429fd81e4d2eeea3dbe35b
1b55e12766d007aea9fcd0966e29ce220b67d28e
python/cpython
python__cpython-134194
# `UnboundLocalError` in `email._header_value_parser.parse_message_id` During fuzzing of Python standard libraries, the following code snippet causes an `UnboundLocalError` with the following message: `UnboundLocalError: cannot access local variable 'pos' where it is not associated with a value'`. This occurs in the `...
d9cad074d52fe31327429fd81e4d2eeea3dbe35b
1b55e12766d007aea9fcd0966e29ce220b67d28e
python/cpython
python__cpython-134687
# `TypeError: '<' not supported between instances of 'NoneType' and 'int'` raised during call to `email.message_from_file` # Bug report ### Bug description: During fuzzing of Python standard libraries, the following code snippet causes a TypeError with the following message: `TypeError: '<' not supported between ins...
bcb6b45cb86a2f9f65b6c41f27c36059ba86a50b
d610f11d21241d353b25843f66e51098a5c0ddad
python/cpython
python__cpython-134154
# The `json` module page uses "object" confusingly # Documentation On the json module page, the word "object" can mean two things: a Python object (any Python value) or a JSON object (a thing enclosed in curly braces). That ambiguity could be explained at the top of the page, and then we could clarify the uses of th...
fa4e088668d4a41f9be5babe7edd5409290ee92a
009e7b36981fd07f7cca1fdcfcf172ce1584fac7
python/cpython
python__cpython-134145
# Cannot safely Py_EndInterpreter in 3.14b1 # Crash report ### What happened? Stack trace: ``` #0 tstate_delete_common.constprop.0 (tstate=tstate@entry=0x555555666ca0, release_gil=0) at ../Python/pystate.c:1854 #1 0x00007ffff78cd341 in zapthreads (interp=0x7ffff74c8010) at ../Python/pystate.c:1915 #2 PyInterprete...
f2de1e6861c27bd498f598efc01600450979b5f9
0a160bf14c4848f50539e52e2de486c641d122a2
python/cpython
python__cpython-134120
# Segfault from template string iterator # Crash report ### What happened? It's possible to segfault the interpreter by repeatedly calling `next()` on an exhausted template string iterator: ```python template_iter = iter(t"{1}") next(template_iter) try: next(template_iter) except StopIteration: pass next(te...
fc7f4c36664314393bd4c30355e21bd7aeac524d
84914ad0e5f96f0ca7238f3b4bc7fc4e50b1abb3
python/cpython
python__cpython-134118
# Confusion with "immutable" and "hashable" in Design and History FAQ The page https://docs.python.org/3/faq/design.html#why-are-there-separate-tuple-and-list-data-types says at the end of its last paragraph: > Only **immutable** elements can be used as **dictionary keys.**.. Which is not quite correct, since dictio...
b1c33294ca5ef8d889f2ec87f9a8fa79741f9f7d
53da1e8c8ccbe3161ebc42e8b8b7ebd1ab70e05b
python/cpython
python__cpython-134110
# Comments incorrectly shown in pydoc output for argparse # Bug report `pydoc` incorrectly shows some comments for `argparse`: ``` | format_help(self) | # ======================= | # Help-formatting methods | # ======================= | | start_section(self, heading) ...
71cf4dd622832848cace358a7f8444243afd2e83
ea2d707bd59963bd4f53407108026930ff12ae56
python/cpython
python__cpython-134117
# Use-After-Free in `PyImport_ImportModuleLevelObject` # Bug report ### Bug description: If you try to import something with a level >= 1 and it somehow fails to put it into sys.modules after importing, you'll get a nice error message letting you know. https://github.com/python/cpython/blob/d94b1e9cac82143048031530...
4e9005d32ff466925f40af410f2ea6bf2329bcf8
fa4e088668d4a41f9be5babe7edd5409290ee92a
python/cpython
python__cpython-134099
# SimpleHTTPRequestHandler incorrectly handles trailing escaped slash # Bug report For path to directory which does not end with slash ("/"), SimpleHTTPRequestHandler returns status MOVED_PERMANENTLY with redirection to new path that ends with slash. Slashes can be percent-encoded, although this is not necessary. But...
2f1ecb3bc474a5895dce090cca7b8afe7b560040
fcaf009907fc39d604907315155c1f1de811dd88
python/cpython
python__cpython-134136
# `-X showrefcount` doesn't do per-statement reports in new REPL # Bug report ### Bug description: `-X showrefcount` [should](https://docs.python.org/3/using/cmdline.html#cmdoption-X) “output the total reference count and number of used memory blocks [...] after each statement in the interactive interpreter. This o...
c31547a5914db93b8b38c6a5261ef716255f3582
44b73d3cd4466e148460883acf4494124eae8c91
python/cpython
python__cpython-134178
# Remove C variadic constructor signature support for `threading.RLock` # Feature or enhancement Passing any arguments has been deprecated since Python 3.14, as the Python version does not permit any arguments, but the C version allows any number of positional or keyword arguments, ignoring every argument. <!-- gh-...
d6dc33ed8086fbd79f6adaeac4e329f29a13f834
9983c7d4416cac8deb2fded1ec9c7daf786c3a02
python/cpython
python__cpython-134027
# Unable to build if the target macOS version is <10.9 # Bug report ### Bug description: There is an error building the [`main`](https://github.com/python/cpython/tree/main) branch on macOS when targeting versions <10.9 or using outdated SDKs: ``` /usr/bin/clang -std=gnu11 -c -I./Modules/_hacl -I./Modules/_hacl/inc...
1566c34dc76ec6139e6827fbab6d76e084a63d9d
7a504b3d5da98874536834481539c19ba4a265af
python/cpython
python__cpython-134067
# Segfault calling `sys.remote_exec(0, None)` # Crash report ### What happened? The following code segfaults ASAN builds and aborts/segfaults on non-ASAN debug builds on main: ```python import sys sys.remote_exec(0, None) ``` Backtrace ASAN debug free-threading: ```shell Program received signal SIGSEGV, Segmentat...
009e7b36981fd07f7cca1fdcfcf172ce1584fac7
fc7f4c36664314393bd4c30355e21bd7aeac524d
python/cpython
python__cpython-134063
# Excessive hash collisions in IPv4Network and IPv6Network classes # Bug report ### Bug description: While working with `IPv4Network` objects, @cakekoa and I discovered that hash collisions were common. Below is a small script that shows a few examples of different networks that have hash collisions. ```python fro...
f3fc0c16e08b317cb201cf1073e934e6909f1251
518c95b5529ed3379b5a3065b09f71411efe72fb
python/cpython
python__cpython-134044
# use stackrefs in `_PyObject_GetMethod` and calling APIs # Feature or enhancement Currently the calling APIs such as `PyObject_VectorcallMethod` use `_PyObject_GetMethod` to avoid creating a bound method object, however `_PyObject_GetMethod` increfs and decrefs the object even when the underlying object supports def...
a380d578737be1cd51e1d1be2b83bbc0b0619e7e
3f9eb55e090a8de80503e565f508f341c5f4c8da
python/cpython
python__cpython-134042
# Some of the newly added path apis in _winapi aren't available on all win api partitions # Bug report ### Bug description: The following apis are missing in some win api partitions (mostly gaming or mobile): - GetLongPathNameW - GetShortPathNameW - NeedCurrentDirectoryForExePathW ### CPython versions tested on: 3...
1c4b34c6cb851334c813647a2a7db77ecee20b7a
43410953c26153b48554218cbe35ba5f1167b08e
python/cpython
python__cpython-134077
# Improve `raise from ValueError()` error message # Feature or enhancement https://github.com/python/cpython/issues/133999 gave me an idea. Right now it is: <img width="788" alt="Image" src="https://github.com/user-attachments/assets/59cf42f5-3f51-495f-ac49-7dc6baab401f" /> I suggest making it something similar to:...
0d9ccc87a2198a0c1881ab4b17a24fc7fec62418
a7d41e8aab5211f4ed7f636c41d63adcab0affba
python/cpython
python__cpython-134034
# Replace "starred_list" with standard grammar term "expression_list" in for statement documentation # Documentation In the [compound statements docs](https://docs.python.org/3/reference/compound_stmts.html#the-for-statement), section 8.3 i found: > for_stmt ::= "for" [target_list](https://docs.python.org/3/reference...
4eacf3883dd041c31133ea407204b797a17559b1
c7364f79b2fb01c251e22115875a46a2ec134dcd
python/cpython
python__cpython-134365
# Expose `PyMutex_IsLocked` in the public C API # Feature or enhancement ### Proposal: In my C extension, I wanted to write: ``` assert(PyMutex_IsLocked(&mutex)); ``` to verify that my own code is maintaining its own locking invariants. `PyMutex_IsLocked` exists, but is private: https://github.com/python/cpython/...
f41e9c750e6971c165e055374a1014d6afd2d50e
86c3316183a79867e3c666d0830f897e16f0f339
python/cpython
python__cpython-134028
# DBM Module Vacuuming # Feature or enhancement ### Proposal: Good afternoon, The `dbm` module, and by extension `shelve` as well, don't provide any way to reclaim free space when lots of deletions from the database happen. This applies to all of the `dbm` submodules (`dbm.dumb`, `dbm.sqlite`, `dbm.ndbm`, `dbm.gnu`)...
f806463e16428ea4b379bf547bafa11f43a480ef
b5952371668089299bc8472c1adb9f8a0e69b4a2
python/cpython
python__cpython-134035
# Incorrect syntax error # Bug report ### Bug description: ```python >>> try: 1/0 ... except Exception as exc: raise from exc ... File "<python-input-0>", line 2 except Exception as exc: raise from exc ^^^ SyntaxError: cannot use except statement with name ``` Should be: ```py >>> try:...
84914ad0e5f96f0ca7238f3b4bc7fc4e50b1abb3
7a9d46295a497669eaa6e647c33ab71c8cf620a1
python/cpython
python__cpython-133987
# string split documentation unclear # Documentation If *sep* is not specified or is ``None`` and *maxsplit* is ``0``, only leading runs of consecutive whitespace are considered. This is contrary to (or, at least, underspecified in) the current documentation. <!-- gh-linked-prs --> ### Linked PRs * gh-133987 * gh-1...
3e23047363f384b7254b7af51afe4e353be94167
6df39765e652ba06267f8e7abae431c37194a23e
python/cpython
python__cpython-133988
# Some operations on managed dict are not safe from memory_order POV # Bug report ### Bug description: First of all, I'm not a threading expert and my understanding of the memory-ordering model may be wrong. So, if I'm wrong I will be happy to fix my knowledge lacoons. I saw some inconsistency (from my sight) of lo...
ec39fd2c20323ee9814a1137b1a0819e92efae4e
317c49622397222b7c7fb49837e6b1fd7e82a80d
python/cpython
python__cpython-133832
# Using the public PyUnicodeWriter C API made the json module slower I modified the json module to replace the private _PyUnicodeWriter C API with the public PyUnicodeWriter C API: * https://github.com/python/cpython/commit/6e63c4736beebdf912acd391fc437672ee9d362e * https://github.com/python/cpython/commit/c914212474...
c81446af1dbf3c84bfd4ed604c245dd40463fd3a
379d0bc95646dfe923e7ea05fb7f1befbd85572d
python/cpython
python__cpython-135347
# Recording and restoring the LC_NUMERIC locale setting with LC_ALL=C.UTF-8 no longer works with Python 3.13.3 # Bug report ### Bug description: We have project where we record the current value of `locale.LC_NUMERIC`, change it to a different value to use a library that needs a particular locale setting, and then r...
0f866cbfefd797b4dae25962457c5579bb90dde5
ff2b5f40c2bf5c71255caac8a743c09ba0758c02
python/cpython
python__cpython-133961
# Simplify `typing.evaluate_forward_ref` # Bug report In PEP-749 I added `typing.evaluate_forward_ref` to replace the private `typing.ForwardRef._evaluate`, which is being used by some external users. The current [documentation](https://docs.python.org/3.14/library/typing.html#typing.evaluate_forward_ref) claims the...
57fef27cfc2bdfc1e3a65ef8c8a760198d15b14d
b51b08a0a5fedde4f74e4cc338b8b5ad9656ad50