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-122017
# test_sysconfig.test_user_similar fails on --disable-gil --with-platlibdir=lib64 # Bug report ### Bug description: ``` $ /configure --config-cache --without-ensurepip --with-pydebug --disable-gil --with-platlibdir=lib64 && make ... $ ./python -m test test_sysconfig Using random seed: 1721645515 0:00:00 load avg: 1....
186b4d8ea2fdc91bf18e8be695244ead1722af18
d66b06107b0104af513f664d9a5763216639018b
python/cpython
python__cpython-122002
# Fully implement PEP 706: Change default filter for TarFile.extract() and extractall() to 'data' # Feature or enhancement ### Proposal: The documentation for tarfile discusses changes to the default behavior in 3.14 as a future change, but now that 3.14 is in development this change should be implemented and re...
dcafb362f7eab84710ad924cac1724bbf3b9c304
bc94cf7e254e43318223553a7959115573c679a5
python/cpython
python__cpython-121990
# `test_pyrepl` is taking 1 hour on refleaks buildbots Looks like it started with ac07451116d52dd6a5545d27b6a2e3737ed27cf0 (cc @AlexWaygood). https://buildbot.python.org/#/builders/259/builds/1189 https://buildbot.python.org/#/builders/1226/builds/2261 The last time this occurred (https://github.com/python/cpyt...
a09e215abf3c80a3c99c86b4482b512b42aad072
b7ad711fcb37dd001e6bf8466c9503eef6d20331
python/cpython
python__cpython-121983
# csv module: Missing test case for an invalid quoting value # Bug report ### Bug description: This branch is currently not covered by the tests: https://github.com/python/cpython/blob/12c1afa9d153fbdf78c970054c08c755f504c5e9/Modules/_csv.c#L330-L331 We should add a test case for it. I can send a PR shortly ;) ##...
656b7a3c83c79f99beac950b59c47575562ea729
c066bf553577d1000e208eb078d9e758c3e41186
python/cpython
python__cpython-122075
# `statistics.mode` fails for unhashable data # Bug report ### Bug description: `statistics.mode` uses `collections.Counter` so only works for data that are hashable ```python from statistics import mode mode([{1,2},{1,2},{3}]) ``` raises`TypeError: unhashable type: 'set'` Same issue with `multimode`. ...
ebc18abbf34ff248764bda1a02db7f1c783b71e3
c4c7097e64b0c9cb0081de8872b90594865c892b
python/cpython
python__cpython-122140
# test_pyrepl: test_inspect_keeps_globals_from_inspected_* are very flaky # Bug report ### Bug description: When running the test suite on Gentoo Linux amd64 (with all CPUs busy), these tests are failing frequently: <details> ```pytb $ LD_LIBRARY_PATH=. ./python -u -W default -bb -E -m test --fast-ci --timeout= --...
2c1b1e7a07eba0138b9858c6f2bea3cae9af0808
624bda76386efd8eecf73c4ad06f997b9b25f07f
python/cpython
python__cpython-122086
# `typing_extensions.deprecated` and `warnings.deprecated` remove coroutine property; How to deprecate async functions? When I annotate an async function with `@deprecated(...)`, `inspect.iscoroutinefunction` no longer returns True. This is not what I expect to happen, as with `partial` from `functools` this does not ...
375c9f6dfb78345dd0966d6f3b281f15107b0561
2a5d1eb7073179a13159bce937afdbe240432e7d
python/cpython
python__cpython-125877
# test_ctypes: test_generated_data() fails on x86 Debian Installed with X 3.x # Bug report x86 Debian Installed with X 3.x build: https://buildbot.python.org/all/#/builders/1244/builds/2499 ``` FAIL: test_generated_data (test.test_ctypes.test_generated_structs.GeneratedTest.test_generated_data) (name='Packed4') Chec...
13c9fa3d64e0653d696daad716703ef05fd5002b
9c01db40aa5edbd75ce50342c08f7ed018ee7864
python/cpython
python__cpython-121926
# `console`, `empty_tuple`, `kwargs`, `console_result` might be uninitialized in `main.c` # Bug report Variables here are uninitialized: https://github.com/python/cpython/blob/ac07451116d52dd6a5545d27b6a2e3737ed27cf0/Modules/main.c#L263-L268 It can jump here: https://github.com/python/cpython/blob/ac07451116d52d...
f4bc84d261c828ed81f137f2a48fa2f0de7a0211
19cbf8fd636192059550d0c908c3e29797feed1f
python/cpython
python__cpython-135288
# Ambiguous symbol table names # Feature or enhancement Every symbol table has type and name. The name of the symbol table that corresponds a class or a function is the same as the name of the corresponding class or function. But there are special symbol tables of type function for lambdas and generator expressions (...
da699ed7e546ec106609a3858dd529335facaa4d
85ec3b3b503ffd5b7e45f8b3fa2cec0c10e4bef0
python/cpython
python__cpython-122269
# `create_connection` and `create_server` in `asyncio` didn't work with a Python build with IPv6 disabled # Bug report ### Bug description: Build Python with the configuration `--disable-ipv6`, and run the test with `./python.exe -m test test_asyncio.test_events -m 'test_create_connection_local_addr_skip_differe...
070f1e2e5b9b31ee3e7a1af2e30d7e3a66040b17
6c09b8de5c67406113e8d082e05c9587e35a852a
python/cpython
python__cpython-121907
# "floating point" vs "floating-point" @mdickinson in https://github.com/python/cpython/pull/26827#discussion_r1413049353 suggested to use the spelling "floating-point" (with a hyphen) instead of "floating point". Currently there are 118 occurrences of "floating-point" and at least 162 occurrences of "floating point" ...
1a0c7b9ba48a2dffb70bb0c7327abae1d3e87356
420d94312824825a18fa1fd9a36773626a54d97a
python/cpython
python__cpython-121892
# cmath.acosh(complex('±0+nanj')) should return complex('nan±pi/2j') (imaginary part sign is unspecified) # Bug report ### Bug description: As per C11 [DR#471](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2244.htm#dr_471) (adjusted resolution accepted for C17). See glibc patch: https://sourceware.org/git/?...
3462a80d2cf37a63fe43f46f64a8c9823f84531d
151934a324789c58cca9c7bbd6753d735454df5a
python/cpython
python__cpython-121883
# docs: inconsistent open and io.open audit-event parameters # Bug report ### Bug description: While working on [reproducible builds](https://reproducible-builds.org/) for [openSUSE](https://en.opensuse.org/openSUSE:Reproducible_Builds) (sponsored by the NLnet NGI0 fund), I found that our `openSUSE:Factory/python312...
24cf867bed6035f33cd3b38d89d303b7522f12a6
63ddd28cf3e4a9a11a39d03418c5ad92785af4ff
python/cpython
python__cpython-121872
# Documentation HTML varies from timestamp # Bug report ### Bug description: While working on [reproducible builds](https://reproducible-builds.org/) for [openSUSE](https://en.opensuse.org/openSUSE:Reproducible_Builds) (sponsored by the NLnet NGI0 fund), I found that building the `openSUSE:Factory/python311` doc, a ...
941b3b7f4473153bf99f4c47e99f34f7aefe51ac
f036a463dbc43d25712183dc6afa4e38c1aaf93d
python/cpython
python__cpython-121903
# CMultiplyNested closure crash: Python 3.13 regression Test extracted from Cython `tests/run/methodmangling_T5.py`: ```py class CMultiplyNested: def f1(self): __arg = 1 class D: def g(self, __arg): return __arg return D().g(_CMultiplyNested__arg=2) ...
cffad5c6ef9371b26e32556296cea2bfe8358b1a
bfdbeac355235f6831ace5b514264bd1908000e5
python/cpython
python__cpython-121866
# Crash on _PyDict_CheckConsistency with an empty instance dict When running a complicated application that involves Cython I am getting the following crash: ``` Objects/dictobject.c:716: _PyDict_CheckConsistency: Assertion failed: mp->ma_values->valid == 1 Enable tracemalloc to get the memory block allocation tr...
162b41f57757c1df40eb377985e2e877fb0f0ea3
c46d64e0ef8e92a6b4ab4805d813d7e4d6663380
python/cpython
python__cpython-121843
# Improve `PyBytes_FromStringAndSize` test coverage There's a fast-path in `PyBytes_FromStringAndSize` that is not covered: https://github.com/python/cpython/blob/8549559f383dfcc0ad0c32496f62a4b737c05b4f/Objects/bytesobject.c#L120-L124 Here: https://github.com/python/cpython/blob/8549559f383dfcc0ad0c32496f62a4b...
f6c7d8d79c4e17167af98f2e0cb4b1e55d7b5d3c
37611171af4dffbd139e0393873479ed973e9585
python/cpython
python__cpython-121835
# Improve `complex` C-API error descriptions There several things to improve: - Some functions do not have an error description at all: https://github.com/python/cpython/blob/7e91e0dcfe2faab1e1a4630e6f745aa30ca87b3d/Doc/c-api/complex.rst?plain=1#L106-L115 So, we should add that these functions can fail. - Some fun...
72dccd60735b597e99c007a7b69210763a746877
f6c7d8d79c4e17167af98f2e0cb4b1e55d7b5d3c
python/cpython
python__cpython-122150
# Test suite crashes when run single process `--with-pydebug` enabled # Crash report ### What happened? The `make testios` testing target crashes when compiled `--with-pydebug` enabled (as is done in CI). The error is a SIGABRT, raised during `test_types`; however, running `test_types` by itself isn't enough ...
863a92f2bc708b9e3dfa9828bb8155b8d371e09c
4a2607c1807982a107445b5a35240f587a61eb0d
python/cpython
python__cpython-121818
# Segfault in 3.13 when calling `PyEval_SetTrace` from a thread with no Python frames # Bug report ### Bug description: Given a `setup.py` with: ```python from setuptools import Extension from setuptools import setup setup( name="testext", version="0.0", ext_modules=[ Extension("testext", langua...
2b1b68939b15b913080a3403e3ba18e2a1f520ef
4134261ab831863565fefc7a04d05a1fc1bca2f8
python/cpython
python__cpython-121886
# The new repl sometimes does not show the error location when `SyntaxError` is raised # Bug report ### Bug description: When I run `def f[Foo, Foo](): ...` from a file, I get a nice error message including the location of the error: ```python File ".../test.py", line 1 def f[Foo, Foo](): ... ^...
354d55eb1fa40f272419aa6459ee5d2c4804c8ea
e077b201f49a6007ddad7c1b6e3069a037b6d952
python/cpython
python__cpython-121801
# Add class method Decimal.from_number() # Feature or enhancement It is an alternate constructor which only accepts a single numeric argument. Unlike to `Decimal.from_float()` it accepts also Decimal. Unlike to the standard constructor, it does not accept strings and tuples. Similar to `float.from_number()` and `com...
5217328f93f599755bd70418952392c54f705a71
4b358ee647809019813f106eb901f466a3846d98
python/cpython
python__cpython-121800
# Add class method Fraction.from_number() # Feature or enhancement It is an alternate constructor which only accepts a single numeric argument. Unlike to `Fraction.from_float()` and `Fraction.from_decimal()` it accepts any real numbers supported by the standard constructor (int, float, Decimal, Rational numbers). Unl...
b52c7306ea4470f9d7548655c2a1b89a07ff5504
66b3922b97388c328c9bd8df050eef11c0261fae
python/cpython
python__cpython-121796
# Improve performance of set membership testing from set arguments # Feature or enhancement ### Proposal: For set `s` and set `elem`, the operations `elem in s`, `s.remove(elem)`, and `s.discard(elem)` are equivalent to `frozenset(elem) in s`, `s.remove(frozenset(elem))`, and `s.discard(frozenset(elem))`, respective...
2408a8a22bd13d8f15172a2ecf8bbbc4355dcb3b
97668192f7670caebe04c0cbcc488ae0334597d9
python/cpython
python__cpython-121799
# `_Py_MergeZeroLocalRefcount` should not set `ob_tid` to zero in fast-path dealloc # Bug report The `_Py_MergeZeroLocalRefcount` function is called when the local refcount field reaches zero. We generally maintain the invariant [^1] that `ob_tid == 0` implies that the refcount fields are merged (i.e., `ob_ref_shared...
d23be3947ced081914f4458c84f729c9c37f0219
82a4dac9f6131954c32dac9d0277283fc5b499a9
python/cpython
python__cpython-121792
# `MethodDescriptor2_new` does not check for `NULL` in `_testcapi` # Bug report Here: https://github.com/python/cpython/blob/8303d32ff55945c5b38eeeaf1b1811dbcf8aa9be/Modules/_testcapi/vectorcall.c#L347-L354 I know that memory errors are very unluckily, but still: why not having a correct code? <!-- gh-linked-prs --...
8b6d4755812d0b02e9f26beb9c9a7714e4c5ac28
1755df7b3bf5aaaba55fd7ec02a91d99305e362e
python/cpython
python__cpython-121793
# `python3.13 -m asyncio` immediately fails with `TypeError` # Bug report ### Bug description: ```bash python -m asyncio ``` fails with: ``` asyncio REPL 3.14.0a0 experimental free-threading build (heads/main:4b9e10d0ea3, Jul 13 2024, 14:18:40) [GCC 11.4.0] on linux Use "await" directly instead of "asyncio.run()"....
e5c7216f376a06d2c931daf999e2980e494e747e
d23be3947ced081914f4458c84f729c9c37f0219
python/cpython
python__cpython-121787
# codecs.py: Legacy --disable-unicode branch # Bug report ### Bug description: (Not a bug report, but there is no appropriate category when creating an issue.) git HEAD as well as Python 3.12 has the following code in codecs.py: https://github.com/python/cpython/blob/8303d32ff55945c5b38eeeaf1b1811dbcf8aa9be/Lib/co...
74fbdcd74abc1bac6846ec92f00d21fe8f87610b
94bee45dee41876e88fe023b9163178d376355dc
python/cpython
python__cpython-121788
# Tier 1 code generator doesn't track used values if named `unused` # Bug report ### Bug description: The `_INIT_CALL_BOUND_METHOD_EXACT_ARGS` uop definition requires explicit code to force the function and `self` to be written to memory, or the values are lost. This is because following uops do not use those values...
3eacfc1a4d09a9807bedba58ef4037788b6df961
169324c27a39a4d6a4dd7b313b0de6ab2d1f7e6b
python/cpython
python__cpython-121750
# Discrepancy in docs for `PyModule_AddObjectRef` # Bug report ### Bug description: The docs for `PyModule_AddObjectRef` say: https://github.com/python/cpython/blob/cae15267166e217822e3c58ac22b7817162f323a/Doc/c-api/module.rst?plain=1#L520-L521 However the function actually returns `-1` in that case: https://gith...
26dfb2771236bfd96cdaa1081103f75141ecff47
cae15267166e217822e3c58ac22b7817162f323a
python/cpython
python__cpython-121754
# Inconsistent behaviour for ALT+Enter keybinding in pyrepl, ipython and ptpython # Bug report ### Bug description: IPython and ptpython use <kbd>ALT</kbd>+<kbd>Enter</kbd> to submit multiline input, regardless of the position of the cursor, but the new REPL does not. Looks like it'd be good to be consistent with th...
6522f0e438a8c56a8f3cce2095b193ea6e3f5016
74fbdcd74abc1bac6846ec92f00d21fe8f87610b
python/cpython
python__cpython-123037
# Can't open orphan path on bare importlib.resources.files() under zipapp # Bug report ### Bug description: Context: In Python 3.12 the function importlib.resources.files() was updated: https://docs.python.org/3/library/importlib.resources.html#importlib.resources.files > Changed in version 3.12: package parameter ...
ba687d9481c04fd160795ff8d8568f5c9f877128
3bd942f106aa36c261a2d90104c027026b2a8fb6
python/cpython
python__cpython-121732
# mimalloc build fails on GNU/Hurd due to undeclared 'open' # Bug report ### Bug description: # Bug description: The compilation of mimalloc on GNU/Hurd currently fails with the following error: ``` In file included from ../Objects/mimalloc/prim/prim.c:22, from ../Objects/mimalloc/static.c:37: ../...
d005f2c1861dbf0ab3d9f80b54d05d0c0b522c3c
5d6861ad06b524358f52603f242e7c0d57532a58
python/cpython
python__cpython-122154
# multiprocessing.Pool in spawn mode breaks logging.handlers.QueueHandler configuration # Bug report ### Bug description: multiprocessing.Pool with **spawn** method breaks logging.handlers.QueueHandler configuration ```python import logging import logging.config import multiprocessing import time def _init(q): ...
fb864c76cd5e450e789a7b4095832e118cc49a39
addbb73927f55855dfcc62fd47b0018de8a814ed
python/cpython
python__cpython-121714
# `python -m asyncio` returns 0 when failing with ENOTTY in the runner thread # Bug report ### Bug description: The return code at the end here is `0` when it should be `25` aka `ENOTTY`: ``` import subprocess proc = subprocess.Popen(["./python", "-m", "asyncio"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, stde...
a1834742936a3a2164c25c14ecf4ae6a95288ca3
178e44de8f023be7a5dc400044ab61983b191f24
python/cpython
python__cpython-121713
# Incomplete test coverage for `unittest.util` # Bug report ### Bug description: `safe_repr`, `sorted_list_difference` and `unorderable_list_difference` inside `unittest.util` are not properly tested. I'll send a PR shortly with some tests ;) ### CPython versions tested on: CPython main branch ### Operating syste...
901ea411bf51f59f2a4b0b4fec6f60d29c76ca05
a2bec77d25b11f50362a7117223f6d1d5029a909
python/cpython
python__cpython-121701
# Emscripten trampolines not quite right since #106219 # Bug report ### Bug description: `pycore_emscripten_trampoline.h` defines `_PyCFunctionWithKeywords_TrampolineCall` as a macro but `pycore_object.h` tries to declare it. This leads to a compile error. The fix is to delete the declaration from `pycore_object.h`....
3086b86cfda829e23a71569908edbfbcdc16327f
04130b290b545e64625c07dc8fa2709d17e70880
python/cpython
python__cpython-121699
# Emscripten: Use updated WebAssembly type reflection proposal # Bug report ### Bug description: The way to use WebAssembly type reflection has changed from a static method `WebAssembly.Function.type(wasmFunc)` to an instance method `wasmFunc.type()`. We use the old version here: https://github.com/python/cpython/bl...
cae15267166e217822e3c58ac22b7817162f323a
3086b86cfda829e23a71569908edbfbcdc16327f
python/cpython
python__cpython-121677
# Python implementation of `functools.reduce` accepts keyword arguments, while the C implementation does not # Bug report ### Bug description: Steps to reproduce: ```python printf '*disabled*\n_functools\n' > Modules/Setup.local ./configure --with-pydebug && make -j ./python Python 3.14.0a0 (heads/main:dc03ce797a, J...
d903b17499b1a3bfb3ea848f6a1b6da02eac3328
c5438fdf4706a70bdd19338edc000dacffff6837
python/cpython
python__cpython-121674
# Incomplete test coverage for `ast.get_docstring` # Bug report ### Bug description: The `ast.get_docstring` is missing test coverage: ![image](https://github.com/user-attachments/assets/82d0275e-79cd-4f91-a4c2-1683cdcfb0c9) I'll send a PR with some additional tests ;) ### CPython versions tested on: CPython mai...
0a26aa5007cb32610366c31fbac846b5fe2f4f90
fc2178117538c161471711073887f34bcd464cc1
python/cpython
python__cpython-121661
# `ga_getitem` can fail if `Py_GenericAlias` returns `NULL` # Bug report This code is problematic: https://github.com/python/cpython/blob/dc03ce797ae8786a9711e6ee5dcaadde02c55864/Objects/genericaliasobject.c#L565-L569 Why? `Py_GenericAlias` can return `NULL` in different cases: https://github.com/python/cpython/blob...
bb802db8cfa35a88582be32fae05fe1cf8f237b1
6505bda85a3b11c9012707896b0c3dee8a3855cb
python/cpython
python__cpython-121680
# Incorrect error message for `yield from` # Bug report ### Bug description: ```python % ./python.exe -c 'yield x' File "<string>", line 1 SyntaxError: 'yield' outside function % ./python.exe -c 'yield from x' File "<string>", line 1 SyntaxError: 'yield' outside function % ./python.exe -c 'async def f(): yield f...
178e44de8f023be7a5dc400044ab61983b191f24
f4d6e45c1e7161878b36ef9e876ca3e44b80a97d
python/cpython
python__cpython-122457
# Limited API way of assigning to immutable types and/or making a class immutable # Feature or enhancement ### Proposal: This is one of the uglier bits of Cython's limited API implementation. When we create our extension type ("cdef classes") we want them to be presented to users as immutable (mainly because ...
db96327203b09ada45f2214567f92fe4d837f82a
da8673da362a2135cd621ac619d3aced6bb55100
python/cpython
python__cpython-121653
# `weakrefobject.c` doesn't handle `allocate_weakref` failures # Bug report We need to handle the case where `allocate_weakref` returns `NULL` due to an out-of-memory error. https://github.com/python/cpython/blob/dc03ce797ae8786a9711e6ee5dcaadde02c55864/Objects/weakrefobject.c#L428-L439 <!-- gh-linked-prs --> ### L...
a640a605a8a1a3f73b98f948d0c2a7d42134f692
a1834742936a3a2164c25c14ecf4ae6a95288ca3
python/cpython
python__cpython-121724
# ``test_pdb`` fails with an ``--forever`` argument # Bug report ### Bug description: ```python ./python -m test -v test_pdb --forever == CPython 3.14.0a0 (heads/main:dc03ce797a, Jul 12 2024, 21:10:05) [Clang 15.0.0 (clang-1500.3.9.4)] == macOS-14.5-arm64-arm-64bit-Mach-O little-endian == Python build: debug == cwd:...
c0af6d4ff1705d9857c9f2e96acc142c5b8b84e9
a640a605a8a1a3f73b98f948d0c2a7d42134f692
python/cpython
python__cpython-121646
# [C API] Add PyBytes_Join() function # Feature or enhancement Python 3.13 alpha 1 removed the private `_PyBytes_Join(sep, iterable)` function which calls `sep.join(iterable)`. mypyc uses it. Since we already have `PyUnicode_Join(sep, iterable)`, I propose to add a new `PyBytes_Join()` function. In practice, it's j...
3d60dfbe1755e00ab20d0ee81281886be77ad5da
7fca268beee8ed13a8f161f0a0d5e21ff52d1ac1
python/cpython
python__cpython-121656
# Python/compile.c:7482: int compute_code_flags(struct compiler *): Assertion `IS_TOP_LEVEL_AWAIT(c) || _PyST_IsFunctionLike(ste)' failed # Crash report ### What happened? ``` ~/p/cpython ❯❯❯ ./python.exe -c 'compile("assert await u", "", "exec", optimize=2)' Assertion failed: (IS_TOP_LEVEL_AWAIT(c) || _PyST_IsFunct...
2762c6cc5e4c1c0d630568db5fbba7a3a71a507c
69f2dc5c06e62b4a9eb4da8f0cd456cc09b998ed
python/cpython
python__cpython-121622
# asyncio module state should be locked with mutexes in free-threaded builds # Feature or enhancement ### Proposal: Please see issue title. ### Has this already been discussed elsewhere? No response given ### Links to previous discussion of this feature: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-...
5d6861ad06b524358f52603f242e7c0d57532a58
bb802db8cfa35a88582be32fae05fe1cf8f237b1
python/cpython
python__cpython-121616
# Improve `module.rst` C-API docs There are multiple places in https://github.com/python/cpython/blob/main/Doc/c-api/module.rst where exception are not mentioned in the docs. Like: https://github.com/python/cpython/blob/690b9355e00d1ea52020fde3feb4c043a2b214e2/Doc/c-api/module.rst#L685 Some functions do not ...
e6264b44dc7221c713b14dfa0f5929b33d362829
690b9355e00d1ea52020fde3feb4c043a2b214e2
python/cpython
python__cpython-121757
# Copy-pasted multi-statement block cannot be extended with new REPL # Bug report ### Bug description: To reproduce, copy paste this into the Python REPL: ```python from dataclasses import dataclass @dataclass class Point: x: float y: float ``` You'll see: ```pycon >>> from dataclasses import dataclass ....
7d111dac160c658b277ec0fac75eee8edcfbe9dc
2b1b68939b15b913080a3403e3ba18e2a1f520ef
python/cpython
python__cpython-121667
# Pasting 🏳️‍🌈 crashes the new Python REPL # Crash report ### What happened? To reproduce, start the new Python REPL in 3.13.0b3 and start to assign a string: ```bash $ python3.13 Python 3.13.0b3 (main, Jul 2 2024, 13:24:06) [GCC 11.4.0] on linux Type "help", "copyright", "credits" or "license" for more...
e745996b2d24b9234f896bdc2f3320e49287dcd0
18015451d0e3f4d155d56f70faf9b76ce5b7ad79
python/cpython
python__cpython-121519
# Improve/clarify importlib recipe for loading code from a source file path > https://docs.python.org/3/library/importlib.html#importing-a-source-file-directly Ahh -- thanks -- I hadn't found that. That looks to me like it's the non-deprecated way to do: `module = SourceFileLoader(name, path).l...
38809171b8768517824fb62d48abe2cb0aff8429
cd06f5e32369c7816c7360cbb20fbe9f38b4f3a7
python/cpython
python__cpython-121606
# `test_pyrepl.run_repl` timeout is too small The timeout in `run_repl` of 0.5 seconds is too small and leads to spurious failures on slow/heavily loaded machines, or when running with sanitizers: https://github.com/python/cpython/blob/ef10110cd781afe8ddd3e65a54dc2b5ed2cb3187/Lib/test/test_pyrepl/test_pyrepl.py#L9...
abc3aeebdbae560476f2f8c0312e9a4bf0dbfd33
0a26aa5007cb32610366c31fbac846b5fe2f4f90
python/cpython
python__cpython-121597
# Sharing Interpreter Channels is Broken # Bug report ### Bug description: We try to load the channel end types from "test.support.interpreters.channel", which doesn't exist. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs ...
35a67e36aa7cb0fc915771327f58bb0c70213867
7641743d48b276de88a709ad40d715b6c5d7a2ea
python/cpython
python__cpython-121594
# `select.poll()` objects are not thread-safe in the free-threaded build # Bug report The [polling objects](https://docs.python.org/3/library/select.html#poll-objects) returned by [`select.poll`](https://docs.python.org/3/library/select.html#select.poll) and related functions are not thread-safe in the free-threade...
44937d11a6a045a624918db78aa36e715ffabcd4
e6264b44dc7221c713b14dfa0f5929b33d362829
python/cpython
python__cpython-121587
# Can't build C extensions with --enable-pystats builds # Bug report ### Bug description: After building with `--enable-pystats`, you can't build any C extensions because `Python.h` includes `pycode_uop_ids.h` (indirectly). ``` In file included from /home/mdboom/Work/builds/cpython/Include/pystats.h:16, ...
f036a463dbc43d25712183dc6afa4e38c1aaf93d
4e35dd607b0f32657341e6c4f583d14964ee1699
python/cpython
python__cpython-121572
# Do not use `EnvironmentError` in tests, use `OSError` instead # Bug report Since 3.3 `EnvironmentError` is just an alias for `OSError`. There are several places where it is still used. I propose to modernize the code. Just like we did with `IOError`. ```diff diff --git Lib/test/support/__init__.py Lib/test/support...
e2822360da30853f092d8a50ad83e52f6ea2ced9
22a0bdbf9a63f92f45106c7dc4377e45e0278e60
python/cpython
python__cpython-121568
# Improve `slice` C-API docs by mentioning exceptions There are two cases where we can add explicit `with exception set` part. First one is: https://github.com/python/cpython/blob/9585a1a2a251aaa15baf6579e13dd3be0cb05f1f/Doc/c-api/slice.rst#L21-L27 Notice this part: > Return `NULL` if the new object could no...
84a5597b08b7d53aced2fbd0048271ce762807a8
cced22c760a9398c27f0381048a1b3eb2e8ef50d
python/cpython
python__cpython-121563
# hex_from_char run faster replacing switch-case with lookup table # Feature or enhancement ### Proposal: Replacing switch-case in `hex_from_char` with a lookup table makes python `float.fromhex(...)` run 4%-5% faster. Probably if we measure `hex_from_char` in isolation we will get a much greater % improvement. htt...
04130b290b545e64625c07dc8fa2709d17e70880
f6f4022a357f70f1c40945403065e81b6c2e4854
python/cpython
python__cpython-121555
# remove _PyCompile_OpcodeHas* functions There are a bunch of functions in compile.c that expose data from pycore_opcode_metadata.h as private C API. These are only used in Modules/_opcode.c. However, Modules/_opcode.c can just include pycore_opcode_metadata.h and pycore_opcode_utils.h, and access this data direc...
6557af669899f18f8d123f8e1b6c3380d502c519
ef10110cd781afe8ddd3e65a54dc2b5ed2cb3187
python/cpython
python__cpython-121548
# duplicated code in compiler's const cache functions There is code duplication between `_PyCompile_ConstCacheMergeOne` and `merge_consts_recursive` - the former can be implemented in terms of the latter if we add a boolean "is-recursive" arg. <!-- gh-linked-prs --> ### Linked PRs * gh-121548 <!-- /gh-linked-prs...
cced22c760a9398c27f0381048a1b3eb2e8ef50d
e2822360da30853f092d8a50ad83e52f6ea2ced9
python/cpython
python__cpython-121740
# ContextVars are not thread-safe in the free-threaded build # Bug report The [ContextVar](https://docs.python.org/3/library/contextvars.html) implementation is not thread-safe in the free-threaded build: In particular, the caching is not thread-safe, although there may be other thread-safety issues as well: https:...
e904300882055bed71cae59f8ca9161066659b7c
6b98b274b60a15b490d2ea85069638c037b2a9cd
python/cpython
python__cpython-121543
# email: documenting different behavior of trailing newline in `set_content` and `set_payload` # Documentation See #121515, which reported that `set_content()` implicitly adds a newline to the end of the content (if it doesn't have one already), whereas `set_payload()` ignores it. Unfortunately, this would be a bre...
fba475ae6f932d0aaee6832b4102b2d4c50df70f
3de7cc15c2f3186b84c0fb105bc84c27e9589902
python/cpython
python__cpython-121534
# `PyCell_[G,S]et` does not document that they set an exception https://github.com/python/cpython/blob/9ba2a4638d7b620c939face7642b2f53a9fadc4b/Doc/c-api/cell.rst#L51-L56 We should add "returns `-1` with an exception set". <!-- gh-linked-prs --> ### Linked PRs * gh-121534 * gh-121539 * gh-121540 <!-- /gh-linked-pr...
649d5b6d7b04607dd17810ac73e8f16720c6dc78
9ba2a4638d7b620c939face7642b2f53a9fadc4b
python/cpython
python__cpython-121530
# Undocumented from_ parameter in _mboxMMDF methods Some _mboxMMDF methods have an extra from_ parameter which is currently undocumented. <!-- gh-linked-prs --> ### Linked PRs * gh-121530 * gh-131622 * gh-131623 <!-- /gh-linked-prs -->
557d2d20d484a7b22da39cdb876f6312ab66d561
a9a399f0ecfeeff91425cc089057f1b95799853b
python/cpython
python__cpython-121522
# Detect when wasmtime is not installed in `Tools/wasm/wasi.py` # Feature or enhancement ### Proposal: Right now, `Tools/wasm/wasi.py` calls `shutil.which()` at the global level of the file. That means you can end up w/ `None` in your `HOSTRUNNER` environment variable. ### Has this already been discussed elsewhere?...
f62161837e68c1c77961435f1b954412dd5c2b65
80209468144fbd1af5cd31f152a6631627a9acab
python/cpython
python__cpython-121531
# The pyrepl cache doesn't play well with history Type the following in the REPL: ``` >>> def foo(): ... x = 1 ... y = 2 ... z = 3 ... >>> def bar(): ... return 42 ... ``` Now press up arrow 3 times to go to the `foo` function. The REPL shows: ``` >>> def bar(): ... x = 1 ... ...
4b9e10d0ea352592049c1f2a00318d7274143fa4
e745996b2d24b9234f896bdc2f3320e49287dcd0
python/cpython
python__cpython-121498
# Pyrepl doesn't respect correctly the history with input hook set When an input hook is set, Pyrepl doesn't correctly display the history until a new key press is made. <!-- gh-linked-prs --> ### Linked PRs * gh-121498 * gh-121703 <!-- /gh-linked-prs -->
4e36dd7d87eb0f1bd1ecd53e368c16a5f75967a0
dc03ce797ae8786a9711e6ee5dcaadde02c55864
python/cpython
python__cpython-121488
# Deprecation warning for ATOMIC_VAR_INIT in mimalloc # Bug report ### Bug description: `ATOMIC_VAR_INIT` is marked as deprecated in C17 and C++20. ```cpp /.../cpython/Include/internal/mimalloc/mimalloc/atomic.h:42:14: error: macro 'ATOMIC_VAR_INIT' has been marked as deprecated [-Werror,-Wdeprecated-pragma] (diff)...
31873bea471020ca5deaf735d9acb0f1abeb1d3c
db00fee3a22db1c4b893b432c64a8123d7e92322
python/cpython
python__cpython-121486
# Use 64-bit integers for bit counts Some internal C functions represent the number of bits in the Python integer as `size_t` or `Py_ssize_t`. It is fine on 64-bit platforms, where you need exbibytes of memory to get an overflow error. But on 32-bit platform you can create an integer objects that has a size of just 0....
32c7dbb2bc58bee953622fc5ac24aad123f0d8f2
58ce131037ecb34d506a613f21993cde2056f628
python/cpython
python__cpython-121478
# PyLong_FromString() docs should point to C API functions rather than to int.to_bytes()/from_bytes() Patch: ```diff diff --git a/Doc/c-api/long.rst b/Doc/c-api/long.rst index 42162914c0..a43a46a55a 100644 --- a/Doc/c-api/long.rst +++ b/Doc/c-api/long.rst @@ -94,9 +94,9 @@ distinguished from a number. Use :c:fu...
ce4b9c8464706a58d0c98c2b0deeec07e7496ccc
e9287ea426e8e1b930f1c3f0cb949a1416d29090
python/cpython
python__cpython-121480
# Barrier hangs indefinitely when arg `parties` < 0 or invalid type # Bug report ### Bug description: `threading.Barrier` at no point checks for valid `parties`. `parties`, of a negative value, or invalid type hang indefinitely on `.wait()`. This behavior is inconsistent from the behavior of any other `threading...
d27a53fc02a87e76066fc4e15ff1fff3922a482d
3a9b2aae615165a40614db9aaa8b90c55ff0c7f9
python/cpython
python__cpython-121469
# Mimalloc headers are not being installed # Bug report ### Bug description: An error in the makefile causes `make install` / `make inclinstall` to skip the `internal/mimalloc` headers. Instead the output for the corresponding line is ``` /bin/sh: 1: test: yes: unexpected operator ``` To fix that, the sting compari...
5aa1e60e0cc9c48abdd8d2c03fcc71927cf95204
c8669489d45f22a8c6de7e05b7625db10befb8db
python/cpython
python__cpython-121465
# pathlib docs: table of corresponding os/os.path functions is disorganised # Documentation The [*Corresponding tools* table](https://docs.python.org/3.14/library/pathlib.html#corresponding-tools) in the pathlib docs has evolved organically and is overdue some editing. <!-- gh-linked-prs --> ### Linked PRs * gh-12...
cbac8a3888411587beb026e246889154fbdd49a3
45614ecb2bdc2b984f051c7eade39458a3f8709f
python/cpython
python__cpython-121466
# `os.path.normpath` documentation is not correctly indented # Documentation https://github.com/python/cpython/blob/b765e4adf858ff8a8646f38933a5a355b6d72760/Doc/library/os.path.rst?plain=1#L384-L402 Note that on this line https://github.com/python/cpython/blob/b765e4adf858ff8a8646f38933a5a355b6d72760/Doc/libr...
bf74db731bf108e880348f2925160af61570dbf4
5aa1e60e0cc9c48abdd8d2c03fcc71927cf95204
python/cpython
python__cpython-121491
# test.test__interpchannels.ChannelTests.test_channel_list_interpreters_released hangs on 32-bit ARM --pydebug builds # Bug report ### Bug description: It looks like there's a memory handling error in interpreter cleanup, that manifests on 32-bit ARM `--pydebug` builds. In Debian tests of 3.13.0 beta 3 on `ar...
a802277914405786f6425f2776605c44bd407fc0
0177a343353d88ca8475dccabf6e98e164abb0e8
python/cpython
python__cpython-123128
# PEP 703 Deferred reference counts # Feature or enhancement ### Proposal: [PEP 703](https://peps.python.org/pep-0703/#deferred-reference-counting) proposes deferred reference counting to reduce contention between threads on shared objects' reference count fields. This issue is not in conflict with Faster CPy...
8810e286fa48876422d1b230208911decbead294
74330d992be26829dba65ab83d698d42b2f2a2ee
python/cpython
python__cpython-121454
# Doc `tools/templates/download.html` missing `texinfo` format download link # Bug report ### Bug description: In python 3.8, added support for `texinfo` format https://github.com/python/cpython/pull/14606, but not added link in https://github.com/python/cpython/blob/main/Doc/tools/templates/download.html And...
37611171af4dffbd139e0393873479ed973e9585
941b3b7f4473153bf99f4c47e99f34f7aefe51ac
python/cpython
python__cpython-121451
# Inline breakpoints should use the most recent pdb isntance, instead of creating a new one # Feature or enhancement ### Proposal: Currently, the inline breakpoints (`breakpoint()` or `pdb.set_trace()`) will create a new pdb instance, which breaks all the instance-specific feature for pdb. For example, all the `disp...
690b9355e00d1ea52020fde3feb4c043a2b214e2
6557af669899f18f8d123f8e1b6c3380d502c519
python/cpython
python__cpython-121428
# PyTupleObjects with an ob_size of 20 are not reused. # Bug report ### Bug description: In the `maybe_freelist_push` function, PyTupleObjects with an ob_size of 20 are being stored in the free_list for potential reuse. However, in the `maybe_freelist_pop` function, these objects aren't actually being reused. `...
9585a1a2a251aaa15baf6579e13dd3be0cb05f1f
f62161837e68c1c77961435f1b954412dd5c2b65
python/cpython
python__cpython-121424
# Speed up `socket.errorTab` and lazy import `selectors` # Feature or enhancement ![socket](https://github.com/python/cpython/assets/71213467/2d5674b2-8a9f-44cb-bdcf-e34ead4ca362) ``` >python -m timeit -n 1000 -s "import socket" "print(socket.__all__)" 1000 loops, best of 5: 407 usec per loop >python -m timeit -n 1...
7bd964dbbe301059f3971b1be281bee0938bc70a
91ff700de28f3415cbe44f58ce84a2670b8c9f15
python/cpython
python__cpython-121500
# split compiler.c into compiler and codegen compile.c is one of the largest source files in python (at about 8000 lines). Most of the code is code generation functions (the AST traversals). Most of the complexity is in the compiler data structure management. In this work I will split out the code generation fun...
2be37ec8e2f68d2c2fce7ea7b9eef73d218a22f9
1d3cf79a501a93a7a488fc75d4db3060c5ee7d1a
python/cpython
python__cpython-121626
# Calling PyList_GetItemRef after PyList_New segfaults # Crash report ### What happened? While working on Pillow, I came across the following issue: I'm getting a crash when calling `PyList_GetItemRef` immediately after calling `PyList_New` since list item is initialized to `NULL`. ```c PyObject *list = PyList_New...
2bac2b86b1486f15038fb246835e04bb1b213cd8
498a94c198e72525b8a7f4cb4f4a8957560f593a
python/cpython
python__cpython-121391
# Memory leak in tracemalloc # Bug report ### Bug description: The `tracemalloc_tracebacks` hash table has traceback keys and NULL values, but its destructors do not reflect this -- `key_destroy_func` is NULL while `value_destroy_func` is `raw_free`. The leaked traceback keys can be seen with AddressSanitizer: ...
db39bc42f90c151b298f97b780e62703adbf1221
cb688bab08559079d0ee9ffd841dd6eb11116181
python/cpython
python__cpython-121383
# subprocess._USE_VFORK doesn't change usage of vfork # Bug report ### Bug description: Discussion: https://discuss.python.org/t/subprocess-use-vfork-escape-hatch-broken-fix-or-remove/56915 This flag was added as an escape hatch in gh-91401 and backported to Python 3.10. The flag broke at some point between its add...
a9344cdffa30fdf60154d645f9e74ab3d67ae2e9
82db5728136ebec3a1d221570b810b4128a21255
python/cpython
python__cpython-121418
# 3.13 Incorrect Docstrings in `_interpchannels` # Bug report ### Bug description: There are some slightly incorrect docstrings in `_interpchannels`: - `send` enforces kwargs after `obj`, and has a timeout kwarg. - `send_buffer` enforces kwargs after `obj`, and has a timeout kwarg. ### CPython versions te...
5289550b33de3d56f89a5d44a665283f7c8483a7
8ad6067bd4556afddc86004f8e350aa672fda217
python/cpython
python__cpython-121388
# TypeError: descriptor 'some_method' for 'A' objects doesn't apply to a 'B' object # Bug report I found a bug that seems to be code corruption. While working on an example project with ~70 threads, I occasionally (once every hour or so) get the following exception from various locks: ``` Exception in thread...
1d3cf79a501a93a7a488fc75d4db3060c5ee7d1a
31873bea471020ca5deaf735d9acb0f1abeb1d3c
python/cpython
python__cpython-122663
# dis: BUILD_LIST docs incorrectly say count must be > 0 # Documentation The `dis` module docs for `BUILD_LIST` (and `BUILD_SET` and `BUILD_TUPLE`) say that the `count` argument must be > 0: https://github.com/python/cpython/blob/17d5b9df10f53ae3c09c8b22f27d25d9e83b4b7e/Doc/library/dis.rst?plain=1#L1081-L1098 ...
1422500d020bd199b26357fc387f8b79b82226cd
5207adf228547273b0e8d0253c23c69b95d7fe11
python/cpython
python__cpython-121414
# test_pyrepl.test_exposed_globals_in_repl failure # Bug report ### Bug description: I'm seeing this on a Dell laptop running XUbuntu 22.04 and MacBook Pro M1 running MacOS 14.5. In both cases, Python was built on main with the following sequence: ``` git fetch --all git pull git clean -fdx ./configure nice make -j...
6239d41527d5977aa5d44e4b894d719bc045860e
892e3a1b708391cb43517a141f9b9712e047b8a4
python/cpython
python__cpython-121356
# Minor error in simple_stmts.rst # Documentation https://github.com/python/cpython/blob/2f5f19e783385ec5312f7054827ccf1cdb6e14ef/Doc/reference/simple_stmts.rst?plain=1#L296 In this line, isn't it should be `assignment statement`, not `assignment expression`? <!-- gh-linked-prs --> ### Linked PRs * gh-121...
715ec630dd78819ed79cad5ac28617daefe1e745
06a1c3fb24c4be9ce3b432022ebaf3f913f86ba7
python/cpython
python__cpython-121353
# Use _Py_SourceLocation in symtable We now have the ``_Py_SourceLocation`` which captures a 4-int source location range. We can use it in symtable instead of passing 4 ints around everywhere. <!-- gh-linked-prs --> ### Linked PRs * gh-121353 <!-- /gh-linked-prs -->
19d1e43e43df97d14c5ab415520b6ccd941e1c88
2f5f19e783385ec5312f7054827ccf1cdb6e14ef
python/cpython
python__cpython-121422
# test_pyrepl: test_not_wiping_history_file() fails (randomly?) on multiple buildbots Example with s390x Fedora 3.x: https://buildbot.python.org/all/#/builders/223/builds/6180 ``` FAIL: test_not_wiping_history_file (test.test_pyrepl.test_pyrepl.TestMain.test_not_wiping_history_file) ------------------------------...
68e279b37aae3019979a05ca55f462b11aac14be
114389470ec3db457c589b3991b695258d23ce5a
python/cpython
python__cpython-121340
# MSVC pragma to turn compiler optimization off around the _PyEval_EvalFrameDefault is no longer necessary # Bug report ### Bug description: When the Tier 2 interpreter loop was first merged with the Tier 1 interpreter loop, the MSVC compiler would crash when building for PGO, presumably due to the very large size o...
d69529d31ccd1510843cfac1ab53bb8cb027541f
59be79ae60073f7b6bdf6ce921560c279937e4ab
python/cpython
python__cpython-121335
# Clarify what is the default executor for `asyncio.run_in_executor` # Documentation The document of asyncio said: https://github.com/python/cpython/blob/84512c0e7f4441f060026f4fd9ddb7611fc10de4/Doc/library/asyncio-eventloop.rst?plain=1#L1263-L1264 But it dosn't mention that what is the default executor, like...
facf9862da0cf9331550747197800d682cd371fb
15d48aea02099ffc5bdc5511cc53ced460cb31b9
python/cpython
python__cpython-121334
# ast constructors should look at `_attributes` for allowed attributes # Bug report ### Bug description: https://github.com/python/cpython/pull/121162/files#r1664259401 ### CPython versions tested on: 3.13, CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs ...
58e8cf2bb61f82df9eabd1209fe5e3d146e4c8cd
44937d11a6a045a624918db78aa36e715ffabcd4
python/cpython
python__cpython-121302
# 3.13 `copy.replace` isn't in `__all__` # Bug report ### Bug description: `copy.replace` isn't exported as a part of `__all__` in the `copy` module. This seemed liked an oversight, as opposed to being intentional, but feel free to close this issue if not. ### CPython versions tested on: 3.13 ### Operating syste...
7c66906802cd8534b05264bd47acf9eb9db6d09e
ca2e8765009d0d3eb9fe6c75465825c50808f4dd
python/cpython
python__cpython-121815
# KeyboardInterrupt during paste breaks the new REPL # Bug report ### Bug description: To reproduce, type `f = """` then paste a giant block of text (I pasted [the text of Frankenstein](https://github.com/asweigart/codebreaker/blob/master/frankenstein.txt)) then press Ctrl+C immediately (while the text is being past...
498a94c198e72525b8a7f4cb4f4a8957560f593a
7d111dac160c658b277ec0fac75eee8edcfbe9dc
python/cpython
python__cpython-121286
# Remove backtracking from parsing tarfile members and headers ### Bug description: Today the `tarfile` module parsing of header values allows for backtracking when parsing header values. Headers have a well-known format that doesn't require backtracking to parse reliably, the new method of parsing will only require ...
34ddb64d088dd7ccc321f6103d23153256caa5d4
0cba289870d5cd41f24b2f63b9480e4593aa2330
python/cpython
python__cpython-122754
# email: invalid RFC 2047 address header after refolding with email.policy.default # Bug report ### Bug description: If an email message (modern or legacy) is assigned an address header that is pre-encoded with RFC 2047, calling as_bytes(policy=default) can generate an invalid address header. The resulting header m...
295b53df2aa18deb625a7da41f7e4babfe6ef34b
ab6333f7f56554bfd6c01eff567ddfb163a3dae6