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-124401
# Use the normal code path for breakpoint commands in pdb # Feature or enhancement ### Proposal: Currently the structure to support breakpoint commands is too heavy. We need to keep `self.commands_doprompt` and `self.commands_silent` which are not necessary. Also `bp_commands` now use its own loop to execute command...
b5774603a0c877f19b33fb922e2fb967b1d50329
4b83c03ce964af7fb204144db9adaa524c113a82
python/cpython
python__cpython-124399
# Pin LLVM 18.1.0 for JIT CI (Windows) Looks like LLVM on Chocolatey has added 19.1.0 so we need to pin the JIT version. <!-- gh-linked-prs --> ### Linked PRs * gh-124399 * gh-129380 <!-- /gh-linked-prs -->
b4d0d7de0f6d938128bf525e119c18af5632b804
20ccda000b5f8365d5f864fd07876804157c2378
python/cpython
python__cpython-124386
# Document PyLong_AS_LONG `PyLong_AS_LONG` is undocumented. It should be documented, so people know how to replace it. See also: https://github.com/capi-workgroup/decisions/issues/38 <!-- gh-linked-prs --> ### Linked PRs * gh-124386 * gh-124719 * gh-130549 <!-- /gh-linked-prs -->
425587a110eb214a097c634d4b6d944ac478923e
1ba35ea38562bfc0301bab4e098aa124e114b886
python/cpython
python__cpython-124542
# New test_ttk failure on Mac: "bad screen distance" # Bug report ### Bug description: I've been running with some patches from @ronaldoussoren to the following: ``` modified: Lib/test/support/__init__.py modified: Lib/test/test_ttk/test_style.py modified: Lib/test/test_ttk/test_widgets.py ``` (See attach...
fb6bd31cb74d2f7e7b525ee4fe9f45475fc94ce9
d6954b6421aa34afd280df9c44ded21a2348a6ea
python/cpython
python__cpython-124459
# Crash running PyO3 tests with --test-threads=1000 # Crash report ### What happened? Unfortunately I don't know how to make this more minimal than "run the PyO3 tests". You'll need rust 1.81 installed along with a copy of the latest version of PyO3 from github and a free-threaded Python interpreter. Repea...
54c6fcbefd33a8d8bf8c004cf1aad3be3d37b933
e97910cdb76c1f1dadfc4721b828611e4f4b6449
python/cpython
python__cpython-124371
# Python "HOWTO" guide for free-threading We already have a ["HOWTO" guide](https://docs.python.org/3.13/howto/free-threading-extensions.html#freethreading-extensions-howto) for free-threading C API extension authors. We should have a similar guide aimed at people writing Python code. The HOWTO should document the...
68e384c2179fba41bc3be469e6ef34927a37f4a5
7d24ea9db3e8fdca52058629c9ba577aba3d8e5c
python/cpython
python__cpython-128399
# Expression before `=` in an f-string is interpreted like a normal string with escape sequences # Bug report ### Bug description: When an f-string contains an `=` specifier, the characters before the equals sign are interpreted as if they were within a normal string. In particular, a backslash is always interpreted...
60a3a0dd6fe140fdc87f6e769ee5bb17d92efe4e
ba9a4b621577b92f36d88388cc9f791c2dc7d7ba
python/cpython
python__cpython-124428
# argparse: abbreviated single-dash long options do not work with = `argparse` supports short options, single-dash long options and double-dash long options. Values for option can be specified as separate argument (for all types of options): ``` --option value -option value -o value ``` It can also be grouped in...
61180446eee2aef07b042c7e8892c45afabd1499
9bcadf589ab6f7b9d309290de7a80156b6905d35
python/cpython
python__cpython-124349
# `_PyObject_IS_GC()` should not use `PyType_HasFeature()` # Feature or enhancement ### Proposal: `_PyObject_IS_GC()` is one of the most frequently used functions, which keeps using `PyType_HasFeature()` rather than `_PyType_HasFeature()`. I know it has no performance issues since introduced, but switching to...
d9d5b3d2ef770224b39987dbce7bb5c616fe3477
2e0d445364f6d9832e81263c1c68440654924fc4
python/cpython
python__cpython-124322
# Argparse negative number parsing does not capture -.5 https://github.com/python/cpython/pull/123970/files#r1770614169 <!-- gh-linked-prs --> ### Linked PRs * gh-124322 * gh-124359 * gh-124361 <!-- /gh-linked-prs -->
dc48312717142ec902197da504fad333f13c9937
2f6d4109b84d40b76e8814233ecfcc02291f71be
python/cpython
python__cpython-124472
# Remove `ma_version_tag` (PEP 699 / PEP 509) # Feature or enhancement The accepted [PEP 699](https://peps.python.org/pep-0699/) proposed removing the private [`ma_version_tag`](https://github.com/python/cpython/blob/342e654b8eda24c68da64cc21bc9583e480d9e8e/Include/cpython/dictobject.h#L25) field from `PyDictObject`....
5aa91c56bf14c38b4c7f5ccaaa3cd24fe3fb0f04
60ff67d010078eca15a74b1429caf779ac4f9c74
python/cpython
python__cpython-124803
# Add translation tests for argparse While #12711 was merged, it seems like there's a separate issue worth tracking around adding translation tests for argparse (see https://github.com/python/cpython/pull/12711#issuecomment-1964754284) <!-- gh-linked-prs --> ### Linked PRs * gh-124803 * gh-126046 * gh-126051 * gh-126...
0922a4ae0d2803e3a4e9f3d2ccd217364cfd700e
f819d4301d7c75f02be1187fda017f0e7b608816
python/cpython
python__cpython-124288
# Reference counting stats do not account for immortal objects. ### Bug description: The reference counting stats ([for example](https://github.com/faster-cpython/benchmarking-public/blob/main/results/bm-20240914-3.14.0a0-401fff7-PYTHON_UOPS/bm-20240914-azure-x86_64-python-401fff7423ca3c8bf1d0-3.14.0a0-401fff7-pystat...
c87b0e4a462f98c418f750c6c95d4d8715c38332
6203ef35dd4ee9dd59759ce83eace8eacac69685
python/cpython
python__cpython-130770
# Rewrite `typing.Annotated` docs As @JelleZijlstra said in https://github.com/python/cpython/pull/124125 > I don't like this long bulleted list of individual issues. We should rewrite it to a more organized form. `typing.Annotated` indeed has a lot bullet points in the docs: https://docs.python.org/3/library/ty...
e4ac196aaaa9fd2f1bd0050797b58959671c549a
c497f83ad85260e6c1be633d5ab24b3dddd6f32c
python/cpython
python__cpython-124279
# Windows Installer update with "keep current options" uninstalled the free-threaded binaries # Bug report ### Bug description: I used the installer to upgrade from a Python 3.13.0rc1 install to a Python 3.13.0rc2 install. In the 3.13.0rc1 install, I had installed the free-threaded binaries. When upgrading, I chose...
df7228ce140ecb005d44a0c171ba4d098b3fa67c
6ab634840c662ae07d90655e5e50ca43421da4be
python/cpython
python__cpython-124251
# SystemError/Assertion failure when processing struct with '0p' field # Crash report ### What happened? Using `struct` to process zero-width Pascal strings (`"0p"`) can lead to an assertion failure or `SystemError`. Specifically: * `struct.pack("<0p", b"")` leads to an assertion failure and seg fault on debug buil...
63f196090f90cbfe5f698824655f74dea5cb2b29
baa3550bc3a119f41cc4eaed5373f9d695208e8e
python/cpython
python__cpython-124246
# UserWarning in test_argparse Running test_argparse with option `-We` fails: ```pytb $ ./python -We -m test -vuall test_argparse -m test_invalid_args ... ====================================================================== ERROR: test_invalid_args (test.test_argparse.TestIntermixedArgs.test_invalid_args) ----...
992e8f6102e317b4967a762fbefea82f9fcf9dfb
7331d0f70bc9fbac177b76b6ec03486430383425
python/cpython
python__cpython-124237
# Improve `mock.reset_mock` docs: clarify that `return_value` and `side_effects` are booleans Requested here: https://github.com/python/cpython/pull/124038 <!-- gh-linked-prs --> ### Linked PRs * gh-124237 * gh-124592 * gh-130408 <!-- /gh-linked-prs -->
19fed6cf6eb51044fd0c02c6338259e2dd7fd462
f923605658a29ff9af5a62edc1fc10191977627b
python/cpython
python__cpython-124229
# AssertionError in test_uuid on NetBSD: Expected UUID version 1, but got version 4 # Bug report ### Bug description: ```python home# ./python -m test test_uuid Using random seed: 2311813199 0:00:00 load avg: 0.11 Run 1 test sequentially in a single process 0:00:00 load avg: 0.11 [1/1] test_uuid test test_uuid faile...
2e8c769481d5729d86be8c6cff5881c4c5fbb8d2
d5f95ec07bb47a4d6554e04d13a979dbeac05f74
python/cpython
python__cpython-124844
# Reference count contention with nested functions Creating nested functions can be a source of reference count contention in the free-threaded build. Consider the following (contrived) example: ```python from concurrent.futures import ThreadPoolExecutor def func(n): sum = 0 for i in range(n): ...
b48253852341c01309b0598852841cd89bc28afd
5aa91c56bf14c38b4c7f5ccaaa3cd24fe3fb0f04
python/cpython
python__cpython-124240
# RFC 9637 not implemented by ipaddress module # Bug report ### Bug description: ```python >>> import ipaddress >>> ip_address = ipaddress.ip_address("3fff::") >>> ip_address.is_global True ``` [RFC 9637](https://www.rfc-editor.org/rfc/rfc9637.html) registered the address block `3fff::/20` as **NOT** globally reach...
db6eb3640a7d98db6fea17cf9da4cb14504e5571
622368d99c986ca1a9bdba951ac53f42d7ee6fca
python/cpython
python__cpython-124215
# Test failures inside `systemd-nspawn --suppress-sync=true` container # Bug report ### Bug description: When the CPython's test suite is run inside a systemd-nspawn container with `--suppress-sync=true` specified, the following tests fail: ```pytb ===================================================================...
342e654b8eda24c68da64cc21bc9583e480d9e8e
1a577729e347714eb819fa3a3a00149406c24e5e
python/cpython
python__cpython-124211
# Invalid variable name in `venv` code for symlink failure handling on Windows # Bug report ### Bug description: The `dst` variable in https://github.com/python/cpython/blob/main/Lib/venv/__init__.py#L396 should be named `dest`. Otherwise it throws the `UnboundLocalError: cannot access local variable 'dst' wher...
ea7fe1fe2e162f2375562467ad834c6224a62daf
36682c091407dc9c7e750c22fb71e62466952662
python/cpython
python__cpython-127046
# threading module is missing basic/introductory usage example # Documentation threading module is missing basic/introductory usage example documentation start from some general notes which may have its place there and jump into "This module defines the following functions: threading.active_count()" Would it...
62f66caa8c963bdf45d1e22456aea985e74fa2d5
73d71a416fb05b64c2b43fade5d781a1fa0cb2cd
python/cpython
python__cpython-124208
# `get_type_hints(K format=FORWARDREF)` raises when `K` is dynamically created class # Bug report On `main` this raises: ```python >>> from typing import get_type_hints >>> K = type('K', (), {}) >>> get_type_hints(K) {} >>> get_type_hints(K, format=2) Traceback (most recent call last): File "<python-input-4>", lin...
96f619faa74a8a32c2c297833cdeb0393c0b6b13
3b6bfa77aa4da2ce1f3a15e39831f8b85882698c
python/cpython
python__cpython-124195
# Wrong link in "What's new in Python 3.8" (apparent typo in issue ID) # Documentation I noticed a typo while doing some curation on Stack Overflow and looking for a link to justify a claim. At the start of https://docs.python.org/3/whatsnew/3.8.html#api-and-feature-removals : > Starting with Python 3.3, impo...
d8c0fe1944ac41787e16fa60e608f56c8235e100
a15a584bf3f94ea11ab9363548c8872251364000
python/cpython
python__cpython-124192
# Remove -Wconversion from CFLAGS_NODIST in --enable-safety # Bug report ### Bug description: `-Wconversion` in CFLAGS_NODIST in CI jobs Ubuntu build/test and macOS build/test emits warnings on PRs that have changes unrelated to those warnings. There is an issue in the actions toolkit expressing the same frustration...
29a1a6e3ed6f606939b4aaf8d6955f368c3be3fc
d8c0fe1944ac41787e16fa60e608f56c8235e100
python/cpython
python__cpython-124193
# Ignore compiler warnings for entire file or directory in CI tooling # Feature or enhancement ### Proposal: CI warning check tooling needs to ignore entire files or directories. Currently `Tools/build/.warningignore_ubuntu` and `Tools/build/.warningignore_macos` contain file paths and a count of warnings to ign...
81480e6edb34774d783d018d1f0e61ab5c3f0a9a
646f16bdeed6ebe1069e1d64886fbaa26edac75c
python/cpython
python__cpython-124189
# Take into account encoding of source file for syntax error Currently most syntax errors raised in the compiler (except these raised in the parser) use `PyErr_ProgramTextObject()` to get the line of the code. It does not know the encoding of the source file and interpret it as UTF-8 (failing if it contain non-UTF-8 s...
e2f710792b0418b8ca1ca3b8cdf39588c7268495
3c83f9958c14cd62ad8951c53536f7788745b0ba
python/cpython
python__cpython-124335
# "DeprecationWarning: builtin type has no __module__ attribute" when using PyStructSequence_NewType from a module method # Bug report ### Bug description: Below is an example producing the warning. This warning does not occur when the type is created in the module's init function. When using `PyStructSequence_InitT...
3287c834e5370294e310450115290979aac06efa
51d426dc033ef9208c0244a569f3e816e4c328c9
python/cpython
python__cpython-124164
# Segfault when trying to use PyRun_SimpleString() with some imports # Crash report ### What happened? I hit the segfault when doing the following thing: ``` $ docker run -ti fedora:41 bash # dnf -y install gcc python-devel # echo '#include <Python.h> int main() { Py_Initialize(); PyThreadStat...
7331d0f70bc9fbac177b76b6ec03486430383425
8f82d9aa2191db7826bb7a453fe06ce65f966cf8
python/cpython
python__cpython-124133
# Regex \B doesn't match empty string # Bug report ### Bug description: ```python >>> import re >>> list(re.finditer(r'\b', 'e')) [<re.Match object; span=(0, 0), match=''>, <re.Match object; span=(1, 1), match=''>] >>> list(re.finditer(r'\B', 'e')) [] >>> list(re.finditer(r'\b', '%')) [] >>> list(re.finditer(r'\B', ...
d3e79d75d164c338a64fd66edb26e69c501cee58
2e8c769481d5729d86be8c6cff5881c4c5fbb8d2
python/cpython
python__cpython-124128
# [C API] Make Py_REFCNT() opaque in limited C API 3.14 In the limited C API 3.14 and newer, I propose to change Py_REFCNT() implementation to an opaque function call to hide implementation details. I made a similar change for Py_INCREF() and Py_DECREF() in Python 3.12. The problem is that with Free Threading (PEP...
9d344fafc4385cb2e17425b77b54660ca83c61ac
b82f07653e1e15a48ebaf8de324f52559e470254
python/cpython
python__cpython-124125
# Document `Annotated.__origin__` The `typing` module docs cover using `Annotated.__metadata__` to retrieve the annotations, but they do not currently cover the use of `Annotated.__origin__` to retrieve the underlying type hint that is being annotated. ``` >>> from typing import Annotated >>> Annotated[int, ""]._...
faef3fa653f2901cc905f98eae0ddcd8dc334d33
9d344fafc4385cb2e17425b77b54660ca83c61ac
python/cpython
python__cpython-124110
# test_locale: test_strcoll_with_diacritic and test_strxfrm_with_diacritic tests failing on NetBSD # Bug report ### Bug description: ```python localhost$ ./python -m test test_locale -m test_strcoll_with_diacritic -m test_strxfrm_with_diacritic -v == CPython 3.14.0a0 (heads/main:401fff7423c, Sep 15 2024, 21:20:00) [...
10de3600a908f96d1c43dac85ef867991d54708e
a9c2bc16349c2be3005f97249f3ae9699988f218
python/cpython
python__cpython-124103
# Update Dependency Information for PCBuild to Correct Information the description in `python.props` stated: ``` Use the latest available version of Visual Studio to build. To override this and build with an earlier version, pass "/p:PlatformToolset=v100" (for example) when building. ``` However, v100 corres...
27a62e7371f062a80704f6bf4d6e8f06568d37aa
8a2baedc4bcb606da937e4e066b4b3a18961cace
python/cpython
python__cpython-124119
# Pasting a function definition does not work in 3.13 REPL with Windows Terminal # Bug report ### Bug description: I use Python downloaded from python.org without using a graphical environment such as IPython. Instead, I use the Windows Terminal with the REPL built into python.exe. In 3.12.6, I can paste a functio...
a65366ed879a3d9f27cbcc811ed2e05ad1a2af06
25a7ddf2efeaf77bcf94dbfca28ba3a6fe9ab57e
python/cpython
python__cpython-124084
# test_strsignal fails on NetBSD with TypeError # Bug report ### Bug description: ```sh -bash-5.2$ ./python -m test test_signal -m test_strsignal Using random seed: 3137472754 0:00:00 load avg: 5.12 Run 1 test sequentially in a single process 0:00:00 load avg: 5.12 [1/1] test_signal test test_signal failed -- Traceb...
36682c091407dc9c7e750c22fb71e62466952662
9a6e2336e4b54fc13064b77826a67b03b3b45133
python/cpython
python__cpython-124069
# ``test_asyncio.test_base_events`` leaks references in free-threaded build # Bug report ### Bug description: ```python eclips4@nixos ~/p/p/cpython (main)> ./python -m test -R 3:3 test_asyncio.test_base_events Using random seed: 315532800 0:00:00 load avg: 7.88 Run 1 test sequentially in a single process 0:00:00 loa...
b02301fa5a543266ee310a6d98278d2b8e26d7b3
38809171b8768517824fb62d48abe2cb0aff8429
python/cpython
python__cpython-124070
# Lots of new compiler warnings ``` In file included from ./Include/internal/pycore_global_objects.h:12: ./Include/internal/pycore_gc.h:230:21: warning: implicit conversion changes signedness: 'int' to 'uintptr_t' (aka 'unsigned long') [-Wsign-conversion] gc->_gc_prev &= ~_PyGC_PREV_MASK_FINALIZED; ...
44052b5f18c5d605d33bf3207b5c918127cf0e82
05235e3c16d755e292ebf6e2bd6c4903bb6849b9
python/cpython
python__cpython-124061
# Remove `_PyCompile_IsNestedScope` roll it into `_PyCompile_IsInteractive` Currently the `c_interactive` field is used in only one place - to special-case the code generation of interactive statements. We can move this special case from `codegen_stmt_expr` to `_PyCodegen_Body` (where there is the `is_interactive` a...
9aa1f60e2dedd8a67c42fb4f4c56858b6ba5b947
453da532fee26dc4f83d4cab77eb9bdb17b941e6
python/cpython
python__cpython-124045
# Tracker: protect macros expansions using `do { ... } while (0)` constructions or via `static inline` equivalents when possible # Fortifying Macros Expansion ## The Problem In C, using a macro allows to reduce code duplication. However, depending on the macro's body, the moment they are expanded by the C prepro...
e49d1b44d3ef2542c0ae165e14a7e5ffbc32b2d1
432bf31327c6b9647acb8bdb0eac2d392fd9f60a
python/cpython
python__cpython-124078
# Crash when free-threaded Python is built with `--with-trace-refs` # Crash report ### What happened? I'm using `ThreadPoolExecutor` to write tests for free-threading enabled C extensions. - metaopt/optree#137 ~When running concurrent threads larger than `num_workers`, CPython crashes.~ CPython crashes whe...
3b45df03a4bd0e21edec43144b8d9bac689d23a0
44052b5f18c5d605d33bf3207b5c918127cf0e82
python/cpython
python__cpython-124042
# testHypot in test_match uses assertEqual on floats https://github.com/python/cpython/blob/main/Lib/test/test_math.py#L794-L871 We (SUSE) have test `self.assertEqual(hypot(1, -1), math.sqrt(2))` failing on some distros and some architectures (namely `i586`) and I suspect that whole idea of `assertEqual` on two flo...
4420cf4dc9ef7bd3c1c9b5465fa9397304bf0110
7628f67d55cb65bad9c9266e0457e468cd7e3775
python/cpython
python__cpython-124031
# test_termios.test_tcsendbreak fails with 'Inappropriate ioctl for device' error on NetBSD # Bug report ### Bug description: ``` $ ./python -m test test_termios -m test_tcsendbreak -v == CPython 3.14.0a0 (heads/main:3bd942f106a, Sep 13 2024, 03:20:13) [GCC 10.5.0] == NetBSD-10.0-amd64-x86_64-64bit-ELF little-endian...
9f42b62db998131bb5cd555e2fa72ba7e06e3130
8810e286fa48876422d1b230208911decbead294
python/cpython
python__cpython-124028
# Python 3.13+ REPL inserts ~ on [Del] [PgUp] [PgDn] with TERM=vt100 # Bug report ### Bug description: I've noticed that the Python 3.13+ REPL misbehaves in a [mock](https://github.com/rpm-software-management/mock) shell environment. Whenever I press <kbd>Del</kbd>, <kbd>PgUp</kbd>, or <kbd>PgDn</kbd>, a literal...
f4e5643df64d0c2a009ed224560044b3409a47c0
6e06e01881dcffbeef5baac0c112ffb14cfa0b27
python/cpython
python__cpython-124023
# class docstring is removed in interactive mode ``` >>> import dis >>> src = """class C: ... "docstring" ... x = 42""" >>> dis.dis(compile(src, "<string>", "single")) 0 RESUME 0 1 LOAD_BUILD_CLASS PUSH_NULL LOAD_CONST ...
a9594a34c62487961be86c0925daaa43bb467bb9
cfe6074d1fa81cf0684fbf8a623616441a1966e7
python/cpython
python__cpython-124020
# codegen_annotations_in_scope is called when ste->ste_annotations_used is false Currently `codegen_annotations_in_scope()` is called before the value of `ste->ste_annotations_used` is checked. As far as I can tell this is not necessary. <!-- gh-linked-prs --> ### Linked PRs * gh-124020 <!-- /gh-linked-prs -->
6e06e01881dcffbeef5baac0c112ffb14cfa0b27
a53812df126b99bca25187441a123c7785ee82a0
python/cpython
python__cpython-124017
# upgrade Unicode database to 16.0.0 https://blog.unicode.org/2024/09/announcing-unicode-standard-version-160.html <!-- gh-linked-prs --> ### Linked PRs * gh-124017 <!-- /gh-linked-prs -->
bb904e063d0cbe4c7c83ebfa5fbed2d9c4980a64
a9594a34c62487961be86c0925daaa43bb467bb9
python/cpython
python__cpython-124014
# remove _PyCompile_IsTopLevelAwait The assertions that need this function were added to convince ourselves that the refactor away from it is correct. We don't need them anymore, so we can remove this function. <!-- gh-linked-prs --> ### Linked PRs * gh-124014 <!-- /gh-linked-prs -->
8145ebea587284db3be3f152ee0298952977d6f4
b2afe2aae487ebf89897e22c01d9095944fd334f
python/cpython
python__cpython-124059
# invaild assertion of _io__WindowConsoleIO_write_impl # Feature or enhancement ### Proposal: If function `_io__WindowsConsoleIO_write_impl` does not produce as expected output from WriteConsoleW, it is the process of recalculating the existing len. At this point, function WideCharToMultiByte finds the byte l...
3cf83d91a5baf3600dd60f7aaaf4fb6d73c4b8a9
83926d3b4c7847394b5e2531e9566d7fc9fbea0f
python/cpython
python__cpython-124003
# Use array of size 1 for `self_or_null` and other instruction inputs that get merged into another array. # Bug report We have a common pattern for calls. The stack looks like this: `func` `self_or_null` `args[oparg]` and if `self_or_null` is not `NULL` we merge it into the `args` array. This is error prone however a...
4ed7d1d6acc22807bfb5983c98fd59f7cb5061db
3ea51fa2e33797c772af6eaf6ede76d2dc6082ba
python/cpython
python__cpython-123995
# Buildbot failure in test_importlib UTF-16 tests :warning::warning::warning: Buildbot failure :warning::warning::warning: ------------------------------------------------------------------------ Hi! The buildbot **s390x RHEL9 Refleaks 3.x** has failed when building commit ba687d9481c04fd160795ff8d8568f5c9f877128....
3ea51fa2e33797c772af6eaf6ede76d2dc6082ba
a362c41bc934fabe6bfef9be1962005b38396860
python/cpython
python__cpython-124358
# Remove `WITH_FREELISTS` macro As we discussed at https://discuss.python.org/t/should-we-remove-the-with-freelists-macro, we just added this macro to **test** mimalloc's own feature without using our own free list implementation. See: https://github.com/python/cpython/issues/89685 But since we already impleme...
ad7c7785461fffba04f5a36cd6d062e92b0fda16
be76e3f26e0b907f711497d006b8b83bff04c036
python/cpython
python__cpython-124018
# Sentinel in namespace path breaks NamespaceReader # Bug report ### Bug description: As reported in https://github.com/python/importlib_resources/issues/311 and highlighted by https://github.com/python/importlib_resources/issues/318, when an editable install adds a sentinel value to a namespace path, it can break t...
b543b32eff78ce214e68e8c5fc15a8c843fa8dec
fccbfc40b546630fa7ee404c0949d52ab2921a90
python/cpython
python__cpython-123972
# Add _PyErr_RaiseSyntaxError and _PyErr_EmitSyntaxWarning The ``_PyCompile_Error`` and ``_PyCompile_Warn`` functions take a compiler struct as parameter, just for the filename. In order to be able to use these functions from areas of the codebase where this does not exist, we need versions that take just the filename...
aba42c0b547e6395c9c268cf98a298d0494cb9df
9aa1f60e2dedd8a67c42fb4f4c56858b6ba5b947
python/cpython
python__cpython-123971
# `python -m random --float N` should pick a float between 0 and N, not 1 and N # Bug report ### Bug description: In the specification for the new `python -m random` CLI for 3.13 (#118131), the proposed behavior was > if it's a float, print a random float between 0 and the input (via [random.uniform](https://...
a362c41bc934fabe6bfef9be1962005b38396860
8e99495701737c9d9706622f59581213ef163b23
python/cpython
python__cpython-127329
# faulthandler's `dump_traceback` doesn't handle case where top-most frame is `FRAME_OWNED_BY_CSTACK` # Bug report We properly skip trampoline frames when they are not the top-most frame: https://github.com/python/cpython/blob/3bd942f106aa36c261a2d90104c027026b2a8fb6/Python/traceback.c#L979-L982 But if `tstate->cur...
58e334e1431b2ed6b70ee42501ea73e08084e769
9328db7652677a23192cb51b0324a0fdbfa587c9
python/cpython
python__cpython-123962
# Refactorization of `_cursesmodule.c` to fix reference leaks # Feature or enhancement ### gh-123962: global dictionary removal In `_cursesmodule.c`, there is a global reference to the module's dictionary. The reason is that we cannot add all constants when the module is being initialized because some constants...
403f3ddedcab14f6c16ea78a93bb4acf49d06a07
e5b0185e43c972ce98decd1493cd0b0c3a6b166b
python/cpython
python__cpython-123959
# codegen should ideally not need to know the optimization level Optimization level is used for things that can be done in ast_opt. I'll try to move them there. <!-- gh-linked-prs --> ### Linked PRs * gh-123959 * gh-124143 <!-- /gh-linked-prs -->
e07154fd1e3152a758cf9b476257a4ffdc48dfc6
2938c3dec99390087490124c2ef50e1592671e72
python/cpython
python__cpython-123970
# Argparse does not identify negative numbers with underscores as a numerical value # Bug report ### Bug description: Simple example: $ python test_arguments.py --Value -1_000.0 `error: argument -v/--Value: expected one argument` The regular expression to identify negative numbers in the argparse.py module uses th...
14e5bdceff45e6e789e1f838b96988946c75b0f4
0a32c6959c265d21d7c43fe8e4aefc8c0983e85e
python/cpython
python__cpython-123943
# Missing test for docstring-handling code in ast_opt.c ``astfold_body`` has a block of code that checks whether const folding created something that looks like a docstring, which was not there before. If it did, then we have a string that came out of folding a const expression. This is not recognised by Python as a d...
6e23c89fcdd02b08fa6e9fa70d6e90763ddfc327
c8d1dbef5b770b647aa7ff45fd5b269bc7629d0b
python/cpython
python__cpython-124150
# Daemonic threads not killed in some circumstances in python 3.13 # Bug report ### Bug description: I got a [bug report](https://github.com/pycompression/python-zlib-ng/issues/53) on python-zlib-ng where using the threaded opening the program would hang if an exception occurred and a context manager was not use...
c9878e1b220b748788c3faa656257d5da4cd46c7
21c825417fc993d708c3ff57e2b8b97b09a20159
python/cpython
python__cpython-123941
# Incorrect slot check: typo in `__dictoffset__` # Bug report I made a typo that made it into the final code: https://github.com/python/cpython/blob/00ffdf27367fb9aef247644a96f1a9ffb5be1efe/Lib/dataclasses.py#L1211-L1212 It should had been `__dictoffset__` not `__dictrefoffset__`. Fixing plan: - Add tests for C typ...
ac918ccad707ab2d7dbb78a4796a7b8a874f334c
43303e362e3a7e2d96747d881021a14c7f7e3d0b
python/cpython
python__cpython-124038
# `reset_mock` resets `MagicMock`'s magic methods in an unexpected way # Bug report ### Bug description: The `reset_mock(return_value=True)` method behaves in a wrong/inconsistent way. When used with `MagicMock`, the method `reset_mock(return_value=True)` does not reset the return values of the magic methods. ...
7628f67d55cb65bad9c9266e0457e468cd7e3775
43cd7aa8cd88624f7211e47b98bc1e8e63e7660f
python/cpython
python__cpython-123929
# Better error message for from imports when a script shadows a module # Feature or enhancement ### Proposal: This is a follow up to https://github.com/python/cpython/pull/113769 See https://github.com/python/cpython/pull/113769#issuecomment-2197994572 ### Has this already been discussed elsewhere? No response gi...
3983527c3a6b389e373a233e514919555853ccb3
58c753827ac7aa3d7f1495ac206c28bf2f6c67e8
python/cpython
python__cpython-128405
# configure doesn't disable ncurses extended_pair_content() if ncursesw is not available # Bug report ### Bug description: On a system I'm trying to build Python for, I have libncurses.so available but not libncursesw.so. Unfortunately, although this is not documented directly anywhere I can find, the ncurses exten...
8d16919a06a55a50756bf083221a6f6cab43de50
e1baa778f602ede66831eb34b9ef17f21e4d4347
python/cpython
python__cpython-123924
# Use deferred reference counting in some `_PyInterpreterFrame` fields # Feature or enhancement The `_PyInterpreterFrame` struct contains a strong reference to: * `f_executable` - the currently executing code object * `f_funcobj` - the function object * `f_locals` - the locals object (often NULL) * `frame_obj` - the...
b2afe2aae487ebf89897e22c01d9095944fd334f
4ed7d1d6acc22807bfb5983c98fd59f7cb5061db
python/cpython
python__cpython-123920
# `_freeze_module.c` has several unhandled nulls # Bug report https://github.com/python/cpython/blob/main/Programs/_freeze_module.c has several unhandled nulls. I have a PR ready: ```diff diff --git Programs/_freeze_module.c Programs/_freeze_module.c index 2a462a42cda..891e4256e89 100644 --- Programs/_freeze_module....
c8d1dbef5b770b647aa7ff45fd5b269bc7629d0b
e9eedf19c99475b1940bbbbdc8816b51da3968e7
python/cpython
python__cpython-123918
# buildrelease.bat uses same build directory for AMD64 and ARM64 # Bug report ### Bug description: When I build Python 3.11.10 installers using `Tools\msi\buildrelease.bat -x64 -arm64`, the AMD64 files under `PCbuild\amd64\en-us` are deleted when the ARM64 build starts. This is due to a typo in the build directory ...
00ffdf27367fb9aef247644a96f1a9ffb5be1efe
a2d0818c85c985a54f358e1d9ea7ce3eb0c5acca
python/cpython
python__cpython-123947
# PyType_From*: Disallow metaclasses with custom tp_new Following up after #60074 and #103968: In 3.14, the deprecation period is over and `PyType_From*` should fail if the metaclass has custom `tp_new`. That means the `tp_new` is no longer silently skipped. The proper way to instantiate such a metaclass is to cal...
432bf31327c6b9647acb8bdb0eac2d392fd9f60a
d7e83398c188a0acd19a496ee2eeeeab52d64a11
python/cpython
python__cpython-123893
# _wmi missing in sys.stdlib_module_names # Bug report ### Bug description: Given that `import _wmi` succeeds on a minimal Python distribution (embeddable amd64 downloaded from https://www.python.org/downloads/release/python-3130rc2/ for example), should `_wmi` not be included in `sys.stdlib_module_names`? ``` pyth...
fb1b51a58df4315f7ef3171a5abeb74f132b0971
b52de7e02dba9e1f176d6d978d782fbd0509311e
python/cpython
python__cpython-124490
# Incorrect optimization in itertools.tee() **Bug description**: To save a memory allocation, the code path for a tee-in-a-tee incorrectly reuses the outer tee object as the first tee object in the result tuple. This is incorrect. All tee objects in the result tuple should have the same behavior. They are suppos...
909c6f718913e713c990d69e6d8a74c05f81e2c2
fb6bd31cb74d2f7e7b525ee4fe9f45475fc94ce9
python/cpython
python__cpython-123883
# Compiler should not need to know how to construct AST nodes There is one place in the compiler where it copies a bit of AST and modifies it to add a base class to generic classes. It would be nice if the compiler didn't need to know how to do this. <!-- gh-linked-prs --> ### Linked PRs * gh-123883 * gh-123886...
a2d0818c85c985a54f358e1d9ea7ce3eb0c5acca
3597642ed57d184511ca2dbd1a382ffe8e280ac4
python/cpython
python__cpython-123950
# Python 3.13 breaks circular imports during single phase init of extension module Here's a bash script to reproduce: ```bash printf ' #define PY_SSIZE_T_CLEAN #include <Python.h> static struct PyModuleDef nativemodule = { PyModuleDef_HEAD_INIT, .m_name = "native", }; PyObject* module = NULL; P...
aee219f4558dda619bd86e4b0e028ce47a5e4b77
3e36e5aef18e326f5d1081d73ee8d8fefa1d82f8
python/cpython
python__cpython-126552
# Support `wasm32-wasip1` as the default WASI target triple # Bug report ### Bug description: https://bytecodealliance.zulipchat.com/#narrow/stream/219900-wasi/topic/Is.20.60wasm32-wasi.60.20retired.20in.20preference.20for.20.60wasm32-wasip1.60.3F points out that `wasm32-wasi` is soft deprecated in favour of `wasm32...
bbe9b21d06c192a616bc1720ec8f7d4ccc16cab8
1f777396f52a4cf7417f56097f10add8042295f4
python/cpython
python__cpython-124396
# The new REPL fails on Ctrl-C after search How to reproduce: * Run the interactive interpreter. * Press `<Ctrl-R>`. You should see the "```(r-search `')```" prompt. * Press `<Right>`. You should see the normal REPL prompt "`>>>` ". * Press `<Ctrl-C>`. The REPL quits with a traceback. ``` >>> Traceback (mos...
c1600c78e4565b6bb558ade451abe2648ba4dd0a
28efeefab7d577ea4fb6e3f6e82f903f2aee271d
python/cpython
python__cpython-123859
# test_sqlite3/test_dump.py Fails if SQLite Foreign Keys Enabled # Bug report ### Bug description: Just compiled 3.13.0rc2 today and ran into this issue with test_sqlite3. [A commit](https://github.com/python/cpython/commit/de777e490fb356d7bcc7c907141c20a5135d97df) added an intentional foreign key violation in test_...
14b44c58e195c4cdee6594a4aacf8bf95b19fcd7
37228bd16e3ef97d32da08848552f7ef016d68ab
python/cpython
python__cpython-123854
# Testing math_testcases.txt lacks support for signed zeros # Feature or enhancement ### Proposal: This file tested, using result_check() helper: https://github.com/python/cpython/blob/beee91cdcc0dbecab252f7c5c7c51e2adb8edc26/Lib/test/test_math.py#L175 which lacks checking of zero sign (while some entries in the dat...
28aea5d07d163105b42acd81c1651397ef95ea57
14e5bdceff45e6e789e1f838b96988946c75b0f4
python/cpython
python__cpython-123835
# Add `symtable` to the list of modules with a CLI Documenting the `symtable` CLI was first not considered since it previously included self-tests. This is no more the case and the module now features a full-fledged CLI (only since 3.13). As such, I suggest adding it to the list of modules documented in `cmdline.r...
32bc2d61411fb71bdc84eb29c6859517e7f25f36
05a401a5c3e385286a346df6f0b463b35df871b2
python/cpython
python__cpython-126182
# `getaddrinfo` fails on Illumos, inconsistent elsewhere if port is, but type & protocol are not specified # Bug report ### Bug description: I have discovered that 1. On ~~Solaris~~ OpenIndiana, if you don't specify at least socket type **or** protocol for the service name, address resolution fails (see belo...
ff0ef0a54bef26fc507fbf9b7a6009eb7d3f17f5
e0692f11650acb6c2eed940eb94650b4703c072e
python/cpython
python__cpython-123827
# Unused function warnings during mimalloc build on NetBSD ### Bug description: ```sh gcc -pthread -c -fno-strict-overflow -Wsign-compare -g -Og -Wall -O2 -fstack-protector-strong -Wtrampolines -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-decl...
4a6b1f179667e2a8c6131718eb78a15f726e047b
1a9d8917a38e3eb190506025b9444730ed821449
python/cpython
python__cpython-123824
# test_posix fails on NetBSD: Operation Not Supported for posix_fallocate ### Bug description: ```sh $ ./python -m test test_posix Using random seed: 3412046247 0:00:00 load avg: 0.00 Run 1 test sequentially in a single process 0:00:00 load avg: 0.00 [1/1] test_posix test test_posix failed -- Traceback (most rec...
df4f0cbfad8a1ed0146cabd30d01efd135d4d048
b2a8c38bb20e0a201bbc60f66371ee4e406f6dae
python/cpython
python__cpython-123829
# Issue with Round Function in Python # Bug report ### Bug description: **Description of the Issue:** The `round` function does not seem to handle certain floating-point numbers correctly. For example, when rounding the number -1357.1357 to negative 4 decimal places, the function returns -0.0 instead of the expecte...
d2b9b6f919e92184420c8e13d078e83447ce7917
a1dbf2ea69acc6ccee6292709af1dadd55c068be
python/cpython
python__cpython-123804
# Support arbitrary code page encodings on Windows # Feature or enhancement Python supports encodings that correspond to some code pages on Windows, like cp437 or cp1252. But every such encoding should be specially implemented. There are code pages that do not have corresponding codec implemented in Python. But ther...
f7ef0203d44acb21ab1c5ff0c3e15f9727862760
8fe1926164932f868e6e907ad72a74c2f2372b07
python/cpython
python__cpython-123806
# Availability of `ptsname_r` is not checked at runtime on macOS # Bug report ### Bug description: Use of this was recently added in Python 3.13 but it is only available in macOS 10.13.4+ and there is not a proper runtime check for availability. This means that in `python-build-standalone` we need to ban the sym...
3e36e5aef18e326f5d1081d73ee8d8fefa1d82f8
aae126748ff3d442fdbcd07933855ffd7ae6f59c
python/cpython
python__cpython-123801
# `secrets.randbits` returns only nonnegative integers # Documentation The docstring of `secrets.randbits` reads, in its entirety, "Return an int with *k* random bits." In fact, it only generates nonnegative integers, like its sister function `random.getrandbits`. <!-- gh-linked-prs --> ### Linked PRs * gh-123801 ...
beee91cdcc0dbecab252f7c5c7c51e2adb8edc26
11fa11987990eb7ed75b1597cf2e8237f5991c57
python/cpython
python__cpython-123036
# `test_pkgutil` should clean up `spam` module When running the tests with --randomize, as is done by the buildbots, @mhsmith came across this failure: ``` ====================================================================== ERROR: test_find_class (test.test_pickle.CUnpicklerTests.test_find_class) ----------...
eca3fe40c251d51964172dd4e6e9c7d0d85d7d4a
782a076362ca1836c2052652b1a3a352dec45186
python/cpython
python__cpython-123757
# Only support restart command in pdb when it's a command line usage # Feature or enhancement ### Proposal: Now when we have a `breakpoint()` in the source code and enter pdb, we can do `restart` and raise a `Restart` exception - which in most cases will just stop the program with an exception. For other rare cases,...
28efeefab7d577ea4fb6e3f6e82f903f2aee271d
da5855e99a8c2d6ef2bb20124d2ebb862dbb971f
python/cpython
python__cpython-123779
# `Includes/internal/pycore_code.h` uses `static_assert()` but does not inlcude `pymacro.h` # Bug report ### Bug description: `Includes/internal/pycore_code.h` uses `static_assert()` but does not inlcude `pymacro.h`, should it? AFAIU `pymacro.h` makes sure that `static_assert()` is correctly defined for all support...
ef4b69d2becf49daaea21eb04effee81328a0393
e95984826eb3cdb3a3baedb2ccea35e11e9f8161
python/cpython
python__cpython-130537
# Document caveats of `zipfile.Path` around name sanitization > Advertise that `zipfile.Path` does not do any name sanitization and it's the responsibility of the caller to check the inputs, etc. I think documenting the caveats would be good. _Originally posted by @obfusk in https://github.com/python/cpython/iss...
a3990df6121880e8c67824a101bb1316de232898
edd1eca336976b3431cf636aea87f08a40c94935
python/cpython
python__cpython-123719
# Build error: implicit declaration of 'explicit_memset' in NetBSD ### Bug description: ```sh -bash-5.2$ make ``` ```sh ./Modules/_hacl/Lib_Memzero0.c: In function 'Lib_Memzero0_memzero0': ./Modules/_hacl/Lib_Memzero0.c:45:5: error: implicit declaration of function 'explicit_memset'; did you mean '__builtin_mems...
f8f7500168c94330e094aebfa38798d949466328
84ad264ce602fb263a46a4536377bdc830eea81e
python/cpython
python__cpython-123717
# Configure script fails with 'Bad substitution' error on NetBSD ### Bug description: ```sh -bash-5.2$ ./configure ``` ``` checking for git... found checking build system type... x86_64-unknown-netbsd10.0 checking host system type... x86_64-unknown-netbsd10.0 checking for Python interpreter freezing... ./_boot...
42f52431e9961d5236b33a68af16cca07b74d02c
b5aa271f86229f126c21805ff2bd3b95526818a4
python/cpython
python__cpython-123701
# Update tested OpenSSL branches in `Tools/ssl/multissltests.py` and CI # Feature or enhancement ### Proposal: OpenSSL 3.3 has been out long enough to be up to v3.3.2 already; we should start testing with it, though it will probably never be included in binary releases. OpenSSL 1.1.1 has been out of support for qui...
d83e30caddcbf9482273743d287577517ec735b7
56b00f4705634af2861a8aa9c2eb5769012220f0
python/cpython
python__cpython-123697
# tsan: fix race:sock_recv_impl suppressions for free-thread building # Feature or enhancement ### Proposal: The root cause of this race here is we use the same socket in the server and client side in our test. I think this is wrong FYI https://github.com/python/cpython/blob/main/Lib/test/test_socket.py#L4817-L4825...
8a46a2ec5032c5eb1bc3c6bb0fc2422ac9b2cc53
5a4fb7ea1c96f67dbb3df5d4ccaf3f66a1e19731
python/cpython
python__cpython-123689
# Please upgrade bundled Expat to 2.6.3 (e.g. for the fixes to CVE-2024-45490, CVE-2024-45491 and CVE-2024-45492) # Bug report ### Bug description: Hi! :wave: Please upgrade bundled Expat to 2.6.3 (e.g. for the fixes to CVE-2024-45490, CVE-2024-45491 and CVE-2024-45492). - GitHub release: https://github.com/libe...
40bdb0deee746e51c71c56329df21e5172fd8aa0
d83e30caddcbf9482273743d287577517ec735b7
python/cpython
python__cpython-123703
# `decimal.getcontext` crashes with `--with-decimal-contextvar=no` and `-X showrefcount` # Crash report ### What happened? cc @godlygeek, who helped me find this I was investigating a reference leak on the asyncio test suite, and I came across `decimal.getcontext` leaking some memory. Here's what I was doing:...
853588e24c907be158b3a08601797ea5b47a0eba
8311b11800509c975023e062e2c336f417c5e4c0
python/cpython
python__cpython-123648
# Dictionary and set documentation mixup # Documentation https://docs.python.org/3/reference/datamodel.html 3.2.7.1. Dictionaries The documentation says the following: "Dictionaries are mutable; they can be created by the {...} notation." However any Python interpreter shows the following result: >>>pri...
cfbc841ef3c27b3e65d1223bf8fedf1f652137bc
68fe5758bf1900ffdcdf7cd9e40f5018555a39d4
python/cpython
python__cpython-123635
# Instance method performance issue with free threading (3.13rc1) # Bug report ### Bug description: ```python from threading import Thread import time class Cache: def get(self, i): return i def get(i): return i client = Cache() def bench_run(runner): s = time.monotonic_ns() for i in rang...
d00878b06a05ea04790813dba70b09cc1d11bf45
29b5323c4567dc7772e1d30a7ba1cbad52fe10a9
python/cpython
python__cpython-123617
# A save function in the Turtle module # Feature or enhancement ### Proposal: I've used `turtle.py` quite a bit in my teaching, and a common question is how learners can save their files. Now, the turtle library only supports saving the drawings as postscript files by calling the cryptic command `turtle.getscree...
584cdf8d4140406b3676515332a26c856c02618b
1f9d163850c43ba85193ef853986c5e96b168c8c