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-122875
# Deprecate `asyncio.iscoroutinefunction` `asyncio.iscoroutinefunction` should be deprecated in favor of `inspect.iscoroutinefunction`, we don't need two different functions to do the same thing. I propose to deprecate `asyncio.iscoroutinefunction` because IMO these introspection functions don't belong to `asyncio` bu...
bc9d92c67933917b474e61905451c6408c68e71d
3aaed083a3f5eb7e490495c460b3dc1ce7451ce8
python/cpython
python__cpython-122855
# [C API] Add Py_HashBuffer() function Implementation of the the C API Working Group decision: https://github.com/capi-workgroup/decisions/issues/13. <!-- gh-linked-prs --> ### Linked PRs * gh-122855 <!-- /gh-linked-prs -->
d8e69b2c1b3388c31a6083cfdd9dc9afff5b9860
3d60dfbe1755e00ab20d0ee81281886be77ad5da
python/cpython
python__cpython-122847
# Function definition grammar is incorrect https://github.com/python/cpython/blob/2f5c3b09e45798a18d60841d04a165fb062be666/Doc/reference/compound_stmts.rst?plain=1#L1211-L1224 In ``parameter_list_starargs`` - everything can be optional, except for ``*``, and that permits incorrect function definitions like ``def fo...
610584639003317193cdcfe38bbdc8268b612828
7ad793e5dbdf07e51a71b70d20f3e6e3ab60244d
python/cpython
python__cpython-123073
# Several Python 3.13 opcodes are not documented # Documentation The following opcodes which can appear in the output of dis, do not appear in the documentation https://docs.python.org/3.13/library/dis.html: - LOAD_FAST_LOAD_FAST - LOAD_FROM_DICT_OR_DEREF - LOAD_FROM_DICT_OR_GLOBAL - STORE_FAST_STORE_FAST - ST...
9cba47d9f151734815a61e32391ea7fca877ea55
b1c4ffc20573befb4db66bbbdd569b9bd13bb127
python/cpython
python__cpython-122836
# Running ``test_typing`` file directly fails # Bug report ### Bug description: ```python eclips4@nixos ~/p/p/cpython (main)> ./python Lib/test/test_typing.py .................................................................................................................................................................
2037d8cbaea4aed7000e3265113814657a9aea54
2d9d3a9f5319ce3f850341d116b63cc51869df3a
python/cpython
python__cpython-122934
# Inconsistent locations for conditional branches in `while` statements # Bug report ### Bug description: Reported here: https://github.com/python/cpython/issues/122762#issuecomment-2273809777 The locations for branches in while statements are not consistent. The first iteration shows different locations from the s...
fe23f8ed970425828de20fb48750fa89da914886
0e207f3e7adc6a0fdbe1482ce01163ff04d5ddcb
python/cpython
python__cpython-122799
# Make tests for warnings in the re module more strict #122357 passed existing tests because tests for warnings in the `re` module only tested `re.compile()` and did not test stack level. <!-- gh-linked-prs --> ### Linked PRs * gh-122799 * gh-122804 * gh-122805 <!-- /gh-linked-prs -->
d2e5be1f39bc3d48c7bc8c146c4bcadee266672a
3e753c689a802d2e6d909cce3e22173977b2edbf
python/cpython
python__cpython-122793
# Some IPv4 and IPv4-mapped IPv6 properties don't match # Bug report ### Bug description: The following properties on an `IPv6Address` don't match their `IPv4Address` counterparts when using an IPv6-mapped IPv4 address (ie `::ffff:<ipv4>`): * is_multicast * is_reserved * is_link_local * is_global * is_unspecified ...
76a1c5d18312712baed4699fe7333abb050ec9b7
033510e11dff742d9626b9fd895925ac77f566f1
python/cpython
python__cpython-122848
# Documentation doesn't specify how "new style" formatting works for complex numbers [Old string formatting](https://docs.python.org/3/tutorial/inputoutput.html#old-string-formatting) has no support for complex numbers: ```pycon >>> "%f" % (1+0j) Traceback (most recent call last): File "<python-input-0>", line 1...
0bbbe15f5688552236c48f2b6e320c5312720b8e
faa3272fb8d63d481a136cc0467a0cba6ed7b264
python/cpython
python__cpython-123751
# venv activate.csh fails when user prompt contains newline # Bug report ### Bug description: activate.csh uses "$prompt" in quotes like that, which fails when the user prompt contains a newline (error: unbalanced quotes). Using $prompt:q or "$prompt:q" solves this with no harm, at least in tcsh (not sure about van...
a15a584bf3f94ea11ab9363548c8872251364000
f4dd4402108cc005d45acd4ca83c8530c36a93ca
python/cpython
python__cpython-122760
# Error handling of `RERAISE` is strange # Bug report There's a strange pattern used in `RERAISE` opcode: https://github.com/python/cpython/blob/4767a6e31c0550836b2af45d27e374e721f0c4e6/Python/bytecodes.c#L1174-L1189 Especially these lines: https://github.com/python/cpython/blob/4767a6e31c0550836b2af45d27e374e721f0c...
61a8bf28530558da239834785a0b590ae8900a16
76bdeebef6c6206f3e0af1e42cbfc75c51fbb8ca
python/cpython
python__cpython-122745
# Upgrade bundled pip to 24.2 # Feature or enhancement ### Proposal: `ensurepip`'s bundled version of pip gets updated to the current latest 24.2. ### Has this already been discussed elsewhere? No response given ### Links to previous discussion of this feature: N/A <!-- gh-linked-prs --> ### Linked PRs * gh-122...
5b8a6c5186be299d96dd483146dc6ea737ffdfe7
dc093010672207176857a747c61da9c046ad9d3e
python/cpython
python__cpython-122735
# 3.13.0rc1 regression in PyEval_GetLocals(): `SystemError: Objects/dictobject.c:3774: bad argument to internal function` # Crash report ### What happened? After upgrading to CPython 3.13.0rc1, the `gpgme` test suite started failing. The tests fail with errors resembling: ```pytb Traceback (most recent call last): ...
4767a6e31c0550836b2af45d27e374e721f0c4e6
5b8a6c5186be299d96dd483146dc6ea737ffdfe7
python/cpython
python__cpython-122713
# Specializing interpreter may crash if the code object of a class's `__init__` method is reassigned # Crash report ### What happened? The interpreter will specialize `CALL` instructions into [`CALL_ALLOC_AND_ENTER_INIT`](https://github.com/python/cpython/blob/44659d392751f0161a0f958fec39ad013da45427/Python/bytecode...
79ddf7571016a04f0e1d5f416ece2d45c4440b1b
ec89620e5e147ba028a46dd695ef073a72000b84
python/cpython
python__cpython-128092
# Asyncio socket-level methods do not support SSLSocket Attempting to use a `SSLSocket` with the`asyncio.loop.sock_sendall` method and the other socket-level async functions raises the following error: ```python TypeError: Socket cannot be of type SSLSocket ``` This can be reproduced by the following if `socket`...
19c5134d57764d3db7b1cacec4f090c74849a5c1
3c168f7f79d1da2323d35dcf88c2d3c8730e5df6
python/cpython
python__cpython-122705
# Reference leaks in test suite on current main # Bug report ### Bug description: ```python ./python -m test -R 3:3 -j 32 ...many lines == Tests result: FAILURE == 37 tests skipped: test.test_asyncio.test_windows_events test.test_asyncio.test_windows_utils test.test_gdb.test_backtrace test.test_gdb.test...
94a4bd79a7ab7b0ff5f216782d6fdaff6ed348fc
b0c48b8fd88f26b31ec2f743358091073277dcde
python/cpython
python__cpython-122702
# Is this doc wording about raw bytes literal correct? Link: https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals <img width="816" alt="Снимок экрана 2024-08-05 в 21 38 55" src="https://github.com/user-attachments/assets/e77cf7aa-49cf-4208-b253-9d7e1ee2ee48"> > Both string and byte...
ea70439bd2b5a1c881342646f30942f527f61373
db8b83c2b0247f1d9b15152bbfcfe4afc7e588ed
python/cpython
python__cpython-122703
# Memory leaks in free-threaded build at shutdown # Bug report The `-X showrefcount` isn't reporting leaked blocks on exit and we're hiding some leaked objects on shutdown. Note that we're still able to catch most leaks via the refleaks test. ### -X showrefcount `_Py_GetGlobalAllocatedBlocks()` is returning zero b...
2d9d3a9f5319ce3f850341d116b63cc51869df3a
833eb106f5ebbac258f236d50177712d98a36715
python/cpython
python__cpython-122687
# Hypothesis tests on Ubuntu fails in the main # Bug report ### Bug description: See e.g.: https://github.com/python/cpython/actions/runs/10240047164/job/28326351304 It seems, pinning attrs deps helps. I'll provide patch. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No ...
35ae4aab1aae93c1c11c45ac431787ff79ce7907
44659d392751f0161a0f958fec39ad013da45427
python/cpython
python__cpython-122682
# Merge m_atan2() and c_atan2() helper functions (or replace libm's atan2) # Feature or enhancement ### Proposal: With #29179, many workarounds for buggy libm implementations were removed. Yet, there is ``m_atan2()``: https://github.com/python/cpython/blob/d0b92dd5ca46a10558857adeb7bb48ecf39fa783/Modules/mathmodule...
0b433aa9df6b5bb84e77ff97e59b7bcd04f2199a
6ff82fdb56fa0381f94c7a45aa67ab4c4aa71930
python/cpython
python__cpython-126939
# argparse: allow to override the type name in `'invalid %(type)s value: %(value)r'` error messages # Feature or enhancement ### Proposal: Hey. When doing something like: ```python class SomeEnumClass(enum.StrEnum): foo = enum.auto() bar = enum.auto() parser.add_argument("--enum", type=SomeEnum...
fcfdb55465636afc256bc29781b283404d88e6ca
fd133d4f21cd7f5cbf6bcf332290ce52e5501167
python/cpython
python__cpython-122667
# Add tests for ast optimizations # Feature or enhancement ### Proposal: Currently we have a one test case which testing that `optimize` parameter for ast.parse is working as expected. I propose to add tests for these ast optimizations: * Optimization for binary operations if left and right operands are constants *...
9f9b00d52ceafab6c183e8b0f502071d59dc6d22
1eed0f968f5f44d6a13403c1676298a322cbfbad
python/cpython
python__cpython-122662
# `make distclean` needs `GNU make` to work # Bug report ### Bug description: Introduced in bc37ac7b440b5e816f0b3915b830404290522603 , `define` directive is GNU make specific - https://www.gnu.org/software/make/manual/html_node/Multi_002dLine.html This is the output of me running `make distclean` on main, where `ma...
f5c39b3e9cc88d1eaa9229d610b0221305a83ad9
e6fad7a0e3d824f4a3c9cd71a48208880606d705
python/cpython
python__cpython-122638
# cmath.tanh(±0+infj) and tanh(±0+nanj) should return ±0+nanj # Bug report ### Bug description: As per C11 [DR#471](https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2244.htm#dr_471) (accepted for C17), ``ctanh (0 + i NaN)`` and ``ctanh (0 + i Inf)`` should return ``0 + i NaN`` (with "invalid" exception in the secon...
e6fad7a0e3d824f4a3c9cd71a48208880606d705
3462a80d2cf37a63fe43f46f64a8c9823f84531d
python/cpython
python__cpython-122651
# Translation strings for auditing events no longer have reST markup # Documentation The Python-specific 'audit-event' directive is not being extracted to message catalogs (.po files) with the usual reST markups. For instance, expected a source string as ```Raises an :ref:`auditing event `sys._getframe <auditing>` ...
95f5c89b545beaafad73f05a695742da3e90bc41
1573d90ce17f27fd30a251de897a35bf598d2655
python/cpython
python__cpython-122624
# Improve `c-api/bytearray.rst` by adding exception information Only one function among `PyByteArray` functions says anything about error handling: https://github.com/python/cpython/blob/7aca84e557d0a6d242f322c493d53947a56bde91/Doc/c-api/bytearray.rst#L40-L56 I suggest that all functions must state that they can re...
151934a324789c58cca9c7bbd6753d735454df5a
95f5c89b545beaafad73f05a695742da3e90bc41
python/cpython
python__cpython-122620
# LOAD_ATTR_WITH_HINT and STORE_ATTR_WITH_HINT have internal branching. https://github.com/python/cpython/blob/main/InternalDocs/adaptive.md describes how specialized instructions should be a series of guards followed by simple, linear code. Both instructions have two different paths with guards on each path. We sho...
5bd72912a1a85be96092de302608a4298741c6cd
1bb955a2fe0237721c141fdfe520fd3ba46db11e
python/cpython
python__cpython-122280
# PyLong_GetInfo() (part of Limited API) is missing in sphinx docs See here: https://docs.python.org/3.12/c-api/stable.html#contents-of-limited-api <!-- gh-linked-prs --> ### Linked PRs * gh-122280 * gh-122644 * gh-122645 <!-- /gh-linked-prs -->
d91ac525ef166edc0083acf5a96f81b87324fe7f
7a5c4103b094aaf1b65af6de65795d172cfe8fe0
python/cpython
python__cpython-122601
# Move the bodies of large instructions into helper functions. There are two reasons for this: 1. Big chunks of code slow down the JIT and the resulting machine code. 2. These big chunks of code usually have complex control flow which makes analysis of the code for stack spilling and top-of-stack much harder. Usi...
7aca84e557d0a6d242f322c493d53947a56bde91
498376d7a7d6f704f22a2c963130cc15c17e7a6f
python/cpython
python__cpython-122596
# Add error checks in the compiler Historically the compiler (`Python/compile.c` and `Python/symtable.c`) contained a lot of code that did not check for errors after the C API calls. For example, it did not check that `PyLong_AS_LONG()`, `PySequence_Contains()`, `PySet_Contains()`, etc can fail, it used `PyDict_GetIte...
e74680b7186e6823ea37cf7ab326d3d6bfa6f59a
94a4bd79a7ab7b0ff5f216782d6fdaff6ed348fc
python/cpython
python__cpython-122587
# "template with C linkage" error when including "pycore_interp.h" from C++ file # Bug report ### Bug description: Tested on official docker image `python3.13.0b4-bullseye`. `pycore_interp.h` causes compiler error when included from C++ file. No problem when included from C file. `mypackage/_good.c`: ```c #include ...
1dad23edbc9db3a13268c1000c8dd428edba29f8
3203a7412977b8da3aba2770308136a37f48c927
python/cpython
python__cpython-122694
# TSan reported race condition in `_PyPegen_is_memoized` in `test_importlib` # Bug report I think this is a race on the global `_PyRuntime.parser.memo_statistics`. That's only used in the debug build for stats, so the race isn't particularly dangerous, but we should fix it. ``` WARNING: ThreadSanitizer: data race (p...
ce0d66c8d238c9676c6ecd3f04294a3299e07f74
a8be8fc6c4682089be45a87bd5ee1f686040116c
python/cpython
python__cpython-122960
# Update to WASI SDK 24 I've already verified everything works. <!-- gh-linked-prs --> ### Linked PRs * gh-122960 * gh-122961 <!-- /gh-linked-prs -->
0e207f3e7adc6a0fdbe1482ce01163ff04d5ddcb
9621a7d0170bf1ec48bcfc35825007cdf75265ea
python/cpython
python__cpython-122574
# Incorrect minimum version of Python for Windows build bootstrapping # Bug report ### Bug description: Python now requires 3.10 to build itself, because `match` case statements have begun proliferating in the cpython repository. However, the Windows build still thinks 3.9 is enough, which results in a build error o...
d0b92dd5ca46a10558857adeb7bb48ecf39fa783
3bde3d8e03eb3d0632d0dced0ab710ab9e3b2894
python/cpython
python__cpython-122572
# Repeated definition of PY_BUILTIN_HASHLIB_HASHES in configure.ac # Bug report ### Bug description: The PY_BUILTIN_HASHLIB_HASHES variable is defined twice in configure.ac, which results in the corresponding #define appearing twice in the autoconf confdefs.h, which results in an unconditional compile error, meaning...
b5e142ba7c2063efe9bb8065c3b0bad33e2a9afa
4767a6e31c0550836b2af45d27e374e721f0c4e6
python/cpython
python__cpython-122563
# symtable: ste_free and ste_child_free are unused `symtable.c` computes the `ste_free` and `ste_child_free` values but nothing in the code uses them. Let's clean up those fields. cc @carljm @iritkatriel <!-- gh-linked-prs --> ### Linked PRs * gh-122563 * gh-122825 <!-- /gh-linked-prs -->
8234419c32b9890689e26da936882bc1e9ee161f
df13a1821a90fcfb75eca59aad6af1f0893b1e77
python/cpython
python__cpython-122932
# Clean up and microoptimize str.translate and charmap codec Initially I just planned to get rid of `PyLong_AS_LONG` (undocumented transitional alias of `PyLong_AsLong`) in `Objects/unicodeobject.c`. But I have used opportunity to add few optimizations in the nearby code. I do not expect significant performance boost,...
1a0b828994ed4ec1f2ba05123995a7d1e852f4b4
6f563e364d1a7902417573f842019746a79cdc1b
python/cpython
python__cpython-122582
# inlined comprehension implementation in symtable - missing test or redundant code No test fails if I remove the symtable code that modifies the symtable for an inlined comprehension: https://github.com/python/cpython/pull/122557 I don't know whether this step is necessary. Would suggest we find a test covering i...
fe0a28d850943cf2ba132c9b0a933bb0c98ff0ae
4b63cd170e5dd840bffc80922f09f2d69932ff5c
python/cpython
python__cpython-122628
# Pickle ignores custom getstate methods on TextIOWrapper in Python 3.12 # Bug report ### Bug description: So I am not entirely sure whether this is unintended behaviour, but it is definitely a noticeable change between 3.11 and 3.12 that is rather unintuitive ```python import pickle from io import BytesIO, Te...
e9253ebf74433de5ae6d7f1bce693a3a1173b3b1
a247dd300ea0c839154e2e38dbc0fdc9fdff673f
python/cpython
python__cpython-122556
# [cleanup] Remove removed functions from `Doc/data/refcounts.dat` # Feature or enhancement ### Proposal: This is a follow-up of https://github.com/python/cpython/pull/122331#discussion_r1699206142 where a typo was not spotted. Some functions are still in this file but were removed in previous versions (see the corr...
88030861e216ac791725c8784752201d6fe31329
58ffc4cf4aa4cfb47f8768a3c3eaf1dd7a7c4584
python/cpython
python__cpython-122547
# Add `platform.invalidate_caches` for invalidating cached results # Feature or enhancement ### Proposal: In #122525, it was observed that many functions of the `platform` module use cached results. This is, in practice, preferrable, but it should also be possible, if needed, to invalidate cached results. One use ca...
612ac283b81907d328891b102f5bfafcf62bd833
08f98f4576f95f9ae1a4423d151fce053416f39f
python/cpython
python__cpython-123217
# Inconsistency between file names of SyntaxErrors and other Exceptions in the new repl A small issue, but the new repl reports `<unknown>` as the file name for `SyntaxErrors`, but `<python-input-x>` for other errors: ``` >>> a b c File "<unknown>", line 1 a b c ^ SyntaxError: invalid syntax >>> 1...
3d7b1a526d858496add5b188c790b8d5fe73b06b
427b106162c7467de8a84476a053dfba9ef16dfa
python/cpython
python__cpython-122566
# Change base OS image to Ubuntu-24.04 in CI testing In current `ci.yml`, base OS image is `ubuntu-22.04`, should we move to the latest LTS verion: `ubuntu-24.04` ? > > pool: > vmImage: ubuntu-22.04 To go further, if we should replace all current CI testing which run on `ubuntu-22.04` to `ubuntu-24.04`...
fc233f46d3761b4e808be2c44fda0b843179004e
c3a12ae13ee0212a096f570064407f8ba954e6aa
python/cpython
python__cpython-122577
# Crash on deallocator of type 'time.struct_time' during finalizing for free-threaded Python # Crash report ### What happened? A simple standalone file: ```python # test1.py import time obj = time.struct_time(range(1, 10)) ``` ```console $ pyenv install 3.14t-dev --debug $ pyenv local 3.14t-dev-d...
4b63cd170e5dd840bffc80922f09f2d69932ff5c
7aca84e557d0a6d242f322c493d53947a56bde91
python/cpython
python__cpython-122547
# platform.node() does not return the latest hostname value # Bug report ### Bug description: I think it's because of how cache is implemented for the uname() helper: https://github.com/python/cpython/blob/5377f55b4e022041b7b57b5489c66c9b3c046c7e/Lib/platform.py#L890-L905.\ Given socket.gethostname() exists as well...
612ac283b81907d328891b102f5bfafcf62bd833
08f98f4576f95f9ae1a4423d151fce053416f39f
python/cpython
python__cpython-122543
# socket module shutdown() constants SHUT_RD, etc not included in Constants section # Documentation In documentation for socket module, the constants SHUT_RD, SHUT_WR, SHUT_RDWR are mentioned in the description for shutdown(), but they are missing from the Constants section on that page. <!-- gh-linked-prs --> #...
8a59deca59aa9452e71bb49e909199fbb41a5de7
19be0ee9316f9f0d0cae63d3cdd384f44f9a2fce
python/cpython
python__cpython-122512
# Improve the documentation for identity semantics of mutable and immutable types Current paragraph: > Types affect almost all aspects of object behavior. Even the importance of object identity is affected in some sense: for immutable types, operations that compute new values may actually return a reference to any ...
76bdeebef6c6206f3e0af1e42cbfc75c51fbb8ca
674a50ef2f8909c1c5d812e166bcc12ae6377908
python/cpython
python__cpython-122483
# About IDLE: direct discussion to DPO Change About IDLE to direct discussions to discuss.python.org. Users are already doing so. Currently, idle-dev@python.org and idle-dev mailing list serve, 90+%, to collect spam. The few user messages per year are off topic requests for help, mostly not about IDLE. The email...
29c04dfa2718dd25ad8b381a1027045b312f9739
097633981879b3c9de9a1dd120d3aa585ecc2384
python/cpython
python__cpython-122528
# The new REPL outputs different tracebeck when custom sys.excepthook is used # Bug report If `sys.systemhook` is not `sys.__systemhook__`, the new REPL outputs the line in the code module in the traceback: ```pycon >>> xxx Traceback (most recent call last): File "<python-input-0>", line 1, in <module> xxx Name...
e73e7a7abdc3fed252affcb1629df1b3c8fff2ef
42d9bec98fd846e16a3f4fa9a07e2024aae533ce
python/cpython
python__cpython-122460
# Pickling objects by name without __module__ is suboptimal When the object is pickled by name (classes, functions, and other enum-like objects) has no `__module__` attribute or it is None, the code searches the object in all imported modules: tries to resolve its name relatively to the module and check that the resul...
1bb955a2fe0237721c141fdfe520fd3ba46db11e
1422500d020bd199b26357fc387f8b79b82226cd
python/cpython
python__cpython-122446
# __static_attributes__ doesn't include method calls # Feature or enhancement ### Proposal: ```python class C: def f(self): self.x self.y[3] self.z() print(C.__static_attributes__) # gives ('y', 'x'), but 'z' is absent ``` From 3.13 documentation, `__static_attributes__` is _A tuple containing names ...
498376d7a7d6f704f22a2c963130cc15c17e7a6f
9fc1c992d6fcea0b7558c581846eef6bdd811f6c
python/cpython
python__cpython-122469
# Segmentation Fault in append_history_file of readline # Crash report ### What happened? # Crash report ### What happened? ### Build ``` apt-get install libreadline6-dev ./configure --with-pydebug --with-address-sanitizer ``` ### Root Cause When calling readline.append_history_file, the first argument can be ...
208b0fb645c0e14b0826c0014e74a0b70c58c9d6
67b9a5331ae45aa126877d7f96a1e235600f9c4b
python/cpython
python__cpython-122421
# `test_intern` in `test_sys` leaks negative references in free-threaded build # Bug report The `test_intern` test "leaks" -2 references in the free-threaded build. This isn't caught by the refleak build bots because negative refleaks are treated as "suspicious" rather than "failing". This is a problem because the ne...
ac8da34621a574cd5773217404757a294025ba49
7797182b78baf78f64fe16f436aa2279cf6afc23
python/cpython
python__cpython-122418
# Use per-thread reference count for heap type objects in the free-threaded build # Feature or enhancement ### Overview As described in [PEP 703](https://peps.python.org/pep-0703/#reference-counting-type-objects), heap type objects use a mix of reference counting techniques in the free-threaded build. They use defer...
dc093010672207176857a747c61da9c046ad9d3e
1429651a06611a9dbcb1928b746faf52934c12e2
python/cpython
python__cpython-122401
# Handle `ValueError` in `filecmp.dircmp` and `filecmp.cmpfiles` # Bug report ### Bug description: In `filecmp.cmpfiles`, when the path is not stat-able, it will be put in the "fancy" files. This should include paths that would raise `ValueError`. Note that `filecmp.cmp` should *not* be protected against that...
3a9b2aae615165a40614db9aaa8b90c55ff0c7f9
3833d27f985a62c4709dcd9dc73724fc19d46ebf
python/cpython
python__cpython-122407
# Minor error in the doc for controller.name in the webbrowser documentation page # Documentation In https://docs.python.org/3/library/webbrowser.html#browser-controller-objects it says: ``` webbrowser.name System-dependent name for the browser. ``` when it should be `controller` instead of `webbrowse...
1583f9cdd482f6ddc1535799c03e0a0b5ec29c61
210f027d02f2f2a6e953fc3a4c4ebd9dc77563a5
python/cpython
python__cpython-124975
# IDLE: Path Browser vertical spacing is too small, causing the text to be cut off ### Bug description: Noise: @terryjreedy The vertical spacing is too small, causing the text to be cut off. I'm not sure if this issue exists on other systems as well. Currently, I may not create a PR to fix it because I haven't ...
c5df1cb7bde7e86f046196b0e34a0b90f8fc11de
7ffe94fb242fd51bb07c7f0d31e94efeea3619d4
python/cpython
python__cpython-122942
# Improve internal API for fetching original instruction, replacing `_Py_GetBaseOpcode` The function `_Py_GetBaseOpcode` returns the original opcode for an instruction, even if that instruction has been instrumented. However it doesn't work for `ENTER_EXECUTOR` and doesn't allow for the `op.arg` to have been changed....
7a65439b93d6ee4d4e32757b55909b882f9a2056
fe23f8ed970425828de20fb48750fa89da914886
python/cpython
python__cpython-122385
# Make Download page translatable # Documentation The Python docs' Download page (https://docs.python.org/3/download.html) is not currently available for translation, hence differentiating from other pages that received the translations effort of the language teams. Strings should be marked for translation, so t...
58ffc4cf4aa4cfb47f8768a3c3eaf1dd7a7c4584
a9d56e38a08ec198a2289d8fff65444b39dd4a32
python/cpython
python__cpython-122362
# `_PyUnicodeWriter*` is passed where `PyUnicodeWriter*` is expected # Bug report <img width="483" alt="Снимок экрана 2024-07-27 в 20 32 19" src="https://github.com/user-attachments/assets/a4c9cb14-fe0a-471c-9576-03c64dd50b21"> In this commit: https://github.com/python/cpython/commit/ae192262ad1cffb6ece9d16e67804386...
04eb5c8db1e24cabd0cb81392bb2632c03be1550
ae192262ad1cffb6ece9d16e67804386c382be0c
python/cpython
python__cpython-122397
# is_zipfile does not set the position to the file header https://github.com/python/cpython/blob/4e7550934941050f54c86338cd5e40cd565ceaf2/Lib/zipfile/__init__.py#L243-L244 When filename is BytesIO, is_zipfile don't set the position to the file header. This will affect other codes. And it's my first issues,i d...
e0ef08f5b444950ad9e900b27f5b5dbc706f4459
3d8ac48aed6e27c43bf5d037018edcc31d9e66d8
python/cpython
python__cpython-122481
# Importing ssl After Reinitializing Crashes # Crash report ### What happened? Using 3.13b4 and main (5592399313c963c110280a7c98de974889e1d353): ``` $ Programs/_testembed test_repeated_init_exec 'import ssl' --- Loop #1 --- --- Loop #2 --- Segmentation fault (core dumped) ``` Using 3.12: ``` $ Programs/_testembed...
9fc1c992d6fcea0b7558c581846eef6bdd811f6c
b5e6fb39a246bf7ee470d58632cdf588bb9d0298
python/cpython
python__cpython-122338
# Eager task factory segfaults when hosting and calling an API from the same event loop # Crash report ### What happened? Love eager task factory, but it's crashing one of my tests. I'm using `uvicorn` and `fastapi` to host an API, and testing it with `httpx` running in the same event loop. This reliably produce...
c08696286f52d286674f264eecf7b33a335a890b
863a92f2bc708b9e3dfa9828bb8155b8d371e09c
python/cpython
python__cpython-122640
# symtable recursion depth updates seem inconsistent The symtable ``VISIT`` macro decrements ``st->recursion_depth`` (and returns) in case of error. For explicit returns, visitor functions should use the ``VISIT_QUIT`` macro (which also decrements the recursion depth). Each function should either always decrement ...
efcd65cd84d5ebcc6cacb67971f235a726a205e7
fe0a28d850943cf2ba132c9b0a933bb0c98ff0ae
python/cpython
python__cpython-122312
# Add more tests for pickle and fix error messages # Bug report Much error generating code in the `pickle` module is not tested at all. As result, not only exception types and messages can differ between Python and C implementations, but other bugs are left unnoticed: * NameError in formatting one of error messages....
7c2921844f9fa713f93152bf3a569812cee347a0
dcafb362f7eab84710ad924cac1724bbf3b9c304
python/cpython
python__cpython-122308
# [3.13.0b4] f-string with precision specifier has `format_spec` of `Constant`, not `JoinedStr` # Bug report ### Bug description: ```py Python 3.12.0 (v3.12.0:0fb18b02c8, Oct 2 2023, 09:45:56) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin >>> import ast >>> ast.parse("f'{e:.3}'").body[0].value.values[0].format_spec...
db2d8b6db1b56c2bd3802b86f9b76da33e8898d7
7c2921844f9fa713f93152bf3a569812cee347a0
python/cpython
python__cpython-123261
# gc.DEBUG_STATS no longer print out anything # Bug report ### Bug description: The command `gc.set_debug(gc.DEBUG_STATS)` no longer prints out any statistics, even though `gc.set_debug(gc.DEBUG_COLLECTABLE)` shows that the `gc` is still being run. (Probably caused by the incremental GC implementation, #116206 .) ...
7cd3aa42f0cf72bf9a214e2630850879fe078377
adc5190014efcf7b7a4c5dfc9998faa8345527ed
python/cpython
python__cpython-122293
# Split up ``Lib/test/test_ast.py`` # Feature or enhancement ### Proposal: ``Lib/test/test_ast.py`` currently contains a ``ast`` test cases, and code-generated data such as ``exec_results``, ``eval_results`` and ``single_results``. I propose to move the snippets which are used to generate these variables and the co...
9187484dd97f6beb94fc17676014706922e380e1
0697188084bf61b28f258fbbe867e1010d679b3e
python/cpython
python__cpython-122303
# `intern_static` is not thread-safe with multiple interpreters # Bug report Most static strings are interned during Python initialization in [`_PyUnicode_InitStaticStrings`](https://github.com/python/cpython/blob/5f6001130f8ada871193377954cfcfee01ef93b6/Include/internal/pycore_unicodeobject_generated.h). However, th...
bb09ba679223666e01f8da780f97888a29d07131
c08696286f52d286674f264eecf7b33a335a890b
python/cpython
python__cpython-122289
# Improve performances of `fnmatch.translate` # Feature or enhancement ### Proposal: I implemented `fnmatch.translate` and `fnmatch.filter` in C in #121446 but the performances for `fnmatch.filter` are less pronounced than those in `fnmatch.translate`. While I believe that the factor 2x improvement brought by th...
78cb377c622a98b1bf58df40c828e886575a6927
14a05a8f433197c40293028f01797da444fb8409
python/cpython
python__cpython-122436
# Inconsistent `datetime.*.strftime()` year padding behavior across `%y`, `%Y`, `%F` and `%C` # Bug report ### Bug description: #120713 changed the way `%y` and `%Y` format works with `strftime()` to pad "short" years with leading zeros. However, the `%F` and `%C` formats were left alone, creating inconsistency:...
126910edba812a01794f307b0cfa2a7f02bda190
7cd3aa42f0cf72bf9a214e2630850879fe078377
python/cpython
python__cpython-122271
# Typos in the Py_DEBUG macro name # Bug report `Parser/pegen.c` and `Tools/peg_generator/peg_extension/peg_extension.c` contain checks for wrong macro: ```c #if defined(PY_DEBUG) ``` They always false, because the correct name is `Py_DEBUG`, not `PY_DEBUG`. Therefore, the code which was supposed to run in the debug ...
6c09b8de5c67406113e8d082e05c9587e35a852a
dc07f65a53baf60d9857186294d3d7ba92d5606d
python/cpython
python__cpython-122251
# Instrumentation assertion failure when calling the registered handler explicitly # Bug report ### Bug description: On my mac M1 Sonoma (14.5), Python 3.13.0b4, I see this crash when registering an opcode monitor, calling the handler explicitly while it's enabled, and then restarting events. To reproduce: ```pyth...
57d7c3e78fb635a0c6ccce38ec3e2f4284d5fac7
e006c7371d8e57db26254792c67292956e88d81d
python/cpython
python__cpython-122246
# Move detection of writes and shadowing of __debug__ from compiler to symtable. There are checks in the compiler for writes and shadowing of ``__debug__``. This can be done earlier, in the symtable, where it is somewhat simpler. <!-- gh-linked-prs --> ### Linked PRs * gh-122246 * gh-122322 <!-- /gh-linked-prs...
bc94cf7e254e43318223553a7959115573c679a5
2c42e13e80610a9dedcb15b57d142602e8143481
python/cpython
python__cpython-122244
# Improve error message for unbalanced unpacking # Feature or enhancement ### Proposal: This is great: ```pytb >>> x, y, z = 1, 2 Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: not enough values to unpack (expected 3, got 2) ``` But here, it doesn't seem to tell h...
3597642ed57d184511ca2dbd1a382ffe8e280ac4
07f0bf5aa4ca34e692c16e14129d79c161ee206f
python/cpython
python__cpython-122236
# Accuracy issues of sum() specialization for floats/complexes # Bug report ### Bug description: Unfortunately, #121176 was merged with a bug: https://github.com/python/cpython/blob/e9681211b9ad11d1c1f471c43bc57cac46814779/Python/bltinmodule.c#L2749-L2755 L2751 lacks cs_add(). Sorry for that. Reproducer: ``s...
169e7138ab84db465b6bf28e6c1dc6c39dbf89f4
bc93923a2dee00751e44da58b6967c63e3f5c392
python/cpython
python__cpython-122230
# Missing decref in error handling of `func_get_annotation_dict` # Bug report Here: https://github.com/python/cpython/blob/af4329e7b1a25d58bb92f79480f5059c3683517b/Objects/funcobject.c#L537-L551 - We allocate `ann_dict` - If `PyDict_SetItem` fails, we return `NULL` - We don't deallocate the dict I will send a PR. ...
e9681211b9ad11d1c1f471c43bc57cac46814779
af4329e7b1a25d58bb92f79480f5059c3683517b
python/cpython
python__cpython-122214
# Add details for pickle serialization errors # Feature or enhancement When pickling a complex object, or a graph of objects, it is difficult to locate the source of error. At best you get the type of the unpickleable object at the bottom level, but you cannot know the part of what object or data structure it is. Th...
c0c2aa7644ebd4953682784dbb9904fe955ff647
4a6b1f179667e2a8c6131718eb78a15f726e047b
python/cpython
python__cpython-122207
# Dictionary watchers deliver `added` event before it's guaranteed to be successful leading to possible incosistent state # Bug report ### Bug description: Currently dictionary watchers deliver the `PyDict_EVENT_ADDED` event before they have done everything that is necessary to ensure success. If the dictionary ...
5592399313c963c110280a7c98de974889e1d353
9ac606080a0074cdf7589d9b7c9413a73e0ddf37
python/cpython
python__cpython-122204
# Race condition in `make_pending_calls` in free-threaded build # Bug report `make_pending_calls` uses a mutex and the the `handling_thread` field to ensure that only one thread per-interpreter is handling pending calls at a time: https://github.com/python/cpython/blob/41a91bd67f86c922f350894a797738038536e1c5/Python...
c557ae97d6bd9d04164a19b4fe136610e54dbdd8
64857d849f3079a73367525ce93fd7a463b83908
python/cpython
python__cpython-122222
# `test_warnings` fails if run with `-Werror` # Bug report ### Bug description: `./python.exe -Werror -m test test_warnings` fails, which feels sort-of ironic: ```pytb ~/dev/cpython (main)⚡ % ./python.exe -We -m test test_warnings Using random seed: 673638140 Raised RLIMIT_NOFILE: 256 -> 1024 0:00:00 load avg: 2.83...
9b4fe9b718f27352ba0c1cf1184f5b90d77d7df4
5592399313c963c110280a7c98de974889e1d353
python/cpython
python__cpython-122243
# Move opcode magic number out of `Lib/importlib/_bootstrap_external.py` # Feature or enhancement ### Proposal: The number changes way more frequently than it used to, and currently triggers a review request for CODEOWNERS on `Lib/importlib`. Maybe it's time to put it in its own file somewhere else? ### Has this al...
af0a00f022d0fb8f1edb4abdda1bc6b915f0448d
2b163aa9e796b312bb0549d49145d26e4904768e
python/cpython
python__cpython-122189
# Avoid TSan reported race in `run_udp_echo_server` The `test_asyncio.test_sock_lowlevel.py` test uses a UDP echo server: https://github.com/python/cpython/blob/a15feded71dd47202db169613effdafc468a8cf3/Lib/test/test_asyncio/utils.py#L288-L310 Thread sanitizer complains about the `sock.sendto(b'STOP', sock.getsoc...
2f74b709b637cad7a9c18a2d90b0747823f2ff51
bb108580dec5d8655ccdfb6c8737b5f64e3366d0
python/cpython
python__cpython-122183
# `hashlib.file_digest()` can't handle non-blocking I/O # Bug report ### Bug description: This came up in python/typeshed#12414. The current implementation of `file_digest()` does not check the return value of `fileobj.readinto()` for `None`: https://github.com/python/cpython/blob/2a5d1eb7073179a13159bce937afdbe24...
2b47f46d7dc30d27b2486991fea4acd83553294b
fa70bf85931eff62cb24fb2f5b7e86c1dcf642d0
python/cpython
python__cpython-122165
# Add details for JSON serialization errors # Feature or enhancement When an JSON unserializable object occurs deeply in the large structure, it is difficult to find the culprit, because the error message by default only contains the type of the unserializable object. This is pretty common error, for example you can ...
e6b25e9a09dbe09839b36f97b9174a30b1db2dbf
c908d1f87d287a4b3ec58c85b692a7eb617fa6ea
python/cpython
python__cpython-122164
# Remove `BUILD_CONST_KEY_MAP` opcode According to our stats the `BUILD_CONST_KEY_MAP` represents fewer than 1 in 20_000 instructions executed. Presumably it is more common in startup code, but it has no real value there either. For run once code, turning the keys into a constant merely moves the cost of building ...
2e14a52cced9834ed5f7e0665a08055de554360f
9bb2e4623f504c44655436eae181d802f544fff9
python/cpython
python__cpython-122158
# Cases generator gets confused about the number of values to pop in case of errors in some macros # Bug report ### Bug description: This input: ``` op(FIRST, (x, y -- a, b)) { a = x; b = y; } op(SECOND, (a, b -- a, b)) { } op(THIRD, (j,...
624bda76386efd8eecf73c4ad06f997b9b25f07f
498cb6dff10f97fa3d348a4c0ad9374d14af3312
python/cpython
python__cpython-122161
# Exception raised in traceback.StackSummary._should_show_carets exits interpreter: IndexError on tree.body[0] # Bug report ### Bug description: Running the code sample from #122071 in 3.13.0b4 or main exits the interpreter due to `traceback.StackSummary._should_show_carets` raising an exception: ```python >>...
5cd50cb6eb28e525f0c838e049e900ea982a5a23
8b6c7c7877c26f0201f37f69d4db2f35d7abd760
python/cpython
python__cpython-123423
# test.test_asyncio.test_server.TestServer2.test_abort_clients consistently fails on Linux 6.10.x # Bug report ### Bug description: Hello, we run the testsuite of the optimized and debug builds of Python in Fedora CI. Since the addition in https://github.com/python/cpython/commit/415964417771946dcb7a163951913adf...
b379f1b26c1e89c8e9160b4dede61b980cc77be6
61bef6245c4a32bf430d684ede8603f423d63284
python/cpython
python__cpython-122134
# Pure-Python implementation of socket.socketpair() doesn't authenticate connected socket # Bug report ### Bug description: `socket.socketpair()` has a fall-back implementation on platforms that don't support `socket.AF_UNIX` which uses AF_INET[6] sockets bound to localhost. This connection is expected to come from ...
78df1043dbdce5c989600616f9f87b4ee72944e5
76bdfa4cd02532519fb43ae91244e2b4b3650d78
python/cpython
python__cpython-122157
# Invoking 'help(...)' unexpectedly includes name of internal wrapper function. # Bug report ### Bug description: Attempting to retrieve documentation for the [`urlsplit` function](https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urlsplit) mostly works as expected, but the first line is confusing...
4606eff0aa01d6ce30d25b05ed347567ea59b00b
a15feded71dd47202db169613effdafc468a8cf3
python/cpython
python__cpython-122097
# ``test_pathlib`` prints unnecessary information # Bug report ### Bug description: ```python ./python -m test -q test_pathlib Using random seed: 2693504937 0:00:00 load avg: 0.51 Run 1 test sequentially in a single process [OSError(), OSError()] [PermissionError(13, 'Permission denied'), PermissionError(13, 'Permis...
5901d92739c6e53668e3924eaff38e2e9eb95162
a3f7db905c5aecda1d06fb60ed382a17e5b9c7aa
python/cpython
python__cpython-121241
# Docs: move deprecations into include files # Documentation Re: https://discuss.python.org/t/streamline-whats-new-by-moving-deprecations-and-removals-out-of-news/53997/8 To avoid needing to duplicate and sync the deprecation sections across What's New files, and ease backports, move them into include files. ...
a1df1b44394784721239615f307b273455536d14
709db44255eb5d73fc22a1341dd0253e71ddfda9
python/cpython
python__cpython-122082
# Optional support for ieee contexts in the decimal module doesn't work # Crash report ### What happened? Reproducer: ``` $ ./configure CFLAGS=-DEXTRA_FUNCTIONALITY -q && make -s configure: WARNING: no system libmpdecimal found; falling back to bundled libmpdecimal (deprecated and scheduled for removal in Python 3.1...
b9e10d1a0fc4d8428d4b36eb127570a832c26b6f
be257c58152e9b960827362b11c9ef2223fd6267
python/cpython
python__cpython-122059
# Outdated docstrings in `Lib/inspect.py` `inspect.isfunction` docstring is missing a: - `__dict__` - `__closure__` - `__qualname__` - `__module__` - `__type_params__` `inspect.isgenerator`: - `gi_yieldfrom` - `gi_suspended`(?) an undocumented attribute, I guess we should not expose it there - `next` - an...
8ce70d6c697c8179e007169ba2ec5d3a0dc77362
0b433aa9df6b5bb84e77ff97e59b7bcd04f2199a
python/cpython
python__cpython-133169
# Question about adjacent empty matches in regular expressions # Documentation The Python [documentation](https://docs.python.org/3/library/re.html#re.sub) for re.sub() states: > Empty matches for the pattern are replaced only when not adjacent to a previous empty match. However, after some testing, I have be...
44b73d3cd4466e148460883acf4494124eae8c91
605022aeb69ae19cae1c020a6993ab5c433ce907
python/cpython
python__cpython-122045
# SBOM generation tool fails during gitignore filtering for libraries with no files Within https://github.com/python/cpython/pull/119316 the libb2 library was removed. When running the SBOM generation tool a confusing error is raised during gitignore filtering instead of triggering the helpful error for the "no files ...
4e04d1a3d237abd0cba354024556c39519e0d163
7a6d4ccf0ec16e09f0d8b21c5a0c591e5e3e45f7
python/cpython
python__cpython-132201
# Misleading comment in `Modules/xxmodule.c` Everything is clear on how to use xxmodule.c as a starting point to build your own module based on the explanation on the file itself, but I feel confused with the following portion of the comments at the header: >If your object type is needed in other files, you'll have...
af8d1b95377917036aaedf18b9cc047d8877259c
b865871486987e7622a2059981cc8d708f9b04b0
python/cpython
python__cpython-122072
# CPython profiler broken with TensorFlow 2.17.0 code in Python 3.12.1+ # Bug report ### Bug description: Lately, I've been testing IA code on various Python interpreters and their corresponding profilers across multiple platforms. After multiple attempts, I've noticed that CPython profilers consistently fail to ana...
e91ef13861e88c27aed51a24e58d1dcc855a01dc
41a91bd67f86c922f350894a797738038536e1c5
python/cpython
python__cpython-122028
# Parser/lexer/lexer.c:1218: int tok_get_normal_mode(struct tok_state *, tokenizer_mode *, struct token *): Assertion `current_tok->curly_bracket_depth >= 0' failed. # Crash report ### What happened? ``` ~/p/cpython ❯❯❯ ./python.exe -c "import ast; ast.literal_eval(\"F'{[F'{:'}[F'{:'}]]]\")" Assertion failed: (curre...
2009e25e26040dca32696e70f91f13665350e7fd
186b4d8ea2fdc91bf18e8be695244ead1722af18