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-106211
# Emscripten import trampoline is not needed As far as I know the import isn't actually needed. It was originally added to work around typos in the CPython test suite, but those typos have since been fixed and I am unaware of any user code that requires the trampoline. <!-- gh-linked-prs --> ### Linked PRs * gh-10621...
e7bc8d16364bde54487eab349a29d58345e35f28
cea9d4ea82abcb2c6f1d83a2fe819859da4bbda4
python/cpython
python__cpython-106201
# Multiple unused imports in the source code Found by https://github.com/python/core-workflow/issues/505 Affected: ``` Lib/poplib.py:454:5: F811 redefinition of unused 'sys' from line 19 Lib/test/test_capi/test_misc.py:1826:9: F811 redefinition of unused 'json' from line 9 Lib/test/test_capi/test_misc.py:1905...
d830c4a944bcdcc8fe729a60f438fc762965eec1
6c60684bf5d34fae27a2f6a142ff794b38cefe1b
python/cpython
python__cpython-106198
# `test_multiple_inheritance_buffer_last` is duplicated in `test_buffer` Based on https://github.com/python/core-workflow/issues/505 Source: https://github.com/python/cpython/blob/bbf722dcd39c66418e45991dcf1cdf140c2ce20e/Lib/test/test_buffer.py#L4697-L4754 There are two different tests with the same name. One mu...
c283a0cff5603540f06d9017e484b3602cc62e7c
18f51f91e24402a24a0daa53fcbc81a5a2e9af94
python/cpython
python__cpython-106196
# `test_curses` has duplicated tests From https://github.com/python/core-workflow/issues/505 ``` Lib/test/test_curses.py:1371:5: F811 redefinition of unused 'test_move_left' from line 1362 ``` Source: https://github.com/python/cpython/blob/bbf722dcd39c66418e45991dcf1cdf140c2ce20e/Lib/test/test_curses.py#L1362-...
3fb7c608e5764559a718ce8cb81350d7a3df0356
4bde89462a95e5962e1467cfc1af5a6094c0c858
python/cpython
python__cpython-109139
# `test_monitoring` has duplicated tests Based on https://github.com/python/core-workflow/issues/505 by @hugovk ``` Lib/test/test_monitoring.py:973:5: F811 redefinition of unused 'test_line_then_instruction' from line 950 Lib/test/test_monitoring.py:978:5: F811 redefinition of unused 'test_instruction_then_line'...
ea530f2f9ae63e81c22a1818bec0a650ccf758d2
17d65547df55eaefe077c45242a7f2d175961dfd
python/cpython
python__cpython-107016
# email.parser header-only parsing records MultipartInvariantViolationDefect for valid multipart emails # Bug report A valid multipart email message, when parsed with `email.parser.HeaderParser(policy=email.policy.default)` will record a `email.errors.MultipartInvariantViolationDefect`. If the parser isn't going...
c65592c4d6d7552fb6284442906a96a6874cb266
54632528eeba841e4a8cc95ecbd84c9aca8eef57
python/cpython
python__cpython-106187
# `test_traceback` does not run one set of `CPythonTracebackErrorCaretTests` Based on @hugovk work in https://github.com/python/core-workflow/issues/505 I found that we have two duplicated class `CPythonTracebackErrorCaretTests` here: https://github.com/python/cpython/blob/a3dd8cce58fe2b27eea4eed572d086dc8a7e1bb8/Lib/...
7c89f1189229c5c67a3766e24ecf00cde658b7fd
233b8782886939176982a90f563d552757cbf34e
python/cpython
python__cpython-106183
# `sys.getfilesystemencoding()` should return interned string # Feature or enhancement Intern `sys.getfilesystemencoding()` output. # Pitch fsencoding string may be cached and reused. (After `sys._enablelegacywindowslegacyfsencoding()` is removed, we can cache fsencoding object.) <!-- gh-linked-prs --> ##...
f1034ba7f67400e7ed7e299dc8b22521c4e43246
77ddc9a7b1b28c8b8aee6cc97e483185a56819a6
python/cpython
python__cpython-106164
# C API: Check in PyTuple_SET_ITEM() and PyList_SET_ITEM() The PyTuple_SET_ITEM() and PyList_SET_ITEM() functions don't check that the index is valid. It should be checked with an assertion. <!-- gh-linked-prs --> ### Linked PRs * gh-106164 * gh-111480 * gh-111618 * gh-111683 <!-- /gh-linked-prs -->
3f8483cad2f3b94600c3ecf3f0bb220bb1e61d7d
161012fc25910a47423bae8012398bf519a88140
python/cpython
python__cpython-106181
# test_array modifies `warnings.filter` ``` $ ./python -m test test_array --fail-env-changed -m test.test_array.ArrayReconstructorTest.test_error 0:00:00 load avg: 17.75 Run tests sequentially 0:00:00 load avg: 17.75 [1/1] test_array Warning -- warnings.filters was modified by test_array Warning -- Before: (140...
a3dd8cce58fe2b27eea4eed572d086dc8a7e1bb8
541a10f9ed193a79aeea5e244bca6f6485d0689f
python/cpython
python__cpython-106167
# Fix `test_gzip` failure under WASI https://github.com/python/cpython/commit/1858db7cbdbf41aa600c954c15224307bf81a258 introduced a dependency on `zlib` in `test_gzip` (see https://buildbot.python.org/all/#/builders/1046/builds/2315 for the first failure), but `zlib` is not guaranteed to exist. /cc @Yhg1s <!-- gh...
161012fc25910a47423bae8012398bf519a88140
84caa3324aaefb900895de2f946607cfdbe1be70
python/cpython
python__cpython-106161
# [3.12] cProfile counts 0 primitive calls for builtins.exec in certain scenario # Bug report In 3.12, cProfile can count 0 primitive calls and miscalculate cumulative time in the following scenario. For this layout: ``` script.py project/ typing.py ``` And the file contents: script.py ```python i...
cea9d4ea82abcb2c6f1d83a2fe819859da4bbda4
7b2d94d87513967b357c658c6e7e1b8c8d02487d
python/cpython
python__cpython-106150
# tidy up the division of work between compile.c and flowgraph.c Following the split of the compiler into 3 parts in #87092, the resolution of jump targets is still in the optimizer, but it should move to the assembler. There are also a few operations in compile.c that could move into the optimizer. <!-- gh-link...
529088100952b31797a29ef7e0f5716613b32d66
eaa1eae55ea66d74c5303924320185dac74d4eb1
python/cpython
python__cpython-106224
# AST nodes for PEP 695 type param syntax do not require `end_lineno` nor `end_col_offset` # Bug report Unlike AST nodes for 3.10 match syntax, AST nodes for 3.12 type param syntax (PEP 695) do not require `end_lineno` nor `end_col_offset`. For 3.10 match syntax, this question was discussed [here](https://github.c...
46c1097868745eeb47abbc8af8c34e8fcb80ff1d
904aef994262383ae916545908f0578c2d53cf31
python/cpython
python__cpython-106143
# Reorder some fields to facilitate out-of-process inspection Some of the relevant fields in the interpreter state and the frame state in 3.12 are **very** challenging to fetch from out of process tools because they are in offsets that depend on compilation or platform variables that are different in different platfor...
2d5a1c281161d037148ffb5983decc6d31c2557d
bb578a0c304dffe43bb28b36b2b1c9153c78b659
python/cpython
python__cpython-106271
# Add more cases to `test_patma` While anwsering https://github.com/python/cpython/issues/106133 I've noticed that `test_patma` does not have tests for some corner-cases: 1. Case `case [x] | x: ...` is mentined in https://peps.python.org/pep-0634/#capture-patterns but is never tested, the closest we have to it is `ca...
904aef994262383ae916545908f0578c2d53cf31
2062e115017d8c33e74ba14adef2a255c344f747
python/cpython
python__cpython-106124
# Modules/_sha3 is created by configure, but no longer an actual source directory # Bug report I noticed that `make distclean` didn't compare correctly with a fresh clone (after accounting for files I expected it wouldn't be expected to clean up). It left an empty `Modules/_sha3` directory which used to hold files,...
0345b0c2bbf251a0f475cf53e0fb04c79a220e52
51fc72511733353de15bc633a3d7b6da366842e4
python/cpython
python__cpython-106120
# 3.12.0b3 build issue: 'O_CLOEXEC' undeclared in sysmodule.c I am building Python 3.12.0b3 (3.11.X builds fine) on CentOS 5 using glibc-2.5 and gcc-4.8.5 and I encounter this build error: gcc-4.8 -std=gnu11 -pthread -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter...
6c60684bf5d34fae27a2f6a142ff794b38cefe1b
bbf722dcd39c66418e45991dcf1cdf140c2ce20e
python/cpython
python__cpython-106112
# The zipapp module documentation includes out of date notes on creating a Windows executable # Documentation As noted in #72434, the zipapp documentation contains a section covering "How to create a Windows executable". This section was never entirely complete, and is now inaccurate as the `distutils` library is n...
5d4dbf0e309255e5bce9e31d805a8f950ebf9161
1a2bc94fc2bbdf5f810b441ebbbd8fec95a3207c
python/cpython
python__cpython-106109
# Docs: dataclasses: wrong error documented # Documentation [Data Classes - Mutable default values](https://docs.python.org/3/library/dataclasses.html#mutable-default-values) says in the second blockquote > x: list = [] # This code raises **ValueError** but in the explanantion (two paragraphs down)...
512f299e557f4ab60768d36cee9968bd92116367
219effa876785408a87bd6acb37c07ee0d25f3f9
python/cpython
python__cpython-106875
# Segmentation fault in 3.11.4, 3.12.0b3; _PyInterpreterFrame ownership issue # Crash report This test case (minimized from a crash in the Zulip test suite) causes a segmentation fault in Python 3.11.4 and 3.12.0b3. https://github.com/andersk/python-segfault ```console $ git clone https://github.com/andersk/...
557b05c7a5334de5da3dc94c108c0121f10b9191
052a0d1106fa3ee0c955a3b7ba48e82c49424e20
python/cpython
python__cpython-106085
# C API: Remove private functions from abstract.h Over the years, we accumulated many private functions as part of the public C API in abstract.h header file. I propose to remove them: move them to the internal C API. <!-- gh-linked-prs --> ### Linked PRs * gh-106085 * gh-106088 * gh-106103 * gh-106106 * gh-106159 <!...
00e75a33728cdad7c10088acc36bc55b2f4a0efe
93a970ffbce58657cc99305be69e460a11371730
python/cpython
python__cpython-106079
# Isolate the `_decimal` extension module This issue is used to track the PRs split from [gh-103092](https://github.com/python/cpython/pull/103381). Isolate the `_decimal` extension module by: * Establish a global module state and convert static types to heap types * Move other global static variables to the glob...
fb0d9b9ac1ec3ea13fae8b8ef6a4f0a5a80482b3
0e24499129f3917b199a6d46fa33eeedd2c447fc
python/cpython
python__cpython-106090
# `asyncio.__init__` does not include `asyncio.taskgroups` in its `__all__` I'm not sure if I should file this as a bug or a feature...I just noticed it in [a discussion](https://discuss.python.org/t/add-the-export-keyword-to-python/28444/13), and thought I'd raise the issue. It's possible this is intended behavior. ...
a12e8ffb49e05a1d1874389318911ce9685db232
3eeb8c89063d5ac22c0b1d26e4ae2fd12c149650
python/cpython
python__cpython-106108
# Memory leak in AST parsing (OSS-Fuzz #60074) # Bug report Reported by OSS-Fuzz (issue [60074](https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=60074)). Build cpython with: ```sh CC=clang CFLAGS="-fsanitize=address" LDFLAGS="-fsanitize=address" ./configure --prefix=<prefix> ASAN_OPTIONS=detect_leaks=0...
24fb627ea7a4d57cf479b7516bafdb6c253a1645
e1d45b8ed43e1590862319fec33539f8adbc0849
python/cpython
python__cpython-106515
# Possessive quantifier matches where an ordinary quantifier doesn't ```python >>> import re >>> re.fullmatch('(?:ab?c)*', 'a') >>> re.fullmatch('(?:ab?c)*+', 'a') <re.Match object; span=(0, 1), match='a'> >>> ``` I'm not sure that I completely understand the behavior of the possessive quantifiers, but I thin...
7b6e34e5baeb4162815ffa4d943b09a58e3f6580
73507382ac184a72b59ebb0c2f85e8b1d2dfa58e
python/cpython
python__cpython-106082
# Improve error message from `os.fspath` if `__fspath__` is set to `None` # Feature or enhancement A common Python idiom is to set a magic method to `None` in a subclass if you want to disable the behaviour that the magic method enables. If you do so, a nice error message will be given if a user tries to "call" the...
93a970ffbce58657cc99305be69e460a11371730
8c24a837371439b8e922ff47275085b581f510c5
python/cpython
python__cpython-106034
# PyDict_GetItem and PyObject_HasAttr should not be used These functions are broken by design, because they discard any exceptions raised inside, including MemoryError and KeyboardInterrupt. There were several rounds of getting rid of them in past (for example 567eba1852ed89e5cf93dbce33f7e2ca73e8f05d, #11112, #75753),...
1d33d5378058671bfabb6f4d4b5bfd4726973ff9
41ad4dfc04c201728ce9fa12b1a96922dd15a368
python/cpython
python__cpython-106031
# Miscellaneous fixes in Python/suggestions.c * PyDict_GetItem() and PyObject_HasAttr() suppress arbitrary errors and should not be used. * PyUnicode_CompareWithASCIIString() only works if the second argument is ASCII string. * Refleak in get_suggestions_for_name_error. * Use of borrowed pointer after possibl...
c8c162ef5294cddb7ac75fe93ab918e5661c68ee
9499b0f138cc53b9a2590350d0b545d2f69ee126
python/cpython
python__cpython-106257
# C API: What's the status of the half-private FASTCALL calling convention? Hi, In 2017, I added a new experimental FASTCALL calling convention. See my articles about it: [The start of the FASTCALL project](https://vstinner.github.io/start-fastcall-project.html) and [FASTCALL microbenchmarks](https://vstinner.githu...
8c5f74fc89e35827c52753fe620b32207d537319
e7bc8d16364bde54487eab349a29d58345e35f28
python/cpython
python__cpython-106017
# Crash in test_import: Assertion error about monitoring version. This `./python -m test -j1 -R 3:3 test_import -v -m test_concurrency -m test___cached___legacy_pyc -m test_package___cached___from_pyc` Crashes with `Assertion `code->_co_instrumentation_version == tstate->interp->monitoring_version' failed.` <!-...
9339d70ac2d45743507e320e81e68acf77e366af
a72683ba8e0337650cc490dbe593a5e46aba60cb
python/cpython
python__cpython-106003
# Make implicit boolean conversions explicit ...as discussed in https://github.com/faster-cpython/ideas/issues/568. By adding a dedicated instruction for converting values to bool, we can easily specialize the conditions of all remaining branches in the bytecode while keeping the branches themselves as "dumb" and s...
7b2d94d87513967b357c658c6e7e1b8c8d02487d
6e9f83d9aee34192de5d0ef7285be23514911ccd
python/cpython
python__cpython-106005
# C API: Add PyDict_GetItemRef() function The PyDict C API has a bad history. PyDict_GetItem() ignores all exception: error on hash(), error on "key == key2", KeyboardInterrupt, etc. PyDict_GetItemWithError() was added to fix this design. Moreover, Python 3.9 and older allowed to call PyDict_GetItem() with the GIL rel...
41ca16455188db806bfc7037058e8ecff2755e6c
0ba07b2108d4763273f3fb85544dde34c5acd40a
python/cpython
python__cpython-105995
# asyncio.EventLoop.start_tls() returns None # Bug report The documentation says the function should return a transport: https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.loop.start_tls But, in some cases it actually returns None. It looks like this may happen when it receives a closing transport...
6b52a581c151914e59c8c367a03bc7309713a73b
a3dd8cce58fe2b27eea4eed572d086dc8a7e1bb8
python/cpython
python__cpython-105989
# Crash in `_asyncio._swap_current_task` due to improper reference counting First appeared in a474e04388c2ef6aca75c26cb70a1b6200235feb, where given function was introduced. Repro: ```python import _asyncio class DummyLoop: pass class DummyTask: pass l = DummyLoop() _asyncio._swap_current_task(...
d2cbb6e918d9ea39f0dd44acb53270f2dac07454
4849a80dd1cbbc5010e8749ba60eb91a541ae4e7
python/cpython
python__cpython-105980
# Assertion failure in `_imp.get_frozen_object` if data object contains bad marshal data Repro: ```python import _imp >>> _imp.get_frozen_object('x', b"6\'\xd5Cu\x12") ``` Output: ``` python: Objects/object.c:541: PyObject_Repr: Assertion `!_PyErr_Occurred(tstate)' failed. Aborted (core dumped) ``` I'll subm...
cd5280367a3a7065d13b8f7234474f7a2e9a18fd
46a3190fcf8580f322047395408cd60feba67041
python/cpython
python__cpython-105976
# Behaviour change in py312 for protocols with non-callable members and custom `__subclasshook__` methods # Bug report On Python 3.11: ```pycon >>> from typing import * >>> @runtime_checkable ... class Foo(Protocol): ... x = 1 ... @classmethod ... def __subclasshook__(cls, other): ... ...
9499b0f138cc53b9a2590350d0b545d2f69ee126
968435ddb1c1af9333befb26f7970cded8a5c710
python/cpython
python__cpython-112615
# crc32 function outputs wrong result for large data on the macOS arm64 platform # Bug report The functions zlib.crc32 and binascii.crc32 share the problematic behavior. When computing the CRC for data >= 2GB macOS arm64 binaries result in different values than all other platforms such as macOS x64, Windows x64, Li...
4eddb4c9d9452482c9af7fa9eec223d12b5a9f33
a1551b48eebb4a68fda031b5ee9e5cbde8d924dd
python/cpython
python__cpython-105939
# DeprecationWarning when escaping curly braces in an f-string # Bug report A `DeprecationWarning` is emitted when escaping a curly brace in an f-string. The correct warning is a `SyntaxWarning` as of Python 3.12. ```python3 cpython on  test-fstring-syntaxwarnings [$] via C v14.0.3-clang via 🐍 pyenv 3.11.3 to...
6586cee27f32f0354fe4e77c7b8c6e399329b5e2
155577de1b6a7f4404b2bf90bcc1a588201550da
python/cpython
python__cpython-108671
# Surprising behaviour with compileall -s STRIPDIR parameter The '-s' stripdir parameter to compileall has very unusual semantics that could lead to unexpected and potentially confusing outcomes. For example, when run like this: `python -m compileall -s/path/to/build/dst -p /lib /path/to/build/src/file.py` The s...
3726cb0f146cb229a5e9db8d41c713b023dcd474
52e902ccf0178d7a3f26de4bba7922b01c0d4d3c
python/cpython
python__cpython-105928
# C API: Add PyWeakref_GetRef() function PyWeakref_GET_OBJECT() and PyWeakref_GetObject() return a borrowed reference to the object, or a borrowed reference to None if the object has been finalized. This API is error-prone and not easy to use. This API was discussed in 2016: https://mail.python.org/archives/list/py...
7f97c8e367869e2aebe9f28bc5f8d4ce36448878
a5c2ad0c3d23d2b1e61ab8e0d7ee64f7e1288547
python/cpython
python__cpython-105923
# C API: Add PyImport_AddModuleRef() function The C API [PyImport_AddModule()](https://docs.python.org/dev/c-api/import.html#c.PyImport_AddModule) returns a borrowed reference using a special dance added by commit https://github.com/python/cpython/commit/4db8988420e0a122d617df741381b0c385af032c of issue #86160: ```...
03f1a132eeb34c738812161947ef171b21d58c25
7f97c8e367869e2aebe9f28bc5f8d4ce36448878
python/cpython
python__cpython-105940
# SyntaxWarnings in `test_fstring` # Bug report Running `python -m test test_fstring` on `main` results in several `SyntaxWarnings` being emitted. If I just run `python -m test test_fstring` locally, I get this: ```pytb C:\Users\alexw\coding\cpython>python -m test test_fstring Running Release|x64 interprete...
4b431d2e90bf5760a57aa40af2dd78e7bbf0b1ae
6586cee27f32f0354fe4e77c7b8c6e399329b5e2
python/cpython
python__cpython-112871
# Crash in urllib/request.py proxy_bypass_macosx_sysconf <!-- Use this template for hard crashes of the interpreter, segmentation faults, failed C-level assertions, and similar. Do not submit this form if you encounter an exception being unexpectedly raised from a Python function. Most of the time, these shou...
22511f77c2818a138a252e6ddae89725d082f8b0
a723a13bf135306cdc5999a959596bfb487e8f4f
python/cpython
python__cpython-105909
# syntactical `__future__` import `barry_as_FLUFL` does not work in the REPL anymore <!-- If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not the right place to seek help. Consider the following options instead: - reading the Python tutoria...
28187a9c4f95affe50fd37e0db0db177e2b9c2e9
1858db7cbdbf41aa600c954c15224307bf81a258
python/cpython
python__cpython-114035
# Documentation for pathlib.Path.symlink_to is incorrectly constrained # Documentation The docs for `symlink_to` state: > _target_is_directory_ must be true (default `False`) if the link’s target is a directory. That's not precisely correct. I experimented and `symlink_to` seems to follow the same behavior a...
b822b85ac11e73bbe4417bf03ee770ab116bb42d
32c227470aa6f72950b76206ffc529c258b4b8fa
python/cpython
python__cpython-105885
# Allow eval and exec to take keyword arguments # Feature or enhancement Allow for `globals` and `locals` to be passed in as keyword arguments to `exec` and `eval`. # Pitch `exec` and `eval` both can take `globals` and `locals` as positional arguments. The built-in functions documentation shows the argument...
2770d5caca42d48102f8e18210132a964c34af7c
72867c962cc59c6d56805f86530696bea6beb039
python/cpython
python__cpython-105876
# Bump required SQLite version to 3.15.2 (Also [posted on Discord](https://discuss.python.org/t/bump-sqlite-minimum-version-requirement/27999?u=erlendaasland).) In January 2021 (mid 3.10 development), Sergey Fodoseev and I raised the compile time (and runtime) SQLite version requirements for the sqlite3 standard li...
6849acb3feacda63ee43f1dc9be28fac1075ca7d
bc07c8f096791d678ca5c1e3486cb9648f7a027b
python/cpython
python__cpython-105874
# `_xxsubinterpreters`: the name of shared exception type is `str(exc_type)`, not `exc_type.__name__` Example: ```python >> import _xxsubinterpreters >> i = _xxsubinterpreters.create() >> _xxsubinterpreters.run_string(i, "(") Traceback (most recent call last): File "<stdin>", line 1, in <module> _xxsubinterpr...
69a39bd9ad52241ca0e9a1926b4536c73017d067
2ef1dc37f02b08536b677dd23ec51541a60effd7
python/cpython
python__cpython-105870
# dataclasses: implicitly defined __dict__ and __weakref__ slots of inherited classes are ignored. # Bug report The __weakref__ slot is redefined when inherited from a class which didn't specify slots at all (and thus has a __dict__ and __weakref__ slots). ``` from dataclasses import dataclass class A: ...
a22d05f04c074dbb4f71e7837f54c0bb693db75d
1d82a41235ac5619d36ac7e289fcbb686c1d9350
python/cpython
python__cpython-105880
# Improve the constructors of AST nodes Currently, the constructors for AST nodes accept arbitrary keyword arguments and don't enforce any value: ```pycon >>> node=ast.FunctionDef(what="is this") >>> node.what 'is this' >>> node.name Traceback (most recent call last): File "<stdin>", line 1, in <module> At...
d53560deb2c9ae12147201003fe63b266654ee21
e72576c48b8be1e4f22c2f387f9769efa073c5be
python/cpython
python__cpython-107986
# asyncio subprocess stdin/out/err can be filehandles, but this is undocumented # Documentation I was trying to write some asyncio subprocess code to pipe from one process to another, struggled until I found examples with os.pipe(). But going back to the docs I was confused because passing a filehandle isn't mentio...
13966da71b693b1fae1a8ef66e34e2f0a90ec6c0
39de79b345f925ce3bbb79b33534872fe0c90877
python/cpython
python__cpython-105851
# Clarify definition of "minor" vs "major" release # Documentation I noticed this in a discussion but it was off-topic there. Either I'm misreading things, but it seems like the definition of major and minor release is inconsistent in the documentation. See [this page](https://discuss.python.org/t/a-fast-free-threa...
0bffe1acd78069ea21f6b1347bec9cc9747342cb
0d0963737a0f4b7cadedfae7e8fd33ed18269289
python/cpython
python__cpython-105847
# Assertion failure when specializing functions with too many `__defaults__` When specializing some Python calls, we assert that we don't have more defaults than we have arguments. This isn't always true, though: ```py >>> def f(): ... pass ... >>> f.__defaults__ = (None,) >>> for _ in range(2): ... ...
2beab5bdef5fa2a00a59371e6137f769586b7404
b356a4749acb3e6f8c50e8abeb7b2d2b267738d7
python/cpython
python__cpython-105835
# Untested code in `typing.py` # Bug report If you apply this diff to `typing.py`, all tests continue to pass: ```diff diff --git a/Lib/typing.py b/Lib/typing.py index 1dd9398344..98e19644a2 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -1931,6 +1931,7 @@ def _proto_hook(other): if...
70c075c194d3739ae10ce76265f05fa82ed46487
101d5ec7d7fe122fa81a377c8ab8b562d1add9ee
python/cpython
python__cpython-105833
# F-string debug mode does not print correctly when in last line of file Where there's an f-string that has a debug expression in the last line of a file, the debug expression buffer is one character too short. For example: ```python3 ```python3 cpython on  main via C v14.0.3-clang via 🐍 pyenv 3.11.3 took 15s ...
3af2dc7588614c65e9d1178ad9b4a11a19c14dde
d382ad49157b3802fc5619f68d96810def517869
python/cpython
python__cpython-108513
# `concurrent.futures.ProcessPoolExecutor` pool deadlocks when submitting many tasks # Bug report Submitting many tasks to a `concurrent.futures.ProcessPoolExecutor` pool deadlocks with all three start methods. When running the same example with `multiprocessing.pool.Pool` we have NOT been able to cause a dead...
405b06375a8a4cdb08ff53afade09a8b66ec23d5
e94a2232eac07eb526ec93ef01699513cf9b0fa3
python/cpython
python__cpython-105822
# `test___all__.AllTest.test_all` is failing on every PR # Bug report Following https://github.com/python/cpython/pull/105801, `test___all__.AllTest.test_all` is failing on every non-docs PR on the "Hypothesis tests on Ubuntu" CI job. The traceback is: ```pytb ================================================...
09ce8c3b48f940eb8865330f029b8069854c3106
c5111aec2bac464b6643e21fe0844c9b8c4c661a
python/cpython
python__cpython-105828
# `patchcheck.py` raises `SystemError` on `main` # Bug report Following #105801, running `python Tools/patchcheck/patchcheck.py` now results in `SystemError` being raised. # To reproduce 1. Make any change to a `.py` file, e.g.: ```diff --- a/Lib/test/test_fstring.py +++ b/Lib/test/test_fstring.py @@ -1...
3af2dc7588614c65e9d1178ad9b4a11a19c14dde
d382ad49157b3802fc5619f68d96810def517869
python/cpython
python__cpython-105910
# GzipFile.flush doesn't flush compressor in 3.12 beta <!-- If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not the right place to seek help. Consider the following options instead: - reading the Python tutorial: https://docs.python.org/3/t...
1858db7cbdbf41aa600c954c15224307bf81a258
7a56a4148c521969d64164d2776641f19e3ca9e8
python/cpython
python__cpython-105801
# f-strings do not show warnings about invalid escapes In 3.12 and 3.13, f-strings are not warning about invalid escapes that get warnings in real strings. This seems like a bug. ``` >>> f'\?' '\\?' >>> len(f'\?') 2 >>> '\?' <stdin>:1: SyntaxWarning: invalid escape sequence '\?' '\\?' _Originally posted by...
12b6d844d8819955508bd86db106f17516be3f77
698a0da7d440856a90b45964e9082b5a55387b80
python/cpython
python__cpython-105794
# Support for not following symlinks in pathlib.Path.is_dir() # Feature or enhancement Add a *follow_symlinks* argument to [`pathlib.Path.is_dir()`](https://docs.python.org/3/library/pathlib.html#pathlib.Path.is_dir), defaulting to `True` # Pitch Pathlib's `walk()` and `glob()` implementations are built upon ...
219effa876785408a87bd6acb37c07ee0d25f3f9
5d4dbf0e309255e5bce9e31d805a8f950ebf9161
python/cpython
python__cpython-108343
# Python 3.11.4: Running "make test" fails under gcc 4.8.5 because both -std=gnu11 and -std=c++11 are specified when compiling _testcpp11ext In Python 3.11.4, running "make test" fails under gcc 4.8.5 because both -std=gnu11 and -std=c++11 are specified when compiling _testcpp11ext. Run the following: ```shell ...
9173b2bbe13aeccc075b571da05c653a2a91de1b
3a1ac87f8f89d3206b46a0df4908afae629d669d
python/cpython
python__cpython-106059
# Remove `LOAD_CLOSURE` `LOAD_CLOSURE` is identical to `LOAD_FAST_CHECK` in every way except its name and number. The justification for its existence is that "We keep LOAD_CLOSURE so that the bytecode stays more readable.". Which is insufficient justification to keep it given that it: * Uses an instruction, a lim...
8bff940ad69ce176dcd2b8e91d0b30ddd09945f1
3c70d467c148875f2ce17bacab8909ecc3e9fc1d
python/cpython
python__cpython-106093
# normalize() method of Decimal class does not always preserve value I have encountered unexpected behavior while using the ```normalize()``` method of the ```Decimal``` class. I performed the following test using Python 3.10.10 and 3.11.4. ```python from decimal import Decimal v1 = Decimal("0.999999999999999999...
a8210b6df1ed2793c484b3380182ba56c4254a4e
0345b0c2bbf251a0f475cf53e0fb04c79a220e52
python/cpython
python__cpython-107519
# "mem" and "object" Allocators are No Longer Protected by the GIL Once we moved to per-interpreter GIL, the promises in [the docs](https://docs.python.org/3.12/c-api/memory.html#allocator-domains) no longer hold: ``` ...where the allocation must be performed with the GIL held. ``` It's still fine for pymalloc...
db361a340af3970c279908c8746a6b9ed45f47b8
fb344e99aa0da5bef9318684ade69978585fe060
python/cpython
python__cpython-105758
# Rework test_ctypes The ctypes module was first maintained outside Python, then moved into Python stdlib. Its test suite wasn't cleaned recently. I create this issue to track work on this topic. <!-- gh-linked-prs --> ### Linked PRs * gh-105758 * gh-105762 * gh-105768 * gh-105797 * gh-105798 * gh-105803 * gh-105814 ...
ac7b551bde7a362bc77d2cb84accf755ac30eb09
b87d2882754a7c273e2695c33384383eba380d7d
python/cpython
python__cpython-105746
# `webbrowsers.Konqueror` is broken `webbrowsers.Konqueror` is broken after https://github.com/python/cpython/pull/102872#issuecomment-1589958849 It looks like `def open` was not removed from `Grail` and was moved to `Konqueror`. Originially discovered by @vstinner in https://github.com/python/cpython/pull/10287...
e5d45b7444733861153d6e8959c34323fd361322
67f69dba0a2adc68c631bad5d970bdd22fc05d91
python/cpython
python__cpython-105734
# ctypes: Deprecate SetPointerType() and ARRAY() functions The ctypes module has two undocumented functions: SetPointerType() and ARRAY(). These functions are marked as ``XXX Deprecated``, but only in comments. I propose to deprecate ``ctypes.SetPointerType()`` and ``ctypes.ARRAY()`` by emitting a DeprecationWarnin...
2211454fe210637ed7fabda12690dac6cc9a8149
b97e14a806477af4225777d215ac38c0d9b845f0
python/cpython
python__cpython-106035
# More callables should be usable as Exception Group predicates # Bug report If a bound method is used as the condition for BaseExceptionGroup.split the following exception is raised: > TypeError: expected a function, exception type or tuple of exception types Consider the following example: ```python class H...
d8ca5a11bc55e2a69cab4f8795d0a5aa6932a41b
1d33d5378058671bfabb6f4d4b5bfd4726973ff9
python/cpython
python__cpython-106771
# `contextlib.ContextManager` doesn't contain `__slots__ = ()` Python's ABCs should have `__slots__` attributes to not interfere with slotting in derived classes (especially when the class has no members). However, it is not the case for `contextlib.ContextManager` (as for other `contextlib` ABCs): ```python from ...
55408f86d78259f18c56c5e1ea51e0f8dcdbeb67
cc25ca16ee406db936dfbd2337cbd14b12ccc4b7
python/cpython
python__cpython-105728
# 3.12+: segfault tokenizing multiline fstring placeholder # Bug report ```python f'{ hello }:{world}' ``` output: ```console $ python3.12 -m tokenize t.py free(): invalid pointer Aborted (core dumped) ``` here's a backtrace: ``` (gdb) bt #0 __pthread_kill_implementation (no_tid=0, s...
abfbab6415fb029e7dca19ecc8d29a13da37bf71
d0f1afd9425e28409fbf535bb7d43472bfcffcef
python/cpython
python__cpython-109921
# _xxsubinterpreters.run_string() doesn't allow subthreads to be running still Currently `_xxsubinterpreters.run_string()` fails if the interpreter has other threads running, e.g. subthreads created by a previous `run_string()` call. This should be fixed to allow other threads to be running. <!-- gh-linked-prs --> #...
5a76d1be8ef371b75ca65166726923c249b5f615
bbee57fa8c318cb26d6c8651254927a1972c9738
python/cpython
python__cpython-105723
# 3.12+: tokenize of mixed tabs and spaces now produces an error I read the parts in [here](https://docs.python.org/3.12/whatsnew/3.12.html#changes-in-the-python-api) and it does mention that some `ERRORTOKEN`s will be converted to exceptions but it doesn't seem to cover this case. this breaks the `E101` check in `...
ed8217b493e19cea0f3f539e55b592c09ceb9323
c3d2d64b4c53203719466b32df60ea76f7312891
python/cpython
python__cpython-105740
# Crash During Subinterpreter Finalization There's an isolation leak somewhere. It may be just in the _xxsubinterpreters module, but I suspect it's not. See https://github.com/python/cpython/pull/99114#issuecomment-1520952650. Reproducers: * https://gist.github.com/tonybaloney/262986212e1061b97908657a53a605d...
b87d2882754a7c273e2695c33384383eba380d7d
fcf0647cf2a78de2c2b603af2709d58c8567df67
python/cpython
python__cpython-105688
# Remove deprecated `re.template`, `re.T`, `re.TEMPLATE` # Feature or enhancement It is time to remove deprecated stuff from `re` module. The 3.11 says: > The :func:`re.template` function and the corresponding :const:`re.TEMPLATE` and :const:`re.T` flags are deprecated, as they were undocumented and lack...
67f69dba0a2adc68c631bad5d970bdd22fc05d91
fb655e0c4581ca4bed80db0a083884b29fe142d2
python/cpython
python__cpython-105685
# Get rid of _set_task_name in asyncio It is already deprecated to have a task which doesn't not supports the name, its time to get rid of this old workaround. <!-- gh-linked-prs --> ### Linked PRs * gh-105685 <!-- /gh-linked-prs -->
840d02f3f0cd341207db6d918ce7f0987be9952e
829ac13b69a2b53153e1b40670e6ef82f05130c1
python/cpython
python__cpython-105680
# Remove irregular stack effects As we move towards generating more components from the instruction definition file (bytecodes.c), it helps if the instructions have regular formats and stack effects. Currently the stack effects can be simple, variable, conditional or complex. * Simple: Does not depend on the operand...
09ffa69e2e84950751739ab500f820725e00a3dd
217589d4f3246d67c6ef0eb0be2b1c33987cf260
python/cpython
python__cpython-105674
# New warning: `‘value’ may be used uninitialized in this function [-Wmaybe-uninitialized]` <img width="981" alt="Снимок экрана 2023-06-12 в 09 10 49" src="https://github.com/python/cpython/assets/4660275/84a2242a-d8d3-4777-9886-ae64c67d79f2"> I am working on a fix already. <!-- gh-linked-prs --> ### Linked PRs * ...
a8d69fe92c65d636fc454cfb1825c357eb2e6325
58f5227d7cdff803609a0bda6882997b3a5ec4bf
python/cpython
python__cpython-109384
# 3.12 tracing regression: a conditional in a finally block will revisit the condition before exiting the block. Python 3.12 introduced a change in tracing behavior. Now a conditional in a finally block will revisit the condition before exiting the block. Here is test.py: ```python import sys print(sys.version)...
4a54074a0f5579d417445ec28427cd0ed5aa01f4
1ce9ea0453f7dc69dd41684f3bc9310259513de8
python/cpython
python__cpython-105628
# Change the default return value of `HTTPConnection.get_proxy_response_headers` from `{}` to `None` See my reasoning here: https://github.com/python/cpython/pull/104248#issuecomment-1585579473 <!-- gh-linked-prs --> ### Linked PRs * gh-105628 * gh-106738 <!-- /gh-linked-prs -->
490295d651d04ec3b3eff2a2cda7501191bad78a
025995feadaeebeef5d808f2564f0fd65b704ea5
python/cpython
python__cpython-105887
# Poor performance on logging.RotatingFileHandler due to fix to #89564 The fix to #89564 produced a significant performance degradation when logs are on an NFS filesystem. The fix for #89564 was for a bug found with the TimedRotatingFileHandler but an fix was added to the sized base file rotator too. Here is the...
e9b4ec614b66d11623b80471409c16a109f888d5
0890ad7c024ccf29614849b6ffadcb92c0e91ce7
python/cpython
python__cpython-105620
# Rename "own_gil" Field of PyInterpreterConfig to "gil" We've added the `PyInterpreterConfig` struct in 3.12. For PEP 684 (per-interpreter GIL), likewise 3.12, we added a new int-boolean field, "own_gil", to indicate if `PyInterpreterState.ceval.gil` should point to the interpreter's own GIL. Having finally just ...
b97e14a806477af4225777d215ac38c0d9b845f0
abfbab6415fb029e7dca19ecc8d29a13da37bf71
python/cpython
python__cpython-105589
# Some object-to-AST conversions are missing error checks The generated code in `Python-ast.c` is missing error checks following the construction of C-level `alias`, `arg`, `comprehension`, `keyword`, `match_item`, and `withitem` nodes from their Python object counterparts. This means it's possible to crash the interp...
a4056c8f9c2d9970d39e3cb6bffb255cd4b8a42c
3af2dc7588614c65e9d1178ad9b4a11a19c14dde
python/cpython
python__cpython-105638
# 3.12.0b2: "Assertion failed: immortal object has less refcnt than expected _Py_IMMORTAL_REFCNT" # Crash report When I run [my project](https://qutebrowser.org/) with Python 3.12, sometimes on exit I get the error below. ~~Given the circumstances, it seems almost impossible to construct a minimal example with t...
6199fe3b3236748033a7ce2559aeddb5a91bbbd9
dab5a3ebe8063e7ad39c9ba04421d8fe11927d43
python/cpython
python__cpython-105780
# Deprecate unusual ways of creating empty TypedDicts # Feature or enhancement I propose that we deprecate the following two ways of creating empty `TypedDict`s: ```py from typing import TypedDict T = TypedDict("T") T2 = TypedDict("T2", None) ``` # Pitch Users currently have four distinct options if ...
7b1f0f204a785485de1daf9d26828a81953537e4
d32e8d6070057eb7ad0eb2f9d9f1efab38b2cff4
python/cpython
python__cpython-105609
# Deprecate unusual ways of creating `typing.NamedTuple` classes # Feature or enhancement I propose that we deprecate in Python 3.13 the following unusual ways of constructing a `typing.NamedTuple`: ```py from typing import NamedTuple Foo = NamedTuple("Foo", x=int, y=int) # NamedTuple with "x" and "y" field...
ad56340b665c5d8ac1f318964f71697bba41acb7
fc8037d84c5f886849a05ec993dd0f79a356d372
python/cpython
python__cpython-105565
# Artificial newlines show in the "line" attribute of tokens in the tokenizer module Example: ``` from tokenize import generate_tokens from io import StringIO import pprint pprint.pprint(list(generate_tokens(StringIO('a').readline))) ``` prints: ``` [TokenInfo(type=1 (NAME), string='a', start=(1, 0), en...
d7f46bcd989580340675bf0a9fdbfa1505a37e81
1dd267af642ed6df05a1c106e9dafb8252d826e6
python/cpython
python__cpython-105946
# Recommend DateType in the datetime documentation # Documentation At the PyCon US 2023 sprints, I spent some time with @glyph, @hauntsaninja, @AlexWaygood and others trying to put together a plan to make the type stubs for `datetime` distinguish between naïve and aware datetimes (even if the runtime types don't re...
8f9ea43ee805f98391f857397daac9df7ffa71cd
6f97eeec222f81bd7ae836c149872a40b079e2a6
python/cpython
python__cpython-105558
# test_sqlite3.test_userfunctions redefines test_func_return_too_large_int() method Lib/test/test_sqlite3/test_userfunctions.py defines to methods called test_func_return_too_large_int() in the same class, so the first one is never called. cc @erlend-aasland <!-- gh-linked-prs --> ### Linked PRs * gh-105558 * gh-...
b8fa7bda4f286503447dc12327b789bbfc836458
9bf8d825a66ea2a76169b917c12c237a6af2ed75
python/cpython
python__cpython-105555
# `generate_tokens` starts to give `SyntaxError` <!-- If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not the right place to seek help. Consider the following options instead: - reading the Python tutorial: https://docs.python.org/3/tutoria...
b047fa5e56ba725362c64ca3d6fccbdcf51d0cab
00b599ab5a76023fa0083d7cc5d3c569342a5191
python/cpython
python__cpython-105546
# Remove deprecated `MacOSXOSAScript._name` attribute # Feature or enhancement It was deprecated in 3.11: https://github.com/python/cpython/blob/3.11/Lib/webbrowser.py#L676-L688 It is time to remove it. My PR from 2 years ago: https://github.com/python/cpython/pull/30241 CC @corona10 as the original PR reviewe...
947ec7ab02e7673956eb7f235c330a49f11e157a
3e525d22128cf040b3fd164f52cc6ae20ca58455
python/cpython
python__cpython-105707
# cases_generator tests aren't run by CI, and are broken There are some tests for the cases generator in Tools/cases_generator/test_generator.py, but several things are wrong with these: - [x] They are currently broken - [x] They depend on pytest - [x] They aren't run in CI - [ ] They are incomplete Let's fix...
8da9d1b16319f4a6bd78435016ef1f4bef6e2b41
ca3cc4b95d66f7527ebe0ba4cdb1907082d9bfc8
python/cpython
python__cpython-108015
# Emit resource warning if sqlite3 fails to close the database _See https://github.com/python/cpython/issues/103837#issuecomment-1541808307 and https://github.com/python/cpython/issues/103837#issuecomment-1543936079_: EAA: > I still think we should consider changing the underlying API so we can emit a resource war...
1a1bfc28912a39b500c578e9f10a8a222638d411
86617518c4ac824e2b6dc20691ba5a08df04f285
python/cpython
python__cpython-107119
# Document that enums with unhashable members are created non-performantly # Documentation #28907 fixes enum creation taking quadratic time relative to the number of members, but _only_ for members whose values are hashable. If not fixed, ideally this would be documented somewhere as it could potentially be a big p...
601f3a7b3391e9d219a8ec44a6c56d00ce584d2a
735fc2cbbcf875c359021b5b2af7f4c29f4cf66d
python/cpython
python__cpython-105523
# Modernize `test_enum` by removing unused exception handling Right now there are places in `test_enum` that for some reason contain code like https://github.com/python/cpython/blob/4ff5690e591b7d11cf11e34bf61004e2ea58ab3c/Lib/test/test_enum.py#L53-L76 For some reason we try to catch exceptions that won't ever happ...
199438b7cc2ef669b8d005d38797477a18b610cb
fce93c80ae2d792b8ca443b044e28abbf28bb89a
python/cpython
python__cpython-105510
# Simplify the implementation of `typing.Annotated` # Feature or enhancement `typing.Annotated` is currently implemented as a class, but doesn't need to be. All other objects like it in the `typing` module are implemented as instances of `typing._SpecialForm`, and we can do the same here. This simplifies the code a...
a1cbace91b624681dd7bb8eb82ba187bda55d785
8f9ea43ee805f98391f857397daac9df7ffa71cd
python/cpython
python__cpython-105511
# Merge `typing.Union` and `types.UnionType` Currently, unions created through `typing.Union[A, B]` and through the PEP-604 syntax `A | B` are at runtime instances of completely different types, and they differ in exactly what elements they accept. This is confusing and makes it harder for users to detect unions at ru...
0f511d8b44dd9993474402411af8c83f4964bc95
9127b4602e4e0e110eab7f2f6a8ac54fe66b0a72
python/cpython
python__cpython-105542
# 3.11.4: ValueError when inverting enum.Flag member with mask member With code such as: ```python import enum class Flag(enum.Flag): A = 0x01 B = 0x02 Mask = 0xff print(~Flag.A) ``` Python 3.10.11 prints `Flag.B`, and so does Python 3.11.3. However, with Python 3.11.4, this happens instea...
59f009e5898a006cdc8f5249be589de6edfe5cd0
8e755923c97d689ba7c7fe8deb50c1b169263264
python/cpython
python__cpython-105488
# `types.GenericAlias` has extra `__copy__` and `__deepcopy__` in `__dir__` Repro: ```python >>> type A[X] = list[X] >>> dir(A[int]) [..., '__copy__', '__deepcopy__', ...] ``` We can access all other attributes, but not `__copy__` and `__deepcopy__`: ```pytb >>> A[int].__copy__ Traceback (most recent ca...
eb7d6e7ad844955f9af88707d296e003c7ce4394
e212618bafaa4f775502e3442de0affb80205b5e