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-110168
# if SOURCE_DATE_EPOCH is set, don't randomize the testsuite # Feature or enhancement ### Proposal: cc @vstinner from https://github.com/python/cpython/pull/109570#discussion_r1342002862 cc @doko42 @stefanor from debian -- this would allow debian to remove this patch I believe https://salsa.debian.org/cpython-tea...
65c285062ce2769249610348636d3d73153e0144
adf0f15a06c6e8ddd1a6d59b28efcbb26289f080
python/cpython
python__cpython-110170
# test_userstring: test_find_periodic_pattern() failed on GHA Hypothesis tests on Ubuntu GHA Hypothesis tests on Ubuntu: ``` FAIL: test_find_periodic_pattern (test.test_userstring.UserStringTest.test_find_periodic_pattern) (p='', text='') Cover the special path for periodic patterns. ----------------------------...
06faa9a39bd93c5e7999d52b52043ecdd0774dac
038c3564fb4ac6439ff0484e6746b0790794f41b
python/cpython
python__cpython-110156
# regrtest: handle cross compilation and HOSTRUNNER in libregrtest, avoid Tools/scripts/run_tests.py Previously, Tools/scripts/run_tests.py was used to add Python options to the command line: ``-u -E -W default -bb``. But regrtest is now able to do it when ``--fast-ci`` and ``--slow-ci`` options are used. I propose...
53eb9a676f8c59b206dfc536b7590f6563ad65e0
d3728ddc572fff7ffcc95301bf5265717dbaf476
python/cpython
python__cpython-110151
# Fix base case handling in quantiles() Fix an inconvenience in `quantiles()` by supporting input lists of length one, much like `min()`, `max()`, `mean()` and `median()` also support datasets of size one. The principal use case is making statistical summaries of data streams. It is really inconvenient to require ...
62405c7867b03730f0d278ea845855692d262d44
a46e96076898d126c9f276aef1934195aac34b4e
python/cpython
python__cpython-110268
# test_msvcrt: test_getwche() failed with timeout (10 min) on GHA Windows x64 GHA Windows x64: ``` 0:16:19 load avg: 5.19 [377/467/1] test_msvcrt process crashed (Exit code 1) -- running (1): test_winconsoleio (10 min) Timeout (0:10:00)! Thread 0x000001d4 (most recent call first): File "D:\a\cpython\cpython\L...
1f3af03f83fead5cd86d54e1b2f47fc5866e635c
a13620685f68957c965fca89343a0e91f95f1bab
python/cpython
python__cpython-110142
# Grammar mistake in description of __main__.py idiomatic usage. # Documentation The following sentence in the section about [idiomatic usage](https://docs.python.org/3.11/library/__main__.html#id1) of `__main__.py` seems to be missing one word: > Instead, those files are kept short, functions to execute from othe...
adf0f15a06c6e8ddd1a6d59b28efcbb26289f080
31097df611bb5c8084190202e095ae47e8b81c0f
python/cpython
python__cpython-110123
# `--disable-gil` test failures due to ABI flag # Bug report On Linux and macOS, `test_cppext` fails due to: ``` AssertionError: would build wheel with unsupported tag ('cp313', 'cp313td', 'linux_x86_64') ``` Example build: https://buildbot.python.org/all/#/builders/1217/builds/286 Resolving this failure will requ...
2973970af8fb3f117ab2e8ab2d82e8a541fcb1da
5ae6c6d053311d411a077200f85698d51d5fe8b9
python/cpython
python__cpython-110308
# User-defined virtual path objects ## Proposal Add a `PathBase` class that can be subclassed by users to implement "virtual paths", e.g. paths within `.zip` files or on FTP servers, and publish it as an external PyPI package. ## Phase 1: Private support in pathlib - [x] Add private `_PathBase` class - #1...
da0a68afc9d1487fad20c50f5133cda731d17a17
0d805b998ded854840f029b7f0c9a02eb3efa251
python/cpython
python__cpython-110094
# Replace trivial Py_BuildValue() with direct C API call `Py_BuildValue()` is a powerful tool which can be used to create complex Python structures. But in some cases it is used to create a Python objects from a C value for which a special C API exists. Since `Py_BuildValue()` adds some overhead (parsing the format st...
59ea0f523e155ac1a471cd292b41a76241fccd36
ff4e53cb747063e95eaec181fd396f062f885ac2
python/cpython
python__cpython-110092
# test_asyncio.test_windows_events: test_wait_for_handle() failed on GHA Windows x86 The test must not measure the performance of the CI. GHA Windows x86: ``` FAIL: test_wait_for_handle (test.test_asyncio.test_windows_events.ProactorTests.test_wait_for_handle) --------------------------------------------------...
db0a258e796703e12befea9d6dec04e349ca2f5b
e27adc68ccee8345e05b7516e6b46f6c7ff53371
python/cpython
python__cpython-110080
# Remove extern "C" { ... } in C files # Bug report Until Python 3.11, it was possible to build Python with a C++ compiler: ``./configure --with-cxx-main``. This build mode has been removed in Python 3.12: in gh-93744 by commit 398ed84dc40abc58e16f5014d44c08f20cb4b5f6: ``` commit 398ed84dc40abc58e16f5014d44c08f20cb4...
8b626a47bafdb2d1ebb1321e50ffa5d6c721bf3a
bfd94ab9e9f4055ecedaa500b46b0270da9ffe12
python/cpython
python__cpython-110069
# test_threading.test_4_daemon_threads() crash randomly On Linux, when I stress test test_threading.test_4_daemon_threads(), it does crash randomly: ``` ./python -m test test_threading -m test_4_daemon_threads -j50 -F --fail-env-changed ``` gdb traceback: ``` Program terminated with signal SIGSEGV, Segme...
2e37a38bcbfbe1357436e030538290e7d00b668d
235aacdeed71afa6572ffad15155e781cc70bad1
python/cpython
python__cpython-110051
# The TypeError message from random.seed call has a seemingly unintentional newline in the middle # Bug report ### Bug description: ```python >>> import random >>> random.seed(random) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "...lib/python3.12/random.py", line 167, in seed ...
ce43d5f0e1e271289be5510ec80ebb9df77d88e1
756062b296df6242ba324e4cdc8f3e38bfc83617
python/cpython
python__cpython-110066
# Symbol table for type parameter (PEP 695) raises AssertionError on get_type() # Bug report ### Bug description: Tested with CPython 3.12.0rc3 ```python import symtable def foo[T](): return "bar" t_mod = symtable.symtable("""\ def foo[T](): return "bar" """, '?', 'exec') t_T = t_mod.get...
7dc2c5093ef027aab57bca953ac2d6477a4a440b
2e37a38bcbfbe1357436e030538290e7d00b668d
python/cpython
python__cpython-110039
# `KqueueSelector` miscounts max events # Bug report ### Bug description: `KqueueSelector.select()` may not get all events if a fd is registered for _both read and write_. kqueue requires to register two filters, one for read and one for write. But KqueueSelector.select() calls kqueue.control() counting the number ...
b14f0ab51cb4851b25935279617e388456dcf716
7e0fbf5175fcf21dae390ba68b7f49706d62aa49
python/cpython
python__cpython-110037
# test_multiprocessing_spawn: Popen.terminate() failed with PermissionError: [WinError 5] Access is denied subprocess.terminate() catchs PermissionError: we can reuse their code. I'm working on a fix. GHA Windows x86: ``` ERROR: tearDownClass (test.test_multiprocessing_spawn.test_manager.WithManagerTestPool) -...
bd4518c60c9df356cf5e05b81305e3644ebb5e70
4e356ad183eeb567783f4a87fd092573da1e9252
python/cpython
python__cpython-110035
# test_signal: test_interprocess_signal() failed on GHA macOS The problem is that the first subprocess.Popen may not be removed **immediately** after ``with self.subprocess_send_signal(pid, "SIGHUP") as child:`` block, it can survive a little bit. But while it is being deleted automatically, oooops, sigusr1_handler() ...
7e0fbf5175fcf21dae390ba68b7f49706d62aa49
757cbd4f29c9e89b38b975e0463dc8ed331b2515
python/cpython
python__cpython-110100
# test_threading failed: test_reinit_tls_after_fork() failed with "env changed" on GHA Address Sanitizer: process 19857 is still running after 300.4 seconds GHA Address Sanitizer: ``` test_reinit_tls_after_fork (test.test_threading.ThreadJoinOnShutdown.test_reinit_tls_after_fork) ... Warning -- Uncaught thread exc...
86e76ab8af9a5018acbcdcbb6285678175b1bd8a
743e3572ee940a6cf88fd518e5f4a447905ba5eb
python/cpython
python__cpython-110053
# Warning: `incompatible-pointer-types` in `pycore_pylifecycle.h` # Bug report ``` In file included from Python/optimizer.c:3: ./Include/internal/pycore_interp.h:222:42: warning: incompatible pointer types passing 'unsigned long *' to parameter of type 'const uint64_t *' (aka 'const unsigned long long *') [-Wincompat...
6364873d2abe0973e21af7c8c7dddbb5f8dc1e85
9c73a9acec095c05a178e7dff638f7d9769318f3
python/cpython
python__cpython-110023
# Warning: unused variable ‘owner_cls’ in `generated_cases.c.h` # Bug report <img width="651" alt="Снимок экрана 2023-09-28 в 16 14 05" src="https://github.com/python/cpython/assets/4660275/d6f50141-207e-4554-bfea-5060b7978c9f"> Example: https://github.com/python/cpython/pull/110013/files#diff-4ef46fa654f95502e49a2...
3814bc17230df4cd3bc4d8e2ce0ad36470fba269
9be283e5e15d5d5685b78a38eb132501f7f3febb
python/cpython
python__cpython-110398
# Refactor to reduce code duplication in `Tools/scripts/summarize_stats.py` # Feature or enhancement ### Proposal: The `summarize_stats.py` script operates in two modes: single and comparison. It grew these two modes somewhat organically, and there is a lot of code duplication and opportunity for these two modes to...
81eba7645082a192c027e739b8eb99a94b4c0eec
6b9babf140445ec2a560d1df056b795e898c6bd0
python/cpython
python__cpython-112834
# Random crash of `test_signal` on macos sonoma # Crash report I've experience a randome crash while fixing https://github.com/python/cpython/issues/109981 Why random? Because I was not able to reproduce it ever again. My command: ``` » ./python.exe -m test -f tests.txt 0:00:00 load avg: 4.78 Run 31 tests sequentia...
bf0beae6a05f3266606a21e22a4d803abbb8d731
a955fd68d6451bd42199110c978e99b3d2959db2
python/cpython
python__cpython-110002
# Update to OpenSSL 3.0.13 (& 1.1.1w) in our binary release build process. # Bug report ### Bug description: We need to upgrade the OpenSSL versions we build & bundle into our binary releases before the next release. More security fixes as usual. In particular https://nvd.nist.gov/vuln/detail/CVE-2023-4807 applies ...
c88037d137a98d7c399c7bd74d5117b5bcae1543
526380e28644236bde9e41b949497ca1ee22653f
python/cpython
python__cpython-113378
# Test `test_c_locale_coercion` fails on macos Sonoma Repro: `./python.exe -m test test_c_locale_coercion -v` Short output: ``` ====================================================================== FAIL: test_external_target_locale_configuration (test.test_c_locale_coercion.LocaleConfigurationTests.test_exter...
5f665e99e0b8a52415f83c2416eaf28abaacc3ae
bee627c1e29a070562d1a540a6e513d0daa322f5
python/cpython
python__cpython-112797
# Tests crash on macos Sonoma # Crash report I've experienced a crash on `main` branch. I just used `./python.exe -m test` This is the all output I have for now. Cannot reproduce with smaller set of tests. ``` 0:13:53 load avg: 2.12 [371/463/4] test_super 0:13:53 load avg: 2.12 [372/463/4] test_support [1] 12160...
953ee622b3901d3467e65e3484dcfa75ba6fcddf
16448cab44e23d350824e9ac75e699f5bcc48a14
python/cpython
python__cpython-112905
# `test_tarfile_vs_tar` of `test_shutil` fails on macos Sonoma # Bug report ``` 0:10:50 load avg: 1.97 [343/463/3] test_shutil test test_shutil failed -- Traceback (most recent call last): File "/Users/sobolev/Desktop/cpython/Lib/test/test_shutil.py", line 1592, in test_tarfile_vs_tar self.assertEqual(self._tar...
dd2ebdf89ff144e89db180bd552c50615f712cb2
5bf7580d72259d7d64f5ee8cfc2df677de5310a4
python/cpython
python__cpython-110193
# Change DEOPT_IF macro not to need the opcode name The `DEOPT_IF` macro currently takes a condition and the name of the unspecialized instruction. This causes some duplication of guards (when the same guard could be reused by different instruction families), and is quite unnecessary, since the code generator can easi...
d67edcf0b361c9ee0d29ed719562c58a85304cd0
d73501602f863a54c872ce103cd3fa119e38bac9
python/cpython
python__cpython-110993
# What's New in Python 3.13 (copyediting) # Documentation This is a meta-issue to capture PRs for copyedits to What's New in Python 3.13. Other meta-issues: * 3.14: #123299 * 3.12: #109190 <!-- gh-linked-prs --> ### Linked PRs * gh-110993 * gh-110994 * gh-110997 * gh-114401 * gh-117902 * gh-118439 ...
c9c4a87f5da8d1e9b7ab19c687b49ba5431f6d36
6c23635f2b7067ef091a550954e09f8b7c329e3f
python/cpython
python__cpython-110057
# test_threading: test_set_and_clear() failed on Windows x64 Windows x64: ``` FAIL: test_set_and_clear (test.test_threading.EventTests.test_set_and_clear) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\a\cpython\cpython\Lib\test\lock_tests.py...
4e356ad183eeb567783f4a87fd092573da1e9252
5fdcea744024c8a19ddb57057bf5ec2889546c98
python/cpython
python__cpython-109977
# test_gdb failed with 15 min timeout on PPC64LE RHEL8 3.x (LTO + pydebug) PPC64LE RHEL8 3.x: ``` 0:19:19 load avg: 1.37 [463/463/1] test_gdb process crashed (Exit code 1) Timeout (0:15:00)! Thread 0x00007fffae664d70 (most recent call first): File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-ppc64le/build/Lib...
8f324b7ecd2df3036fab098c4c8ac185ac07b277
98c0c1de18e9ec02a0dde0a89b9acf9415891de2
python/cpython
python__cpython-109968
# Incorrect rendering of `__replace__` method in `copy` docs: consider adding `copy.SupportsReplace`? # Bug report Here's how it looks right now: <img width="792" alt="Снимок экрана 2023-09-27 в 12 51 08" src="https://github.com/python/cpython/assets/4660275/7847e178-7cf3-483c-a0be-f7f9d80791a7"> Link: https://do...
0baf72696e79191241a2d5cfdfd7e6135115f7b2
8f324b7ecd2df3036fab098c4c8ac185ac07b277
python/cpython
python__cpython-110058
# test_pty: test_openpty() failed on aarch64 RHEL8 LTO + PGO 3.x aarch64 RHEL8 LTO + PGO 3.x: ``` 0:00:16 load avg: 8.60 [299/463/1] test_pty failed (1 failure) hi there test_fork (test.test_pty.PtyTest.test_fork) ... ok test_master_read (test.test_pty.PtyTest.test_master_read) ... ok test_openpty (test.test_p...
5fdcea744024c8a19ddb57057bf5ec2889546c98
b488c0d761b2018c10bc5a0e5469b8b209e1a681
python/cpython
python__cpython-128122
# test_glob: test_selflink() fails randomly on Linux AMD64 RHEL8 Refleaks 3.x: ``` 0:09:26 load avg: 9.08 [406/463/1] test_glob failed (1 failure) -- running (7): (...) beginning 6 repetitions 123456 .....test test_glob failed -- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.cstratak-...
0974d7bb866062ed4aaa40f705d6cc4c294d99f1
df46c780febab667ee01264ae32c4e866cecd911
python/cpython
python__cpython-109957
# Also test `typing.NamedTuple` with `copy.replace` # Bug report Right now only `collections.namedtuple` is tested: https://github.com/python/cpython/blob/b1aebf1e6576680d606068d17e2208259573e061/Lib/test/test_copy.py#L937-L946 @serhiy-storchaka noted in https://github.com/python/cpython/pull/108752#discussion_r1313...
bb2e96f6f4d6c397c4eb5775a09262a207675577
8c071373f12f325c54591fe990ec026184e48f8f
python/cpython
python__cpython-109910
# Inline comments about Task state in ``asyncio.tasks`` are out of date # Documentation Some of the in-line comments in the asyncio.tasks module are out of date. They incorrectly describe the state transitions between a task in a sleeping and running state. This is unhelpful to anyone reading the code. I've cre...
45cf5b0c69bb5c51f33fc681d90c45147e311ddf
32466c97c06ee5812923d695195394c736eeb707
python/cpython
python__cpython-109924
# Set line number on the POP_TOP that follows a RETURN_GENERATOR Currently the ``POP_TOP`` of a generator doesn't get a line number. If we give it the same line number as the ``RETURN_GENERATOR`` and ``RESUME``, that will reduce the size of the line number table. The missing line number also got in my way while w...
ea285ad8b69c6ed91fe79edb3b0ea4d9cd6e6011
b89ed9df39851348fbb1552294644f99f6b17d2c
python/cpython
python__cpython-110911
# Segfault when printing `MemoryError` raised through `PyErr_NoMemory()` from subinterpreter # Crash report ### What happened? Repro: ```python import _testcapi _testcapi.run_in_subinterp("[0]*100000000000") ``` Backtrace: ``` BaseException_str (self=<optimized out>) at Objects/exceptions.c:120 120 switch (PyTu...
47d3e2ed930a9f3d228aed4f62133737dae74cf7
96cbd1e1db3447a33e5cc5cc2886ce79b61cc6eb
python/cpython
python__cpython-109899
# flowgraph optimize_cfg Assertion for if-else-expression with if-else-expression as condition # Bug report ### Bug description: ```python a if (1 if b else c) else d ``` output (Python 3.12.0rc3+): ```python python: Python/flowgraph.c:1598: optimize_cfg: Assertion `no_redundant_nops(g)' failed. ``` tested with the...
9fa094677186b4bb05e488e5bc9d5dfe7ec32812
c0b194a77082f2db4b5689a27e73f07fa046fa79
python/cpython
python__cpython-110421
# test_os.Win32KillTests: test_CTRL_BREAK_EVENT() failed on GHA Windows x64 Windows x64 failed: ``` ERROR: test_CTRL_BREAK_EVENT (test.test_os.Win32KillTests.test_CTRL_BREAK_EVENT) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\a\cpython\cpyt...
aaf297c048694cd9652790f8b74e69f7ddadfbde
fb6c4ed2bbb2a867d5f0b9a94656e4714be5d9c2
python/cpython
python__cpython-109869
# Skip deepcopy memo check when memo is empty # Feature or enhancement ### Proposal: In the `copy.deepcopy` method we can skip the initial memo check if the memo was just created. We can replace ``` if memo is None: memo = {} d = id(x) y = memo.get(d, _nil) if y is not _nil: return y ...
05079d93e410fca1e41ed32e67c54d63cbd9b35b
7dc2c5093ef027aab57bca953ac2d6477a4a440b
python/cpython
python__cpython-109866
# PluralFormsTestCase tests in test_gettext are not independent # Bug report ### Bug description: ``` $ ./python -m test -v test_gettext -m PluralFormsTestCase ... ====================================================================== FAIL: test_plural_context_forms1 (test.test_gettext.PluralFormsTestCase.test_plura...
1aad4fc5dba993899621de86ae5955883448d6f6
92ca90b7629c070ebc3b08e6f03db0bb552634e3
python/cpython
python__cpython-113991
# test_create_subprocess_with_pidfd in test_asyncio.test_subprocess is not independent # Bug report ### Bug description: ``` $ ./python -m test -v test_asyncio.test_subprocess -m test_create_subprocess_with_pidfd ... test_create_subprocess_with_pidfd (test.test_asyncio.test_subprocess.GenericWatcherTests.test_create...
f8a79109d0c4f408d34d51861cc0a7c447f46d70
1709020e8ebaf9bf1bc9ee14d56173c860613931
python/cpython
python__cpython-110245
# PyThreadState Sometimes Used for Different Threads for Subinterpreters # Bug report In a few places, we treat `PyInterpreterState.threads.head` (AKA `PyInterpreterState_ThreadHead()`) for subinterpreters as an unused thread state that we can use in a one-off manner: * `_PyInterpreterState_IDDecref()` (Python/pyst...
f5198b09e16bca1886f8245fa88203d07d51ec11
4227bfa8b273207a2b882f7d69c8ac49c3d2b57d
python/cpython
python__cpython-110016
# Python "zipfile" can't detect "quoted-overlap" zipbomb that can be used as a DoS attack # Bug report ### Bug description: Just found this vulnerability in the latest Python 3.11.5 (and previous 3.10.10). If we craft a zipbomb using the "quoted-overlap" way (as mentioned [https://www.bamsoftware.com/hacks/zipbomb/...
66363b9a7b9fe7c99eba3a185b74c5fdbf842eba
183b97bb9db075197153ad82b8ffdfce8e913250
python/cpython
python__cpython-109850
# test_rot13_func in test_codecs is not independent # Bug report ### Bug description: Running separate test `test_rot13_func` in `test_codecs` fails: ``` $ ./python -m test -v test_codecs -m test_rot13_func ... Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/test/test_codecs.py", line 3572, in...
b987fdb19b981ef6e7f71b41790b5ed4e2064646
1aad4fc5dba993899621de86ae5955883448d6f6
python/cpython
python__cpython-109912
# test_ftplib: test_storlines() fails randomly s390x RHEL7 Refleaks 3.x: ``` 0:00:19 load avg: 3.25 [ 17/463/1] test_ftplib failed (1 failure) beginning 6 repetitions 123456 ..test test_ftplib failed -- Traceback (most recent call last): File "/home/dje/cpython-buildarea/3.x.edelsohn-rhel-z.refleak/build/Lib...
2ef2fffe3be953b91852585c75188d5475b09474
b1e4f6e83e8916005caa3f751f25fb58cccbf812
python/cpython
python__cpython-110428
# test_multiprocessing_spawn.test_processes: test_waitfor_timeout() failed on GHA Windows x64 GHA Windows x64: ``` FAIL: test_waitfor_timeout (test.test_multiprocessing_spawn.test_processes.WithProcessesTestCondition.test_waitfor_timeout) ---------------------------------------------------------------------- Tra...
5eae8dc2cb832af6ae1ee340fb0194107fe3bd6e
0db2f1475e6539e1954e1f8bd53e005c3ecd6a26
python/cpython
python__cpython-109834
# test_asyncio.test_waitfor: test_wait_for() failed with "AssertionError: 0.547 not less than 0.5" on GHA Windows x64 GHA Windows x64: ``` FAIL: test_wait_for (test.test_asyncio.test_waitfor.AsyncioWaitForTest.test_wait_for) ---------------------------------------------------------------------- Traceback (most r...
f29bc9c9a0a6794c6b8a9e84a7ba9237b427a10a
bccc1b78002c924e8f4121fea5de7df5eb127548
python/cpython
python__cpython-109887
# test_concurrent_futures.test_deadlock fails with env changed: sys.stderr was modified on s390x RHEL8 Refleaks 3.x s390x RHEL8 Refleaks 3.x: ``` Warning -- sys.stderr was modified by test.test_concurrent_futures.test_deadlock Warning -- Before: <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'> War...
2897142d2ec0930a8991af964c798b68fb6dcadd
8ac2085b80eca4d9b2a1093d0a7da020fd12e11a
python/cpython
python__cpython-109839
# basicblock_addop Assertion: while-loop with if-expression # Bug report ### Bug description: ```python while x: 0 if 1 else 0 # 1 can not be 0 to reproduce this bug ``` output (Python 3.12.0rc3+): ```python python: Python/flowgraph.c:114: basicblock_addop: Assertion `0 <= oparg && oparg < (1 << 30)' failed. `...
d73c12b88c2275fd44e27c91c24f3ac85419d2b8
88a6137cdb81c80440d9d1ee7dee17ea0b820f11
python/cpython
python__cpython-109819
# `reprlib.recursive_repr` does not copy `__type_params__` # Bug report Repro: ```python >>> from reprlib import recursive_repr >>> >>> class My: ... @recursive_repr() ... def __repr__[T](self, converter: T | None = None): ... ... >>> My().__repr__.__type_params__ () ``` This happens because `recursive_repr...
f65f9e80fe741c894582a3e413d4e3318c1ed626
5bb6f0fcba663e1006f9063d1027ce8bd9f8effb
python/cpython
python__cpython-109813
# Tricky phrasing in the `collections.Counter` docs # Documentation The [collections.Counter documentation](https://docs.python.org/3/library/collections.html#collections.Counter) states: `c.items() # convert to a list of (elem, cnt) pairs` which seems to have been correct in Python 2 but is...
99fba5f156386cf8f4a71321708690cdb9357ffc
f65f9e80fe741c894582a3e413d4e3318c1ed626
python/cpython
python__cpython-127345
# datetime error message is different between _pydatetime.py and _datetimemodule.c # Bug report ### Bug description: ```python import _datetime, _pydatetime _datetime.date(1, 1, 50) Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: day is out of range for month``` _pydatetime.date...
3e222e3a15959690a41847a1177ac424427815e5
57f45ee2d8ee23c2a1d1daba4095a5a044169419
python/cpython
python__cpython-109808
# Starting new thread during finalization leads to call to `PyMem_Free` without holding the GIL # Crash report ### What happened? Since #109135, `thread_run` checks if it is called during finalization, and in this case it frees thread bootstate in `thread_bootstate_free` and returns. The problem is that `PyMem_Free...
1b8f2366b38c87b0450d9c15bdfdd4c4a2fc3a01
f19416534a546460fdf6a0739b70e44d1950a073
python/cpython
python__cpython-109794
# PyThreadState_Swap() During Finalization Causes Immediate Exit (AKA Daemon Threads Are Still the Worst!) # Bug report tl;dr Switching between interpreters while finalizing causes the main thread to exit. The fix should be simple. We use `PyThreadState_Swap()` to switch between interpreters. That function alm...
6364873d2abe0973e21af7c8c7dddbb5f8dc1e85
9c73a9acec095c05a178e7dff638f7d9769318f3
python/cpython
python__cpython-109788
# Re-entering pairwise.__next__() leaks references Re-entering the `__next__()` method of itertools.pairwise leaks references, because *old* hold a borrowed reference when the `__next__()` method of the underlying iterator is called. It may potentially lead to the use of a freed memory and a crash, but I only have rep...
6ca9d3e0173c38e2eac50367b187d4c1d43f9892
c74e9fb18917ceb287c3ed5be5d0c2a16a646a99
python/cpython
python__cpython-109790
# Windows os.path.isdir has different signature # Bug report ### Bug description: In this PR #101324 and issue #101196 the optimized methods of `isdir` and `isfile` were added for windows. If not available they will fall back to `genericpath` implementations. The issue with `isdir` is that this introduced a differe...
7df8b16d28d2418161cef49814b6aca9fb70788d
3814bc17230df4cd3bc4d8e2ce0ad36470fba269
python/cpython
python__cpython-109872
# test_venv: test_zippath_from_non_installed_posix() failed on aarch64 RHEL8 Refleaks 3.x ``cp874.cpython-313.pyc.281473310212544`` looks like a temporary PYC filename used by importlib to create PYC files in atomic way. The problem seems to be that tests are run in parallel and that files can appear or disappear w...
25bb266fc876b344e31e0b5634a4db94912c1aba
d73c12b88c2275fd44e27c91c24f3ac85419d2b8
python/cpython
python__cpython-109859
# re: undocumented exception is raised # Bug report ### Bug description: The `re` module's documentation says it only raises the `re.error` exception, but the regex `"\x00(?<!\x00{2147483648})"` causes RuntimeError: ```python Python 3.11.5 (main, Sep 20 2023, 10:46:56) [GCC 12.2.0] on linux Type "help", "copyright",...
e2b3d831fd2824d8a5713e3ed2a64aad0fb6b62d
ca0f3d858d069231ce7c5b382790a774f385b467
python/cpython
python__cpython-109761
# Crash at finalization after fail to start new thread # Crash report ### What happened? Bisected to e11fc032a75d067d2167a21037722a770b9dfb51, but I guess this issue exists longer, and assertion that is added to `PyThreadState_Clear` by this commit just made it visible. ```python import resource import threading # ...
ca3ea9ad05c3d876a58463595e5b4228fda06936
a264637654f9d3ac3c140e66fd56ee32faf22431
python/cpython
python__cpython-109922
# Include "t" in ABI tag for `--disable-gil` builds # Feature or enhancement Context: * [PEP 703 (Build Configuration Changes)](https://peps.python.org/pep-0703/#build-configuration-changes) * [PEP 3149 – ABI version tagged .so files](https://peps.python.org/pep-3149/#proposal) The `--disable-gil` builds will have...
773614e03aef29c744d0300bd62fc8254e3c06b6
b35f0843fc15486b17bc945dde08b306b8e4e81f
python/cpython
python__cpython-109871
# test_regrtest: test_huntrleaks() fails randomly: leaked [9, 1, 1] references Failure on GHA Windows x86 CI: ``` FAIL: test_huntrleaks (test.test_regrtest.ArgsTestCase.test_huntrleaks) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\a\cpython...
4091deba88946841044b0a54090492a2fd903d42
e5186c3de4194de3ea8c80edb182d786f5e20944
python/cpython
python__cpython-109727
# Python fails to build on WASM: _testcapi/vectorcall_limited.c is built with Py_BUILD_CORE_BUILTIN My PR #109690 broke WASM buildbots. Example with wasm32-emscripten node (dynamic linking) 3.x: https://buildbot.python.org/all/#/builders/1056/builds/3142 ``` /opt/emsdk/upstream/emscripten/emcc -DNDEBUG -g -O3 ...
09a25616a908a028b6373f9ab372d86edf064282
c32abf1f21c4bd32abcefe4d601611b152568961
python/cpython
python__cpython-109722
# `_testinternalcapi` is imported without guards in some test modules # Bug report I found at least three cases where `_testinternalcapi` is just imported, we cannot do that, because other python implementation which reuse our test cases will fail on this. 1. https://github.com/python/cpython/blob/34ddcc3fa118168901...
8ded34a1ff2d355e95213ab72493908f2ca25dd9
8a82bff12c8e6c6c204c8a48ee4993d908ec4b73
python/cpython
python__cpython-109734
# basicblock_addop Assertion: while-else-loop with try # Bug report ### Bug description: ```python while name_5: try: break except: pass else: 1 if 1 else 1 ``` output (Python 3.12.0rc3+): ```python python: Python/flowgraph.c:114: basicblock_addop: Assertion `0 <= oparg && oparg < (1 <...
7c553991724d8d537f8444db73f016008753d77a
73ccfa28c5e6ff68de15fdbb1321d4773a688e61
python/cpython
python__cpython-109710
# test_asyncio.test_subprocess: test_stdin_broken_pipe() failed on GHA Windows x64 CI ``` test_stdin_broken_pipe (test.test_asyncio.test_subprocess.SubprocessProactorTests.test_stdin_broken_pipe) ... FAIL FAIL: test_stdin_broken_pipe (test.test_asyncio.test_subprocess.SubprocessProactorTests.test_stdin_broken_pipe...
cbbdf2c1440c804adcfc32ea0470865b3b3b8eb2
46b63ced2564ad6c3d7b65e0ea1f04fd5c7d2959
python/cpython
python__cpython-109707
# test_multiprocessing_fork: test_nested_startmethod() fails randomly. test_nested_startmethod() fails randomly. Since there is no synchronization, putting items in the queue is not really ordered. I suggest to either accept [1, 2] and [2, 1] in the test, or add some kind of synchronization to ensure that events ha...
b03a791497ff4b3c42805e06c73d08ac34087402
d5611f280403d19befe4a3e505b037d286cf798e
python/cpython
python__cpython-109703
# test_concurrent_futures: test_deadlock failed with timeout on ARM Raspbian 3.x Example: ``` FAIL: test_crash_during_func_exec_on_worker (test.test_concurrent_futures.test_deadlock.ProcessPoolForkserverExecutorDeadlockTest.test_crash_during_func_exec_on_worker) ---------------------------------------------------...
1eb1b45183c3b8aeefe3d5d27694155741e82bbc
4230d7ce93cc25e9c5fb564a0b37e93f19ca0e4e
python/cpython
python__cpython-109694
# Clean-up pyatomic headers # Feature or enhancement Now that https://github.com/python/cpython/issues/108337 is done, we have three atomic headers. We should be able to remove `pycore_atomic.h` and `pycore_atomic_funcs.h` and replace their usages with calls to `pyatomic.h`. cc @vstinner <!-- gh-linked-prs --> ###...
2aceb21ae61b4648b47afd9f8fdba8c106a745d0
5b8f0246834f211db0ea83b89277489abc2521ed
python/cpython
python__cpython-109651
# Improve import time of various stdlib modules # Feature or enhancement ### Proposal: As noted in https://discuss.python.org/t/deferred-computation-evalution-for-toplevels-imports-and-dataclasses/34173, `typing` isn't the slowest stdlib module in terms of import time, but neither is it one of the quickest. We s...
e8be0c9c5a7c2327b3dd64009f45ee0682322dcb
62c7015e89cbdedb5218d4fedd45f971885f67a8
python/cpython
python__cpython-109635
# Use :samp: role The `:samp:` role formats text as literal, but unlike to literal text formatting (``` ``...`` ```) it allows to emphasize variable parts. For example, in ``` ``\xhh`` ``` all letters are in the same font, but in ``` :samp:`\x{hh}` ``` the variable part *hh* is emphasized in italic. It is the same ...
92af0cc580051fd1129c7a86af2cbadeb2aa36dc
5e7ea95d9d5c3b80a67ffbeebd76ce4fc327dd8e
python/cpython
python__cpython-109867
# Short repeated regex patterns can skip signal handling # Bug report ### Bug description: I mentioned regex but this probably applies to other modules as well. In the code below, if the `#` line right after the findall is commented out (as it is right now), the code raises the exception past the try-except bloc...
8ac2085b80eca4d9b2a1093d0a7da020fd12e11a
7c61a361fc2e93375e22849fffbc20b60e94dbde
python/cpython
python__cpython-109630
# basicblock_addop Assertion # Bug report ### Bug description: I found the following error with the latest cpython 3.12 from git (4a0c118d6a4080efc538802f70ee79ce5c046e72), which I build myself with --with-pydebug enabled. source: ```python def get_namespace_uri(): while element and something: try: ...
9ccf0545efd5bc5af5aa51774030c471d49a972b
14cdefa667f211401c9dfab33c4695e80b4e5e95
python/cpython
python__cpython-109626
# Move `test.test_import._ready_to_import` helper to `test.support.import_helper` # Feature or enhancement It is used in `test_import` and `test_inspect`, right now `test_inspect` has to import `test_import` to use this function. Since we try to reduce the amount of test cross-dependencies, it is better to move it to...
115c49ad5a5ccfb628fef3ae06a566f7a0197f97
712cb173f8e1d02c625a40ae03bba57b0c1c032a
python/cpython
python__cpython-111258
# Refresh Screen Provided By `curses.wrapper` Causes Seg Fault (macOS, xcode 15 Apple supplied ncurses 6.0 breakage) # Crash report ### What happened? MacOS began pushing out updates to XCode Command Line Tools to install 15.0 recently. Upon updating I began having issues with `curses`. This happens with the Python ...
08d169f14a715ceaae3d563ced2ff1633d009359
291cfa454b9c5b677c955aaf53fab91f0186b6fa
python/cpython
python__cpython-109935
# test_tools: test_freeze_simple_script() fails on s390x SLES 3.x: [Errno 2] No such file or directory: (...) s390x SLES 3.x: ``` test_freeze_simple_script (test.test_tools.test_freeze.TestFreeze.test_freeze_simple_script) ... ERROR Stdout: creating the script to be frozen at /tmp/test_python_3vf4i07o/tmp7pw_c...
1512d6c6ee2a770afb339bbb74c1b990116f7f89
0e28d0f7a1bc3776cc07e0f8b91bc43fcdbb4206
python/cpython
python__cpython-109618
# os.stat() and os.DirEntry.stat() don't check for fill_time() exception: _Py_CheckSlotResult: Slot * of type int succeeded with an exception set # Bug report ``` $ ./python -m test -v test_tools.test_freeze -u all == CPython 3.12.0rc3+ (heads/3.12-dirty:4a0c118d6a, Sep 20 2023, 16:55:13) [GCC 13.2.1 20230728 (Red ...
d4cea794a7b9b745817d2bd982d35412aef04710
115c49ad5a5ccfb628fef3ae06a566f7a0197f97
python/cpython
python__cpython-109612
# Add convenient C API for flushing a file When working on the replacement of `PySys_GetObject()` I noticed a large number of sites (23) that call the flush() method of a file, check the result for error, and decref the returned object. It takes 7 lines of code and requires a temporary variable. There are many variati...
b8d1744e7ba87a4057350fdfd788b5621095fc59
92af0cc580051fd1129c7a86af2cbadeb2aa36dc
python/cpython
python__cpython-109600
# Expose capsule type in types module # Feature or enhancement ### Proposal: It would be nice if the type of capsule objects was exposed in the `types` module, just like other interpreter types. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhe...
88a6137cdb81c80440d9d1ee7dee17ea0b820f11
bc06743533b5fea2d5ecdad6dd3caa372c67439f
python/cpython
python__cpython-109647
# Make PyComplex_RealAsDouble/ImagAsDouble use __complex__ The C-API docs says: "Return the real/imag part of op as a C double." But the real code looks like: ```c PyComplex_RealAsDouble(PyObject *op) { if (PyComplex_Check(op)) { return ((PyComplexObject *)op)->cval.real; } else { ...
0f2fa6150baf111a6c69d5d491c95c3c2ee60eaf
ac10947ba79a15bfdaa3ca92c6864214648ab364
python/cpython
python__cpython-109606
# Rule name conflict and token marking mistakes in the 3.12.0rc grammar # Bug report ### Bug description: This report was originally launched [here](https://discuss.python.org/t/rule-name-conflict-and-token-reference-mistakes-in-the-3-12-0rc-grammar/34151/3). [grammars](https://github.com/python/cpython/blob/...
b28ffaa193efc66f46ab90d383279174a11a11d7
7c553991724d8d537f8444db73f016008753d77a
python/cpython
python__cpython-109667
# Support python -Xcpu_count=<n> feature for container environment. # Feature or enhancement As https://github.com/python/cpython/issues/80235, there are requests for isolating CPU count in k8s or container environment, and **this is a very important feature these days**. (Practically my corp, a lot of workloads ar...
0362cbf908aff2b87298f8a9422e7b368f890071
5aa62a8de15212577a13966710b3aede46e93824
python/cpython
python__cpython-110018
# test_concurrent_futures.test_wait: test_timeout() failed on ARM Raspbian 3.x The test uses sleep and timeout in seconds (6 and 7 seconds): ```py @support.requires_resource('walltime') def test_timeout(self): future1 = self.executor.submit(mul, 6, 7) future2 = self.executor.submit(time....
9be283e5e15d5d5685b78a38eb132501f7f3febb
0baf72696e79191241a2d5cfdfd7e6135115f7b2
python/cpython
python__cpython-110102
# test_eintr: test_flock() fails with: 0.19043820584192872 not greater than or equal to 0.2 Failure on AMD64 RHEL8 3.x buildbot: ``` FAIL: test_flock (__main__.FNTLEINTRTest.test_flock) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildb...
9c73a9acec095c05a178e7dff638f7d9769318f3
86e76ab8af9a5018acbcdcbb6285678175b1bd8a
python/cpython
python__cpython-109666
# [proposal] Allow "precompiled" perf-trampolines to largely mitigate the cost of enabling perf-trampolines # Feature or enhancement ### Proposal: The perf trampoline feature introduced in #96143 is incredibly useful to gain visibility into the cost of individual Python functions. Currently, there are a few aspect...
21f068d80c6cc5de75f9df70fdd733d0ce9c70de
3d2f1f0b830d86f16f42c42b54d3ea4453dac318
python/cpython
python__cpython-109605
# test_asyncio.test_unix_events: test_fork_signal_handling() fails randomly on Linux/macOS ``` FAIL: test_fork_signal_handling (test.test_asyncio.test_unix_events.TestFork.test_fork_signal_handling) ---------------------------------------------------------------------- Traceback (most recent call last): File "/U...
608c1f3083ea1e06d383ef1a9878a9758903de4b
2aceb21ae61b4648b47afd9f8fdba8c106a745d0
python/cpython
python__cpython-109584
# test_perf_profiler: test_trampoline_works_with_forks() failed on Address Sanitizer CI # Bug report ``` test_trampoline_works_with_forks (test.test_perf_profiler.TestPerfTrampoline.test_trampoline_works_with_forks) ... FAIL FAIL: test_trampoline_works_with_forks (test.test_perf_profiler.TestPerfTrampoline.test_tram...
754519a9f8c2bb06d85ff9b3e9fe6f967ac46d5c
9df6712c122b621dc5a1053ff1eccf0debfb2148
python/cpython
python__cpython-109567
# Unify ways to run the Python test suite There are at least 15 known ways to run the Python test suite. IMO it's too much, it's hard to keep all these code paths consistent. IMO ``python -m test`` should be enough to fit all use cases. Maybe we need a ``--ci``, ``--buildbot``, or ``--strict`` option which would ru...
67d9363372d9b214d9aa1812163866c9804aa55a
f2636d2c45aae0a04960dcfbc7d9a2a8a36ba3bc
python/cpython
python__cpython-109560
# Unicode 15.1 Support # Feature or enhancement ### Proposal: [Unicode 15.1 has recently been released](http://blog.unicode.org/2023/09/announcing-unicode-standard-version-151.html), and the stdlib `unicodedata` and associated tooling should be updated accordingly. An example of a query against the Unicode Characte...
def828995a35a289c9f03500903b5917df93465f
1293fcc3c6b67b7e8d0081863ec6387e162341eb
python/cpython
python__cpython-109915
# Add new states `ATTACHED`, `DETACHED`, `GC` to `PyThreadState` to support PEP 703 # Feature or enhancement To support pausing threads for garbage collection, PEP 703 requires identifying which threads may be accessing Python object internals (like reference counts). Currently, this is effectively controlled by acqu...
6e97a9647ae028facb392d12fc24973503693bd6
9eb2489266c4c1f115b8f72c0728db737cc8a815
python/cpython
python__cpython-109548
# Add more tests for formatting floats and fractions File "formatfloat_testcases.txt" contains test cases for testing printf-like formatting of floats. The same data can be used for testing new-style formatting of floats (they give the same result) and float-style formatting of Fraction (added in 3.12). cc @mdickin...
beb5ec5817b645562ebbdd59f25683a93061c32c
c829975428253568d47ebfc3104fa7386b5e0b58
python/cpython
python__cpython-109544
# typing.TypedDict: unnecessary hasattr check These lines: https://github.com/python/cpython/blob/412f5e85d6b9f2e90c57c54539d06c7a025a472a/Lib/typing.py#L2889-2890 ```python if not hasattr(tp_dict, '__total__'): tp_dict.__total__ = total ``` go out of their way to account for the case t...
d8ce092fe4e98fec414f4e60cfc958b3ac3ec9a3
89d8b2d14bb6f7e5c4565b5c3f56d917e6134c89
python/cpython
python__cpython-111983
# 3.11.5 regression: StreamWriter.__del__ fails if event loop is already closed # Bug report ### Bug description: PR #107650 added a `StreamWriter.__del__` that emits a ResourceWarning if a StreamWriter is not closed by the time it is garbage collected, and it has been backported as 3.11.5. However, if the event loo...
e0f512797596282bff63260f8102592aad37cdf1
fe9db901b2446b047e537447ea5bad3d470b0f78
python/cpython
python__cpython-109522
# Problems with PyImport_GetImporter() # Bug report 1. `PyImport_GetImporter()` can return NULL with set or not set error. The latter happens only if `sys.path_hooks` or `sys.path_importer_cache` was deleted, or in more obscure cases: when string allocation for strings "path_hooks" or "path_importer_cache" fail, or t...
62c7015e89cbdedb5218d4fedd45f971885f67a8
b8d1744e7ba87a4057350fdfd788b5621095fc59
python/cpython
python__cpython-109516
# freeze_modules.py on windows hits command line limits when number of frozen modules grows # Bug report ### Bug description: frozen_modules.py machinery invokes deepfreeze.py passing modules to be frozen on the command line. If the number of modules is high enough, the command line is truncated and deepfreeze.py fa...
8eaa206feccc913d172027a613d34a50210f4511
6dfb8fe0236718e9afc8136ff2b58dcfbc182022
python/cpython
python__cpython-109696
# Doctest - No clear guidance on how to use the "Option Flag" and and the explanation of "Which Docstrings Are Examined" is ambiguos. # Documentation Which Docstrings Are Examined :- The issue with the provided documentation lacks clarity and precision. It doesn’t clearly specify what “is true” means in the contex...
bcc941bd4a7fbed3b20f5a5fc68b183fda1506a5
63acf78d710461919b285213fadc817108fb754e
python/cpython
python__cpython-109506
# `test_asyncio` has several expired `hasattr` checks # Bug report The first one: https://github.com/python/cpython/blob/e57ecf6bbc59f999d27b125ea51b042c24a07bd9/Lib/test/test_asyncio/test_events.py#L2338-L2340 From: https://github.com/python/cpython/commit/8dc3e438398046c6bb989e038cd08280aa356982 I cannot think of ...
0d20fc7477a21328dd353071eaa06384bb818f7b
b10de68c6ceae1076cdc98c890b9802dc81a7f44
python/cpython
python__cpython-109539
# Calling `Py_DECREF` twice does not result in error with debug build # Bug report ### Bug description: [Documented behavior](https://github.com/python/cpython/blob/d6892c2b9263b39ea1c7905667942914b6a24b2c/Misc/SpecialBuilds.txt#L30) of Py_REF_DEBUG includes: > Py_REF_DEBUG also checks after every decref to verify ...
0bb0d88e2d4e300946e399e088e2ff60de2ccf8c
ef659b96169888e52b6ff03ce28fffaaa8f76818
python/cpython
python__cpython-109494
# _pydatetime.datetime has extra unnecessary slots # Bug report ### Bug description: Pre patch ```py from _pydatetime import datetime import sys sys.getsizeof(datetime(1970, 1, 1)) # 152 ``` Post patch ```py from _pydatetime import datetime import sys sys.getsizeof(datetime(1970, 1, 1)) # 120 ``` I had a look ro...
7d57288f6d0e7fffb2002ceb460784d39277584a
20bc5f7c28a6f8a2e156c4a748ffabb5efc7c761
python/cpython
python__cpython-109486
# Further improve `test_future_stmt` # Bug report Based on the review of @vstinner in https://github.com/python/cpython/pull/109368#pullrequestreview-1628376115 I propose to: 1. Replace `badsyntax_future` files with regular code samples, so we can more easily manage them 2. Keep at lest one file to be sure that it a...
94c95d42a3b74729ee775f583fb7951f05d16c77
59f32a785fbce76a0fa02fe6d671813057714a0a