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-118311
# Incorrect example in docs for enum.Enum.__new__ # Documentation In the documentation for [3.12](https://docs.python.org/3.12/library/enum.html#enum.Enum.__new__) and [3.13](https://docs.python.org/3.13/library/enum.html#enum.Enum.__new__) the example is incorrect for the documentation of `enum.Enum.__new__`. Q...
48e52fe2c9a7b33671f6b5d1420a71a6f31ad64b
44a9f3db2b40ba41999002799a74e6b6f2a3a50a
python/cpython
python__cpython-118307
# Update JIT compilation to use LLVM 18 Today, the JIT compiles using LLVM 16 so we should consider updating to a later version. <!-- gh-linked-prs --> ### Linked PRs * gh-118307 <!-- /gh-linked-prs -->
8b56d82c59c2983b4292a7f506982f2cab352bb2
8e4fb5d260e529c9d4ca60980225fbd00dd5c3c8
python/cpython
python__cpython-118298
# _Py_FinishPendingCalls() Doesn't Necessarily Run All Remaining Pending Calls # Bug report ### Bug description: In Python/ceval_gil.c, `_Py_FinishPendingCalls()` calls `make_pending_calls()` once. `make_pending_calls()` will fail with the first pending call that fails (returns a non-zero value), leaving any remain...
985dd8e17b55ae35fc31546384fc9364f2f59f86
6522f0e438a8c56a8f3cce2095b193ea6e3f5016
python/cpython
python__cpython-118315
# Spawning multiprocessing workers on Windows changes mouse cursor # Bug report ### Bug description: The multiprocessing module uses the CreateProcess function on Windows to spawn processes, which has a flag for controlling whether Windows should display feedback to the user in the form of the "Working in Background...
133c1a7cdb19dd9317e7607ecf8f4fd4fb5842f6
f5b7e397c0a0e180257450843ab622ab8783adf6
python/cpython
python__cpython-118316
# Fix inspect.signature() of operator.{attrgetter,itemgetter,methodcaller} instances # Bug report ### Bug description: On Python 3.12.3 and 3.11.9, it looks like the `inspect.Signature` object for operator's `attrgetter`, `itemgetter`, and `methodcaller` classes doesn't match their `__call__` method signature: ...
444ac0b7a64ff6b6caba9c2731bd33151ce18ad1
51c70de998ead35674bf4b2b236e9ce8e89d17b4
python/cpython
python__cpython-118277
# Generator .close does not release resources # Bug report ### Bug description: Sending a generator `.close()` in Python 3.12 does not release resources used by local variables as it used to do in earlier versions of Python. Wrapping the generator content in a `try: ... except GeneratorExit: pass` releases the resou...
1f16b4ce569f222af74fcbb7b2ef98eee2398d20
f7747f73a9d9b9b1661c1a69cd8d934d56bbd3b3
python/cpython
python__cpython-118273
# Support more options for reading/writing images in Tkinter # Feature or enhancement PhotoImage has method `write()` which writes the image (or its part) to the file. But it lacks methods for two other related subcommand -- `read`, to read the image from the file, and `data`, to get the image data. I propose to add ...
709ca90a00e66cea432096a7ba61aa6459d2a9a7
fc50f1bdbad3aa52d7cbd3cb836a35806266ec54
python/cpython
python__cpython-118355
# Generalize `path_t` for C level optimizations # Feature or enhancement ### Proposal: Quoting @eryksun: > The implementation of `path_t` could be generalized to support fields to configure the converter to use `wide` regardless of platform, to allow null characters, to allow arbitrary length paths (e.g. no 3...
96b392df303b2cfaea823afcb462c0b455704ce8
f0ed1863bd7a0b9d021fb59e156663a7ec553f0e
python/cpython
python__cpython-118536
# Skip individual tests (not entire files) when running emulated JIT CI Since we don't have AArch64 runners, four JIT CI jobs are [run under emulation](https://github.com/python/cpython/blob/345e1e04ec72698a1e257c805b3840d9f55eb80d/.github/workflows/jit.yml#L126-L144). Unfortunately, our test suite wasn't exactly d...
52485967813acdb35c274e1b2eaedd34e9ac01fc
9c14ed06188aa4d462cd0fc4218c6023f9bf03cb
python/cpython
python__cpython-118247
# JIT CI is broken due to `test_pathlib` and `test_posixpath` Looks like something in emulation/QEMU changed and now `test_pathlib` and `test_posixpath` are causing the GHA workflow to fail for Linux Arm. <!-- gh-linked-prs --> ### Linked PRs * gh-118247 <!-- /gh-linked-prs -->
8942bf41dac49149a77f5396ab086d340de9c009
93b7ed7c6b1494f41818fa571b1843ca3dfe1bd1
python/cpython
python__cpython-118237
# Full Grammar specification lists invalid syntax The [Full Grammar specification](https://docs.python.org/3.13/reference/grammar.html) lists these production rules: ``` type_param: | NAME [type_param_bound] | '*' NAME ':' expression | '*' NAME | '**' NAME ':' expression | '**' NAM...
ef940dec409f0a9e4f353c6188990aeb3ad4ffb4
09c29475813ff2a763931fc0b45aaaef57cd2ac7
python/cpython
python__cpython-118228
# Support more options for copying images in Tkinter # Feature or enhancement Tk's photo image has the copy subcommand which supports a number of options, https://www.tcl.tk/man/tcl8.4/TkCmd/photo.htm#M17 ``` imageName copy sourceImage ?option value(s) ...? Copies a region from the image called ...
1b639a04cab0e858d90e2ac459fb34b73700701f
09871c922393cba4c85bc29d210d76425e076c1d
python/cpython
python__cpython-118223
# Unable to call iterdump method for Sqlite3 connections # Bug report ### Bug description: ```python import sqlite3 def dict_factory(cursor, row): d = {} for idx, col in enumerate(cursor.description): d[col[0]] = row[idx] return d def main(): conn = sqlite3.connect(":memory:") cur = c...
e38b43c213a8ab2ad9748bac2732af9b58c816ae
796b3fb28057948ea5b98f7eb0c0f3af6a1e276e
python/cpython
python__cpython-118219
# Speed up itertools.pairwise The pairwise implementation mentions that we can reuse the result tuple There's currently some discussion of performance ongoing at https://discuss.python.org/t/nwise-itertools/51718 <!-- gh-linked-prs --> ### Linked PRs * gh-118219 <!-- /gh-linked-prs -->
6999d68d2878871493d85dc63599f3d44eada104
b568c2c1ff5c0b1922a6402dc95c588d7f9aa914
python/cpython
python__cpython-118267
# `__future__` imports allow dots before them # Bug report ### Bug description: `__future__` imports don't check the amount of dots while checking `from`-`import` nodes for the module name, so they are still valid even if dots are put before the module name. ```pycon >>> from .__future__ import barry_as_FLUFL Traceb...
7c97dc8c9594c71bd3d1f69758a27de45f57e4c3
67bba9dd0f5b9c2d24c2bc6d239c4502040484af
python/cpython
python__cpython-118213
# mmap lacks error handling (SEH) on Windows which can lead to interpreter crashes # Crash report ### What happened? `mmap` reads and writes require structured exception handling (SEH) for correct handling of errors (like hardware read issues, or disk full write issues) on Windows. See <https://learn.microsoft.c...
e85e8deaf3220c8d12b69294e45645aaf20187b9
7e6fcab20003b07621dc02ea78d6ea2fda500371
python/cpython
python__cpython-118208
# COMMON_FIELDS macro in funcobject.h leaks to user code # Bug report ### Bug description: the `COMMON_FIELDS` macro is defined [here](https://github.com/python/cpython/blob/7e87d30f1f30d39c3005e03195f3d7648b38a1e2/Include/cpython/funcobject.h#L11-L19), and can end up being included in user code (via `Python.h`). "...
796b3fb28057948ea5b98f7eb0c0f3af6a1e276e
546cbcfa0eeeb533950bd49e30423f3d3bbd5ebe
python/cpython
python__cpython-118452
# Intermittent "unrecognized configuration name" failure on iOS and Android # Bug report ### Bug description: The iOS buildbot is seeing an intermittent testing failure in `test_posix.PosixTester.test_confstr: ```python ====================================================================== ERROR: test_confstr (tes...
9c468e2c5dffb6fa9811fd16e70fa0463bdfce5f
7fabcc727dee52a3e0dfe4f903ad414e93cf2dc9
python/cpython
python__cpython-124473
# AST docs: Fix parameter markup https://github.com/python/cpython/pull/116129#discussion_r1575794751 I'll try to do this in a bit, but if someone else gets to it first, feel free to pick it up. <!-- gh-linked-prs --> ### Linked PRs * gh-124473 * gh-124600 * gh-124705 <!-- /gh-linked-prs -->
09aebb1fbc0c1d771d4942844d5e2077fcdf56c9
274d9ab619b8150a613275835234ea9ef935f21f
python/cpython
python__cpython-118169
# Incorrect argument substitution on Unpack[tuple[...]] # Bug report ### Bug description: In the code below, all of the prints should be equivalent: ```python from typing import Generic, Tuple, TypeVarTuple, Unpack Ts = TypeVarTuple("Ts") class Old(Generic[*Ts]): ... class New[*Ts]: ... PartOld = Old[int, *Ts] p...
d0b664ee065e69fc4f1506b00391e093d2d6638d
d687d3fcfaa13b173005897634fc5ab515c8a660
python/cpython
python__cpython-118483
# str(10**10000) hangs if the C `_decimal` module is missing # Bug report ### Bug description: The following code ```python >>> import sys; sys.set_int_max_str_digits(0); 10**10000 ``` works in 3.11 but hangs in 3.12. Interrupting it gives this backtrace: ``` File "<stdin>", line 1, in <module> File "/usr/lib/py...
711c80bfca5dd17cb7c6ec26f0e44848b33aec04
5dd36732c850084ce262b7869ed90d73a281296a
python/cpython
python__cpython-118149
# Improve tests for shutil.make_archive() While working on my idea for #80145, I noticed that not all combinations of None and not-None `root_dir` and `base_dir` are tested. The proposed PR expands the tests. <!-- gh-linked-prs --> ### Linked PRs * gh-118149 * gh-118151 <!-- /gh-linked-prs -->
287d939ed4445089e8312ab44110cbb6b6306a5c
a6647d16abf4dd65997865e857371673238e60bf
python/cpython
python__cpython-118141
# ``test_concurrent_futures.test_init`` prints unnecessary information # Bug report ### Bug description: ```python ./python.exe -m test -q test_concurrent_futures -m test_init Using random seed: 2943892526 0:00:00 load avg: 2.95 Run 8 tests sequentially . -------------------------------------------------------------...
d687d3fcfaa13b173005897634fc5ab515c8a660
de1f6868270d31f56c388ef416daacd35feb152d
python/cpython
python__cpython-118132
# Command-line interface for the `random` module # Feature or enhancement ### Proposal: Many stdlib libraries have a simple CLI: * https://docs.python.org/3/library/cmdline.html Some of my favourites: ```console $ python3 -m http.server Serving HTTP on :: port 8000 (http://[::]:8000/) ... $ python3 -m webbrowser...
3b32575ed6b0905f434f9395d26293c0ae928032
fed8d73fde779fca41026398376cb3038e9b2b5f
python/cpython
python__cpython-118122
# `test_doctest.test_look_in_unwrapped` does not test anything # Bug report Here's a test that ensures that `Wrapper` on top of it handles `__doc__` correcty: https://github.com/python/cpython/blob/d8f350309ded3130c43f0d2809dcb8ec13112320/Lib/test/test_doctest/test_doctest.py#L2539-L2554 The problem is that it d...
ccda73828473576c57d1bb31774f56542d6e8964
5fa5b7facbcd1f725e51daf31c321e02b7db3f02
python/cpython
python__cpython-118120
# Re-use `sep` in `posixpath.expanduser()` # Feature or enhancement ### Proposal: We can replace `root` with the already assigned `sep` from earlier: ```diff if isinstance(path, bytes): userhome = os.fsencode(userhome) - root = b'/' -else: - root = '/' -userhome = userhome.rstrip(root) -return (userhome +...
6f768b71bab837c6c4aac4d3ddd251e55025fe0b
1e428426c836b9a434810a6b99f70454d3a9611e
python/cpython
python__cpython-118108
# zipimport.zipimporter breaks for zips containing files with size > 0xFFFFFFFF # Bug report ### Bug description: The following test in the Pex project fails under CPython 3.13.0a6: https://github.com/pex-tool/pex/blob/27c2db2bf26039bef41323c964bc4e0317a7b4f5/tests/test_pex_builder.py#L520-L547 The failure includes...
49258efada0cb0fc58ccffc018ff310b8f7f4570
698417f2f677b7b9373f8a2f202b6c18870bf3c2
python/cpython
python__cpython-118101
# Improve links in `ast.rst` # Bug report There are two problems: 1. https://github.com/python/cpython/blob/15b3555e4a47ec925c965778a415dc11f0f981fd/Doc/library/ast.rst#L2539 but https://leoeditor.com/appendices.html#leoast-py does not exist anymore, correct link is https://leo-editor.github.io/leo-editor/appendices....
2aa11cca115add03f39cb6cd7299135ecf4d4d82
1e4a4c4897d0f45b1f594bc429284c82efe49188
python/cpython
python__cpython-118091
# Improve `class A[]: ...` syntax error message # Feature or enhancement Right now it will generate this default error: ```python >>> class A[]: ... File "<stdin>", line 1 class A[]: ... ^ SyntaxError: invalid syntax >>> def some[](arg: int) -> None: ... File "<stdin>", line 1 def some[](arg:...
b60d4c0d53b6aafbf4a6e560b4cb6f1d5c7240c8
04859228aa11756558807bcf99ccff78e4e8c56d
python/cpython
python__cpython-118083
# Improve `from x import` error message # Feature or enhancement While reading new ruff release notes: https://astral.sh/blog/ruff-v0.4.0 I found that it has a new nice parser feature that we can addopt. Before: ```python >>> from x import File "<stdin>", line 1 from x import ^ SyntaxError: in...
de1f6868270d31f56c388ef416daacd35feb152d
eb927e9fc823de9539fcb82c9ea9d055462eb04a
python/cpython
python__cpython-118081
# ``test_import`` raises a ``DeprecationWarning`` # Bug report ### Bug description: ```python ./python.exe -m test -q test_import Using random seed: 828001900 0:00:00 load avg: 15.22 Run 1 test sequentially /Users/admin/Projects/cpython/Lib/unittest/case.py:707: DeprecationWarning: It is deprecated to return a value...
8d4a244f1516dcde23becc2a273d30c202237598
1e3e7ce11e3b0fc76e981db85d27019d6d210bbc
python/cpython
python__cpython-118117
# global-buffer-overflow in test_opt.py # Crash report ### What happened? Hello when building cpython with address sanitizer test_opt.py crashed with a global-buffer-overflow, I will add build flags, reduced code that causes crash. https://github.com/python/cpython/blob/main/Lib/test/test_capi/test_opt.py ```sh ./...
7e87d30f1f30d39c3005e03195f3d7648b38a1e2
258408239a4fe8a14919d81b73a16e2cfa374050
python/cpython
python__cpython-118278
# The "finder" Glossary Entry May Need Updating # Documentation I'm referring to https://docs.python.org/3.13/glossary.html#term-finder. (There are probably other import-related glossary entries that could use a similar update.) <details> <summary>(expand for extra context)</summary> ---- The glossary ...
db009348b4b7a4b0aec39472ea074c1b5feeba9b
48f21b3631eb20871fe234e9714b19aa76cf3a49
python/cpython
python__cpython-118137
# Problem with config cache of WASI [This workflow](https://github.com/python/cpython/actions/runs/8723744945/job/23932686454?pr=117855) on #117855 keeps failing. It asks to delete the cache, which I obviously can't do. How should this be fixed? Prune the cache or update the workflow? ```none Run python3 Tools/was...
456c29cf85847c67dfc0fa36d6fe6168569b46fe
8e86579caef59fad0c54ac698d589f23a7951c55
python/cpython
python__cpython-117933
# Call stats are incorrect for tier 2 and maybe for tier 1 as well # Bug report ### Bug description: The call stats for tier 2 differ significantly from tier 1, but it is not clear that the tier 1 call stats are correct either. The main purpose of the call stats is to track the fraction of Python frames that are cr...
40f4d641a93b1cba89be4bc7b26cdb481e0450d5
81a926bd20a8c66646e51b66ef1cfb309b73ebe7
python/cpython
python__cpython-118099
# `dataclasses`: 3.12.3 regression with `weakref_slot` # Bug report ### Bug description: The `__weakref__` slot is not set for classes that have a `Generic[T]` base. ```python from typing import Generic, TypeVar from dataclasses import dataclass T = TypeVar("T") @dataclass(slots=True, weakref_slot=True) class Tok...
fa9b9cb11379806843ae03b1e4ad4ccd95a63c02
e8cbcf49555c694975a6af56b5cb0af7817e889e
python/cpython
python__cpython-118154
# Don't needlessly repeat Sphinx directives # Documentation If you repeat Sphinx directives they are separated by an empty line. For example: https://github.com/python/cpython/blob/f70395786f6da2412d7406606feb64347fc71262/Doc/library/typing.rst?plain=1#L1974-L1975 Renders with a newline: ![image](https://g...
78ba4cb758ba1e40d27af6bc2fa15ed3e33a29d2
287d939ed4445089e8312ab44110cbb6b6306a5c
python/cpython
python__cpython-118503
# _pydecimal.Decimal.__pow__ tries to compute 10**1000000000000000000 and thus doesn't terminate # Bug report ### Bug description: `decimal.Decimal(2) ** 117` does not terminate when using the pure Python implementation `_pydecimal.py` of the `decimal` module, and setting the precision to `MAX_PREC`: ```pytho...
999f0c512281995fb61a0d9eda075fd846e8c505
08d169f14a715ceaae3d563ced2ff1633d009359
python/cpython
python__cpython-118025
# ``test_compile`` leaks references # Bug report ### Bug description: ```python ./python.exe -m test -R 3:3 test_compile Using random seed: 3846844224 0:00:00 load avg: 4.57 Run 1 test sequentially 0:00:00 load avg: 4.57 [1/1] test_compile beginning 6 repetitions. Showing number of leaks (. for 0 or less, X for 10 o...
cd7cf155886cea880c1e80d4313f35f8af210b5e
b848b944bb4730ab4dcaeb15b0b1713c3f68ec7d
python/cpython
python__cpython-118202
# [3.12] getattr_static can result in reference leaks # Bug report ### Bug description: I discovered this bug while working on https://github.com/pytorch/pytorch/issues/124302. It looks like calling `getattr_static` is causing an object to be reference leaked: ```python import gc from inspect import getatt...
8227883d1f1bbb6560e5f175d7ee49f013c094bd
83235f7791fbe6ee2618192f2341de9cd22d0511
python/cpython
python__cpython-118001
# sqlite3 seems to consider `?1` a named placeholder # Bug report ### Bug description: Starting in python 3.12, the following snippet generates a deprecation warning: ```python import sqlite3 db = sqlite3.connect(':memory:') db.execute('CREATE TABLE a (b, c)') db.execute('INSERT INTO a (b, c) VALUES (?2, ?1)', [3,...
550483b7e6c54b2a25d4db0c4ca41bd9c1132f93
8b541c017ea92040add608b3e0ef8dc85e9e6060
python/cpython
python__cpython-117993
# Restore removed Py_SetProgramName() and PySys_SetArgv() functions My Fedora team identified that the removal of "Python initialization" functions impacts at least 17 projects. I propose to restore them to give more time to impacted projects to be updated to the new [PEP 587 PyConfig API](https://peps.python.org/pep-...
340a02b590681d4753eef0ff63037d0ecb512271
0a0756c5edd8c32783a39ef00c47fe4a54deecbc
python/cpython
python__cpython-120233
# GH-114781 potentially breaks gevent: threading becomes pre-imported at startup # Bug report ### Bug description: Hello up there. I've discovered that starting from CPython >= 3.11.10 gevent-based applications become potentially broken because, in a venv with gevent installed, `threading` module becomes pre-import...
94f50f8ee6872007d46c385f7af253497273255a
e245ed7d1e23b5c8bc0d568bd1a2f06ae92d631a
python/cpython
python__cpython-117978
# `os.chmod()`, `os.chown()` & `os.listdir()` weren't added in Python 3.3 # Documentation The documentation of these functions states they were added in Python 3.3: - [os.chmod()](https://docs.python.org/3.13/library/os.html#os.chmod) > New in version 3.3: Added support for specifying path as an open file d...
fccedbda9316d52d93b2db855c07f947fab26ae2
5a0209fc23de113747058858a4d2e5fc8213711e
python/cpython
python__cpython-117976
# If a flush level is specified as a text value in a logging configuration dictionary, `dictConfig()` does not convert it to a numeric value. # Bug report ### Bug description: If setting up e.g. a `MemoryHandler` with a `flushLevel` using a configuration dictionary like this: ```python { # other elements omitted ...
6d0bb43232dd6ebc5245daa4fe29f07f815f0bad
b9b3c455f0293be67a762f653bd22f864d15fe3c
python/cpython
python__cpython-117982
# Add tests for the PyEval_Run family of the C API Functional tests for the `PyEval_Run` family of the C API lack tests. Discovered in the discussions of PR #116637. - [ ] `PyRun_AnyFile` (may be a macro) - [ ] `PyRun_AnyFileEx` (may be a macro) - [ ] `PyRun_AnyFileExFlags` - [ ] `PyRun_AnyFileFlags` (may be a macro)...
6078f2033ea15a16cf52fe8d644a95a3be72d2e3
c1d7147c820545bb0a97a072fdba82154fd97ab6
python/cpython
python__cpython-117959
# Expose jit_code field for UOp Executor # Feature or enhancement ### Proposal: I would like to add a method to the UOpExecutor type to expose the JIT code via a byte string using the `jit_code` and `jit_size` fields of the executor object. This would be useful for testing and debugging, as well as verification ...
beb653cc24275025708758d444835db2ddbb74e4
4a08a75cf4c490f7c43ede69bdf6e5a79c6a3af3
python/cpython
python__cpython-117947
# `os.path.ismount()` wasn't added in Python 3.4 # Documentation The [documentation](https://docs.python.org/3.13/library/os.path.html#os.path.ismount) of os.path.ismount() states it was added in Python 3.4: > New in version 3.4: Support for detecting non-root mount points on Windows. That's clearly wrong, it...
a23fa3368e50866f31d6fc1c66a9a5ca2a580239
dd4383f3c12fc938a445d974543f897c3fc07c0a
python/cpython
python__cpython-117931
# C API: Restore removed PyEval_InitThreads() function Since Python 3.7, PyEval_InitThreads() does nothing, since the GIL is now always created: https://vstinner.github.io/python37-gil-change.html This function is deprecated since Python 3.9 and I removed it in Python 3.13 alpha1. Problem: my Fedora team identified...
75eed5b3734edb221cabb8322d8b8bdf9e3ee6b1
6d0bb43232dd6ebc5245daa4fe29f07f815f0bad
python/cpython
python__cpython-117924
# ``test_webbrowser`` prints unnecessary information # Bug report ### Bug description: ```python ./python.exe -m test -v test_webbrowser -m test_parse_args_error == CPython 3.13.0a6+ (heads/main:2cc916e147, Apr 16 2024, 11:08:11) [Clang 15.0.0 (clang-1500.1.0.2.5)] == macOS-14.2.1-arm64-arm-64bit-Mach-O little-endia...
8123c34faa5aab20edc268c7f8a81e6a765af366
c69968ff69b59b27d43708379e4399f424f92075
python/cpython
python__cpython-117922
# test_inspect: ValueError: no signature found for builtin <built-in function getobjects> # Bug report ### Bug description: ### Configuration: ```sh ./configure --with-trace-refs ``` ### Tests ```python ./python -m test test_inspect ``` Output: ```python sing random seed: 1177238287 0:00:00 load avg: 2.78 Run 1 test...
44890b209ebe2efaf4f57eed04967948547cfa3b
8429b4565deaef7a86bffc0ce58bc0eab1d7ae48
python/cpython
python__cpython-117925
# Documentation says that static methods can be called as regular functions, but I don't see how from the documentation # Documentation The [documentation](https://docs.python.org/3/library/functions.html#staticmethod:~:text=Moreover%2C%20they%20can%20be%20called%20as%20regular%20functions%20(such%20as%20f()).) sta...
b3372481b6cae5766330b041c4622c28cee2119f
7d2ffada0a6490e6839697f729bcd80380e9f561
python/cpython
python__cpython-118007
# _PyCompile_CodeGen compiles nested function all the way to code object # Bug report The ``_PyCompile_CodeGen`` test utility is supposed to run only codegen and return an instruction sequence. However, it compiles nested functions all the way to code object. Need to teach it how to return the instruction sequence fo...
0aa0fc3d3ca144f979c684552a56a18ed8f558e4
692e902c742f577f9fc8ed81e60ed9dd6c994e1e
python/cpython
python__cpython-117893
# test_peg_generator fails on a PGO+LTO build with clang # Bug report Example on aarch64 Debian Clang LTO + PGO 3.x: https://buildbot.python.org/all/#/builders/1084/builds/4019 ``` 0:02:04 load avg: 5.35 [290/473/1] test_peg_generator failed (22 errors) -- running (2): test_io (32.6 sec), test_socket (32.8 sec) (......
64cd6fc9a6a3c3c19091a1c81cbbe8994583017d
784e076a10e828f383282df8a4b993a1b821f547
python/cpython
python__cpython-117882
# async generator allows concurrent access via async_gen_athrow_throw and async_gen_asend_throw # Bug report ### Bug description: ```python import types import itertools @types.coroutine def _async_yield(v): return (yield v) class MyExc(Exception): pass async def agenfn(): for i in ite...
fc7e1aa3c001bbce25973261fba457035719a559
2520eed0a529be3815f70c43e1a5006deeee5596
python/cpython
python__cpython-117932
# test_httpservers: OSError: [Errno 39] Directory not empty ### Bug description: ### Configuration: ```sh ./configure --enable-profiling ``` ### Tests ```python ./python -m test test_httpservers -v ``` Output: ```python == CPython 3.13.0a6+ (heads/main:e01831760e, Apr 14 2024, 23:35:24) [GCC 13.2.1 20230801...
8429b4565deaef7a86bffc0ce58bc0eab1d7ae48
8515fd79fef1ac16d7848cec5ec1797294cb5366
python/cpython
python__cpython-134868
# asyncgen.athrow() checks args on asyncgen.athrow().send() but should check them on asyncgen.athrow() # Bug report ### Bug description: ```python async def agen(): return yield try: athrow = agen().athrow() athrow.close() except TypeError: print("good") else: print("bad") ``` output: ```...
b6237c3602075294a18dec821773429a51fa7e0d
9c72658e49806eae52346a0905c1c176d3d49a2f
python/cpython
python__cpython-117870
# readline module fails to build against recent libedit # Bug report ### Bug description: Building Python 3.13.0a6 configured with `--with-readline=editline` fails like this for me: ```pytb ./Modules/readline.c:1305:21: error: incompatible function pointer types assigning to 'rl_hook_func_t *' (aka 'int (*)(vo...
8515fd79fef1ac16d7848cec5ec1797294cb5366
f74e51229c83e3265f905dc15283bfe0ec1a659e
python/cpython
python__cpython-117843
# Shlex docs: improper syntax highlighting in code snippet # Snippet displays improper syntax highlight In docs `shlex` of subtitle `Improved Compatibility with Shells`(https://docs.python.org/3/library/shlex.html#improved-compatibility-with-shells) ,the first snippet doesn't highlight properly.It should be highlig...
dd724239dd759879b9b6981114db25256449fc42
37a4cbd8727fe392dd5c78aea60a7c37fdbad89a
python/cpython
python__cpython-117869
# Don't call `lookdict_index` in `delitemif_lock_held` The `delitemif_lock_held` function calls `lookdict_index` and passes the returned `hashpos` to `delitem_common`. We should just pass the actual `hash` to `delitem_common`. The existing code is confusing and unnecessary, but it's not exactly a bug. The behavior ...
7bcc257e97ee080d1128788a12a1731afde26b0a
74b0658e6aa6d304cf1dffeab52a30d706ecce47
python/cpython
python__cpython-117796
# PGO: compiler warnings for source files with no profile data PGO builds do not generated profile data for all source files. This means that for a PGO build, you may end up with compiler warnings for source files with no profile data. Do we want to silence these warnings? If we do, it _may_ be harder to spot if PGO b...
ed02eb6aa99ea27f57d0a3c303d8e825d8ef6d9c
644b1e7aac8f048ade4709f248c4d66b85800efc
python/cpython
python__cpython-117798
# Improve `test_descr.test_not_implemented` # Bug report Right now there are several problems that can be attributed to the long history of this test. 1. `operator` name here is not needed: https://github.com/python/cpython/blob/396b831850f0f364d584db4407a5d633f33e571c/Lib/test/test_descr.py#L4604 2. `rname` here is ...
1a1e013a4a526546c373afd887f2e25eecc984ad
2cc916e14797f34c8ce75213ea4f1e8390049c75
python/cpython
python__cpython-117788
# configure script is run with /bin/sh, but contains GNU bash logic # Bug report ### Bug description: I just build the python 3.13 alpha on Gentoo to have available for testing. While doing so, I discovered the following message from Gentoo's QA framework: ``` * QA Notice: Abnormal configure code * * ./configur...
fd2bab9d287ef0879568662d4fedeae0a0c61d43
f268e328ed5d7b2df5bdad39691f6e4789a2fcde
python/cpython
python__cpython-117814
# venv with Windows Store base does not have correct sys.path # Bug report Appears to be new in 3.13.0a6, as I've been using it with a5 and it's only after updating that I noticed. Basically, the venv's prefix and site-packages directories are not present in `sys.path` when the base interpreter is from a Store insta...
4b10e209c76f9f36f8ae2e4d713b3a01591c1856
8942bf41dac49149a77f5396ab086d340de9c009
python/cpython
python__cpython-117785
# Allow CPython to build against cryptography libraries lacking post-handshake authentication # Feature or enhancement ### Proposal: As part of a series of changes [discussed on the python Ideas board](https://discuss.python.org/t/support-building-ssl-and-hashlib-modules-against-aws-lc/44505/6), this issue propo...
56a3ce2715509fc8e42ae40ec40ce6a590448da4
8d0cafd6f23777e0e5defa65e3da048db9368ca7
python/cpython
python__cpython-118112
# Temporarily immortalize objects that use deferred reference counting # Feature or enhancement Work is ongoing to implement [deferred reference counting](https://peps.python.org/pep-0703/#deferred-reference-counting) in the free-threaded build. The goal is to avoid many of the scaling bottlenecks caused by reference...
7ccacb220d99662b626c8bc63b00a27eaf604f0c
8d4b756fd31d4d91b55105b1241561e92cc571a3
python/cpython
python__cpython-129254
# inconsistent handling of duplicate ZipFile entries # Bug report ### Bug description: Create a ZIP file with duplicate central directory entries pointing to the same local file header (these can be found in the wild, see e.g. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068705, this is just an easy way to cre...
0f04f2456a2ff996cc670342a287928ab5f9b706
ac3c439cdfee8452f2bcceacd67a1f4e423ac3cf
python/cpython
python__cpython-121755
# Make `mocker.patch.dict` documentation clearer on actual behavior # Documentation The docs for [`patch.dict`](https://docs.python.org/3/library/unittest.mock.html#unittest.mock.patch.dict) method is: `Patch a dictionary, or dictionary like object, and restore the dictionary to its original state after the tes...
8303d32ff55945c5b38eeeaf1b1811dbcf8aa9be
48042c52a6b59089e7d7dda3c8fed79d646b6f8d
python/cpython
python__cpython-117768
# Add more signatures for builtin functions and methods # Feature or enhancement #117671 adds many signatures for builtin functions and methods. But not all of them need support of multi-signatures. I opened this issue to add signatures for builtin objects which do not require new features. <!-- gh-linked-prs --> ##...
6e05537676da56b37ba0c9dbb459b60422918988
deb921f85173a194afb4386553d85c3f99767ca1
python/cpython
python__cpython-117763
# The trashcan mechanism could be streamlined The trashcan mechanism is over 20 years old and the code could do with a bit of streamlining. There is a lot of indirection and a fair bit of redundancy as it implements its own depth counter. Reworking the code to use the C recursion counter and removing most of the c...
147cd0581e35a10204776029aeaa7fa1901056bc
c917b3e8e113a3e1ffe118e581fac29eaf365191
python/cpython
python__cpython-123266
# Document the new incremental GC # Documentation - [x] Expand the "what's new" section a bit. - [x] Update Doc/library/gc.rst, speciifically how the thresholds work now. - [x] Update the dev guide to explain how incremental collection works. <!-- gh-linked-prs --> ### Linked PRs * gh-123266 * gh-123395 * gh-1...
f49a91648aac2ad55b2e005ba28fac1c7edca020
460ee5b994335994d4b5186c08f44e775b3e55fa
python/cpython
python__cpython-117801
# Python 3.13.0a6 freethreading on s390x: `test.test_io.CBufferedReaderTest.test_constructor` crash with `Floating point exception` # Bug report ### Bug description: Since https://github.com/python/cpython/issues/114331 was solved, we once again attempted to build Python with freethreading on s390x Fedora Linux. `...
a9107fe5c0869c01b4c8db7a34c768ee8511505a
7bcc257e97ee080d1128788a12a1731afde26b0a
python/cpython
python__cpython-117789
# Weird PGO build issue on macOS 14.3 - Xcode: 15.3 (22618) - Instruments: 15.3 (64565.111) With ./configure --enable-optimizations, the PGO build itself is a success on my machine, but the status is weird. Following build warnings are emitted at the first build ``` clang: warning: argument unused during comp...
49fc1414b52b31f6ad0408775d160ec0559c33bb
396b831850f0f364d584db4407a5d633f33e571c
python/cpython
python__cpython-117808
# _PyObject_StoreInstanceAttribute assertion fails in setattr after __dict__.clear() # Bug report ### Bug description: On current main (edit: debug build), ```python class C: def __init__(self): self.__dict__.clear() obj = C() obj.foo = None ``` fails with: ``` python: Objects/dictobjec...
784e076a10e828f383282df8a4b993a1b821f547
7d0be7aea569b3bc9a3936501d7d32af87c70e73
python/cpython
python__cpython-117740
# Stale GIL glossary definition # Documentation The definition of the GIL in the glossary is stale as a result of https://github.com/python/cpython/pull/116338 in Python 3.13. Specifically: > Past efforts to create a “free-threaded” interpreter (one which locks shared data at a much finer granularity) have n...
a97650912e0d17b15fea70dd114577630635d326
4ad8f090cce03c24fd4279ec8198a099b2d0cf97
python/cpython
python__cpython-117728
# Speed up `pathlib.Path.iterdir()` by using `os.scandir()` We should be able to call `os.scandir()` from `pathlib.Path.iterdir()` and construct results based on the `os.DirEntry.path` string. Currently we call `os.listdir()` and `_make_child_relpath()`, which returns a fully parsed/normalized string; particularly,...
30f0643e36d2c9a5849c76ca0b27b748448d0567
0eb52f5f266d9e0a662f28a4d2dfef8c746cf96e
python/cpython
python__cpython-117723
# 3.13.0a6 breaks asyncio.Stream.readuntil with bytearray separator # Bug report ### Bug description: As discussed in #81322, the change I made in #16429 breaks asyncio.Stream.readuntil when used with iterable buffer-object types other than `bytes` (such as `bytearray`) because they're incorrectly interpreted as an ...
01a51f949475f1590eb5899f3002304060501ab2
898f6de63fd5285006ee0f4993aeb8ed3e8f97f9
python/cpython
python__cpython-125110
# `_thread.lock.release()` is not thread-safe in free-threaded builds # Bug report ### Bug description: The implementation of `_thread.lock.release()` manipulates the `locked` field in a thread-unsafe way (this may be called by a thread that does not hold the lock) in free-threaded builds: https://github.com/python...
fca552993da32044165223eec2297b6aaaac60ad
c203955f3b433e06118d00a2fe7215546a0b7fe6
python/cpython
python__cpython-117906
# closing async_generator_athrow on an async generator that suppresses GeneratorExit does not raise RuntimeError # Bug report ### Bug description: when running `agen.aclose().close()` it should throw GeneratorExit into the coroutine and raise RuntimeError from `.close()`: ```python import types @types.cor...
e5c699280deac076cddfef37c8af917a550f6ac3
1ff626ebda465931ff3e4922e8e87d586eb6244c
python/cpython
python__cpython-117712
# test_makefile_test_folders fails if `test/wheeldata` is empty # Bug report ### Bug description: In Fedora, when packaging Python, we remove the `.whl` files from `Lib/test/wheeldata/`. The directory is left empty. `test_makefile` has started to skip empty directories as of alpha 6 (https://github.com/python/c...
d4963871b03cc76fe7d9648d022d12007585beae
02f1385f8ad6bf45376377c41f106b386d3a7eb0
python/cpython
python__cpython-117695
# Improve tests for PyEval_EvalCodeEx In the discussion for #116637 I noticed that the wrapper for `PyEval_EvalCodeEx` unnecessary constricts types of some arguments, preventing testing handling of wrong arguments in `PyEval_EvalCodeEx`. The proposed PR removes these restrictions and adds many tests for `PyEval_Eva...
57bdb75975ff90f95248c59fda34345f3bfff3c4
a9107fe5c0869c01b4c8db7a34c768ee8511505a
python/cpython
python__cpython-117699
# doctest fails to collect tests from a C function that has been wrapped # Bug report ### Bug description: `doctest.DocTestFinder` is now failing to collect examples from functions that are defined in C and then wrapped. It still works just fine with functions that are defined in C but that are _not_ wrapped. This ...
4bb7d121bc0a3fd00a3c72cd915b5dd8fac5616e
f90ff0367271ea474b4ce3c8e2643cb51d188c18
python/cpython
python__cpython-117872
# `tarfile` deprecation warning for PEP-706 should set a stacklevel # Bug report ### Bug description: I just saw the following deprecation warning in the GitHub Actions log for a project I contribute to: ``` /opt/hostedtoolcache/Python/3.12.2/x64/lib/python3.12/tarfile.py:2221: DeprecationWarning: Python 3.14 will,...
cff0a2db00b6379f60fe273a9782f71773d0a4cb
c520bf9bdf77d43c3d5d95bd08e856759a2abc86
python/cpython
python__cpython-117720
# `ThreadPoolExecutorTest.test_no_stale_references` may hang with GIL disabled In https://github.com/python/cpython/pull/114824, I modified `test_no_stale_references` so that it passes in the `--disable-gil` build. Unfortunately, that change was not sufficient and the test may still hang once the GIL is actually disab...
520cf2170ea08730e142d591e311b7ab8a6afe63
106e9ddc435372f3977432d76d0b1cb46ac72c5f
python/cpython
python__cpython-117690
# Improve the performance of ntpath.expanduser() # Feature or enhancement ### Proposal: In `ntpath.expanduser()`, `_get_bothseps()` is called in every loop iteration. It should be assigned instead: ```diff if isinstance(path, bytes): + seps = b'\\/' tilde = b'~' else: + seps = '\\/' tilde = '~' i...
f90ff0367271ea474b4ce3c8e2643cb51d188c18
0d42ac9474f857633d00b414c0715f4efa73f1ca
python/cpython
python__cpython-117685
# `test_code.test_free_different_thread` is flaky when the GIL is disabled This test case checks that freeing a code object on a different thread then where the co_extra was set is safe. However, the test make some assumptions about when destructors are called that aren't always true in the free-threaded build: htt...
df0f3a738f8bd414e0a3164ad65f71acfa83c085
acf69e09c66f8473399fabab36b81f56496528a6
python/cpython
python__cpython-117629
# Give _PyInstructionSequence a python interface and use it in compiler tests Expose ``_PyInstructionSequence`` as a PyObject, and then the compiler tests would be able to work with it directly. By giving this object functions to add a label/instruction, the logic of translating a convenient python representation t...
c179c0e6cbb4d1e981fffd43f207f5b1aa5388e5
ae8dfd2761e4a45afe0adada0f91f371dd121bb8
python/cpython
python__cpython-117664
# [Enum] _simple_enum does not handle complex aliases # Bug report ### Bug description: If an enum's `__new__` takes multiple arguments, and only one of those arguments is the member value, `_simple_enum` fails (it treats all the arguments as a single tuple value). ### CPython versions tested on: 3.13 ### Operati...
e5521bcca916c63866f0aa1c4dfb3a315d6ada73
d5f1139c79525b4e7e4e8ad8c3e5fb831bbc3f28
python/cpython
python__cpython-117659
# Fix `check_dump_traceback_threads` in free-threaded build The [`check_dump_traceback_threads`](https://github.com/python/cpython/blob/ac45766673b181ace8fbafe36c89bde910968f0e/Lib/test/test_faulthandler.py#L534-L591) function checks the result when faulthandler dumps the traceback involving more than one thread. W...
6edde8a91c753dba03c92315b7585209931c704b
fa58e75a8605146a89ef72b58b4529669ac48366
python/cpython
python__cpython-117668
# ``test_strptime`` raises a DeprecationWarning # Bug report ### Bug description: ```pytb ./python -m test -v test_strptime == CPython 3.13.0a5+ (heads/main:ac45766673, Apr 8 2024, 23:14:32) [GCC 9.4.0] == Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.31 little-endian == Python build: debug == ...
abead548af0172dabba13da8bacf2da3c02d4927
cd4cfa6ed2fd5f866c7be339f1d3cf56aa4d2bad
python/cpython
python__cpython-117651
# Disable importing legacy single-phase init extensions within subinterpreters in `--disable-gil` build # Feature or enhancement When importing a single-phase init extension in a subinterpreter, Python will make a [shallow copy](https://github.com/python/cpython/blob/775912a51d6847b0e4fe415fa91f2e0b06a3c43c/Python/im...
25f6ff5d3e92305659db62e7f7545f823f0dbd05
39d381f91e93559011587d764c1895ee30efb741
python/cpython
python__cpython-117654
# Improve performance of os.join by replacing map with a direct method call # Feature or enhancement ### Proposal: We can improve performance of `os.join` by changing ``` for b in map(os.fspath, p): ``` into ``` for w in p: b=os.fspath(w) ``` The `map` generator takes time to create and...
99852d9e65aef11fed4bb7bd064e2218220f1ac9
19a22020676a599e1c92a24f841196645ddd9895
python/cpython
python__cpython-117646
# test_dynamic fails on wasm32 WASI 8Core 3.x buildbot Example of recent failing build: https://buildbot.python.org/all/#/builders/1344/builds/1372 build: ``` 0:00:42 load avg: 4.04 [ 50/473/1] test_dynamic worker non-zero exit code (Exit code 134) test_cannot_change_globals_or_builtins_with_eval (test.test_dy...
ac45766673b181ace8fbafe36c89bde910968f0e
ed785c08993467461711c56eb5e6f88331062cca
python/cpython
python__cpython-117643
# PEP 737 implementation errors # Bug report For some reasons gh-111696 implemented `%T#` and `%N#` instead of `%#T` and `%#N`. It does not only contradict PEP 737, but does not match the general principles of prinf-like format, and can cause problems in future. Tests, which were added in gh-111696, were removed in ...
24a2bd048115efae799b0a9c5dd9fbb7a0806978
1a6594f66166206b08f24c3ba633c85f86f99a56
python/cpython
python__cpython-117652
# Use set comprehension for `posixpath.commonpath()` # Feature or enhancement ### Proposal: We can use a set comprehension to check if no absolute and relative paths are mixed: ```diff -try: - isabs, = set(p[:1] == sep for p in paths) -except ValueError: - raise ValueError("Can't mix absolute and re...
b848b944bb4730ab4dcaeb15b0b1713c3f68ec7d
6078f2033ea15a16cf52fe8d644a95a3be72d2e3
python/cpython
python__cpython-117638
# Remove redundant type check in `os.path.join()` # Feature or enhancement ### Proposal: These type checks were introduced a long time ago in https://github.com/python/cpython/commit/5bfc03f430ab13ed84c2c30f2c87e9800b5670a4 and became redundant in https://github.com/python/cpython/commit/3f9183b5aca568867f37c385...
9ee94d139197c0df8f4e096957576d124ad31c8e
e01831760e3c7cb9cdba78b048c8052808a3a663
python/cpython
python__cpython-117619
# Improve the `filename` argument of `pdb`'s `break` command # Feature or enhancement ### Proposal: Currently in the docs we say `b(reak)` command can take a `filename`, but we are very vague about it. It only mentioned the file will be searched in `sys.path`. The actual implementation currently allows: * absolute ...
d7ac427a796a3f869b813dac37b030889b56cd3b
4a5ad8469af9a6fc0ec1355eb203cc22bb4321d5
python/cpython
python__cpython-117781
# Argument Clinic: Unsafe code generation with `defining_class` and no slash # Bug report ### Bug description: When using the Argument Clinic to implement a function with `METH_METHOD` calling convention, the generated code can cause a crash if `defining_class` is used without slashing. For example, `datetime.now(...
c520bf9bdf77d43c3d5d95bd08e856759a2abc86
1316692e8c7c1e1f3b6639e51804f9db5ed892ea
python/cpython
python__cpython-117608
# Speedup `os.path.relpath()` # Feature or enhancement ### Proposal: Currently both implemenatations of `relpath()` are a bit inefficient. So they could use some optimisations: 1. We don't need to apply `normpath()` before `abspath()`, it already normalises it: ```diff -start_abs = abspath(normpath(...
a7711a2a4e5cf16b34fc284085da724a8c2c06dd
424438b11ec90110054f720bfa6ea67d644cc2ec
python/cpython
python__cpython-117670
# Terrible user experience if `test_exceptions.ExceptionTests.test_recursion_normalizing_infinite_exception` fails # Bug report ### Bug description: If `test_exceptions.ExceptionTests.test_recursion_normalizing_infinite_exception` fails, a _huge_ amount of output is printed to the terminal, which is a pretty terribl...
02f1385f8ad6bf45376377c41f106b386d3a7eb0
993c3cca16ed00a0bfe467f7f26ac4f5f6dfb24c