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-130797
# `test_notify` multiprocessing test is flaky # Bug report Seen in https://github.com/python/cpython/actions/runs/13606907022/job/38039459160?pr=130732 ``` FAIL: test_notify (test.test_multiprocessing_spawn.test_threads.WithThreadsTestCondition.test_notify) -----------------------------------------------------------...
8a64a62002fa3cdc93cb4cfee315edb235cad8cb
d0eb01c9de9a455df36f885506314d8d00645c9f
python/cpython
python__cpython-130800
# `test_shutdown_default_executor_timeout` asyncio test is flaky # Bug report Seen in https://github.com/python/cpython/actions/runs/13606907022/job/38039459160?pr=130732 ``` FAIL: test_shutdown_default_executor_timeout (test.test_asyncio.test_base_events.BaseEventLoopTests.test_shutdown_default_executor_timeout) --...
6c48ed7d62c6ca0eb24935b0e612f9e4a1a3b1bc
3929af5e3a203291dc07b40c9c3515492e3ba7b4
python/cpython
python__cpython-130832
# [Windows] test_wmi: `test_wmi_query_error` test is flaky # Bug report Seen in https://github.com/python/cpython/actions/runs/13606431591/job/38038447105?pr=130724 on both the default and free threading builds: ``` ====================================================================== FAIL: test_wmi_query_error (te...
f67ff9e82071b21c1960401aed4844b00b5bfb53
1d251b8339a34a54e5d82d912d90bc0ca96e8757
python/cpython
python__cpython-130712
# Undocumented public C-API `PyBaseObject_Type` # Documentation `PyBaseObject_Type` is in the limited API and not documented. <!-- gh-linked-prs --> ### Linked PRs * gh-130712 * gh-130792 * gh-130793 <!-- /gh-linked-prs -->
b3c18bfd828ba90b9c712da74095c4a052887655
4f14b7e30c0243e81407a34968495301e829a033
python/cpython
python__cpython-130708
# Optimize reference counting overhead of `LOAD_FAST` variants # Feature or enhancement ### Proposal: `LOAD_FAST` and its super instruction form are the most frequently executed bytecode instructions in most Python programs (they represent ~20% of dynamic instruction frequency on the benchmark suite). While they are...
053c285f6b41f92fbdd1d4ff0c959cceefacd7cd
e9556e100452ed5a92fcf0e333ab75b0da29cf5b
python/cpython
python__cpython-130906
# JIT build crashes on x86_64-linux with LLVM 18 # Bug report ### Bug description: I'm trying to build CPython 3.13.2 with JIT supported (`--enable-experimental-jit=yes-off`), but the build process crashes after reporting like this: ```text python3> | Traceback (most recent call last): python3> | File "/b...
a26a301f8b09c1825b288fc8649f8174576361f4
488174dc68f90217fd43aa95d87441cc6bad6a29
python/cpython
python__cpython-130676
# test_calendar and test_pdb always fail in non-English locale Example of the `test_calendar` output for locale uk_UA.UTF-8: ```pytb ====================================================================== FAIL: test_option_encoding (test.test_calendar.CommandLineTestCase.test_option_encoding) --------------------------...
c1b4a6bd6151d0f777c5256e1d5e2304717932e6
e21863ce78b17ab9fc98df08681d89e57c275a60
python/cpython
python__cpython-130663
# format(Fraction(1, 3), '.016f') raises ValueError # Bug report ### Bug description: c.f. ```python >>> format(float(Fraction(1, 3)), '.016f') '0.3333333333333333' ``` Looking on [docs](https://docs.python.org/3.14/library/string.html#format-specification-mini-language), I think that float formatting better confor...
5bc2d99126e40cb727a249939a4f905a51e8c920
baccfdb3d4d004cfb5308674e5e6ea6e598abcd7
python/cpython
python__cpython-130661
# sys.ps1 and sys.ps2 should be reverted after code.interact # Bug report ### Bug description: Our [documentation](https://docs.python.org/3/library/sys.html#sys.ps1) clearly states that `sys.ps1` and `sys.ps2` are only defined when the interpreter is in interactive mode. `code.interact` brings the interpreter to in...
fdcbc29f26448f47201ec40fcf3b6405631c85d3
54965f3fb25b381995a73b09d928c344bd2b86bd
python/cpython
python__cpython-132323
# Add colour to `argparse` help # Feature or enhancement In Python 3.13 we added colour output to the new REPL, `traceback` and `doctest`, and in 3.14 to `unittest`, `test.regrtest` and `calendar`, that can also be controlled with the `PYTHON_COLORS`, `NO_COLOR` and `FORCE_COLOR` environment variables: * https://doc...
4701ff92d747002d04b67688c7a581b1952773ac
ba16ba3a18e86e094bcd215892b49fb08c74ec0a
python/cpython
python__cpython-130646
# poplib.py: Missing integer parsing validation causes client crash on invalid server response # Crash report ### What happened? In [poplib.py at line 229](https://github.com/python/cpython/blob/8ba0d7bbc295781bf27902380521db97a272c442/Lib/poplib.py#L229) the code attempts to convert a server response to an integer ...
a42168d316f0c9a4fc5658dab87682dc19054efb
990ad272f66fe6a50087ad044725bb0f9f8e181d
python/cpython
python__cpython-130632
# Make join_header_words() more similar to the original Currently `http.cookiejar.join_header_words()` uses `re.search(r"^\w+$", v)` to check whether the value can be represented as a token, unquoted. There are some red flags here: 1. `\w` looks arbitrary. And it is. The original Perl implementation (it is now in [HT...
7ebbd271444d89218870169624921b795a717470
16dcb576f7623e19f22be631bbc0e565335da969
python/cpython
python__cpython-130638
# `UnicodeDecodeError` or `SystemError` when using `f-string` with `lambda` and non-ASCII characters # Bug report ### Bug description: When using an `f-string` in combination with `lambda` functions that return non-ASCII characters, either a `UnicodeDecodeError` or a `SystemError` is raised, depending on the specifi...
e06bebb87e1b33f7251196e1ddb566f528c3fc98
b26286ca49d87ad8491e411f7b0283b0f15ad5be
python/cpython
python__cpython-130634
# build failed on DragonFlyBSD-6.4 # Bug report ### Bug description: ``` 2025-02-27T04:16:40.9317730Z /usr/bin/cc -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -I/root/.xbuilder/run/1051/auxroot/include -fPIC -fno-common -Os -I/root/.xbuilder/run/1051/auxroot/include -fPIC -fno-common -Os ...
e41981704f0a6adb58c3e258b4226619521ce03c
9211b3dabeacb92713ac3f5f0fa43bc7cf69afd8
python/cpython
python__cpython-130610
# Remove `dirs_exist_ok` argument from `pathlib.Path.copy()` (Background: [`pathlib.Path.copy()`](https://docs.python.org/3.14/library/pathlib.html#pathlib.Path.copy) is new in Python 3.14, so it hasn't been released yet.) I don't think there's a compelling case to support a *dirs_exist_ok* argument in the initial ve...
b5454509612870dd0e09aaba4b79865a5faad284
fdcbc29f26448f47201ec40fcf3b6405631c85d3
python/cpython
python__cpython-121518
# Missing IPv6 testcase for for IPv6 with part of IPv4 # Feature or enhancement ### Proposal: The same IPv6 address can be writed different ways, one of which is extended IPv4 form, like '::1.2.3.4', which may be detect as IPv4 by mistake. Thats why we must be sure, that ipaddress correctly detect this IPv6 address ...
9f0879baf15fdcf89f1b85cc244d596d4d0f4e47
830f04b5056db92ba96387db0a778dcd19a39522
python/cpython
python__cpython-130606
# `test_concurrent_futures` TSAN failures # Bug report I enabled `test_concurrent_futures` in the thread sanitizer job yesterday in: * https://github.com/python/cpython/pull/129826 Unfortunately, this is causing fairly frequent failures in the TSAN job, especially for the default (GIL-enabled) build, which I hadn't...
959f43315e165a868888808d30025785d4ae3e7c
b251d409f9cf6a84e6d7a78d284467f57c97a63a
python/cpython
python__cpython-130603
# Use `fail-fast: false` for thread sanitizer CI The thread sanitizer CI fails often enough that I think we want to use `fail-fast: false` so that a thread sanitizer failure doesn't cancel other running CI jobs that are part of the same workflow. Suggested by @AA-Turner. <!-- gh-linked-prs --> ### Linked PRs * gh-13...
fda056e64bdfcac3dd3d13eebda0a24994d83cb8
959f43315e165a868888808d30025785d4ae3e7c
python/cpython
python__cpython-130588
# token module documentation is incomplete # Documentation The [`token` docs](https://docs.python.org/3/library/token.html) use a generated list of tokens, with short blurbs for the OP tokens but nothing for the other (more interesting) ones. Some tokens (`COMMENT`, `NL`, etc.) have secondary, hand-written definition...
4bced29a74c4dbcf310a47e8202292aaa39b617b
b8367e7cf3d740fdc401902b502c0ef2ccc6197c
python/cpython
python__cpython-130685
# We are running out of space for specialized opcodes The opcode space is laid out as follows: * Normal instructions * Gap (>30 instructions) * RESUME (opcode 149) * Specialized instructions * Gap (3 instructions) * Instrumented instruments If we need to add four more specializations and/or instrumented instruction...
aeb23273867b27818a3dabd5fca086a1a2e8d229
e4a60248b031d9e327443f1f2627e66865f8a9c9
python/cpython
python__cpython-130778
# Race between `dict_dealloc` and `split_keys_entry_added` under free threading # Bug report ### Bug description: In the following code it appears we race on the `dk_nentries` of a split keys dict. ```python import concurrent.futures import functools import threading import _testcapi num_threads = 32 def closure(...
80e6d3ec4972220587c8b883161311a49ea8d0ff
d91cc9db155024b0a221cf32f4f49617544618bf
python/cpython
python__cpython-131537
# threading: Exception at shutdown on musllinux_1_2_i686 # Bug report ### Bug description: When `cibuildwheel` runs the `musllinux_1_2_i686` configuration, I often see exceptions logged when the end-of-process GC runs: ``` Exception ignored in: <function _DeleteDummyThreadOnDel.__del__ at 0xf2be5578> Traceback (m...
cb93b6fc5ea525f8075cb53ec373356fec63903a
7ce2f101c4b1c123860c90bf67ccc20a7805ea48
python/cpython
python__cpython-130523
# Add meta tags for template pages https://github.com/python/docs-community/issues/65 added generation for most pages excluding the template pages leaving us with no meta tags for the most important pages! <!-- gh-linked-prs --> ### Linked PRs * gh-130523 * gh-132238 * gh-132239 <!-- /gh-linked-prs -->
f5639d87f59043d3075dbd3d9075f30e872dd91a
c0de6500249469e6fc5b458d6afb6bad1b6755cd
python/cpython
python__cpython-130553
# `test_free_threading.test_dict` on TSAN/free-threading is flaky # Bug report ### Bug description: We have: ``` 0:04:15 load avg: 7.63 [20/23/2] test_free_threading worker non-zero exit code (Exit code -6 (SIGABRT)) -- running (2): test_socket (1 min 38 sec), test_threading (38.8 sec) python: Objects/obmalloc.c:12...
45bc120d4504bff215938bca3f1d08cee2ed7a91
5c8e8704c39110da15956b0678303aff7dffb3be
python/cpython
python__cpython-130487
# test_venv fails from within venv # Bug report ### Bug description: The test_venv tests were too strict about executable names, causing failures when running the test suite from within a virtual environment created from the built Python. Rather than enforcing specific executable names, it makes more sense to make t...
d780f0af2bd7b9ef8cf46d28c5d495d1c980b1f0
813bc5694bd8aa43165468c5ea1dc27af973611d
python/cpython
python__cpython-130502
# add ability to specify name for `tk.OptionMenu` and `ttk.OptionMenu` # Feature or enhancement ### Proposal: In current implementation of `tk.OptionMenu` and `ttk.OptionMenu`, we can not specify name to them since adding additional `kwargs` raises `unknown option` error Since after initialization of widget `name` ...
e490c00dac16d458bb66ad157fda2edd0a2d0a14
1e9cc3d502773d2dd3b420ecf5b949d902e010c3
python/cpython
python__cpython-130481
# Move duplicate `LOAD_SMALL_INT` optimization from codegen to CFG # Feature or enhancement ### Proposal: Addressing https://github.com/python/cpython/pull/129568#discussion_r1938588949 Currently both codegen & peepholer optimize `LOAD_CONST` for small integers to `LOAD_SMALL_INT`. CFG can do it alone, so we don't ...
55815a6474c59001f0230e44560341b643268e87
26511993e63265ea5928aabe6af96d89e20f0553
python/cpython
python__cpython-134177
# Compilation of HACL fails under macOS Silicon for version 3.14 # Bug report ### Bug description: Related issues: #123748, #130366, #129043 Problem: In Python 3.14.0a5, when compiling on macOS Silicon without specifying the `--enable-universalsdk` parameter (as there is no need to compile a universal version for x...
5130a4d5d74b19d704099cb40758527c1894185a
4672060d86722e7daf946220812613938c54a5eb
python/cpython
python__cpython-130436
# The documentation for `MultipartConversionError` is outdated # Documentation [The document](https://docs.python.org/ja/3.14/library/email.errors.html#email.errors.MultipartConversionError) mentions the `add_payload` method, but `add_payload` no longer exists and has been replaced by `attach`. This exception seems t...
b536e371044f9e9b1b34cc8276a01e67550b5428
baae9cb159e240ee9474ce7c02f88c233390777a
python/cpython
python__cpython-130420
# Do not build the freeze module twice in case of Windows PGO builds # Feature or enhancement ### Proposal: From https://github.com/python/cpython/pull/129907#issuecomment-2648775431 > Avoiding the rebuild of `_freeze_module` and the refreezing would be nice, but it's not a huge deal (a few seconds in a ~hour long r...
3a555f09f387a0212e5961535ae4e31178b26c11
78e09a488d41066dea5f8dcf22405a0d5dd8be23
python/cpython
python__cpython-130385
# `test_sys.SysModuleTest.get_allocated_blocks` test precondition intermittently fails on iOS # Bug report ### Bug description: #130007 introduced a change to the handling of C stack limits. This change intermittently causes the `test_sys.SysModuleTest.get_allocated_blocks()` test to fail: ``` ======================...
8a76eb846926384a48bb1997bbf5c162fe29fc5d
7ed3dc6392613832f66c63507385b1da109cbf21
python/cpython
python__cpython-130689
# Py_DECREF() in interpreter doesn't call `_PyReftracerTrack(op, PyRefTracer_DESTROY)` # Bug report https://github.com/python/cpython/blob/6c450f44c283c61d0e1ada05ead9524a1fe97962/Python/ceval.c#L72-L85 Tracemalloc only handles `PyRefTracer_CREATE` events and we don't have any tests for `PyRefTracer_DESTROY` events....
c5abded09995f208b21ebaf012185ca5acb0180b
3a91ee97245639c7c4f8852418157d3fc0ec1a82
python/cpython
python__cpython-130509
# Zipapp archives are always empty # Bug report ### Bug description: Good evening, I have recently installed Python 3.13 (Windows x64) over 3.12. Now `zipapp.create_archive(..)` is creating just empty archives. After some fiddling around I found there might be an issue in these lines: (from zipapp.py, lines 113 f...
64ccbbbf367c7510090a6f5faf826a21102a8bc6
f976892b7db011f3f039be615f4a759b8c487db3
python/cpython
python__cpython-130372
# _LOAD_ATTR_WITH_HINT should be able to work lock-free in the free-threaded builds # Feature or enhancement ### Proposal: This is just doing a dictionary lookup, which we can do lock-free. We should do the same thing we do for lock free dict lookups using the hinted location. ### Has this already been discussed el...
2984ff9e5196aa575c7322c2040d55dd4d4eaa02
00f0771e4dbd8c8b66b302ebc16bb21f5d46b304
python/cpython
python__cpython-132349
# asyncio: Re-reverse deprecation of set_event_loop? # Feature or enhancement ### Proposal: The asyncio policy system is deprecated in python 3.14 (#127949). As implemented, this includes the `asyncio.set_event_loop()` function. However, in 2022, [it was decided](https://github.com/python/cpython/pull/98440#issueco...
05d27a84f4a85d777239e95e6d9b6dae8b32c538
e6ef47ac229b5c4a62b9c907e4232e350db77ce3
python/cpython
python__cpython-130321
# gettext: Missing tests for fallback translations For `NullTranslations` and `GNUTranslations` instances, it is possible to add a fallback that is invoked when a translation is not found via `t.add_fallback(fallback)`. However, this is currently not tested, neither for `NullTranslations`, nor for `GNUTranslations`. W...
4d58c8cb247b585051bfbacd79f77aafd18986b7
4a88bbacb38934a7f6c6ba7a7976cbf877dbae21
python/cpython
python__cpython-130452
# struct (un)packing of half-precision `nan` floats is non-invertible # Bug report ### Bug description: I noticed that chaining `struct.unpack()` and `struct.pack()` for IEEE 754 Half Precision floats (`e`) is non-invertible for `nan`. E.g.: ```python import struct original_bytes = b'\xff\xff' unpacked_float = st...
6157135a8d0bc2dbd5c24d1648d04a9c24a7d17e
922049b613d155ade4c4a8f83452767bea003a9f
python/cpython
python__cpython-130126
# We shouldn't lock to clear an object # Feature or enhancement ### Proposal: Currently we lock to clear the attributes of an object because we just re-use setting a managed dict to NULL. But if we haven't created a managed dictionary then there's no need to lock the object, it's no longer referenced externally. #...
6c450f44c283c61d0e1ada05ead9524a1fe97962
69426fcee7fcecbe34be66d2c5b58b6d0ffe2809
python/cpython
python__cpython-130136
# We shouldn't use locking APIs when creating sets in bytecode # Feature or enhancement ### Proposal: Currently we hit a locking API for populating sets during comprehensions and set literals. We should use a lock-free API as the object isn't exposed yet. ### Has this already been discussed elsewhere? No response ...
d9411ae3c2f6b59d97a0a16ad3dd148cc58ad943
7101cba6bf12639e277f7681b90a70c11368cabb
python/cpython
python__cpython-130310
# Pushing temporary, non-object pointers to the stack between micro-ops is counter-productive Currently, we allow micro-ops to push temporary non-object pointers to the stack to be consumed by the following micro-op. This has a number of disadvantages. We originally allowed this for a number of reasons, most of which ...
54965f3fb25b381995a73b09d928c344bd2b86bd
ab11c097052757b79060c75dd4835c2431e752b7
python/cpython
python__cpython-130333
# Colorize tests fail on iOS Xcode 16.2 # Bug report ### Bug description: The iOS buildbot was recently updated to run on Sequoia, with Xcode 16.2 and an iOS 18.2 simulator. This has revealed a set of test failures that weren't occurring on Xcode 15.4 and iOS 17.2: The failures are all in the `test__colorize` tests...
1b070060c025a00d43566a6df65aa7631861d7af
ee337bea01beb3da6dccfe1b48db9a4c891b05a1
python/cpython
python__cpython-130388
# iOS testbed fails to start on completely clean Xcode install machine # Bug report ### Bug description: The iOS testbed contains tooling to tail the log of a simulator while a test suite runs. It identifies the simulator by generating an initial list of simulators; and then polling until that list increases by one ...
99088ab081279329b8362e1c24533fa0be303e6f
56e337d32b88630f2c35458231cd61929f1be6d4
python/cpython
python__cpython-130291
# random.sample raises "IndexError: pop from empty list" when both "population" and "counts" are empty # Bug report ### Bug description: I just encountered the situation where I used `random.sample` but both the `population` and `counts` arguments were empty (my algorithm had nothing left to choose from). So, basica...
286c517db0fedf8d923d6f9620bcbbac4333880d
0c4248f88e279df3254d62b34dfa3204a92c56a0
python/cpython
python__cpython-130284
# docs: fix deprecated or broken examples in urllib.request documentation. # Documentation While working on the issue #130132 , I encountered with some examples and I can see the W3C document is outdated with some examples of `urllib.request.urlopen()` in Example of `urllib.request` These are following things I find...
fd459b115330b089da26a0555f45afced597942a
557d2d20d484a7b22da39cdb876f6312ab66d561
python/cpython
python__cpython-130318
# traceback.print_last behaving differently across python versions # Bug report ### Bug description: `traceback.print_last()` correctly prints the latest traceback for python 3.10.16 and 3.11.9, but it prints `NoneType: None` for 3.12.9 and 3.13.2 See also https://github.com/ipython/ipython/issues/14744, I original...
6c982aeb547528174f8bc843267f584d8b133d14
73801864d866c76ae26a120b9db9de21b08f8b50
python/cpython
python__cpython-130237
# Issues with Decimal and three-argument pow() # Crash report 1. Three-argument `pow()` with non-Decimal first argument does not work in the Python implementation. ```pycon >>> from decimal import Decimal >>> pow(10, Decimal(2), 7) Decimal('2') >>> from _pydecimal import Decimal >>> pow(10, Decimal(2), 7) Traceback (...
b93b7e566e5a4efe7f077af2083140e50bd2b08f
4374e1de87c54ba2291f49c2fa3a105bb6641ce6
python/cpython
python__cpython-130245
# Crash when accessing the `asyncio` module state in task deallocation # Crash report ### What happened? Cross posting from https://github.com/agronholm/anyio/issues/870. I noticed that with Python 3.14.0a5 (it doesn't happen in a4) anyio's tests for asyncio run successfully and only in the end the info about the c...
5f00501a940a0fb97870e70066fb301909320388
660f126f870535b6fa607e6d9cdd3cdbd9ed2cb1
python/cpython
python__cpython-130215
# Undocumented public C-API `PyEllipsis_Type` # Documentation `PyEllipsis_Type` is in the limited API and not documented. <!-- gh-linked-prs --> ### Linked PRs * gh-130215 * gh-130223 * gh-130224 <!-- /gh-linked-prs -->
fc8c99a8ce483db23fa624592457e350e99193f6
f55d0b66be225e4a7fe6d8c50e8b49fd37b4ecc9
python/cpython
python__cpython-130281
# `_PyObject_ResurrectEnd` may deallocate object in the "resurrection" case # Bug report See https://github.com/python/cpython/issues/130163#issuecomment-2661465164 for reproducer. > Yeah, I think that's another bug with `_PyObject_ResurrectEnd`. In the resurrection case, the object may still be deallocated. In part...
f963239ff1f986742d4c6bab2ab7b73f5a4047f6
c5f925c8c948736bd64652918b4e0186b91abbb5
python/cpython
python__cpython-130196
# pygettext: Remove unused option `-a/--extract-all` It has never been implemented. PR soon @tomasr8 <!-- gh-linked-prs --> ### Linked PRs * gh-130196 * gh-130254 <!-- /gh-linked-prs -->
4374e1de87c54ba2291f49c2fa3a105bb6641ce6
99d965635ae2ac4bffdc318ee05b96c59262d165
python/cpython
python__cpython-130208
# Increase test coverage of `gettext.c2py` `gettext.c2py` is not fully covered: ![Image](https://github.com/user-attachments/assets/ef1f2a55-10db-4269-8b1e-7bbc73c43164) (`_parse` is called by `c2py`) We need to cover negation (e.g. `!n`) and an invalid ternary (e.g. `n ? 1 2`) <!-- gh-linked-prs --> ### Linked PRs...
fb2d325725dcc881868b576b9d0d9f4bf7f24fe0
422f8e9e02e68d45aee3846751a003a70fca13b6
python/cpython
python__cpython-130186
# Some tests are skipped in `test_functools` # Bug report ### Bug description: `TestCache` is not used by any other test class in the module. I'm guessing it was intended to be used as `TestLRU` but it currently does not run: https://github.com/python/cpython/blob/9837c2a21457e4eacabf606c44ec42d1962f11f1/Lib/test/t...
73d03005b028eb6e4d1a643f3ca7a1f5ff2040fc
c9b1bf302ce67031e0309a9b0ea55ecdd68ed682
python/cpython
python__cpython-130180
# Missing `Py_CLEAR/Py_VISIT` calls for `Unpickler.persistent_load_attr` and `Pickler.persistent_id_attr` # Bug report ### Bug description: I found that `Unpickler.persistent_load_attr` and `Pickler.persistent_id_attr` can be set, but never clear. However, I didn't find any uses of them. Another issue, I found tha...
e7f00cd14f6a0c0dee6e733ac3e2c5d92e0809bb
56495f81fc7205b572173a03d418e0f9291f9eea
python/cpython
python__cpython-130178
# Some tests are skipped in `test_gettext` # Bug report ### Bug description: `PluralFormsInternalTestCase` does not inherit from `unittest.TestCase` so the test is not picked up: https://github.com/python/cpython/blob/9837c2a21457e4eacabf606c44ec42d1962f11f1/Lib/test/test_gettext.py#L405-L407 ### CPython versions ...
2e8044a4f74f5fc19e5249139c171403aff0118d
361083b84b0db975058b2d1f50dcbfd36f072caf
python/cpython
python__cpython-130174
# Possibly unnumbered list missing in Doc/c-api/function.rst # Documentation PyFunction_WatchEvent at c-api/function.rst has in the source file what seems to be a unnumbered list, but the built documentation has everything in a single line. Should it be formatted as a unnumbered list instead? https://github.com/pyth...
9837c2a21457e4eacabf606c44ec42d1962f11f1
798f8d3ea9f54ee80a684bff74f67ee7d99e35c2
python/cpython
python__cpython-130192
# Signature.bind allows certain positional-only parameters as keywords # Bug report ### Bug description: Prior to 3.13, the following code correctly raised a `TypeError` (I've tested 3.8-3.12, but see the last paragraph below): ```python def fun(x, /, **kwargs): pass import inspect sig = inspect.signature(fun) ...
dab456dcefd886bde44eb204dc6f1b2f14de0e9d
01ba7df49966eaf14f44962a77898840c70dda96
python/cpython
python__cpython-130165
# unaligned numbered list text and extra paragraph in collections.abc # Documentation [collections.abc](https://docs.python.org/3/library/collections.abc.html) has an almost numbered list in the beginning of the doc, but it is not correctly indented as such. This causes the text to not be rendered with indentation as...
8e96adf4532943360f09df04cd7d3a5d35f61a24
38642bff139bde5c0118bc75fda25badc76b85fc
python/cpython
python__cpython-129954
# match: confusion regarding `_` in match statements # Documentation https://docs.python.org/3.13/tutorial/controlflow.html#tut-match makes it look like `_` is not executed when no other branch is executed <!-- gh-linked-prs --> ### Linked PRs * gh-129954 <!-- /gh-linked-prs -->
1b5db5adfec10d90cf5c7abd6817452be4f0b909
ba05a4ebcb67506b4e6d65ea11e78d06f57dc23b
python/cpython
python__cpython-130152
# Reference leaks in `_hashlib.hmac_new` and `_hashlib.hmac_digest` # Bug report ### Bug description: The following leaks: ```py def test_leak1(self): import _hashlib self.assertRaises(TypeError, _hashlib.hmac_new, b"key", 1, "sha256") ``` The issue is in `_hashlib_hmac_new_impl`: ```c self = PyObject...
071820113f11b8f6a21f98652d0840e10268114c
72ea3c030a81262af64ebcae2e83ce2ff529bcef
python/cpython
python__cpython-130150
# Refactor tests for HMAC The tests for HMAC are organized in such a way that makes the adoption of HACL* HMAC harder. More precisely, it'll be a bit harder to test the OpenSSL *and* the HACL* implementation of HMAC (for instance, some tests may or may not work with HACL* as they only support a subset of the hash func...
8f11af45de68459d9d4051812aa5ddaf6a98dcb2
a105f990199f99a352efd481ac039604feceaab5
python/cpython
python__cpython-130146
# loop.run_forever can remove running loop if already running Reproducer: ```py import asyncio async def main(): loop = asyncio.new_event_loop() try: loop.run_forever() except RuntimeError: pass print(asyncio.get_running_loop()) asyncio.run(main()) ``` Output: ```console cpytho...
a545749b0e6c56cab853c5c8df3c199b9707994f
a05433f24a6e1c6d2fbcc82b7a372c376a230897
python/cpython
python__cpython-130140
# ast.parse() without optimize=True doesn't error on invalid AST type ``` >>> ast.parse(ast.Constant(42)) Constant(value=42, kind=None) >>> ast.parse(ast.Constant(42), optimize=True) Traceback (most recent call last): File "<python-input-4>", line 1, in <module> ast.parse(ast.Constant(42), optimize=True) ~...
c9b1bf302ce67031e0309a9b0ea55ecdd68ed682
2e8044a4f74f5fc19e5249139c171403aff0118d
python/cpython
python__cpython-130280
# docs: add an explicit `close()` call to `urlopen` examples without `with` # Documentation The [documentation](https://docs.python.org/3/library/urllib.request.html#examples) for `urllib.request` uses `urlopen()` 3 times without either `with` or manual closing. Although technically possible, this is not recommended....
77d2fd441320ca365c34e21c475d3878f3d5d833
3f50f96586d46497e4d9de065c4424fe2d72508e
python/cpython
python__cpython-130324
# Clarify the meaning `dataclasses.field(..., hash=False)` See https://discuss.python.org/t/unclear-docs-for-dataclasses-field/80716. Currently the docs are: > hash: This can be a bool or None. If true, this field is included in the generated [\_\_hash\_\_()](https://docs.python.org/3/reference/datamodel.html#object....
47ace539950fb675d5968736348f0d724ba199f0
1b070060c025a00d43566a6df65aa7631861d7af
python/cpython
python__cpython-130124
# __new__ tp-wrapper can be deferred on free-threaded builds # Feature or enhancement ### Proposal: `__new__`'s wrapper is small, doesn't hold onto other things except the circular reference between it and the type, meaning the GC reclaims it anyways. We may as well defer it and be able to load cached values. ### H...
5a586c3e81ab53bb1f6c20a4c80b4eb69d429410
e65e9f90626a4c62da4d3500044f354b51e51dbb
python/cpython
python__cpython-130119
# `typing.Annotated` does not flatten through `typing.TypeAliasType` # Bug report ### Bug description: As described in the [documentation](https://docs.python.org/3/library/typing.html#typing.Annotated), nested `Annotated` types are supposed to be flattened. This works well with legacy type aliases but not with the ...
b936ccdb6f6bd11250b4e638b6fa2c239907ca58
529012e26fc43d9b101b034d372b443a24bdf2af
python/cpython
python__cpython-130391
# Active thread list may be inaccurate due to data type mismatch # Bug report ### Bug description: https://github.com/python/cpython/commit/0e9c364f4ac18a2237bdbac702b96bcf8ef9cb09 changed `thread_get_ident` to convert a `unsigned long long` vs the previous `unsigned long`. ```c static PyObject * thread_get_ident(P...
72123063ddee84bb2c9d591a23f420997e35af5a
345baa77ba2ce3b8ea8f2fad84754e5cc0b10938
python/cpython
python__cpython-130107
# Small typo in https://docs.python.org/3/library/unittest.mock.html#where-to-patch https://docs.python.org/3/library/unittest.mock.html#where-to-patch has the text "which we will have to do then it imports" which should be "which we will have to do when it imports" (i.e. `s/then/when/`). The source for this is http...
d2e60d8e598b622573b68b80b4fbf98c021dd087
39cd9728a6770d8fe7937c57385cda5c2e25a223
python/cpython
python__cpython-130251
# Inconsistent behavior of ternary pow() for Python classes and C extension types # Bug report ### Bug description: Consider an example: ```pycon Python 3.13.1 (tags/v3.13.1:0671451779, Dec 4 2024, 07:55:26) [GCC 12.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import exam...
62ff86fa55c903a8362a64ecc363d8443aff2d07
72da4a445867648ee668bfc68a9bb659dfebe658
python/cpython
python__cpython-130101
# Parallel import of modules causes a ModuleNotFoundError # Bug report ### Bug description: Using the free-threading build parallel import of modules causes a `ModuleNotFoundError`. The module that cannot be found can differ. A minimal reproducer: ```python import sys from threading import Thread, Barrier from impor...
857bdba0ac66ed7963e9fca45ab1a5f7a32b4bfb
8207454bc00db8efa0e05c93381ecc8e3efc86a7
python/cpython
python__cpython-130092
# Data race in `PyThread_tss_delete` and `_PyThreadState_Attach` # Bug report There are a few data races during Python shutdown. This report involves thread-local variables using `Py_tss_t`. It can be reproduced sometimes by running `test_threading.test_import_from_another_thread` with TSAN repeatedly. ``` WARNING:...
7aeaa5af2c32f1f87b59f36f89e19284e24b26b9
e06bebb87e1b33f7251196e1ddb566f528c3fc98
python/cpython
python__cpython-129907
# Support PGO for clang-cl # Feature or enhancement ### Proposal: Support PGO (profile guided optimization) for clang-cl on Windows using a similar approach as done in the Linux makefiles for clang. ### Has this already been discussed elsewhere? No response given ### Links to previous discussion of this feature:...
d8a1cf469e40b538a84e583ac1d5d34418ed9a6a
3dd3675492a3fc3b7996613ef75a9044ee7449b0
python/cpython
python__cpython-130081
# Implement PEP 765 This issue serves as a tracker for implementing PEP-765. <!-- gh-linked-prs --> ### Linked PRs * gh-130081 * gh-130087 * gh-130930 * gh-131400 * gh-131471 * gh-131577 * gh-131745 <!-- /gh-linked-prs -->
56495f81fc7205b572173a03d418e0f9291f9eea
73d03005b028eb6e4d1a643f3ca7a1f5ff2040fc
python/cpython
python__cpython-130071
# `exec(<string>, closure=<non-None>)` failed assertion # Crash report ### What happened? Minimal repro: ```python print("Reproducing!") exec("", closure=object()) ``` Fails with ``` Reproducing! python: Python/ast.c:1047: _PyAST_Validate: Assertion `!PyErr_Occurred()' failed. Aborted (core dumped) ``` Note the e...
954b2cf031fb84ff3386251d5c45281f47229003
d7df7815f555a4a5d6f4308072cbacd1286e8060
python/cpython
python__cpython-130061
# Pygettext: Support translator comments # Feature or enhancement ### Proposal: Most gettext extraction tools such as xgettext or pybabel allow one to extract additional comments written by the programmer which are meant to be read by the translator. These are prefixed with `#.` in the PO file. The comments typical...
aa845af9bb39b3e2ed08bbb00a8e932a97be8fc0
6669905723238d45cde6c8a9b40579bfe73c76c1
python/cpython
python__cpython-130053
# Some error paths do not set Exceptions in _testexternalinspection # Bug report ### Bug description: Following @colesbury findings at https://github.com/python/cpython/issues/130035#issuecomment-2654033286, I did a manual inspection of `_testexternalinspection` and found a few more cases where Exception should be s...
69426fcee7fcecbe34be66d2c5b58b6d0ffe2809
ca22147547413229a933e3d9cac21cbecf1183fe
python/cpython
python__cpython-130051
# Memory leaks at _testexternalinspection # Bug report ### Bug description: Following @colesbury findings at https://github.com/python/cpython/issues/130035#issuecomment-2654033286, I did a manual inspection of `_testexternalinspection` and found some memory leaks in `parse_coro_chain`, `parse_task` and `get_async_s...
633853004c5b20827872a32e99cebef52ae0f531
1b27f36eb0ef146aa60b261a1cffcc6fd55c0e88
python/cpython
python__cpython-130040
# Tail calling interpreter for Windows # Feature or enhancement ### Proposal: Add new build flag for it. ### Has this already been discussed elsewhere? No response given ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-130040 <!-- /gh-linked-prs -->
a8ee1e16f545d721318afe8fe5330ddb4df7e3e3
4192ce17ba643e5b0bc9d2182a429002e4cc9dfe
python/cpython
python__cpython-130043
# Python 3.14.0a5 i686 Linux freethreading-debug build fails: gc_free_threading.c:1077: mark_heap_visitor: Assertion "gc_get_refs(op) >= 0" failed: refcount is too small # Bug report ### Bug description: I try to build freethreading-debug Python 3.14.0a5 for i686 Fedora Linux with a consistent failure: `/builddir/bu...
e09442089eb86d88d4b5a96e56f713cb31173ae9
791cdfe1416a591e240b8ffc6f10eb6f659c8277
python/cpython
python__cpython-130026
# iOS testbed clone breaks on some symlinks # Bug report ### Bug description: The iOS testbed project is able to use symlinks when referring to the XCframework (or simulator Framework slice of an XCframework). This saves significant disk space and startup time as the need to copy the full framework is eliminated. T...
625470a7d2c6aa79b5e60ffe17785ccc2547a090
2a0256f588e5c8ea3892521009ae3834c407cd69
python/cpython
python__cpython-130058
# Data race in `_PyType_AllocNoTrack` in free threaded build # Bug report Seen in https://github.com/python/cpython/actions/runs/13272883082/job/37056243083?pr=130015 ``` WARNING: ThreadSanitizer: data race (pid=17248) Write of size 8 at 0x7fbca00601d0 by thread T2652: #0 __tsan_memset <null> (python+0xdc7a8) ...
0559339ccdc76a63dcbd14eb2d60a41f493a1ded
c357d690033e2f976ddb6e11b8199e3fb9f66118
python/cpython
python__cpython-130005
# PGO amd64 build broken on Windows: "Internal compiler error" # Bug report ### Bug description: The Windows release build is failing for 3.14.0a5 for MSVC 14.42.34433 on AMD64: ``` Merging D:\a\1\b\bin\amd64\python314!1.pgc D:\a\1\b\bin\amd64\python314!1.pgc: Used 25.9% (16346384 / 63139840) of total spac...
247b50dec8af47ed8a80069117e07b7139f9d54f
374abded070b861cc389d509937344073193c36a
python/cpython
python__cpython-130001
# Some Windows API calls in winreg didn't release the GIL # Bug report ### Bug description: I'm not sure whether we should release the GIL in every Windows API call, but for specific Windows API calls, sometimes the GIL gets released, like [here](https://github.com/python/cpython/blob/1da412e574670cd8b48854112ba118c...
7a504b3d5da98874536834481539c19ba4a265af
6a2296329117463fd09abc73656f1d7b48076100
python/cpython
python__cpython-129996
# socket.create_server: dualstack_ipv6 and family # Documentation Calling `socket.create_server` with `dualstack_ipv6=True` expect `family=AF_INET`. For example: ``` socket.create_server(("", 12345), family=socket.AF_INET, dualstack_ipv6=True) ``` raise `ValueError`. There is nothing about it docs. We should add th...
044a1e13d5cfc91b0a8774e936877e91cbac3a16
a175d64e30b0ff9f011aea2da6d6e21ccfdcd893
python/cpython
python__cpython-129991
# `--without-tail-call-interp` actually enables the tail-call interpreter, instead of disabling! In `configure.ac`, if the user passes `--tail-call-interp` in the negative, we set `Py_TAIL_CALL_INTERP` to `0`: https://github.com/python/cpython/blob/1feaecc2bc42cb96f2d7bdc8d7083171bdcd0929/configure.ac#L7027-L7032 How...
359c7dde3bb074e029686913f531457eb121d1dd
c26bed1160978fe8b1844878b8123778e47870c6
python/cpython
python__cpython-132295
# computed-goto interpreter: Prevent the compiler from merging `DISPATCH` calls - [Work-in-progress test branch here](https://github.com/python/cpython/compare/main...nelhage:cpython:computed-goto-nomerge) As a reminder: when compiling the interpreter using computed gotos, we emit a separate copy of the "dispatch" ju...
1f5682f3a27516833f7c317707dd359280dba6e7
67ded6a4faae29edff8e4f7886978e71ce116e33
python/cpython
python__cpython-129985
# Immortal objects don't have the deferred bit set by default # Bug report ### Bug description: `_PyObject_HEAD_INIT` defines objects w/ an immortal reference count, but it doesn't set `_PyGC_BITS_DEFERRED`. This results in these objects (like small ints) not being cachable in the specializing interpreter loop for f...
28f5e3de572e1f688b05126d395cf3aadd5ab8ad
0559339ccdc76a63dcbd14eb2d60a41f493a1ded
python/cpython
python__cpython-130015
# Data race in `compile_template` in `sre.c` # Bug report Concurrent accesses to `module_state->compile_template` in the free threaded build https://github.com/python/cpython/blob/1feaecc2bc42cb96f2d7bdc8d7083171bdcd0929/Modules/_sre/sre.c#L1169-L1177 <!-- gh-linked-prs --> ### Linked PRs * gh-130015 * gh-130038 <!...
3cf68cdd3e1809df4e426c61f6990de63747ec6f
469d2e416c453b19d7a75fe31ceec732445e9ef2
python/cpython
python__cpython-129981
# Include test suite name in TSAN log filename # Feature or enhancement If you run a lot of tests that log TSAN reports to a file, you are likely to get a bunch of different log files that look pretty similar. For example, something like: ``` tsan_log.3313980 tsan_log.3315274 ... ``` It can be difficult to figure o...
3b548adc765a83bedc316b19cb922a02c7a201f1
247b50dec8af47ed8a80069117e07b7139f9d54f
python/cpython
python__cpython-129978
# nogil set `clear` causes concurrent `__str__` to print as empty dict # Bug report ### Bug description: Hi, We're a research group focused on testing concurrent runtimes. Our work-in-progress prototype found that the current nogil build `__str__` can return `"{}"` (empty dict) instead of the expected `"set()"` whe...
a7427f2db937adb4c787754deb4c337f1894fe86
1f233f56d6a5216b18e8c3f6b8c14d7e5d62c340
python/cpython
python__cpython-129969
# Add missing MIME types # Feature or enhancement ### Proposal: https://github.com/mikeckennedy/content-types identifies some common MIME types missing from the default `mimetypes` list. Running https://github.com/mikeckennedy/content-types/blob/main/samples/compare_to_builtin.py on Python 3.13 to identify some mis...
1cf9b6d9b8fbb5ebc3e9b42a3682684a983c78bc
d0a1e5c222f9f43b492b28806e2a185a50d64500
python/cpython
python__cpython-130882
# JIT build crashes on Windows on Arm # Crash report ### What happened? The JIT on Windows on Arm (tested on Windows 11 Pro) is broken. It builds successfully but then the first test fails straightaway crashing the binary. Also if I run the REPL and start typing commands, it stays alive for a few seconds and then d...
02de9cb9a8fa5b0ae3947231b8c0677834aaee45
5d8db36bbbab166c4c221ee6e283f090475c5def
python/cpython
python__cpython-130063
# Vague behavior when single quoted f-string format_spec contains line break # Bug report ### Bug description: ```python >>> value = 123 >>> f"{value:.{'2'}f}" # '123.00' >>> f"{value:. {'2f'}}" # '123.00' # but, shouldn't this one below also be valid? >>> f"{value:. ... {'2'}f}" # invalid >>> f"{value: ... {'.2f'}}...
2f8b08da475152adea59b6bf98e2d0cb73dd8a59
e01e5829020e517eb68a47da4dd65926a9d144de
python/cpython
python__cpython-129949
# Add `set()` to `multiprocessing.managers.SyncManager` # Feature or enhancement ### Proposal: The SyncManager provides support for various data structures such as dict, list, and queue, but oddly, it does not support set. This inconsistency feels little bit weird. Unless there is a specific reason, I propose addin...
9f81f828c797f842d1df0a5cbda898bc0df8075a
a65366ed879a3d9f27cbcc811ed2e05ad1a2af06
python/cpython
python__cpython-129940
# Add darkmode support for difflib's comparison pages # Feature or enhancement ### Proposal: Previously, a similar change was made in https://github.com/python/cpython/pull/123475, which was considered a new feature. ![Image](https://github.com/user-attachments/assets/5ad80601-15ea-4aec-8abe-2f494dd570e3) ### Ha...
12bd15f7b378879ed7971d14a4388cd9a38a14dc
3b366a4a4b0cea483824adbc2fa5a19d82d3dc6a
python/cpython
python__cpython-129929
# Refactor sqlite3 error handler In most error cases, we can use the error indicator from the SQLite database pointer when we raise exceptions. However, for some SQLite C APIs, we have to use the result code directly. This is the case for some of the blob APIs, where the error indicator is not stored on the database p...
3b366a4a4b0cea483824adbc2fa5a19d82d3dc6a
3a2e7aacf6f414bbbedaf072e7cb1b48e3d402fa
python/cpython
python__cpython-131025
# Update installers to use SQLite 3.49 ### Proposal: We'e been skipping some SQLite versions lately; currently we're shipping the macOS and Windows installers with SQLite 3.45.3 (released 300 days ago, 2024-04-15). SQLite 3.49.0 recently came out, so we should probably hold off upgrading for a couple of weeks to see ...
45a3ab5a81769eadd94da3e26eb9bb2f3ae80fb1
2e96f5ae4d1700d77a53180b4866c5b9f002e62d
python/cpython
python__cpython-130044
# The tp_dictoffset and Py_TPFLAGS_MANAGED_WEAKREF flag From the `tp_dictoffset` slot documentation: >"It is an error to set both the **`Py_TPFLAGS_MANAGED_WEAKREF`** bit and `tp_dictoffset`." I think the `Py_TPFLAGS_MANAGED_WEAKREF` flag is being used **incorrectly** in this context. Do you mean the `Py_TPFLAGS_MANA...
791cdfe1416a591e240b8ffc6f10eb6f659c8277
633853004c5b20827872a32e99cebef52ae0f531
python/cpython
python__cpython-129914
# pygettext: help output for keywords prints the whole keyword dictionary # Bug report ### Bug description: The `--keyword` entry when printing the help via `./python Tools/i18n/pygettext.py --help` shows the whole keyword dictionary: ``` -k word ...
9d1e668e6f40967dda5cbb1ce298bf0dff2d807c
3bd3e09588bfde7edba78c55794a0e28e2d21ea5
python/cpython
python__cpython-129901
# Exit code in case of an error is always 1 since Python 3.13 # Bug report ### Bug description: We noticed a failure of our Vim test suite on the Github Windows runners, when it was updated from python3.12 to python3.13. Vim basically does run in a terminal `exit(123)` and expects the return code to be 123, however...
90b82f2b61219c8f94e2deddc989a4c4fe9ea7c7
8ada7a9e1435302ec2cb73375122072d0e1cdd6f