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-110919
# regrtest: allow to intermix --match and --ignore options # Feature or enhancement Currently you can use `--match` and `--ignore` options for positive and negative filtering of test cases by name. But negative patterns always win. So you can select a class of tests and then exclude some tests from it, but you cannot...
9a1fe09622cd0f1e24c2ba5335c94c5d70306fd0
b578e51f026a45576930816d6784697192ed472e
python/cpython
python__cpython-111007
# Windows: WindowsConsoleIO produces mojibake replacement characters # Bug report ### Bug description: Hi! The following code reliably produces some unicode [replacement characters �](https://www.compart.com/en/unicode/U+FFFD), on Windows, always in the same location. Works fine on Linux. This report is a fol...
11312eae6ec3acf51aacafce4cb6d1a5edfd5f2e
b60f05870816019cfd9b2f7d104364613e66fc78
python/cpython
python__cpython-110921
# Regression in `MemoryError` displaying (`_PyErr_Display` fallback to C impl of `print_exception`) # Bug report ### Bug description: After e7331365b488382d906ce6733ab1349ded49c928: ```python >>> raise MemoryError() Traceback (most recent call last): File "<stdin>", line 1, in <module> object address : 0x7fd3b603...
b3c9faf056e7d642785a8cfd53d1184b37a74a69
bad7a35055dbe9e6297110eb8c72eb8edfefd42d
python/cpython
python__cpython-110908
# AC: it is allowed to use `*` after vararg definition # Bug report Right now this code is allowed: ``` /*[clinic input] my_test_func pos_arg: object *args: object * kw_arg: object [clinic start generated code]*/ ```...
bad7a35055dbe9e6297110eb8c72eb8edfefd42d
14d2d1576d9301032a6a1f62caa347ff1685c872
python/cpython
python__cpython-110906
# [Enum] minor fixes and cleanup # Bug report ### Bug description: The `_is_private` method has incorrect results on attributes starting with a triple underscore. Example: ```python import enum enum._is_private('X', '_X___test') # returns True ``` The relevant code is: ``` def _is_private(cls_name, name): patte...
a77180e6633a3aca4011b175c2ac65aa33795035
f07ca27709855d4637b43bba23384cc795143ee3
python/cpython
python__cpython-111601
# Asyncio stream doesn't handle exceptions in callback # Bug report ### Bug description: Consider the following server that always just crashes: ```python import asyncio async def handle_echo(reader, writer): raise Exception("I break everything") async def main(): server = await asyncio.start_server( ...
229f44d353c71185414a072017f46f125676bdd6
794dff2fb1d9efe73a724640192c34b25f4fae85
python/cpython
python__cpython-110909
# Legacy tracing & PY_UNWIND: arg of legacy tracer call should be NULL # Bug report ### Bug description: When using a legacy tracer with `PyEval_SetTrace` and a function exits with an exception, the arg of the tracer event `PyTrace_RETURN` should be NULL [docs](https://docs.python.org/3/c-api/init.html#c.PyTrace...
f4b5588bde656d8ad048b66a0be4cb5131f0d83f
0887b9ce8b5b4f9ecdef014b9329da78a46c9f42
python/cpython
python__cpython-110887
# BNF grammar notation is mentioned but not defined # Documentation BNF grammar notation is mentioned twice in python documentation: 1. https://docs.python.org/3.13/reference/introduction.html#notation 2. https://docs.python.org/3.13/reference/expressions.html We should add a link to the wikipedia [article](...
42a5d21d465ffcac792685b6127a6e8e39dd6897
9608704cde4441c76c1b8b765e3aea072bca3b0d
python/cpython
python__cpython-110943
# The first attempt to hande the `format` property during logging.Formatter initilization removes the `.` dictionary from the `config` # Bug report ### Bug description: When the library tries to initialize a formatter and comes across the old `format` property, it falls back to an error handler, but before it do...
a5f29c9faf046b9ef3e498a0bc63dbc29017b5e3
7d21e3d5ee9858aee570aa6c5b6a6e87d776f4b5
python/cpython
python__cpython-110868
# Argument Clinic: vararg + kw-only crash # Bug report Originally found in https://github.com/python/cpython/issues/110782 by @mxschmitt and @JelleZijlstra This is the reproducer: ```c /*[clinic input] null_or_tuple_for_varargs name: object *constraints: object covariant: bool = False [clinic start g...
c2192a2bee17e2ce80c5af34410ccd0c8b6e08aa
db656aebc659e5023d004053db44031176bbe9f5
python/cpython
python__cpython-110848
# threading Thread.join should call the OS join API # Feature or enhancement ### Proposal: `threading.Thread.join()` only waits for the CPython internals to wash its hands of the underlying thread. It doesn't actually wait for the OS thread itself to exit, which in theory happens rapidly as its final internal code c...
c1db9606081bdbe0207f83a861a3c70c356d3704
e2c097ebdee447ded1109f99a235e65aa3533bf8
python/cpython
python__cpython-110962
# AIX fails to build _testcapi extension: Undefined symbol: .__atomic_fetch_or_8 # Bug report ### Bug description: ``` Modules/ld_so_aix gcc -pthread -bI:Modules/python.exp Modules/_testcapimodule.o Modules/_testcapi/vectorcall.o Modules/_testcapi/vectorcall_limited.o Modules/_testcapi/heaptype.o Modules/_...
88bac5d5044e577825db1f9367af908dc9a3ad82
767f416feb551f495bacfff1e9ba1e6672c2f24e
python/cpython
python__cpython-113298
# test_sysconfig test_library fails on macOS framework installs, like the python.org installer # Bug report With the python.org 3.13.0a1 installer for macOS, the new `test_library` of `test_sysconfig` fails: ``` $ python3.13 Python 3.13.0a1 (v3.13.0a1:ad056f03ae, Oct 13 2023, 06:35:05) [Clang 13.0.0 (clang-130...
bab0758ea4a1d4666a973ae2d65f21a09e4478ba
50b093f5c7060c0b44c264808411346cee7becf0
python/cpython
python__cpython-112828
# Assertion failure in test_capi test_alignof_max_align_t possible with macOS universal2 (multi-arch) builds macOS supports multi-architecture binaries (fat binaries) and CPython have long supported building them. Current releases of macOS support two system architectures: legacy x86_64 (for Intel Macs) and arm64 (for...
15a80b15af9a0b0ebe6bd538a1919712ce7d4ef9
4ac1e8fb25c5c0e1da61784281ab878db671761b
python/cpython
python__cpython-110816
# PyArg_ParseTupleAndKeywords() and non-ASCII keyword names Most of C strings in the C API are implied to be UTF-8 encoded. PyArg_ParseTupleAndKeywords() mostly works with non-ASCII keyword names as they are UTF-8 encoded. Except one case, when you pass argument by keyword with invalid non-ASCII name to a function th...
7284e0ef84e53f80b2e60c3f51e3467d67a275f3
ce298a1c1566467e7fd459c8f61478a26f42833e
python/cpython
python__cpython-110775
# Allow the repl to show source code and complete tracebacks Currently the REPL doesn't show traceback source or augmented information for the source that is typed in the repl itself: ``` >>> def f(x): ... 1/x ... >>> f(0) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<s...
e1d8c65e1df990ef8d61b8912742e1a021395e78
898f531996f2c5399b13811682c578c4fd08afaa
python/cpython
python__cpython-110813
# It's unclear how to set __weaklistoffset__ Python 3.11 and below PyType_Slot can’t set tp_weaklistoffset, the 3.12 documentation suggests usingPy_TPFLAGS_MANAGED_WEAKREF: [Type Objects](https://docs.python.org/3/c-api/type.html?highlight=pytype_slot#c.PyType_Slot). But this tp flag is only available in 3.12. So how ...
2ab34f0e425d90d0a153104ef2f4343dce2a414d
11bbe6c6e13980ef9fe2bc4c39b9642524062c4e
python/cpython
python__cpython-110797
# Intermittent failure in ` test_sys.SysModuleTest.test_current_exceptions` # Bug report ### Bug description: Example: https://github.com/python/cpython/actions/runs/6502915514/job/17662666558?pr=110794 The code in question: https://github.com/python/cpython/blob/b883cad06b12443014d57dcebd42d55f559b18f4/Lib/test/t...
df24153f650f39ca82db143cc4a58062412a0896
8ed338ab44daf3cd681d73156fd1d9b6bed53795
python/cpython
python__cpython-110791
# Ignore `BrokenPipeError` when piping the output of the `sysconfig` CLI # Feature or enhancement ### Proposal: I very often pipe the output of the `sysconfig` CLI to the [head](https://man.archlinux.org/man/head.1) utility from [coreutils](https://www.gnu.org/software/coreutils/), so that I can check only the "path...
6478dea3c8aca7147d013d6d7f5bf7805b300589
b883cad06b12443014d57dcebd42d55f559b18f4
python/cpython
python__cpython-110784
# [Regression] TypeVar crashes when name is specified via keyword parameters # Crash report ### What happened? ```python from typing import TypeVar TypeVar(name="Handler") ``` Good: 3.11.X Bad: 3.12.0 Downstream issue: https://github.com/jfhbrook/pyee/issues/134 ### CPython versions tested on: 3.12 ### Operatin...
6a4528d70c8435d4403e09937068a446f35a78ac
02d26c4bef3ad0f9c97e47993a7fa67898842e5c
python/cpython
python__cpython-110776
# Support setting the loop_factory in IsolatedAsyncioTestCase ### Proposal: I want to be able to create utility subclasses of `IsolatedAsyncioTestCase` that use either uvloop or a specific event loop using the `asyncio.Runner(..., loop_factory=...)` kwarg, Ideally it would look something like: Another advantage ...
770530679e89b06f33655b34a8c466ed906842fe
f6a02327b5fcdc10df855985ca9d2d9dc2a0a46f
python/cpython
python__cpython-110773
# Decompose asyncio.run_forever() into parts to improve integration with other event loops # Feature or enhancement ### Proposal: This is an admittedly niche use case, but it's one that we've hit in the development of [Toga](https://github.com/beeware/toga). GUI toolkits all have event loops. If you want to use Pyt...
a7e2a10a85bb597d3bb8f9303214bd0524fa54c3
0ed2329a1627fc8ae97b009114cd960c25567f75
python/cpython
python__cpython-110753
# Assertion failure in instrumentation during interpreter finalization # Bug report ### Bug description: ```python import sys def f(*args): pass def bar(): yield 42 sys.settrace(f) g = bar() next(g) ``` The code above will trigger an assertion added in #109846. ``` python: Python/...
1e3460d9faaffb35b3c6175c666b1f45aea2c1d8
b6000d287407cbccfbb1157dc1fc6128497badc7
python/cpython
python__cpython-110750
# WASI build is broken on certain environments # Bug report ### Bug description: Building CPython main for WASI in `quay.io/tiran/cpythonbuild:emsdk3` results in: ``` ../../Parser/tokenizer/file_tokenizer.c:156:9: error: implicit declaration of function 'lseek' is invalid in C99 [-Werror,-Wimplicit-function-...
23645420dcc4f3b7b2ec4045ef6ac126c37a98c2
5257ade0bc9b53471227d0e67999df7c8ad633a7
python/cpython
python__cpython-111236
# Improve markup in `Doc/library/tkinter.ttk.rst` # Documentation In the `tkinter` docs there are a few methods that include sequences of valid options/values, e.g. https://docs.python.org/3/library/tkinter.ttk.html#tkinter.ttk.Treeview.column These should use appropriate markup (like ` ``...`` ` or `*...*`). ...
00d2b6d1fca91e1a83f7f99a370685b095ed4928
d07483292b115a5a0e9b9b09f3ec1000ce879986
python/cpython
python__cpython-110880
# pathlib.Path.read_text should include a newline argument # Feature or enhancement ### Proposal: Support for a `newline` argument was added to the `write_text` method in Python 3.10 (issue #67894). I've been using this method but I've found a need for a `newline` method for `read_text` as well. Here's the scenari...
9d70831cb7127855a8bf83b585525f13cffb9f59
d857d5331a3326c77f867d837014d774841017a9
python/cpython
python__cpython-110735
# Reduce overhead to run one iteration of the asyncio event loop # Feature or enhancement ### Proposal: Consider the following use case: An asyncio event loop where the majority of the handles being run have a very small run time because they are decoding Bluetooth or Zigbee packets. In this case `_run_once` beco...
3ac8e6955fedc35e8646bee7e04be6f20205cc1e
41d8ec5a1bae1e5d4452da0a1a0649ace4ecb7b0
python/cpython
python__cpython-110702
# Use the traceback module for PyErr_Display() and fallback to the C implementation This is the first step to be able to reduce the code duplication and complexity so adding features to the default traceback is easier. <!-- gh-linked-prs --> ### Linked PRs * gh-110702 * gh-111905 * gh-113712 <!-- /gh-linked-prs -->
e7331365b488382d906ce6733ab1349ded49c928
8c6c14b91bf95e04018151c53bce6e27e0e22447
python/cpython
python__cpython-110822
# name error in zipfile.ZipInfo._decodeExtra() https://github.com/python/cpython/blob/f27b83090701b9c215e0d65f1f924fb9330cb649/Lib/zipfile/__init__.py#L548 uses the `warnings` module, but AFAICS it's never imported. <!-- gh-linked-prs --> ### Linked PRs * gh-110822 * gh-110861 <!-- /gh-linked-prs -->
4110cfec1233139b4e7c63459ba465ab80554e3e
e2b3d831fd2824d8a5713e3ed2a64aad0fb6b62d
python/cpython
python__cpython-110818
# asyncio.wait_for() doesn't raise builtin TimeoutError # Documentation The documentation page about [asyncio.wait_for()](https://docs.python.org/3/library/asyncio-task.html#asyncio.wait_for) function says that: > If a timeout occurs, it cancels the task and raises [TimeoutError](https://docs.python.org/3/librar...
f81e36f700ac8c6766207fcf3bc2540692af868b
548ce0923b9ef93b1c1df59f8febc4bb3daff28a
python/cpython
python__cpython-110789
# test_os.TimerfdTests fails on FreeBSD 14 and 15: missing select.epoll() os.timerfd_create() is [documented to be available only on Linux](https://docs.python.org/dev/library/os.html#os.timerfd_create), but it's always available on FreeBSD 14. Problem: the test uses epoll() which is not available on FreeBSD. The t...
8f07b6e4e3c5e5c549b8c2c7d14a89b2563e6b9e
a7e2a10a85bb597d3bb8f9303214bd0524fa54c3
python/cpython
python__cpython-110706
# Incorrect syntax error message for incorrect argument unpacking # Bug report ### Bug description: I don't think `SyntaxError: iterable argument unpacking follows keyword argument unpacking` should be present in a case like this (minimal reproducible example): ```python >>> func(t, *:) File "<stdin>", line...
3d180347ae73119bb51500efeeafdcd62bcc6f78
ec5622d1977c03960883547f7b8f55c26ac85df2
python/cpython
python__cpython-110952
# test_asyncio.test_base_events: test_time_and_call_at() failed on GHA Windows x64 Recently, I modified asyncio tests to add a CLOCK_RES constant. Example of test_time_and_call_at() change: ``` +CLOCK_RES = 0.020 (...) - self.assertGreaterEqual(dt, delay - 0.050, dt) + self.assertGreaterEqual(dt, ...
9a9fba825f8aaee4ea9b3429875c6c6324d0dee0
78e4a6de48749f4f76987ca85abb0e18f586f9c4
python/cpython
python__cpython-110687
# Pattern matching is not tested with `@runtime_checkable` protocols # Bug report There are different simple and corner cases that we need to tests. Why is that important? Because `runtime_checkable` `Protocol` has its own `__instancecheck__` magic that must work correctly with `match` machinery. ```python >>> impor...
9d02d3451a61521c65db6f93596ece2f572f1f3e
7595d47722ae359e6642506646640a3f86816cef
python/cpython
python__cpython-110683
# `__match_args__` + `runtime_checkable` protocol # Bug report Since `__match_args__` is not mentioned in `_SPECIAL_NAMES` right now these two examples have different results: ```python @runtime_checkable class P(Protocol): x: int y: int class A: def __init__(self, x: int, y: int): s...
5257ade0bc9b53471227d0e67999df7c8ad633a7
88ecb190f3717f7f0d663d004fc4b63c7e7bce77
python/cpython
python__cpython-110747
# Improve markup in `enum.rst` # Documentation For example in https://docs.python.org/3/library/enum.html#enum.IntFlag there are several names that use italic (`*...*`) instead of the correct role (`:class:`, `:func:`, etc.). There might be more throughout the page. <!-- gh-linked-prs --> ### Linked PRs * gh-11...
14f52e154814e4cde4959d04f3e18ac4006cab40
0db2517687efcf5ec0174a32398ec1564b3204f1
python/cpython
python__cpython-110677
# test_pty: test_openpty() timed out after 3h 20min on aarch64 RHEL8 Refleaks 3.x: Is os.write(fd, data) guaranteed to write **all** bytes of *data*? Or can it write only *some* (first) bytes of *data*? Extract of the test: ```py debug("Writing chunked output") os.write(slave_fd, TEST_STRING_2...
b4e8049766a46a9e6548b18d7e9a0c9f573cd122
3ac8e6955fedc35e8646bee7e04be6f20205cc1e
python/cpython
python__cpython-110667
# Tests: Don't measure CI performance in tests, don't test maximum elapsed time A test should not measure a CI performance: don't test maximum elapsed time. <!-- gh-linked-prs --> ### Linked PRs * gh-110667 * gh-110668 * gh-110669 <!-- /gh-linked-prs -->
1556f426da3f2fb5842689999933c8038b65c034
f901f56313610389027cb4eae80d1d4b071aef69
python/cpython
python__cpython-110663
# test_multiprocessing_spawn.test_manager: test_async_timeout() failed on Windows (x64) When the test failed in 2013, 10 years ago, the fix was to increase the timeout from 200 ms to 1 sec: issue #63798. Windows (x64): ``` 0:14:39 load avg: 13.67 [336/469/1] test.test_multiprocessing_spawn.test_manager failed (...
790ecf6302e47b84da5d1c3b14dbdf070bce615b
1556f426da3f2fb5842689999933c8038b65c034
python/cpython
python__cpython-110657
# test_logging: test_post_fork_child_no_deadlock() failed on Address sanitizer That's another victim of libasan deadlock involving fork. See test_threading: ```py # gh-89363: Skip fork() test if Python is built with Address Sanitizer (ASAN) # to work around a libasan race condition, dead lock in pthread_create()....
f901f56313610389027cb4eae80d1d4b071aef69
7ca4aafa0ea94a4bb778b34e9c2e85b07f550c11
python/cpython
python__cpython-110650
# test_signal: test_stress_modifying_handlers() failed on s390x SLES 3.x See also: * #75032 * #110083 s390x SLES 3.x: ``` == CPU count: 4 ... 0:03:27 load avg: 5.22 [280/467/1] test_signal failed (1 failure) (1 min 10 sec) -- running (1): test.test_multiprocessing_spawn.test_processes (38.4 sec) (...) F...
e07c37cd5212c9d13749b4d02a1d68e1efcba6cf
da0a68afc9d1487fad20c50f5133cda731d17a17
python/cpython
python__cpython-110632
# Fix wrongly indented blocks in the documentation # Bug report In the documentation there are several blocks that are indented incorrectly but don't produce errors when the documentation is built. Two common mistakes wrap the misindented block into an additional blockquote or definition list, causing extra indent...
3dd593e2f2527e199ff7401308131e6888f0cf6c
b5f7777cb3ecae02d49e0b348968c1ff1ffe21f4
python/cpython
python__cpython-110629
# Add tests for PyLong C API Currently only new PyLong_AsInt() is tested. <!-- gh-linked-prs --> ### Linked PRs * gh-110629 * gh-110854 <!-- /gh-linked-prs -->
9d40ebf1902812fad6aa85ede7b6f1fdff3c1291
84e2096fbdea880799f2fdb3f0992a8961106bed
python/cpython
python__cpython-110591
# `_sre.compile` overwrites `TypeError` with `OverflowError` # Bug report Reproduction: ```python >>> import _sre >>> _sre.compile('', 0, ['abc'], 0, {}, ()) Traceback (most recent call last): File "<stdin>", line 1, in <module> OverflowError: regular expression code size limit exceeded ``` It should be: ```pyth...
344d3a222a7864f8157773749bdd77d1c9dfc1e6
0362cbf908aff2b87298f8a9422e7b368f890071
python/cpython
python__cpython-110573
# `test_*_code` functions in `_testcapi/getargs.c` have memory leaks # Bug report I don't think it is *very* important, since this is just a test, but why have it when it is spotted? 1. `test_k_code`: https://github.com/python/cpython/blob/326c6c4e07137b43c49b74bd5528619360080469/Modules/_testcapi/getargs.c#L331-L39...
f71cd5394efe154ba92228b2b67be910cc1ede95
e136e2d640f4686b63ea05088d481115185fc305
python/cpython
python__cpython-110559
# Run ruff on Argument Clinic in CI # Feature or enhancement ### Proposal: As @erlend-aasland and I have worked on adding type hints to Argument Clinic over the last few months, and applied various other modernisations to `Tools/clinic/`, running pyflakes on the code on a regular basis has caught numerous small bugs...
7b2764e798e400b8f5fcc199739405e6fbd05c20
96fed66a65097eac2dc528ce29c9ba676bb07689
python/cpython
python__cpython-110552
# Several CAPI tests include `<stddef.h>` for no reason # Bug report These files do not use `offset` or `ptrdiff_t` that some files use: ```diff diff --git Modules/_testcapi/abstract.c Modules/_testcapi/abstract.c index 81a3dea4c1d..a93477a7090 100644 --- Modules/_testcapi/abstract.c +++ Modules/_testcapi/abstract.c...
89df5b73d07872d554da60b455b46c98e01a022d
48419a50b44a195ad7de958f479a924e7c2d3e1b
python/cpython
python__cpython-110535
# fix a URL redirect to wikipedia article on Fibonacci numbers # Documentation Section 3.2 of the tutorial: https://docs.python.org/3.13/tutorial/introduction.html#first-steps-towards-programming links to https://en.wikipedia.org/w/index.php?title=Fibonacci_number which redirects to https://en.wikipedia.org/wiki/F...
892ee72b3622de30acd12576b59259fc69e2e40a
7e30821b17b56bb5ed9799f62eb45e448cb52c8e
python/cpython
python__cpython-110528
# `PySet_Clear`'s docs are incomplete # Bug report Current docs: https://github.com/python/cpython/blob/7e30821b17b56bb5ed9799f62eb45e448cb52c8e/Doc/c-api/set.rst#L164-L166 It does not mention: - `-1` is returned on error, `0` on success - It can raise `SystemError`, similar to other functions that mutate sets htt...
bfc1cd8145db00df23fbbd2ed95324bb96c0b25b
c2192a2bee17e2ce80c5af34410ccd0c8b6e08aa
python/cpython
python__cpython-110526
# Improve CAPI tests of `set` and `frozenset` # Feature or enhancement Right now CAPI tests of `set` and `frozenset` are quite outdated. They are defined as `.test_c_api` method on `set` objects, when `Py_DEBUG` is set: https://github.com/python/cpython/blob/7e30821b17b56bb5ed9799f62eb45e448cb52c8e/Objects/setobject...
c49edd7d9c5395a6a6696a4846f56bc8b2b22792
dd4bb0529e44ac6f75a9ebbfcbf5d73dc251b7a7
python/cpython
python__cpython-110520
# Deprecation warning for non-integer number in gettext is not always accurate # Bug report `gettext` functions and methods that consider plural forms (like `ngettext()`) and directly or indirectly use `GNUTranslations` emit a deprecation warning if the number is not integer. But it only points to the line where `GNU...
326c6c4e07137b43c49b74bd5528619360080469
7bd560ce8de41e62230975c44fd7fbd189e8e858
python/cpython
python__cpython-110524
# `AssertionError` when running `profile` on code containing generator expression # Bug report ### Bug description: Bisected to 411b1692811b2ecac59cb0df0f920861c7cf179a. Minimal repro (save it to file and run as `python -m profile script.py`): ```python next(i for i in range(10)) ``` Output: ``` Exception ignored ...
dd4bb0529e44ac6f75a9ebbfcbf5d73dc251b7a7
9f8282de6bdc3e1f976318821ff151ed45fedc56
python/cpython
python__cpython-110498
# Better communicate that `IOError` and `WindowsError` are just aliases of `OSError` now # Bug report While working on some Windows-related typeshed PRs, I've noticed that some places in docs are very clear about this change. For example: ```rst .. versionchanged:: 3.3 :exc:`IOError` used to be raised; it is now ...
5e7edac7717bfe5f3c533d83ddd0f564db8de40b
c49edd7d9c5395a6a6696a4846f56bc8b2b22792
python/cpython
python__cpython-108801
# Optimise math.ceil for known exact float Do the same optimisation done by rhettinger for math.floor in https://github.com/python/cpython/pull/21072 <!-- gh-linked-prs --> ### Linked PRs * gh-108801 <!-- /gh-linked-prs -->
f013b475047b2e9d377feda9f2e16e5cdef824d7
201dc11aeb4699de3c5ebaea9798796c30087bcc
python/cpython
python__cpython-110651
# pathlib.PurePath.with_name() rejects names with NTFS alternate data streams; accepts '.' # Bug report This shouldn't raise an exception: ```python >>> pathlib.PureWindowsPath('foo', 'a').with_name('a:b') ValueError: Invalid name 'a:b' ``` (affects all versions of pathlib) This _should_ raise an except...
b5f7777cb3ecae02d49e0b348968c1ff1ffe21f4
790ecf6302e47b84da5d1c3b14dbdf070bce615b
python/cpython
python__cpython-110764
# Implement biased reference counting in `--disable-gil` builds # Feature or enhancement CPython's current reference counting implementation would not be thread-safe without the GIL. In `--disable-gil` builds, we should implement biased reference counting, which is thread-safe and has lower execution overhead compa...
6dfb8fe0236718e9afc8136ff2b58dcfbc182022
05f2f0ac92afa560315eb66fd6576683c7f69e2d
python/cpython
python__cpython-115273
# EOF occurred in violation of protocol starting Python3.10 on large requests # Bug report ### Bug description: We have identified a regression starting with Python 3.10 when making a large request over TLS. ```python import requests requests.post('https://google.com', data=b'A'*1000000) ``` ```python urllib3.exce...
e0f9863a613b7e00794475bf4286c1dcf688ac26
fce7fd6426519a2897330c03da7eb889232bf681
python/cpython
python__cpython-113441
# configure --with-openssl-rpath=DIR generates invalid linker option on macOS # Bug report ### Bug description: On macOS, running configure with the option --with-openssl-rpath=/x/y/z causes the linker to be invoked with the option: `-rpath=/x/y/z` which causes a linker error when compiling python with Apple's compi...
cc13eabc7ce08accf49656e258ba500f74a1dae8
bfee2f77e16f01a718c1044564ee624f1f2bc328
python/cpython
python__cpython-110487
# Thread ID assertion in `pystate.c` failing under WASI # Bug report ### Bug description: The following assert fails under a debug build with WASI: https://github.com/python/cpython/blob/a155f9f3427578ca5706d27e20bd0576f0395073/Python/pystate.c#L269 It's probably due to the pthread stubs always returning `0` as th...
5fd8821cf8eb1fe2e8575f8c7cc747cf78855a88
f013b475047b2e9d377feda9f2e16e5cdef824d7
python/cpython
python__cpython-110470
# Python 3.11.5 to 3.11.6 upgrade fails: vcruntime140.dll not found # Bug report ### Bug description: While updating 3.11.5 to 3.11.6 using python-3.11.6-amd64.exe, installation fails multiple time while precompiling. This is on a fairly clean up-to-date Win10 system with no Visual Studio. On a system with Visual St...
12cc6792d0ca1d0b72712d77c6efcb0aa0c7e7ba
ea39c877c0a8e7a717f2e4bf7d92a3a8780e67c0
python/cpython
python__cpython-110433
# GHA "Check if generated files are up to date" job failed with: No such file or directory: ./Parser/parser.new.c The GHA "Check if generated files are up to date" job failed with: `No such file or directory: './Parser/parser.new.c'`. This job runs: ``` make regen-deepfreeze make -j4 regen-all make regen-stdl...
fb6c4ed2bbb2a867d5f0b9a94656e4714be5d9c2
d257479c2f6cbf3b69ed90062f00635832e4bf91
python/cpython
python__cpython-110418
# glob module docs in wrong order The documentation of the `glob` module is in a slightly odd order: 1. A description of the globbing language (wildcards etc) 2. A "see also: pathlib" block 3. Function documentation: a. `glob()` b. `iglob()` c. `escape()` 4. Two examples of using `glob()` 5. A "see ...
d5491a6eff516ad47906bd91a13d71cdde18f5ab
cf67ebfb315ce36175f3d425249d7c6560f6d0d5
python/cpython
python__cpython-110441
# Proposal to add `Py_IsFinalizing()` to the limited API/stable ABI # Feature or enhancement ### Proposal: Bigger Python extension projects sometimes need to check whether the interpreter is in the process of shutting down to determine if certain operations may be safely executed (`PyEval_RestoreThread`, `Py_DECREF`...
64f158e7b09e67d0bf5c8603ff88c86ed4e8f8fd
b987fdb19b981ef6e7f71b41790b5ed4e2064646
python/cpython
python__cpython-110517
# select.kqueue uses invalid fd after fork # Bug report ### Bug description: `select.kqueue` is not aware of forks, and will try to use its file descriptor number after fork. Since kqueues are not inherited[^inherited] in children, the fd will be invalid, or it can refer to a file opened by someone else. [^in...
a6c1c04d4d2339f0094422974ae3f26f8c7c8565
cd6b2ced7595fa69222bdd2042edc5a2576f3678
python/cpython
python__cpython-110400
# test_builtin.PtyTests: test_input_no_stdout_fileno() failed on PPC64LE RHEL7 3.x This buildbot is slow. Maybe it's jut the `signal.alarm(2)` timeout of 2 seconds which is too slow. I suggest to just remove it. ```py # Child try: # Make sure we don't get stuck if there's ...
1328fa31fe9c72748fc6fd11d017c82aafd48a49
d33aa18f15de482a01988aabc75907328e1f9c9f
python/cpython
python__cpython-110642
# tty.setraw() and tty.setcbreak() return partially modified original attributes # Bug report According to the documentation they save the original result of `termios.tcgetattr()` and return it. But while making a copy of the attribute list before modifying it they do not take in account that it contains a reference ...
84e2096fbdea880799f2fdb3f0992a8961106bed
7284e0ef84e53f80b2e60c3f51e3467d67a275f3
python/cpython
python__cpython-110401
# test_socket: NetworkConnectionAttributesTest.clientTearDown() raised AttributeError on AMD64 RHEL7 Refleaks 3.x `NetworkConnectionAttributesTest.clientTearDown()` raised `AttributeError: 'NetworkConnectionAttributesTest' object has no attribute 'cli'`. AMD64 RHEL7 Refleaks 3.x: ``` (...) 3:19:42 load avg: 0....
e37d4557c3de0476e76ca4b8a1cc8d2566b86c79
6e97a9647ae028facb392d12fc24973503693bd6
python/cpython
python__cpython-110394
# The tty module is not tested It only contains 4 functions (2 before 3.12). `tty.setcbreak()` is only used in `pydoc` (and this case seems is not tested), `tty.setraw()` is only used in `pty` and tests mock it. So, the `tty` module is not tested, neither directly, nor indirectly. <!-- gh-linked-prs --> ### Linked PR...
7f702b26dbbf24ab5ef2be5444ae652300733b5b
92a9e980245156bf75ede0869f8ba9512e04d2eb
python/cpython
python__cpython-110407
# Issues from docs@python.org Users who don't have a github login are instructed to report issues to docs@python.org. I meant to do some triaging before converting the mails to GH issues, but always had something more important to do. So I'm posting a rough list to get more eyes on these. Each has a link to the list ...
a973bf0f97e55ace9eab100f9eb95d7eedcb28ac
e37d4557c3de0476e76ca4b8a1cc8d2566b86c79
python/cpython
python__cpython-110379
# `test_contextlib_async` produces several `RuntimeWarning`s # Bug report ``` » ./python.exe -m test test_contextlib_async Using random seed 908291980 0:00:00 load avg: 4.08 Run 1 test sequentially 0:00:00 load avg: 4.08 [1/1] test_contextlib_async /Users/sobolev/Desktop/cpython/Lib/contextlib.py:701: RuntimeWarning:...
6780d63ae5ed5ec98782606491a30b3bdb2f32b4
8e56d551ceef37a307280bcc5303bf69ccc9f9c1
python/cpython
python__cpython-110368
# regrtest: python -m test -j1 --verbose3 should not replace sys.stdout Currently, when a test does crash, its output is lost. It gives bug reports like issue gh-110364 which contains no output, just an exit code :-( The problem is that run_single_test() replaces sys.stdout when --verbose3 option is used. If Python ru...
6592976061a6580fee2ade3564f6497eb685ab67
313aa861ce23e83ca64284d97c1dac234c9def7c
python/cpython
python__cpython-110366
# `termios.tpsetattr` does rewrite errors # Bug report This code is problematic: https://github.com/python/cpython/blob/bf4bc36069ef1ed4be4be2ae70404f78bff056d9/Modules/termios.c#L215-L224 It does rewrite errors that happened before. Showing the last error, not the first one. This goes against Python's semantics. H...
2bbbab212fb10b3aeaded188fb5d6c001fb4bf74
6592976061a6580fee2ade3564f6497eb685ab67
python/cpython
python__cpython-110350
# Tkinter demo: show Tcl/Tk patchlevel instead of version # Feature or enhancement ### Proposal: When dealing with issue reports involving Tcl/Tk, it is often much more helpful to know what Tcl/Tk calls the “patchlevel” (e.g. 8.6.13) than what Tcl/Tk calls the “version” (e.g. 8.6), because only the former usually co...
b8f29b1293f55e12e86a2a039b49b6f9f73851b7
8e31cdc9450b3e644d48954865568e162edad514
python/cpython
python__cpython-110336
# test_asyncio.test_unix_events leaked "pymp-xk9bwcca" temporary file on ARM Raspbian 3.x "pymp" files are created by the multiprocessing module. ARM Raspbian 3.x: ``` 0:35:39 load avg: 6.50 [350/467/1] test.test_asyncio.test_unix_events failed (env changed) -- running (2): test.test_concurrent_futures.test_wa...
1337765225d7d593169205672e004f97e15237ec
1de9406f9136e3952b849487f0151be3c669a3ea
python/cpython
python__cpython-110334
# `test_zlib` uses some very old `random` API # Bug report Here's the problematic code: https://github.com/python/cpython/blob/1465386720cd532a378a5cc1e6de9d96dd8fcc81/Lib/test/test_zlib.py#L513-L525 It always fails with `AttributeError`, because `random.WichmannHill()` does not exist. This is some old compatibilit...
e9f2352b7b7503519790ee6f51c2e298cf390e75
efd8c7a7c97aa411098a4bee0ef1d428337deebb
python/cpython
python__cpython-112226
# In _GUARD_TYPE_VERSION, can type_version be 0? Currently `_GUARD_TYPE_VERSION` looks like this in Python/bytecodes.c: ``` op(_GUARD_TYPE_VERSION, (type_version/2, owner -- owner)) { PyTypeObject *tp = Py_TYPE(owner); assert(type_version != 0); DEOPT_IF(tp->tp_version_...
eb3c94ea669561a0dfacaca715d4b2723bb2c6f4
43b1c33204d125e256f7a0c3086ba547b71a105e
python/cpython
python__cpython-110311
# Heap Types In the Cross-Interpreter Data Registry are Improperly Shared This can cause a weakref for a class to be decref'ed in the wrong interpreter (or even when the GIL isn't held). The solution is to have a separate registry for each interpreter for heap types. Static types would stay global. <!-- gh-linked-p...
80dc39e1dc2abc809f448cba5d2c5b9c1c631e11
e561e9805854980a61967d07869b4ec4205b32c8
python/cpython
python__cpython-110320
# empty string constant in f-string format_spec # Bug report ### Bug description: The f-string `f'{1:{name}}'` has a extra `Constant(value='')` in the format_spec part in 3.12, which is not part of the AST in 3.11. This has also an effect on the generated bytecode. ```python import ast import dis print(ast.dum...
2cb62c6437fa07e08b4778f7ab9baa5f16ac01f2
cc389ef627b2a486ab89d9a11245bef48224efb1
python/cpython
python__cpython-110318
# test__xxinterpchannels leaks [21, 21, 21] references ``` ./python -m test test__xxinterpchannels -R 3:3 (...) test__xxinterpchannels leaked [21, 21, 21] references, sum=63 ``` Regression introduced by: commit a8f5dab58daca9f01ec3c6f8c85e53329251b05d ``` commit a8f5dab58daca9f01ec3c6f8c85e53329251b05d Aut...
d23a2f988771f4abd771ab4274529dcbf60dae37
6741d5af32101c27c3f930bfc575a7e567f9bf20
python/cpython
python__cpython-110297
# C API: Add PyUnicode_EqualToUTF8() function # Feature or enhancement There is public `PyUnicode_CompareWithASCIIString()` function. Despite it name, it compares Python string object with ISO-8859-1 encoded C string. it returns -1, 0 or 1 and never sets an error. There is private `_PyUnicode_EqualToASCIIString()` f...
eb50cd37eac47dd4dc71ab42d0582dfb6eac4515
d1f7fae424d51b0374c8204599583c4a26c1a992
python/cpython
python__cpython-110277
# `test_unicode` always fails during a PGO-optimised build (because it does not exist) # Bug report ### Bug description: As part of a PGO-optimised build, a selection of tests are run in order for the PGO build to take place (if I understand correctly, these tests are used to gather data on which functions in Python...
dddc757303c6512915ef79b9029213415f1c6f1b
bb2e96f6f4d6c397c4eb5775a09262a207675577
python/cpython
python__cpython-110299
# Named tuple's _replace() method should raise TypeError for unexpected keyword arguments # Bug report When you call a function with incorrect key arguments, you get a TypeError. But it is not always so with the `_replace()` method of a named tuple class created by `collections.namedtuple()`. ```pyshell >>> fro...
c74e9fb18917ceb287c3ed5be5d0c2a16a646a99
da6760bdf5ed8ede203618d5118f4ceb2cb1652d
python/cpython
python__cpython-110274
# dataclasses.replace() should raise TypeError for all invalid or missed required keyword arguments # Bug report When you call a function with incorrect key arguments or missing a required argument, you get a TypeError. But it is not always so with `dataclasses.replace()`. It raises a ValueError if a keyword argume...
5b9a3fd6a0ce3c347463e6192a59c15f5fcb0043
bfe7e72522565f828f43c2591fea84a7981ee048
python/cpython
python__cpython-110272
# Add tests for pickling and copying PyStructSequence objects PyStructSequence supports pickling and copying, but there are no tests for this. There is only one trivial test which tests that `__reduce__()` does not raise exception or crash. Needed explicit tests for `copy.copy()`, `copy.deepcopy()` (it is the same,...
2d4865d775123e8889c7a79fc49b4bf627176c4b
f1663a492e14c80c30cb9741fdc36fa221d5e30a
python/cpython
python__cpython-110261
# Missing error checks in `termios` module # Bug report There are multiple cases where `PyList_SetItem` does not check for `-1` in `termios` module. We need to fix this. There are two options to fix this: - `< 0` check - `PyList_SET_ITEM` usage There are two possible errors that `PyList_SetItem` can produce: ```c ...
43baddc2b9557e06ca4f3427c0717bc3688ed3e4
254e30c487908a52a7545cea205aeaef5fbfeea4
python/cpython
python__cpython-110271
# Multiline expression brackets with format specifiers don't work in f-strings # Bug report ### Bug description: In accordance with [PEP 701](https://peps.python.org/pep-0701/), the following code works: ```pycon >>> x = 1 >>> f"___{ ... x ... }___" '___1___' >>> f"___{( ... x ... )}___" '_...
3d5df54cdc1e946bd953bc9906da5abf78a48357
74208ed0c440244fb809d8acc97cb9ef51e888e3
python/cpython
python__cpython-110242
# Missing error check in `_testinternalcapi` # Bug report While looking at https://github.com/python/cpython/pull/110238 I've noticed that https://github.com/python/cpython/blob/014aacda6239f0e33b3ad5ece343df66701804b2/Modules/_testinternalcapi.c#L678 does not handle errors properly. I have a PR ready :) <!-- gh-li...
4596c76d1a7650fd4650c814dc1d40d664cd8fb4
a8f5dab58daca9f01ec3c6f8c85e53329251b05d
python/cpython
python__cpython-110238
# Missing error checks in `_PyEval_MatchClass` Several places in `_PyEval_MatchClass` call `PyList_Append` without checking the return value (e.g., https://github.com/python/cpython/blob/fc2cb86d210555d509debaeefd370d5331cd9d93/Python/ceval.c#L509C13-L509C26). However, `PyList_Append` can fail. It will only fail if we...
dd9d781da30aa3740e54c063a40413c542d78c25
de2a4036cbfd5e41a5bdd2b81122b7765729af83
python/cpython
python__cpython-110258
# PyStructSequence constructor ignores unknown field names # Bug report PyStructSequence constructor takes two arguments: tuple and dict. The tuple specifies values for "visible" fields (i.e. what you get when interpret PyStructSequence as a tuple), the dict specifies values for fields that are accessible only by nam...
9561648f4a5d8486b67ee4bbe24a239b2a93212c
bf4bc36069ef1ed4be4be2ae70404f78bff056d9
python/cpython
python__cpython-110223
# Add support of PyStructSequence in copy.replace() # Feature or enhancement ### Proposal: This issue is to make the concept of ["named tuple"](https://docs.python.org/3/glossary.html#term-named-tuple) support the `__replace__` protocol. `collections.namedtuple` and `typing.NamedTuple` already support the `__...
3bbe3b7c822091caac90c00ee937848bc4de80eb
9561648f4a5d8486b67ee4bbe24a239b2a93212c
python/cpython
python__cpython-110212
# Make types classes that are generic at type time subscriptable at runtime # Feature or enhancement ### Proposal: coroutine and generator should be subscriptable at runtime as they already are at type time ```python >>> import types >>> types.CoroutineType[None, None, int] TypeError: type 'coroutine' is not s...
e7dafdc2240a8e4e45f53782c47120eb3fe37712
b4bdf83cc67434235d9630c92c84a5261992b235
python/cpython
python__cpython-130933
# test_multiprocessing_spawn.test_manager: _TestCondition hung (20 min timeout) on AMD64 RHEL8 3.x ``` File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64/build/Lib/test/_test_multiprocessing.py", line 1426, in f woken.release() ``` This frame comes from ``_TestCondition``. AMD64 RHEL8 3.x: ``` ...
edd1eca336976b3431cf636aea87f08a40c94935
72e5b25efb580fb1f0fdfade516be90d90822164
python/cpython
python__cpython-110198
# copy and deepcopy fail to copy ipaddress scope_id # Bug report ### Bug description: copy and deepcopy fail to copy ipaddress scope_id ```python3 import ipaddress, copy a = ipaddress.IPv6Address('fe80::abc%def') a.scope_id #shows 'def' c = copy.copy(a) c.scope_id #shows null, should show 'def' d = copy.deepcopy(a...
767f416feb551f495bacfff1e9ba1e6672c2f24e
b845a9e145b2f133270aa07836c7e6a385066c00
python/cpython
python__cpython-112604
# ctypes array cannot be returned by value on ARM64 # Bug report ### Bug description: Dear, I'm wrapping a C-library with the ctypes module on Darwin (ARM64). I have a function that simply initializes a C-struct and returns the struct by value. The C-struct contains one simple C-array type. When using ArrayTypes in...
6644ca45cde9ca1b80513a90dacccfeea2d98620
79dad03747fe17634136209f1bcaf346a8c10617
python/cpython
python__cpython-110465
# test_subprocess: test_pipesize_default() failed on s390x Fedora Clang 3.x buildbot s390x Fedora Clang 3.x buildbot: ``` FAIL: test_pipesize_default (test.test_subprocess.ProcessTestCase.test_pipesize_default) ---------------------------------------------------------------------- Traceback (most recent call las...
d023d4166b255023dac448305270350030101481
a4baa9e8ac62cac3ea6363b15ea585b1998ea1f9
python/cpython
python__cpython-110181
# `typing`: `_PickleUsingNameMixin` is dead code # Bug report ### Bug description: The `typing._PickleUsingNameMixin` class is dead code, and should be removed. In Python 3.11, it was used as a mixin class for `typing.TypeVar`, `typing.TypeVarTuple`, and `typing.ParamSpec`. However, all three classes are now imp...
d642c5bbf58b42c90053dc553885445d53f247fe
15de493395c3251b8b82063bbe22a379792b9404
python/cpython
python__cpython-110194
# `test_typing`: `test_many_weakrefs` takes many seconds # Bug report ### Bug description: `TypeVarTests.test_many_weakrefs` in `test_typing` takes far longer than any other test in `test_typing` if you're using a debug build of CPython, slowing down `test_typing` considerably: ``` >python Lib/test/test_typi...
732ad44cec971be5255b1accbac6555d3615c2bf
8d92b6eff3bac45e7d4871c46c4511218b9b685a
python/cpython
python__cpython-110172
# `libregrtest` should always set `random.seed` # Feature or enhancement While working on https://github.com/python/cpython/issues/110160 I've noticed that it is rather hard to reproduce random test failures. So, I want to propose a new feature / fix for that. First of all, there's existing prior work of @vstinner w...
1465386720cd532a378a5cc1e6de9d96dd8fcc81
5b9a3fd6a0ce3c347463e6192a59c15f5fcb0043
python/cpython
python__cpython-110413
# test_socket: testCmsgTrunc0() deadlock on ARM Raspbian 3.x test_socket adds a lock on addCleanup: ```py class ThreadSafeCleanupTestCase: """Subclass of unittest.TestCase with thread-safe cleanup methods. This subclass protects the addCleanup() and doCleanups() methods with a recursive lock. ...
0db2f1475e6539e1954e1f8bd53e005c3ecd6a26
318f5df27109ff8d2519edefa771920a0ec62b92
python/cpython
python__cpython-110331
# test_gdb: test_pycfunction_fastcall_keywords() failed on PPC64LE Fedora Stable Clang 3.x PPC64LE Fedora Stable Clang 3.x: ``` ====================================================================== FAIL: test_pycfunction_fastcall_keywords (test.test_gdb.test_cfunction_full.CFunctionFullTests.test_pycfunction_fas...
1de9406f9136e3952b849487f0151be3c669a3ea
1465386720cd532a378a5cc1e6de9d96dd8fcc81