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-121278
# Allow `.. versionadded:: next` in docs # Feature or enhancement ### Proposal: In a PR to CPython, the `versionadded`, `versionchanged`, `versionremoved`, `deprecated`, `deprecated-removed` directives in documentation should currently be set to the upcoming release. This is inconvenient: - the numbers need ...
7d24ea9db3e8fdca52058629c9ba577aba3d8e5c
1ff1b899ce13b195d978736b78cd75ac021e64b5
python/cpython
python__cpython-121276
# Some tests in test_smtplib and test_logging failed when Python is configured with `--disable-ipv6` # Bug report ### Bug description: There is a error sample: ``` ERROR: test_basic (test.test_logging.SMTPHandlerTest.test_basic) ---------------------------------------------------------------------- Traceba...
3998554bb05f5ce18e8a66492d23d094a2299442
070f1e2e5b9b31ee3e7a1af2e30d7e3a66040b17
python/cpython
python__cpython-121273
# Move a few bits from compiler to earlier stages to simplify the compiler There are validations in compile.c that can move to earlier stages (AST validation or symtable construction). And the compiler is modifying the symbol table (setting ``ste_coroutine``), which it really shouldn't be doing. This will simpli...
1ac273224a85126c4356e355f7445206fadde7ec
6343486eb60ac5a9e15402a592298259c5afdee1
python/cpython
python__cpython-122716
# Remove remnants of support for non-IEEE 754 systems from cmathmodule.c # Feature or enhancement ### Proposal: Proposed patch: ```diff diff --git a/Modules/cmathmodule.c b/Modules/cmathmodule.c index bf86a211bc..591442334e 100644 --- a/Modules/cmathmodule.c +++ b/Modules/cmathmodule.c @@ -185,15 +185,8 @@ cmath_aco...
b6e745a27e9c98127acee436e4855066c58b7a3b
2f5c3b09e45798a18d60841d04a165fb062be666
python/cpython
python__cpython-121269
# Tarfile is unnecessarily slow # Bug report ### Bug description: There is room for improvement in tarfile write performance. In a simple benchmark I find that tarfile spends most of its time doing repeated user name/group name queries. https://gist.github.com/jforberg/86af759c796199740c31547ae828aef2 ### CPython v...
2b2d607095335024e5e2bb358e3ef37650536839
616468b87bc5bcf5a4db688637ef748e1243db8a
python/cpython
python__cpython-121493
# `always_inline` makes build fail with `-Og` and `--without-pydebug` # Bug report ### Bug description: We're trying to build CPython to debug a crash in third-party extension. To do that, I've set `CFLAGS="-Og -g"` and passed `--with-assertions`. However, we're not using `--with-pydebug` since that has had side eff...
c5a6b9afd82cad3f6abd9dc71cd5fdd5781a53f5
81fd625b5c30cc6f417c93bad404923676ad8ca3
python/cpython
python__cpython-121270
# Stackrefs (#118450) introduced a large performance regression on Windows ### Bug description: #118450 "Convert the evaluation stack to stack refs" (by @Fidget-Spinner) unfortunately seems to have introduced a [7% - 11% performance regression overall](https://github.com/faster-cpython/benchmarking-public/tree/mai...
722229e5dc1e499664966e50bb98065670033300
93156880efd14ad7adc7d3512552b434f5543890
python/cpython
python__cpython-121613
# Add support for C99 complex type (_Complex) to the struct module # Feature or enhancement ### Proposal: The struct module has support for ``float`` and ``double`` types, so at least there should be also ``float _Complex`` and ``double _Complex``. I'll work on a patch. <details> <summary>Initial version</summary...
7487db4c7af629f0a81b2127a3ee0000a288cefc
f55273b3b7124dc570911724107c2440f37905fc
python/cpython
python__cpython-121255
# Python 3.13.0b3 REPL empties ~/.python_history # Bug report ### Bug description: As discussed in https://discuss.python.org/t/python-3-13-0-beta-3-now-available/56847/7 and https://github.com/python/cpython/issues/120766#issuecomment-2200251720 When I updated from Python 3.13.0b2 to b3 and started the REPL for th...
7a807c3efaa83f1e4fb9b791579b47a0a1fd47de
7435f053b4a54372a2c43dee7a15c4b973f09209
python/cpython
python__cpython-121221
# [weakref]: Consider marking ``test_threaded_weak_key_dict_copy`` and ``test_threaded_weak_value_dict_copy`` as cpu-heavy tests # Feature or enhancement ### Proposal: I'm wondering why the deepcopy version of these tests is marked as ``requires_resource('cpu')`` but they take almost the same amount of the time as t...
c7991cc28788bbb086fd85d8fc55e20742f0de88
56a3ce2715509fc8e42ae40ec40ce6a590448da4
python/cpython
python__cpython-121211
# `ast.compare` fails if fields or attributes are missing at runtime # Bug report ### Bug description: `ast.compare` does not handle the case where attributes or fields are missing at runtime: ```python >>> import ast >>> a = ast.parse('a').body[0].value >>> del a.id >>> ast.compare(a, a) Traceback (most recent cal...
15232a0819a2f7e0f448f28f2e6081912d10e7cb
7a807c3efaa83f1e4fb9b791579b47a0a1fd47de
python/cpython
python__cpython-121207
# test_posixpath.test_expanduser_pwd2() fails on s390x Fedora Rawhide 3.x build: https://buildbot.python.org/all/#/builders/538/builds/4698 ``` FAIL: test_expanduser_pwd2 (test.test_posixpath.PosixPathTest.test_expanduser_pwd2) ---------------------------------------------------------------------- Traceback (mos...
05a6f8da6042cc87da1cd3824c1375d12753e5a1
c766ad206ea60b1e0edcb625b99e7631954a984f
python/cpython
python__cpython-121203
# Python fails to build on s390x RHEL7 LTO + PGO 3.x on: #if defined(__APPLE__) && defined(__has_attribute) && __has_attribute(availability) s390x RHEL7 LTO + PGO 3.x: https://buildbot.python.org/all/#/builders/244/builds/7626 ``` ./Modules/timemodule.c:1491:70: error: missing binary operator before token "(" #...
a0b8b342c5d0b4722ad9cfe82f2630025d445f00
af8c3d7a26d605099f5b3406a8d33ecddb77e8fb
python/cpython
python__cpython-121197
# `dict.fromkeys` must mark its parameters as pos-only # Bug report Here's how it looks now: <img width="795" alt="Снимок экрана 2024-07-01 в 10 05 59" src="https://github.com/python/cpython/assets/4660275/676bfb53-1b8a-480f-a175-bfa0e6ed2bc6"> From this defitinion I undertand that I can pass `value` as a named keyw...
1dc9a4f6b20148fd4ef2eb2800a6c65224828181
33903c53dbdb768e1ef7c46d347869577f2173ce
python/cpython
python__cpython-121195
# Test suite interrupted by xml.etree.ElementTree.ParseError: not well-formed (invalid token) It seems like the problem comes from `0x1b` bytes (eg: displayed as `^[` in vim editor), ANSI escape sequence, which is not properly escaped. Example: https://buildbot.python.org/all/#/builders/332/builds/1457 ``` 0:04...
af8c3d7a26d605099f5b3406a8d33ecddb77e8fb
f80376b129ad947263a6b03a6c3a874e9f8706e6
python/cpython
python__cpython-121166
# Use `do-while(0)` to protect `ADJUST_INDICES` macro # Feature or enhancement ### Proposal: Use `do-while(0)` construction to protect the expansion of `ADJUST_INDICES` in: - https://github.com/python/cpython/blob/d6d8707ff217f211f3a2e48084cc0ddfa41efc4d/Objects/unicodeobject.c#L9318-L9330 - https://github.c...
6343486eb60ac5a9e15402a592298259c5afdee1
15232a0819a2f7e0f448f28f2e6081912d10e7cb
python/cpython
python__cpython-121164
# Consider support "all" as an valid action for ``warnings.filterswarnings/simplefilter``. # Feature or enhancement ### Proposal: During reviewing the #121102, I found out that all is actually supported somewhere, but this support is not complete. Since users of Python are using it, I think that deprecating this beh...
c8669489d45f22a8c6de7e05b7625db10befb8db
b765e4adf858ff8a8646f38933a5a355b6d72760
python/cpython
python__cpython-121326
# `readline.set_history_length` corrupts history files when used in a libedit build # Bug report ### Bug description: ~~Since the libedit transition~~ ([correction](https://github.com/python/cpython/issues/121160#issuecomment-2200501386): If an end user switches from a GNU readline build of Python to an editline...
263c7e611bb24715e513d457a3477a61fff15162
b4aedb23ae7954fb58084dda16cd41786819a8cf
python/cpython
python__cpython-121154
# Incorrect use of _PyLong_CompactValue() # Bug report There are several errors related to use of `_PyLong_CompactValue()` in `longobject.c`. * The result has type `Py_ssize_t`, not `intptr_t`. Although on most supported platforms it is the same. * Type cast from unsigned integer to signed integer and from signed in...
18015451d0e3f4d155d56f70faf9b76ce5b7ad79
0759cecd9d945dfbac2226febaba51f41195555c
python/cpython
python__cpython-121159
# argparse: usage text of arguments in mutually exclusive groups no longer wraps in Python 3.13 # Bug report ### Bug description: Prior to Python 3.13, long usage text of arguments in mutually exclusive groups would wrap to multiple lines. This is no longer the case in Python 3.13: ```python import argparse parser ...
013a0929750ed2b46ae990b59d02e3db84337474
9e551f9b351440ebae79e07a02d0e4a1b61d139e
python/cpython
python__cpython-121176
# Specialization for accurate complex summation in sum()? # Feature or enhancement ### Proposal: Currently, sum() builtin lacks any specialization for complex numbers, yet it's usually faster than better pure-python alternatives. <details> <summary>benchmark sum() wrt pure-python version</summary> ```py...
169e7138ab84db465b6bf28e6c1dc6c39dbf89f4
bc93923a2dee00751e44da58b6967c63e3f5c392
python/cpython
python__cpython-121162
# Support copy.replace() on AST nodes # Feature or enhancement ### Proposal: I want this to work: ``` >>> n=ast.Name(id="x") >>> copy.replace(n, id="y") Traceback (most recent call last): File "<python-input-4>", line 1, in <module> copy.replace(n, id="y") ~~~~~~~~~~~~^^^^^^^^^^^ File "/Users/jelle/py/c...
9728ead36181fb3f0a4b2e8a7291a3e0a702b952
94f50f8ee6872007d46c385f7af253497273255a
python/cpython
python__cpython-121136
# Missing PyDECREF calls for ADDITEMS opcode of _pickle.c # Bug report ### Bug description: In the `load_additems` function of [`Modules/_pickle.c`](https://github.com/python/cpython/blob/3.11/Modules/_pickle.c#L6629) (which handles the `ADDITEMS` opcode), [PyObject_GetAttr](https://docs.python.org/3/c-api/object.ht...
92893fd8dc803ed7cdde55d29d25f84ccb5e3ef0
e6543daf12051e9c660a5c0437683e8d2706a3c7
python/cpython
python__cpython-121132
# Setting the line number is ignored in `INSTRUMENTED_YIELD_VALUE` # Bug report ### Bug description: There is a test for this: `test_jump_from_yield` in `test_sys_settrace`, but it expects the wrong value and the jump is ignored. This is a fairly fringe behavior so I'm not sure if this is worth backporting. ### CP...
afb0aa6ed20bd8e982ecb307f12923cf8dbccd8c
d9efa45d7457b0dfea467bb1c2d22c69056ffc73
python/cpython
python__cpython-121150
# Self-documenting f-string in conversion specifier throws ValueError # Bug report ### Bug description: Since Python 3.12, the compiler throws a ValueError when compiling a string like `f"{x:{y=}}"`: ```python $ ./python.exe Python 3.14.0a0 (heads/main:81a654a342, Jun 28 2024, 07:45:17) [Clang 15.0.0 (clang-1500.3...
c46d64e0ef8e92a6b4ab4805d813d7e4d6663380
69c68de43aef03dd52fabd21f99cb3b0f9329201
python/cpython
python__cpython-121118
# Skip __index__ handling in PyLong_AsNativeBytes As per the discussion in https://github.com/capi-workgroup/decisions/issues/32 (and some other bugs here that I haven't bothered to look up), having int conversion functions call back into Python to evaluate `__index__` can be problematic or unexpected (Python code may...
2894aa14f22430e9b6d4676afead6da7c79209ca
81a654a3425eaa05a51342509089533c1f623f1b
python/cpython
python__cpython-121236
# test_basic_multiple_interpreters_reset_each: _PyRefchain_Remove: Assertion `value == REFCHAIN_VALUE' failed # Crash report ### What happened? ### Configuration ```sh ./configure --with-trace-refs --with-pydebug ``` Test: ```sh ./python -m test -v -m test_basic_multiple_interpreters_reset_each test_import ``` Outp...
9bcb7d8c6f8277c4e76145ec4c834213167e3387
91313afdb392d0d6105e9aaa57b5a50112b613e7
python/cpython
python__cpython-121293
# Free-threaded libraries should be in `lib/python3.14t` (configure) # Bug report ### Background When using `configure` based Python installations, if two the free-threaded and default builds are installed to the same prefix, they will share the same `lib` directory. For example, when installing Python 3.14 the stru...
e8c91d90ba8fab410a27fad4f709cc73f6ffcbf4
5250a031332eb9499d5fc190d7287642e5a144b9
python/cpython
python__cpython-121102
# python -Wall is undocumented Many people are using it ["python3 -Wall"](https://www.google.com/search?q=%22python3+-Wall%22), but "all" is not listed as a valid choice at cmdoption [-W](https://docs.python.org/3/using/cmdline.html#cmdoption-W) docs, nor at env var [PYTHONWARNINGS](https://docs.python.org/3/using/cmd...
0a1e8ff9c15675fdc4d07fa6c59f83808bf00798
6d34938dc8163f4a4bcc68069a1645a7ab76e935
python/cpython
python__cpython-121097
# Valgrind lists memory leaks: dlopen() called without dlclose() Example on Python 3.12 when loading `_crypt` extension module: ``` $ PYTHONMALLOC=malloc valgrind --leak-check=full --show-leak-kinds=all --num-callers=50 ./python -c 'import _crypt' ==2444751== Memcheck, a memory error detector ==2444751== Copyrig...
6e63d84e43fdce3a5bdb899b024cf947d4e48900
58a3580836eca58c4a0c02cedc8a8d6080b8ab59
python/cpython
python__cpython-121191
# test_typing leaked [1, 1, 1] memory blocks: fail randomly on Refleak buildbots ``` Re-running test_typing in verbose mode test_typing leaked [1, 1, 1] memory blocks, sum=3 ``` Examples of failure: * AMD64 Windows11 Refleaks 3.x: https://buildbot.python.org/all/#/builders/920/builds/807 * AMD64 Windows11 Re...
c766ad206ea60b1e0edcb625b99e7631954a984f
6988ff02a5741bcd04a8f46b7dd845e849557be0
python/cpython
python__cpython-121083
# CPython build failed with `--enable-pystats` after #118450 # Bug report ### Bug description: ```text Python/specialize.c: In function ‘_Py_Specialize_ForIter’: Python/specialize.c:2392:60: error: incompatible type for argument 1 of ‘_PySpecialization_ClassifyIterator’ 2392 | _PySpecializat...
223c03a43c010cf4404f2a42efafe587646a0619
b7a95dfee30aae171de47f98ed3b7d1cc08e5bd4
python/cpython
python__cpython-121343
# Warn In PyThreadState_Clear() If the Thread State Still Has an Unhandled Exception # Feature or enhancement ### Proposal: When `PyThreadState_Clear()` is called, the thread state could still have an exception set. As a user, it would be helpful to know when that happens. This is similar to how we already warn th...
6c1a4fb6d400827155fd70e48d682e35397731a1
aea0c586d181abb897511b6b46d28bfbe4858f79
python/cpython
python__cpython-121041
# -Wimplicit-fallthrough generating warnings # Bug report ### Bug description: Due to the addition of `-Wimplicit-fallthrough` as a `BASEFLAG` new warnings are generated. This should be reverted until tooling is created to track these new warnings per https://github.com/python/cpython/issues/112301 Warnings can be...
ef28f6df42c916b058ed14275fb1ceba63ede28e
90565972243f33dcd40d60a4f1474b97174fe304
python/cpython
python__cpython-121071
# Add assertFloatsAreIdentical/assertComplexAreIdentical to unittest (or kwarg to assertEqual)? # Feature or enhancement ### Proposal: Clones of assertFloatsAreIdentical() are scattered across the CPython tests: https://github.com/python/cpython/blob/d8f82432a36178a2376cc2d0984b02bb03f6d55f/Lib/test/test_comple...
8ef8354ef15e00d484ac2ded9442b789c24b11e0
beee91cdcc0dbecab252f7c5c7c51e2adb8edc26
python/cpython
python__cpython-121036
# Include lastResort in logging HOWTO flow chart # Documentation The [flow chart](https://docs.python.org/3/howto/logging.html#logging-flow) in the logging HOWTO is very helpful in understanding how the logging module works. However, the flow chart does not make clear why a logger with no configured handlers can st...
237baf4d7a789deb153fbc1fc3863550949d5da2
4a62a331de1eeda7878960b0bd184a348908245e
python/cpython
python__cpython-136463
# Soft-deprecate `sys.api_version` and the C API's `PYTHON_API_VERSION` `PYTHON_API_VERSION` and the related `sys.api_version` module attribute were last changed for Python 2.6. At the moment they're not documented at all, so anyone stumbling across them (e.g. by running `dir(sys)`) may be legitimately confused as ...
658599c15d13ee3a5cb56c3d9fccaa195465d4b5
28153fec58a255a001c39235376a326ccb367188
python/cpython
python__cpython-121086
# Add __get__ to the partial object # Feature or enhancement In https://github.com/python/cpython/pull/119827#issuecomment-2190108757, @rhettinger proposed to add the `__get__` method to the `partial` object in `functools`. This is a breaking change, although the impact may be much lesser than of adding `__get__` to ...
db96edd6d1a58045196a71aff565743f493b5fbb
223c03a43c010cf4404f2a42efafe587646a0619
python/cpython
python__cpython-121033
# Improve the repr of partialmethod # Bug report The repr of `partialmethod` object contains redundant commas and spaces. Compare it with the repr of `partial`: ```pycon >>> import functools >>> def test(*args, **kwargs): pass ... >>> functools.partial(test) functools.partial(<function test at 0x7fcbe91819d0>) >>> ...
d2646e3f45e3e4e831ee2ae84d55b161a361d592
d8f82432a36178a2376cc2d0984b02bb03f6d55f
python/cpython
python__cpython-121024
# Improve `_xxtestfuzz/README.rst` # Bug report Right now there are several points I would like to see improved in this file: 1. We need to clarify that `$test_name` should be replaced with an actual test name: https://github.com/python/cpython/blob/82235449b85165add62c1b200299456a50a1d097/Modules/_xxtestfuzz/README....
a9c2bc16349c2be3005f97249f3ae9699988f218
3b45df03a4bd0e21edec43144b8d9bac689d23a0
python/cpython
python__cpython-121019
# argparse.ArgumentParser.parses_args does not honor exit_on_error=False when given unrecognized arguments # Bug report ### Bug description: As reported in [Discourse](https://discuss.python.org/t/about-the-exit-on-error-setting-in-argparse/56702), even though the documentation on the `exit_on_error` argument for `a...
0654336dd5138aec04e3017e15ccbb90a44e053d
82235449b85165add62c1b200299456a50a1d097
python/cpython
python__cpython-121017
# `PYTHON_BASIC_REPL` is not currently tested # Bug report ### Bug description: The environment variable `PYTHON_BASIC_REPL` is meant to make Python use the basic REPL, but this isn't currently tested to work. ### CPython versions tested on: 3.13, CPython main branch ### Operating systems tested on: Linux <!-- ...
9e45fd9858a059950f7387b4fda2b00df0e8e537
ef28f6df42c916b058ed14275fb1ceba63ede28e
python/cpython
python__cpython-121483
# Incorrect optimization in JIT build # Bug report ### Bug description: Reproducer: ```python def foo(): a = [1, 2, 3] exhit = iter(a) for _ in exhit: pass a.append("this should'be in exhit") print(f"got {list(exhit)}, should be []") foo() foo() foo() foo() foo() foo() ``` Output: ``` g...
8ad6067bd4556afddc86004f8e350aa672fda217
d69529d31ccd1510843cfac1ab53bb8cb027541f
python/cpython
python__cpython-121046
# test_pyrepl: test_cursor_back_write() blocks on input_hook() when tests are run sequentially Command: ``` $ ./python -m test -u all,-gui (...) 0:24:10 load avg: 0.92 [326/478] test_pyclbr 0:24:13 load avg: 0.92 [327/478] test_pyexpat 0:24:13 load avg: 0.92 [328/478] test_pyrepl ``` gdb: ``` (gdb) wh...
44eafd66882589d4f4eb569d70c49724da3e9291
c87876763e88ddbe1d465912aff74ee4c0ffd451
python/cpython
python__cpython-120992
# Evaluation stack bounds are not checked in debug builds. # Bug report ### Bug description: Prior to the generating code for the interpreter(s), we had a set of macros for stack manipulation, `PUSH`, `POP`, etc. The code generator does not use these any more, which improves readability, but we have lost the ru...
8f5a01707f27a015b52b7b55af058f8833f8f7db
42b2c9d78da7ebd6bd5925a4d4c78aec3c9e78e6
python/cpython
python__cpython-122132
# `asyncio` thread-safety issues in the free-threaded build # Bug report 1. `fi_freelist` isn't thread-safe (move to `pycore_freelist.h` and follow that pattern) 2. `enter_task`, `leave_task`, and `swap_current_task` aren't thread-safe due to shared `state->current_tasks` and borrowed references. 3. `register_ta...
c908d1f87d287a4b3ec58c85b692a7eb617fa6ea
2c1b1e7a07eba0138b9858c6f2bea3cae9af0808
python/cpython
python__cpython-121655
# `threading.local()` implementation is not thread-safe in the free-threaded build # Bug report The implementation of Python thread local variables (`threading.local()` or `_thread._local`) has some thread-safety issues. The issues are particularly relevant to the free-threaded build, but some can affect the default ...
e059aa6b01030310125477c3ed1da0491020fe10
2009e25e26040dca32696e70f91f13665350e7fd
python/cpython
python__cpython-120959
# Parser compares `int` to `Py_ssize_t` poorly I'm not sure how widespread this is, or how generated the code is, but within `_loop0_139_rule` in `parser.c` we find this: ``` Py_ssize_t _n = 0; // some lines later for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]); ``` If `_...
348184845a72088368021d1f42e96ceea3eee88c
e7315543377322e4c6e0d8d2c4a4bb4626e43f4c
python/cpython
python__cpython-120940
# `__del__` documentation does not mention `weakref` # Documentation the `weakref` documentation mentions `__del__` and compares with it. However, `__del__` documentation does not mention `weakref`, while this is most probably what the vast majority or developers is looking for feature wise. https://docs.python...
1c13b29d54ad6d7c9e030227d575ad7d21b4054f
22b0de2755ee2d0e2dd21cd8761f15421ed2da3d
python/cpython
python__cpython-121747
# email module generates wrong MIME header with quoted-printable encoded extra space with Python 3.12.4 # Bug report ### Bug description: In Python 3.12.4, using `EmailMessage` class with long non-ASCII characters in the subject, the resulting, encoded extra space `=?utf-8?q?_?=` is generated. The issue doesn't ...
cecaceea31f32f01b5617989e3dc8b2077f53f89
1056f2bc208bdfe562c79d2a5098723c50ae9c23
python/cpython
python__cpython-120911
# ValueError in importlib.metadata for eggs with files installed outside the site packages In https://github.com/python/importlib_metadata/issues/455, users reported issues with importlib metadata attempting to resolve the paths for packages installed outside the system site packages. This issue applies to importlib.m...
1ba0bb21ed4eb54023fdfccc9cb20be8fff946b1
0b918e81c1de909f753f1d02bcba0f831d63cfa8
python/cpython
python__cpython-122309
# `FrameLocalsProxy` is stricter than `dict` about what constitutes a match # Bug report ### Bug description: ```python import inspect class MyString(str): pass def f(): a = 1 locals = inspect.currentframe().f_locals print(MyString("a") in locals) f() ``` In Python 3.12 and below this prints `Tru...
5912487938ac4b517209082ab9e6d2d3d0fb4f4d
1cac0908fb6866c30b7fe106bc8d6cd03c7977f9
python/cpython
python__cpython-120898
# Typo in `urllib.parse` docs: Incorrect parameter name The [“Changed in version 3.3”](https://github.com/python/cpython/blob/96ead91f0f0db59a942b8b34da9cc980c05588a2/Doc/library/urllib.parse.rst?plain=1#L176) note to `urllib.parse.urlparse()` refers to `allow_fragment`. The correct name for this parameter is `allow_f...
b6fa8fe86a6f4d02c263682716a91285a94024fc
96ead91f0f0db59a942b8b34da9cc980c05588a2
python/cpython
python__cpython-120889
# Bump the bundled pip version to 24.1.x This brings in the latest pip release into CPython's bundled copies, notably, adding support for free-threading builds which is worth backporting the bundle update to 3.13 for. <!-- gh-linked-prs --> ### Linked PRs * gh-120889 * gh-121080 * gh-121348 <!-- /gh-linked-prs -->
4999e0bda091826fcdf303dd439364e1d303a5ce
1167a9a30b4b2f327ed987e845e378990d1ae6bf
python/cpython
python__cpython-120874
# Add tests for new Tk widget options "-state" was added for ttk::scale in Tk 8.6.9. More options will be added in Tk 8.7 and 9.0. <!-- gh-linked-prs --> ### Linked PRs * gh-120874 * gh-120875 * gh-120876 * gh-120877 * gh-120879 * gh-120880 <!-- /gh-linked-prs -->
974a978631bfbfa6f617e927d5eaa82b06694ae5
879d1f28bb97bcecddca0824276877aaf97f25b3
python/cpython
python__cpython-120872
# 3.12.4 breaks`logging.config.DictConfig` with `logging.handlers.QueueHandler` on read-only file systems # Bug report ### Bug description: When using `logging.config.dictConfig` to configure a `logging.handlers.QueueHandler` on a read only file system, it works fine in 3.12.3, but crashes in 3.12.4. **Repro...
7d9c68513d112823a9a6cdc7453b998b2c24eb4c
4be1f37b20bd51498d3adf8ad603095c0f38d6e5
python/cpython
python__cpython-120861
# `type_setattro` error return paths contain bugs # Bug report The implementation of `type_setattro` has a few bugs relating to error return paths: The lock is not released if `_PyDict_GetItemRef_Unicode_LockHeld` fails: https://github.com/python/cpython/blob/8f17d69b7bc906e8407095317842cc0fd52cd84a/Objects/typeobje...
dee63cb35971b87a09ddda5d6f29cd941f570720
0153fd094019b84e18b8e8451019694595f67f9e
python/cpython
python__cpython-120859
# `PyDict_Next` should not lock the dict # Bug report `PyDict_Next` currently wraps `_PyDict_Next` in a critical section. We shouldn't do this -- the locking needs to be external to the call. 1) It's not sufficient to lock the dict just for each `_PyDict_Next` call because we return borrowed references and because ...
375b723d5873f948696c7e85a97f4778d9e00ff0
dee63cb35971b87a09ddda5d6f29cd941f570720
python/cpython
python__cpython-121051
# `faulthandler` itself crashes in free-threading build (in `_Py_DumpExtensionModules`) # Bug report The `faulthandler` module can dump Python tracebacks when a crash occurs. Unfortunately, the current implementation itself crashes in the free-threaded build. This is mostly undetected because our tests expect a crash...
1a2e7a747540f74414e7c50556bcb2cc127e9d1c
237baf4d7a789deb153fbc1fc3863550949d5da2
python/cpython
python__cpython-120835
# generator frame type should not be PyObject*[] For historical reasons, the `*_iframe` field in `_PyGenObject_HEAD` is declared as ` PyObject*[]`, and later cast to `_PyInterpreterFrame *` (which is not a PyObject*). <!-- gh-linked-prs --> ### Linked PRs * gh-120835 * gh-120941 * gh-120976 <!-- /gh-linked-prs...
65a12c559cbc13c2c5a4aa65c76310bd8d2051a7
c38e2f64d012929168dfef7363c9e48bd1a6c731
python/cpython
python__cpython-121250
# ios buildbot failure: `enclose 'sqlite3_create_window_function' in a __builtin_available check to silence this warning` This failed in my PR: https://github.com/python/cpython/pull/120442 But, it does not look related. Link: https://buildbot.python.org/all/#builders/1380/builds/655 ``` HEAD is now at 8334a1b...
7e91e0dcfe2faab1e1a4630e6f745aa30ca87b3d
2bac2b86b1486f15038fb246835e04bb1b213cd8
python/cpython
python__cpython-120812
# Reference leak in `_contextvars.Context.run()` # Bug report ### Bug description: In `_contextvars.Context.run`, `call_result` is not `Py_DECREF`'d if `_PyContext_Exit` fails. See [here](https://github.com/python/cpython/blob/main/Python/context.c#L660). ### CPython versions tested on: 3.11 ### Operating systems...
aed31beca9a54b85a1392631a48da80602210f18
a81d434c06335b0989ba83666ec7076b9d9d4e1e
python/cpython
python__cpython-120805
# Rewrite asyncio subprocesses without child watchers ### Tasks - [x] Remove child watchers (excludes threaded and pidfd watcher) #120805 - [x] Remove `get_child_watcher` and `set_child_watcher` https://github.com/python/cpython/pull/120818 - [x] Remove threaded and pidfd watcher https://github.com/python/cpython/pu...
733dac01b0dc3047efc9027dba177d7116e47c50
a2f6f7dd26128b834c6e66fe1ceac3ac751143f5
python/cpython
python__cpython-120803
# importlib.metadata test fixtures should prefer test.support fixtures In https://github.com/python/cpython/pull/116131, I learned that there are some fixtures in importlib.metadata that now appear to have substantial overlap with those in `support.os_helper`. There was a time when the backport was the dominant implem...
85d90b59e2a9185cad608c5047357be645b4d5c6
c1553bc34a537e00d6513da7df1c427df3570574
python/cpython
python__cpython-122887
# a bit better example in pathlib docs - maybe include example path that involves file in a folder(s)? # Documentation See https://docs.python.org/3/library/pathlib.html#concrete-paths `Path('setup.py')` and `PosixPath('/etc')` and `WindowsPath('c:/Program Files/')` both have single level only. Would it be OK...
363374cf69a7e2292fe3f1c6bedd199088958cc2
0959142e4defcf7a9fcbbb228d2e2b97a074f7ea
python/cpython
python__cpython-120829
# ``test_datetime`` fails with a ``--forever`` argument # Bug report ### Bug description: Output: ```python ...many lines test_resolution_info (test.datetimetester.TestTime_Fast.test_resolution_info) ... FAIL ====================================================================== FAIL: test_resolution_info (test.dat...
a81d434c06335b0989ba83666ec7076b9d9d4e1e
6f1d448bc110633eda110310fd833bd46e7b30f2
python/cpython
python__cpython-120781
# dis: LOAD_SPECIAL should mention the name of the attribute # Feature or enhancement ### Proposal: ```python >>> import dis >>> dis.dis("with x: pass") 0 RESUME 0 1 LOAD_NAME 0 (x) COPY 1 LOAD_SP...
e8e151d4715839f785ff853c77594d7302b40266
55596ae0446e40f47e2a28b8897fe9530c32a19a
python/cpython
python__cpython-120778
# Introspective attributes of an async generator object are undocumented # Documentation Though listed with details in [PEP-525](https://peps.python.org/pep-0525/#asynchronous-generator-object), introspective attributes of an async generator object, namely `__name__`, `__qualname__`, `ag_await`, `ag_frame`, `ag_run...
83d3d7aace32b8536f552f78dd29610344f13160
8334a1b55c93068f5d243852029baa83377ff6c9
python/cpython
python__cpython-120770
# pdb repeats `w 0` on empty line when there are commands in `cmdqueue` # Bug report ### Bug description: If you do a `n ;; p 1` in pdb, the next time you entry an empty line (meant for repeat last command), it will repeat `w 0` due to #119882. It's supposed to repeat `p 1` (arguably `n ;; p1` but we never do that)....
31ce5c05a489fa22f30c4afdec162e4e669af15a
3af7263037de1d0ef63b070fc7bfc2cf042eaebe
python/cpython
python__cpython-120755
# Speed up open().read() pattern by reducing the number of system calls # Feature or enhancement ### Proposal: I came across some seemingly redundant `fstat()` and `lseek()` calls when working on a tool that scanned a directory of lots of small YAML files and loaded their contents as config. In tracing I found m...
2f5f19e783385ec5312f7054827ccf1cdb6e14ef
9728ead36181fb3f0a4b2e8a7291a3e0a702b952
python/cpython
python__cpython-120744
# Soft deprecate os.spawn*(), os.popen() and os.system() functions See the discussion for the rationale: [Is time to remove os module spawn* functions?](https://discuss.python.org/t/is-time-to-remove-os-module-spawn-functions/55829) See also the discussion: [How to deal with unsafe/broken os.spawn* arg handling beh...
d44c550f7ebee7d33785142e6031a4621cf21573
02cb5fdee391670d63b2fc0a92ca9b36a32ac95a
python/cpython
python__cpython-120734
# some internal compiler functions don't follow the naming convention compiler_visit_* is a prefix that interacts with the VISIT macros and the * should correspond to an AST node. There are some functions that are named like this but should not be. <!-- gh-linked-prs --> ### Linked PRs * gh-120734 <!-- /gh-linke...
eaaf6995a883255e6d0e433591dc9fdc374b8f06
0f3e36454d754026d6c510053ff1e4b22ae80cd9
python/cpython
python__cpython-120737
# Python 3.12.3 -> 3.12.4 breaks use of `create_autospec(X, spec_set=True, name="X")` # Bug report ### Bug description: Hello, thanks for the work you do! My issue: Updating from 3.12.3 to 3.12.4 breaks many elements in my test suite. We use the `name=` argument to better understand log messages once a test ...
1e4815692f6c8a37a3974d0d7d2025494d026d76
ed5ae6c4d76feaff06c2104c8ff864553b000253
python/cpython
python__cpython-120727
# New warnings: ``warning: unused function 'is_core_module' [-Wunused-function]`` # Bug report ### Bug description: Popped up during build in non-debug mode: ``` Python/import.c:1555:1: warning: unused function 'is_core_module' [-Wunused-function] is_core_module(PyInterpreterState *interp, PyObject *name, PyObject *...
a816cd67f43d9adb27ccdb6331e08c835247d1df
45d5cab533a607716b2b41134839a59facf309cd
python/cpython
python__cpython-120820
# `datetime.strftime("%Y")` is not padding correctly # Bug report ### Bug description: [docs](https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior) say: ```text %Y Year with century as a decimal number. 0001, 0002, …, 2013, 2014, …, 9998, 9999 ``` but this is what is happening ```python fro...
6d34938dc8163f4a4bcc68069a1645a7ab76e935
92893fd8dc803ed7cdde55d29d25f84ccb5e3ef0
python/cpython
python__cpython-120691
# test_email fails on WASI: thread 'main' has overflowed its stack wasm32-wasi 3.x: https://buildbot.python.org/all/#/builders/1046/builds/5459 ``` 0:00:28 load avg: 4.60 [ 25/478/1] test_email worker non-zero exit code (Exit code -6 (SIGABRT)) test_b_case_ignored (test.test_email.test__encoded_words.TestDecode.t...
49f51deeef901b677853f00e428cbaeb13ecd2f2
c81a5e6b5b7749862d271e7a67f89976069ad2cd
python/cpython
python__cpython-120687
# Removed unused internal C API functions The functions in Include/internal/pycore_identifier.h are not used: ``` extern PyObject* _PyType_LookupId(PyTypeObject *, _Py_Identifier *); extern PyObject* _PyObject_LookupSpecialId(PyObject *, _Py_Identifier *); extern int _PyObject_SetAttrId(PyObject *, _Py_Identifie...
6f7acaab508edac3dff376912b85cf46a8671e72
12af8ec864225248c3d2916cb142a5e7ee36cbe2
python/cpython
python__cpython-120709
# Python 3.13.0b2: rounding can cause incorrect log timestamps # Bug report ### Bug description: The change made in #102412 introduces floating-point issues that in corner cases can cause log timestamps to be wrong by up to 999ms. This is much worse than the bug it was trying to fix (#102402). For example: ``...
1500a23f33f5a6d052ff1ef6383d9839928b8ff1
02df6795743ee4ee26a07986edbb5e22ae9fec8b
python/cpython
python__cpython-120904
# New REPL does not include globals from executed module when used with `-i` # Bug report ### Bug description: If I have a module called `foo`.py with the following contents in the root of my CPython local clone: ```py class Foo: pass ``` Then running `PYTHON_BASIC_REPL=1 ./python.exe -i foo.py`, I get the followi...
ac07451116d52dd6a5545d27b6a2e3737ed27cf0
58753f33e47fe48906883dc010771f68c13b7e52
python/cpython
python__cpython-120675
# Protect multi-line macros expansions in `_test*.c` files # Feature or enhancement ### Proposal: In `Modules/_testbuffer.c` and `Modules/_testcapimodule.c`, there are some expansions that are not protected, although their usage is correct. This issue is in continuation with https://github.com/python/cpython/issue...
7c5da94b5d674e112dc77f6494463014b7137193
4bc27abdbee88efcf9ada83de6e9e9a0e439edaf
python/cpython
python__cpython-120822
# Failing configure tests due to missing space # Bug report ### Bug description: When building CPython from source, I noticed some suspicious errors that seem to be related to a missing spaces in the configure script. It seems that most uses of `as_fn_append` correctly include a leading space before appending to a v...
2106c9bef0c18ff35db7d6c083cb8f189507758e
fd0f814ade43fa479bfbe76dc226424db14a9354
python/cpython
python__cpython-120668
# Bug in smtplib example # Documentation The example code is meant to demonstrate sending a multi-line message. It does not do that; the lines get contracted into one. This can be fixed by adding a newline character to the end of the line when it is added to the message string: ```python msg += line + '\n' ``...
4bc27abdbee88efcf9ada83de6e9e9a0e439edaf
3044d3866e87bd236d8e7931fb4aa176ba483716
python/cpython
python__cpython-120934
# Type error in the section on type hints # Documentation https://docs.python.org/3/library/typing.html "This module provides runtime support for type hints. Consider the function below:" ``` def moon_weight(earth_weight: float) -> str: return f'On the moon, you would weigh {earth_weight * 0.166} kil...
bb057ea1075e000ff3f0d6b27a2b7ca4117b4969
2106c9bef0c18ff35db7d6c083cb8f189507758e
python/cpython
python__cpython-120660
# Skip `test_free_threading` with GIL # Feature or enhancement ### Proposal: `test_free_threading` shouldn't run when the GIL is enabled. It takes 2 minutes on the default build, making it the slowest test in the suite. ### Has this already been discussed elsewhere? This is a minor feature, which does not ...
360f14a493d8461d42dc646be40b4b6fb20db57a
d2e423114cfb5028515c73e01b4955b39a1ee7db
python/cpython
python__cpython-120643
# [C API] Move private PyCode and PyOptimizer API to the internal C API The private PyCode and PyOptimizer APIs use "unnamed structs/unions" which are not allowed in ISO C99: see https://github.com/python/cpython/issues/120293. I propose to move private PyCode and PyOptimizer APIs to the internal C API. 6 PyUnst...
9e4a81f00fef689c6e18a64245aa064eaadc7ac7
9e45fd9858a059950f7387b4fda2b00df0e8e537
python/cpython
python__cpython-120676
# test_repl: Warning -- reap_children() reaped child process 3457256 On the "AMD64 Debian PGO 3.x" buildbot worker, test_pyrepl fails with "env changed" because a child process is not awaited explicitly. build: https://buildbot.python.org/all/#/builders/249/builds/8909 ``` 1:17:07 load avg: 20.12 [453/478/1] te...
0f3e36454d754026d6c510053ff1e4b22ae80cd9
d8f27cb1141fd3575de816438ed80a916c0560ed
python/cpython
python__cpython-120634
# Remove tear-off menu feature in turtledemo https://github.com/python/cpython/issues/58092 (BPO 13884) removed tear-off menu in IDLE, but it's still there in the turtledemo window. `tearoff=0` will disable tear-off vertical menu (it's even Windows 8's close window `x` style😨) Last, I adjusted the scroll bar f...
89f7208f672be635e923f04c19a7480eb8eb414c
a0dce37895947a09f3ff97ae33bba703f6a6310c
python/cpython
python__cpython-120607
# Allow EOF to exit pdb commands definition # Feature or enhancement ### Proposal: In `pdb` `commands` command, the user can use `exit` or a resume execution to exit the commands definition. However, EOF seems a very reasonable and intuitive way to exit as well. It's technically not a bug because we never said it sh...
4bbb0273f23c93ee82d7f60067775c558a7d1b1b
1e4815692f6c8a37a3974d0d7d2025494d026d76
python/cpython
python__cpython-120604
# Tools/jit/_llvm.py doesn't support LLVM_VERSION_SUFFIX # Bug report ### Bug description: I initially encountered [this build issue on Gentoo](https://bugs.gentoo.org/931838). Currently the regex in `Tools/jit/_llvm.py` only allows strings of the form `version MAJOR.MINOR.PATCH` ```python _LLVM_VERSION_PATTERN = r...
285f42c850da0d8ca31850088eb7b9247cbbbc71
4bbb0273f23c93ee82d7f60067775c558a7d1b1b
python/cpython
python__cpython-120601
# [C API] Make Py_TYPE() opaque in limited C API 3.14 In the limited C API 3.14 and newer, I propose to change Py_TYPE() and Py_SET_TYPE() implementation to opaque function calls to hide implementation details. I made a similar change for Py_REFCNT() and Py_SET_REFCNT() in Python 3.12. The problem is that with Free...
16f8e22e7c681d8e8184048ed1bf927d33e11758
e8752d7b80775ec2a348cd4bf38cbe26a4a07615
python/cpython
python__cpython-120615
# ``test_pydoc.test_pydoc`` fails with a ``-R 3:3`` option # Bug report ### Bug description: ``` ./python.exe -m test -R 3:3 test_pydoc.test_pydoc ``` The output of the tests is in the attached file. ### CPython versions tested on: CPython main branch ### Operating systems tested on: macOS [out...
2cf47389e26cb591342d07dad98619916d5a1b15
ac37a806018cc40fafebcd0fa90250c3e0261e0c
python/cpython
python__cpython-120588
# Several unused functions in `posixmodule.c` under WASI build # Bug report ``` ../../Modules/posixmodule.c:7883:1: warning: unused function 'warn_about_fork_with_threads' [-Wunused-function] ../../Modules/posixmodule.c:12545:1: warning: unused function 'major_minor_conv' [-Wunused-function] ../../Modules/posixm...
3df2022931f77c5cadb3f51b371be6ae17587ede
bac4edad69bb20dd9460766e062637cae999e1e0
python/cpython
python__cpython-120585
# `test_critical_sections.c`: unused function `thread_critical_sections` # Bug report On systems where `Py_CAN_START_THREADS` is not defined (like wasm32-wasi 3.x), `test_critical_sections_threads` is not created: https://github.com/python/cpython/blob/192d17c3fd9945104bc0303cf248bb0d074d260e/Modules/_testintern...
b337aefd3e44f5c8e38cd282273359d07cce6126
b8484c6ad7fd14ca464e584b79821b4b906dd77a
python/cpython
python__cpython-120580
# `test_free_threading/test_dict.py` does not guard `_testcapi` import # Bug report This line is the source of this potential test failure: https://github.com/python/cpython/blob/cf49ef78f894e418bea7de23dde9b01d6235889d/Lib/test/test_free_threading/test_dict.py#L10-L12 ``` » ./python.exe -m test test_free_threading ...
0c0348adbfca991f78b3aaa6790e5c26606a1c0f
cf49ef78f894e418bea7de23dde9b01d6235889d
python/cpython
python__cpython-120573
# [Docs] Missing parentheses in `TypeIs` and `TypeGuard` documentation # Documentation Current documentation regarding `TypeIs`'s behaviors is inconsistent with that in [typing spec](https://typing.readthedocs.io/en/latest/spec/narrowing.html#typeis). ```patch --- a/Doc/library/typing.rst +++ b/Doc/library/typ...
1fa595963ed512b055d2a4faddef5a9e544288ac
08d09cf5ba041c9c5c3860200b56bab66fd44a23
python/cpython
python__cpython-120569
# file leak in PyUnstable_CopyPerfMapFile # Bug report ### Bug description: This leak was found by the Clang Static Analyzer: ![image](https://github.com/python/cpython/assets/10507970/8fd3bff0-bc2d-48f5-acf6-bfc67a04334c) ### CPython versions tested on: CPython main branch ### Operating systems tested on: mac...
92cebaa4911786683e87841bf7788351e7595ac2
b337aefd3e44f5c8e38cd282273359d07cce6126
python/cpython
python__cpython-120570
# Clarify weekday return in calendar.monthrange docstring # Documentation ```python def weekday(year, month, day): """Return weekday (0-6 ~ Mon-Sun) for year, month (1-12), day (1-31).""" if not datetime.MINYEAR <= year <= datetime.MAXYEAR: year = 2000 + year % 400 return Day(datetime.date(...
bd4516d9efee109dd3b02a3d60845f9053fc6718
4f59f8638267aa64ad2daa0111d8b7fdc2499834
python/cpython
python__cpython-120564
# Consider marking ``zip64`` tests in ``test_zipimport`` as cpu-heavy # Feature or enhancement ### Proposal: Without ``testZip64`` and ``testZip64CruftAndComment`` test_zipimport takes about ~300ms: ```python ./python -m test -q test_zipimport Using random seed: 4154114933 0:00:00 load avg: 0.02 Run 1 test sequenti...
ac37a806018cc40fafebcd0fa90250c3e0261e0c
35b16795d11cb50768ffad5fe8e61bdebde9b66a
python/cpython
python__cpython-120545
# Add `else: fail()` to test cases where exception is always expected # Bug report Most `except self.failureClass` cases have `else` branch where we can ensure that the exception really did happen: https://github.com/python/cpython/blob/d4039d3f6f8cb7738c5cd272dde04171446dfd2b/Lib/test/test_unittest/test_case.py#L83...
42ebdd83bb194f054fe5a10b3caa0c3a95be3679
d4039d3f6f8cb7738c5cd272dde04171446dfd2b
python/cpython
python__cpython-120543
# Improve the "less" prompt in pydoc In #65824 the "Help on ..." was added in the "less" prompt in pydoc. It works good in the CLI or hen you call `help()` with a string, but unfortunately, it is not so good for `help()` used in the REPL with non-string argument. For example, `help(str)` has a prompt starting with "He...
31d1d72d7e24e0427df70f7dd14b9baff28a4f89
9e0b11eb21930b7b8e4a396200a921e9985cfca4