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-120528 | # `inspect.signature(map)` works in Python 3.13, but gives a signature that looks like only one arg is required
# Bug report
### Bug description:
```
>>> list(inspect.signature(map).parameters.values())[0].kind
<_ParameterKind.POSITIONAL_ONLY: 0>
>>> list(inspect.signature(map).parameters.values())[1].kind
<... | d4039d3f6f8cb7738c5cd272dde04171446dfd2b | 5c58e728b1391c258b224fc6d88f62f42c725026 |
python/cpython | python__cpython-120984 | # Python 3.12 change results in Apple App Store rejection
# Bug report
### Bug description:
This is not a bug in the traditional sense, but I recently went through an ordeal where updates to my app on Apple's App Store (Mac App Store to be specific) started to be rejected after updating my bundled version of Pyt... | f27593a87c344f3774ca73644a11cbd5614007ef | 8549559f383dfcc0ad0c32496f62a4b737c05b4f |
python/cpython | python__cpython-120523 | # Clarify documentation for except*
# Documentation
The [documentation for except*](https://docs.python.org/3/reference/compound_stmts.html#except-clause) states
> An except* clause must have a matching type, and this type cannot be a subclass of [BaseExceptionGroup](https://docs.python.org/3/library/exceptions.... | 58b3f111767148e9011ccd52660e208f0c834b2a | d484383861b44b4cf76f31ad6af9a0b413334a89 |
python/cpython | python__cpython-120640 | # Lower `BEFORE_WITH` and `BEFORE_ASYNC_WITH` to attribute lookups and calls.
With the JIT and better tier 2 optimizations, effective specialization is becoming more important that plain speed in tier 1.
`BEFORE_WITH` and `BEFORE_ASYNC_WITH` could be specialized, but they are bulky and won't optimize well in tier 2... | 9cefcc0ee781a1bef9e0685c2271237005fb488b | 73dc1c678eb720c2ced94d2f435a908bb6d18566 |
python/cpython | python__cpython-120498 | # Incorrect exception handling in Tab Nanny
# Bug report
### Bug description:
In the `Lib/tabnanny.py` module, the exception handling for `IndentationError` might not be reachable after `SyntaxError` is caught and a `return` statement is executed.
 there was a change to `socketserver.TCPServer` which added a new variable `allow_reuse_port` to support the usage of `SO_REUSEPORT` alo... | 192d17c3fd9945104bc0303cf248bb0d074d260e | 0c0348adbfca991f78b3aaa6790e5c26606a1c0f |
python/cpython | python__cpython-120451 | # Improve documentation about private name mangling
Private mangling is quite common if you want to emulate a "private" interface without leaving the possibility of the interface being considered "protected" (in the C++/Java sense). I've seen a few constructions in the standard library that are using this so I think i... | f4d6e45c1e7161878b36ef9e876ca3e44b80a97d | 422855ad21f09b82c0bfa891dfb8fb48182c6d2b |
python/cpython | python__cpython-120450 | # [tests] mangled names are incorrectly introspected by `test_pyclbr.py`
# Bug report
### Bug description:
This is something I encountered when implementing #120422. It should not affect the `pyclbr.py` module itself since introspection is achieved without any loading (so the names are correctly picked).
### CPyth... | d8cd0fa4e347f460d0f3277e2392504e61ed087d | 16f8e22e7c681d8e8184048ed1bf927d33e11758 |
python/cpython | python__cpython-120712 | # [3.13] Ensurepip fails when built with `--enable-experimental-jit` and `--with-pydebug` (Linux)
# Bug report
### Bug description:
When building for Linux/X64, the 3.13 branch will not run successfully run `python -m ensurepip` if built with both `--enable-experimental-jit` and `--with-pydebug`:
```sh
git checkout... | f385d99f57773e48285e0bcdbcd66dcbfdc647b3 | ace2045ea673e14a4c403d4bb56704cdde83ad07 |
python/cpython | python__cpython-120434 | # Mention ``chocolatey`` in ``Tools/jit/README.md``
Chocolatey is a well-known package manager for Windows users, but our readme for JIT doesn't mentioned it, which surprised me.
I'm think it would be a good addition 🙂
<!-- gh-linked-prs -->
### Linked PRs
* gh-120434
* gh-120651
<!-- /gh-linked-prs -->
| 95737bbf18765a24b6585708588c9b707dc30d27 | f4d301d8b99e5a001c89b0aea091b07b70c6354c |
python/cpython | python__cpython-123191 | # [Docs] Possibly Add More Information About Immortal Objects
From @ncoghlan in https://github.com/python/peps/issues/3817#issuecomment-2151651033:
> I'm wondering if it might be worth adding more detail on immortal objects to a new subheading in https://docs.python.org/3/c-api/refcounting.html though, as the best ... | 6754566a51a5706e8c9da0094b892113311ba20c | da4302699f0af50bcfc1df977481c117876c7117 |
python/cpython | python__cpython-126593 | # `nturl2path.pathname2url()` doesn't handle forward slashes
# Bug report
### Bug description:
Paths with forward slashes aren't handled the same as paths with backslashes:
```python
>>> from nturl2path import pathname2url
>>> pathname2url('//?/unc/server/share/dir')
'//%3F/unc/server/share/dir' # NOK
>>>... | bf224bd7cef5d24eaff35945ebe7ffe14df7710f | 7577307ebdaeef6702b639e22a896080e81aae4e |
python/cpython | python__cpython-120419 | # Test tegression from gh-117711: Assuming wheels are deleted from source when WHEEL_PKG_DIR is set
# Bug report
### Bug description:
```python
test_makefile_test_folders (test.test_tools.test_makefile.TestMakefile.test_makefile_test_folders) ... FAIL
================================================================... | 030b452e34bbb0096acacb70a31915b9590c8186 | 3453362183f083e37ea866a7ae1b34147ffaf81d |
python/cpython | python__cpython-120420 | # Remove unused imports from the stdlib
Using pyflakes or ruff, I found unused imports and I created this issue to remove them.
<!-- gh-linked-prs -->
### Linked PRs
* gh-120420
* gh-120421
* gh-120429
* gh-120454
* gh-120461
* gh-120574
* gh-120622
* gh-120623
* gh-120626
* gh-120627
* gh-120628
* gh-120629
* gh-120... | 4c6d4f5cb33e48519922d635894eef356faddba2 | 4b5d3e0e721a952f4ac9d17bee331e6dfe543dcd |
python/cpython | python__cpython-120089 | # Linux perf profile can not see Python calls on RISC-V architecture
# Bug report
### Bug description:
```python
check the output of python -m sysconfig | grep HAVE_PERF_TRAMPOLINE to see that RISC-V system does not support perf profile
(python312_perf_venv) [root@openeuler-riscv64 pytorch]# python3 -m sysconfig | g... | ca2e8765009d0d3eb9fe6c75465825c50808f4dd | 84512c0e7f4441f060026f4fd9ddb7611fc10de4 |
python/cpython | python__cpython-120398 | # The count method on strings, bytes, bytearray etc. can be significantly faster
# Feature or enhancement
### Proposal:
Counting single characters in a string is very useful. For instance calculating the GC content in a DNA sequence.
```python3
def gc_content(sequence: str) -> int:
upper_seq = sequence.upper()
... | 2078eb45ca0db495972a20fcaf96df8fcf48451d | 6ae254aaa0a5a3985a52d1ab387a2b68c001bd96 |
python/cpython | python__cpython-120390 | # [C API] Add PyLong_FromInt64() and PyLong_ToInt64()
# Feature or enhancement
I propose to add functions to convert <stdint.h> integers to/from Python int objects:
```c
PyObject* PyLong_FromInt32(int32_t value);
PyObject* PyLong_FromInt64(int64_t value);
PyObject* PyLong_FromUInt32(uint32_t value);
PyObject... | 4c6dca82925bd4be376a3e4a53c8104ad0b0cb5f | 1a0b828994ed4ec1f2ba05123995a7d1e852f4b4 |
python/cpython | python__cpython-120401 | # Improve deprecation warning message, when a test case returns non `None` value
# Feature or enhancement
Right now there are two potential things we can improve in this warning message: https://github.com/python/cpython/blob/19435d299a1fae9ad9a6bbe6609e41ddfd7f6cbe/Lib/unittest/case.py#L605-L609
1. The returned val... | fabcf6bc8f89f008319442dea614d5cbeb959544 | 92c9c6ae147e1e658bbc8d454f8c7b2c4dea31d1 |
python/cpython | python__cpython-120386 | # ``test_coroutines`` leaks references
# Bug report
### Bug description:
```python
./python.exe -m test -R 3:3 test_coroutines
Using random seed: 2850221778
0:00:00 load avg: 2.19 Run 1 test sequentially in a single process
0:00:00 load avg: 2.19 [1/1] test_coroutines
beginning 6 repetitions. Showing number of leaks... | 19435d299a1fae9ad9a6bbe6609e41ddfd7f6cbe | f5a9c34f38886c5cf9c2f8d860eee3473447e030 |
python/cpython | python__cpython-120442 | # Array out of bounds assignment in list_ass_subscript
# Crash report
### What happened?
### Root Cause
When step is not 1 in slice assignment, `list_ass_subscript` first calculates the length of the slice and then converts the input iterable into a list. During the conversion, arbitrary code in Python can be... | 8334a1b55c93068f5d243852029baa83377ff6c9 | 733dac01b0dc3047efc9027dba177d7116e47c50 |
python/cpython | python__cpython-120383 | # inspect.ismethoddescriptor(): lack of __delete__() is not checked
# Bug report
### Bug description:
The `inspect.ismethoddescriptor()` function reports descriptor objects which implement `__delete__()` but not `__set__()` as *method descriptors*, even though they are, in fact, *data descriptors*:
Actual beh... | dacc5ac71a8e546f9ef76805827cb50d4d40cabf | 7c5da94b5d674e112dc77f6494463014b7137193 |
python/cpython | python__cpython-120422 | # Python pickler unable to pickle object the native pickler can
# Bug report
### Bug description:
```python
import io
import pickle
class ZeroCopyByteArray(bytearray):
def __reduce_ex__(self, protocol):
return type(self), (pickle.PickleBuffer(self),), None
data = [
ZeroCopyByteArra... | 7595e6743ac78ac0dd19418176f66d251668fafc | 83d3d7aace32b8536f552f78dd29610344f13160 |
python/cpython | python__cpython-124555 | # Segmentation Fault in _curses
# Crash report
### What happened?
### Build
```
./configure --with-pydebug --with-address-sanitizer
apt-get install libncurses5-dev
```
### Root Cause
When calling `_curses.initscr`, initialised is set to True. Then, if `_curses.resizeterm` is called with an improper size for the f... | c2ba931318280796a6dcc33d1a5c5c02ad4d035b | 7bd9dbf8e148f14f9c9c6715a820bfda6adff957 |
python/cpython | python__cpython-120374 | # test_audit.test_http is running even if the 'network' resource is not enabled
# Bug report
### Bug description:
Running the `test_audit` test with no resources enabled in an environment with no Internet access takes ~9 minutes. Most of that time is spent waiting for `test_http` to timeout on network:
```sh
./pyth... | b0e1c51882e3a129d1e4db8291f7a0d869d6f1d6 | ac61d58db0753a3b37de21dbc6e86b38f2a93f1b |
python/cpython | python__cpython-121523 | # Test w/ wasmtime 22
# Feature or enhancement
https://github.com/bytecodealliance/wasmtime/releases/
<!-- gh-linked-prs -->
### Linked PRs
* gh-121523
* gh-121557
<!-- /gh-linked-prs -->
| 80209468144fbd1af5cd31f152a6631627a9acab | 04397434aad9b31328785e17ac7b3a2d5097269b |
python/cpython | python__cpython-121870 | # Test w/ WASI SDK >=22
https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-22
https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-23 (currently pre-release)
<!-- gh-linked-prs -->
### Linked PRs
* gh-121870
* gh-121873
<!-- /gh-linked-prs -->
| f589f263bcb54332e47bfc76cbb06f775e82b778 | e65cb4c6f01a687f451ad9db1600525e1c5832c4 |
python/cpython | python__cpython-120425 | # no_redundant_jumps: Assertion `0' failed
# Bug report
### Bug description:
The following code causes a crash on cpython 3.13 branch (f5289c450a324bd560b328ecd42ac9faf578276e) and the current main.
```python
import ast
code="""
try:
if name_4:
pass
else:
pass
except* name_0:
pass
else:... | 21866c8ed296524f0ca175c0f55b43744c2b30df | c2d5df5787b1f7fbd2583811c66c34a417593cad |
python/cpython | python__cpython-120364 | # `enum.nonmember` type-decays Flag values
# Bug report
### Bug description:
```pycon
>>> from enum import Flag, auto, nonmember
>>>
>>> class DepType(Flag):
... LIBRARY = auto()
... SCRIPT = auto()
... TEST = auto()
... ALL = nonmember(LIBRARY | SCRIPT | TEST)
...
>>> DepType.ALL
7
... | 7fadfd82ebf6ea90b38cb3f2a046a51f8601a205 | 7c38097add9cc24e9f68414cd3e5e1b6cbe38a17 |
python/cpython | python__cpython-120349 | # PYTHON_BASIC_REPL is ignored by interactive inspect
# Bug report
### Bug description:
The code in `pymain_repl()` in "Modules/main.c" needs to check `_Py_GetEnv(config->use_environment, "PYTHON_BASIC_REPL")`. Otherwise running with `-i`, or with `PYTHONINSPECT` set in the environment, ends up running the new R... | ec3af291fe2f680ab277edde7113e2762754f4aa | 9b8611eeea172cd4aa626ccd1ca333dc4093cd8c |
python/cpython | python__cpython-120347 | # Incorrect use of the :class: role with the "()" suffix
There are several uses of the `:class:` role with the name followed by `()`.
```
Doc/tutorial/stdlib2.rst:296:The :mod:`array` module provides an :class:`~array.array()` object that is like
Doc/tutorial/stdlib2.rst:309:The :mod:`collections` module provides a... | 92c9c6ae147e1e658bbc8d454f8c7b2c4dea31d1 | 42b25dd61ff3593795c4cc2ffe876ab766098b24 |
python/cpython | python__cpython-120352 | # Multiple lines f-string with non-ASCII breaks tokenize.generate_tokens in 3.12.4
# Bug report
### Bug description:
```python
import io
import tokenize
src = '''\
a = f"""
Autorzy, którzy tą jednostkę mają wpisani jako AKTUALNA -- czyli"""
'''
tokens = list(tokenize.generate_tokens(io.StringIO(src).readline))
... | 1b62bcee941e54244b3ce6476aef8913604987c9 | 32a0faba439b239d7b0c242c1e3cd2025c52b8cf |
python/cpython | python__cpython-120329 | # Python 3.13 beta 2 build fails on Windows when using both `--experimental-jit` and `--disable-gil`
# Bug report
### Bug description:
```bash
PCbuild\build.bat --experimental-jit --disable-gil
```
commit: 14ff4c979c8564376707de4b5a84dd3e4fcb5d1d
Repeating a lot of the same error:
```
C:\Users\redacted\Projects... | 939c201e00943c6dc2d515185168c30606ae522c | 86a8a1c57a386fb3330bee0fa44fc3fd6c3042a3 |
python/cpython | python__cpython-120318 | # Using internal tokenize module's TokenizerIter in multiple threads crashes
# Crash report
### What happened?
Because the tokenizer is not thread-safe, using the same `TokenizerIter` in multiple threads under the free-threaded build leads to all kinds of unpredicted behavior. It sometimes succeeds, sometimes throws... | 8549559f383dfcc0ad0c32496f62a4b737c05b4f | 8b6d4755812d0b02e9f26beb9c9a7714e4c5ac28 |
python/cpython | python__cpython-120989 | # `ctypes._FuncPtr` doesn't seem to exist as described in the doc (misspelled `_CFuncType`?)
# Documentation
Module `ctypes` doesn't seem to provide [`_FuncPtr`](https://docs.python.org/3.13/library/ctypes.html#ctypes._FuncPtr) when imported.
However, it provides `_CFuncType` that really looks similar to `_FuncP... | 417c130ba55ca29e132808a0a500329f73b6ec41 | cae853e3b44cd5cb033b904e163c490dd28bc30a |
python/cpython | python__cpython-120303 | # Use After Free in list_richcompare_impl
# Crash report
### Bisect
bisect from https://github.com/python/cpython/commit/65e1cea6e372ed809501cf5b927a65c111f79cd3
### Build
```
./configure --with-pydebug --with-address-sanitizer
```
### Root Cause
The `list_richcompare_impl` function calls arbitrary... | 141babad9b4eceb83371bf19ba3a36b50dd05250 | 9e9ee50421c857b443e2060274f17fb884d54473 |
python/cpython | python__cpython-120301 | # ``fnctlmodule.fcntl_ioctl_impl`` has outdated format string
# Bug report
### Bug description:
After 92fab3356f4c61d4c73606e4fae705c6d8f6213b fcntl.ioctl `code` argument has type `unsigned long`, so
this code should be updated:
from
```c
if (PySys_Audit("fcntl.ioctl", "iIO", fd, code,
ob_ar... | e5a7bc6f2eb9a3875063423caa67bb0ffcc3a6b8 | 0ae8579b85f9b0cd3f287082ad6e194bdb025d88 |
python/cpython | python__cpython-120292 | # [3.13] shell version of `python-config` started using bashisms
# Bug report
### Bug description:
Since de2a73dc4649b110351fce789de0abb14c460b97 `python-config.sh.in` is using bashisms but declaring `#!/bin/sh` as the shell. As a result, it now throws errors on systems using non-bash shells:
```
$ python3.13-confi... | 7d2447137e117ea9a6ee1493bce0b071c76b1bd7 | 141babad9b4eceb83371bf19ba3a36b50dd05250 |
python/cpython | python__cpython-120297 | # Use After Free in initContext(_lsprof.c)
# Crash report
### What happened?
Version
Python 3.14.0a0 (heads/main:34f5ae69fe, Jun 9 2024, 21:27:54) [GCC 11.4.0]
bisect from commit https://github.com/python/cpython/pull/8378/commits/2158977f913f68ff4df15ca3e6e8fb19c6ef0cf2
### Root Cause
The `call_timer` function ... | 1ab17782832bb1b6baa915627aead3e3516a0894 | 7431c3799efbd06ed03ee70b64420f45e83b3667 |
python/cpython | python__cpython-120277 | # Fix incorrect `email.header.Header` `maxlinelen` default.
# Documentation
Update `email.header.Header` documentation for `maxlinelen` default from 76 to 78.
<!-- gh-linked-prs -->
### Linked PRs
* gh-120277
* gh-120278
* gh-120279
<!-- /gh-linked-prs -->
| 7c016deae62308dd1b4e2767fc6abf04857c7843 | 5d59b870effa0f576acf7264cfcbfca2b36e34e3 |
python/cpython | python__cpython-120269 | # ``date.fromtimestamp(None)`` behaves differently between ``_pydatetime`` and ``_datetime``
# Bug report
### Bug description:
```python
./python
Python 3.14.0a0 (heads/main-dirty:55402d3232, Jun 8 2024, 11:03:56) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> impor... | 34f5ae69fe9ab0f5b23311d5c396d0cbb5902913 | 7c016deae62308dd1b4e2767fc6abf04857c7843 |
python/cpython | python__cpython-120255 | # Add a `commands` argument to `pdb.set_trace` so the user can feed commands from source code
# Feature or enhancement
### Proposal:
I propose to add a `commands` argument to `pdb.set_trace` and `pdb.Pdb.set_trace`. The `commands` fed should be a list of pdb commands that will be executed the first time the debu... | af8403a58dbe45130400a133f756cbf53c5f1d7e | fc9e6bf53d1c9ce2b5f802864e0da265a77c111f |
python/cpython | python__cpython-120245 | # `re.sub()` leaks references
# Bug report
### Bug description:
```
>python_d -X showrefcount -c "import re; re.sub(r'()', r'\1', '')"
[7140 refs, 4669 blocks]
```
[`_strptime`](https://github.com/python/cpython/blob/e6076d1e1303c3cc14bc02baf607535af2cf1501/Lib/_strptime.py#L250-#L253) is a module affected by this.
... | 38a25e9560cf0ff0b80d9e90bce793ff24c6e027 | 55402d3232ca400ebafe4fe3bd70f252304ebe07 |
python/cpython | python__cpython-120243 | # `test_datetime` does not respect custom `setUpClass` and `tearDownClass`
# Bug report
Example test case that can be possibly added to `test_datetime.py`:
```python
class TestExample(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
cls.value_to_test = 1
return super().setUpClass... | 95f4db88d5ab7d900f05d0418b2a2e77bf9ff126 | 4fc82b6d3b99f873179937215833e7a573ca7876 |
python/cpython | python__cpython-120227 | # test_sendfile_close_peer_in_the_middle_of_receiving fails with Linux 6.10 release candidates and non-4KiB page size
# Bug report
### Bug description:
With Linux-6.10-rc2 configured to use 16KiB page:
```shellsession
$ python3 -m test test.test_asyncio.test_sendfile -m test_sendfile_close_peer_in_the_middle_of_rec... | a7584245661102a5768c643fbd7db8395fd3c90e | 10fb1b8f36ab2fc3d2fe7392d5735dd19c5e2365 |
python/cpython | python__cpython-120235 | # flowgraph.c: push_cold_blocks_to_end: Assertion `prev_instr' failed
# Bug report
### Bug description:
The following code causes a crash with cpython 3.13 (56a7e0483436d1ebd2af97c02defe0e67c4bb495) and with the current main branch (d68a22e7a68ae09f7db61d5a1a3bd9c0360cf3ee)
```python
async def name_4():
match b... | 4fc82b6d3b99f873179937215833e7a573ca7876 | e6076d1e1303c3cc14bc02baf607535af2cf1501 |
python/cpython | python__cpython-120354 | # Overriding SIGINT doesn't work as expected in the new REPL
# Bug report
In the old REPL, overriding SIGINT and pressing Ctrl-C works as expected:
```
❯ python
Python 3.11.6 (main, Nov 3 2023, 17:05:41) [Clang 15.0.0 (clang-1500.0.40.1)] on darwin
Type "help", "copyright", "credits" or "license" for more in... | 34e4d3287e724c065cc07b04a1ee8715817db284 | 203565b2f9c74656ba519780049b46d4e5afcba1 |
python/cpython | python__cpython-120223 | # Tkinter: emit deprecation warning for trace_variable() etc
The `Variable` methods `trace_variable()`, `trace_vdelete()` and `trace_vinfo()` wrap deprecated Tcl commands which were deleted in Tcl 9.0. Modern replacements `trace_add()`, `trace_remove()`, and `trace_info()` were added in Python 3.6 (#66313). They wra... | c46635aa5a20fc1b4c5e85370fa0fa2303c47c14 | 814ca116d54f40d6958a623deb614c3e3734e237 |
python/cpython | python__cpython-120213 | # Fix tkinter.ttk with Tcl/Tk 9.0
There are two issues in `tkinter.ttk` with Tcl/Tk 9.0.
* Using the Variable methods trace_variable() and trace_vdelete(). They wrap deprecated Tcl commands which were removed in Tcl 9.0. New methods added in #66313 should be used instead (added in Python 3.6 and supported in Tcl 8.... | d68a22e7a68ae09f7db61d5a1a3bd9c0360cf3ee | 6646a9da26d12fc54263b22dd2916a2f710f1db7 |
python/cpython | python__cpython-120214 | # inspect.iscoroutinefunction(inspect) returns True
# Bug report
### Bug description:
I would expect `inspect.iscoroutinefunction` to only return True for coroutine functions and those functions decorated with `inspect.markcoroutinefunction`, but it also returns True for the `inspect` module object itself.
```
Pyth... | 10fb1b8f36ab2fc3d2fe7392d5735dd19c5e2365 | 9d6604222e9ef4e136ee9ccfa2d4d5ff9feee976 |
python/cpython | python__cpython-120195 | # Read and write of __class__ in two threads causes crash
# Crash report
### What happened?
See https://github.com/python/cpython/pull/120195 for crashing CI.
Apply diff from there and run
```
python -m test test_free_threading -m test_type
```
### CPython versions tested on:
CPython main branch
### ... | 203565b2f9c74656ba519780049b46d4e5afcba1 | 939c201e00943c6dc2d515185168c30606ae522c |
python/cpython | python__cpython-120179 | # Three typos in documentation
# Documentation
I noticed a few typos in the documentation.
1. In `Doc/glossary.rst`, there is `immmortal` instead of `immortal`
2. In `Doc/library/dis.rst`, there is `oparand` instead of `operand`
3. In `Doc/library/pdb/rst`, there is `Accepatable` instead of `Acceptable`
I'm... | 5bdc87b8859c837092e7c5b19583f98488f7a387 | e21057b99967eb5323320e6d1121955e0cd2985e |
python/cpython | python__cpython-120171 | # Importing multiprocessing breaks _checkmodule in _pickle.c
# Bug report
### Bug description:
#86572 describes a bug where importing `multiprocessing` causes `pickle` to determine the wrong module for objects without `__module__`. #23403 fixed the bug, but only for the pure Python implementation of `pickle`. The C ... | 05a19b5e56894fd1e63aff6b38fb23ad7c7b3047 | 393773ae8763202ecf7afff81c4d57bd37c62ff6 |
python/cpython | python__cpython-120177 | # ``test_os.test_win32_mkdir_700`` fails on Windows
# Bug report
### Bug description:
```python
./python -m test -v test_os -m test_win32_mkdir_700
Running Debug|x64 interpreter...
== CPython 3.14.0a0 (heads/main-dirty:78634cfa3d, Jun 6 2024, 18:39:33) [MSC v.1933 64 bit (AMD64)]
== Windows-10-10.0.19043-SP0 little-... | d5ba4fc9bc9b2d9eff2a90893e8d500e0c367237 | 47816f465e833a5257a82b759b1081e06381e528 |
python/cpython | python__cpython-120182 | # `Objects/typeobject.c:143: managed_static_type_index_get: Assertion `managed_static_type_index_is_set(self)' failed.` in 3.13.0b2+, with freezegun
# Crash report
### What happened?
Starting with Python 3.13.0b2, importing `freezegun` causes the interpreter to crash on exit. I was able to reduce it into the followi... | 2c66318cdc0545da37e7046533dfe74bde129d91 | e73c42e15cf83c7a81de016ce2827c04110c80c3 |
python/cpython | python__cpython-120187 | # Unused code in `concurrent.future`
# Bug report
### Bug description:
https://github.com/python/cpython/blob/fd104dfcb838d735ef8128e3539d7a730d403422/Lib/concurrent/futures/_base.py#L26C1-L32
The `_FUTURE_STATES` variable hasn't been used in this file, and nor in other files: https://github.com/search?q=repo%3Apyt... | bd826b9c77dbf7c789433cb8061c733c08634c0e | 5c115567b1e3aecb7a53cfd5757e25c088398411 |
python/cpython | python__cpython-120156 | # Fix some Coverity warnings and false alarms
I got access to a Coverity scan of Python 3.12.2 and there are about 67 warnings. Most of them seem to be false alarms, my team is still investigating the warnings.
I propose to make minor changes, when it makes sense, to make some false alarms quiet.
And propose fix... | 78634cfa3dd4b542897835d5f097604dbeb0f3fd | cccc9f63c63ae693ccd0e2d8fc6cfd3aa18feb8e |
python/cpython | python__cpython-120173 | # Incorrect case string in configure script
# Bug report
### Bug description:
I think this: https://github.com/python/cpython/blob/fd104dfcb838d735ef8128e3539d7a730d403422/configure#L12895
Should be: `Emscripten*|WASI*`
I could be wrong, but I think this will never be matched otherwise since even if `ac_sys_releas... | 47816f465e833a5257a82b759b1081e06381e528 | 6a97929a5ad76c55bc6e1cf32898a1c31093334d |
python/cpython | python__cpython-124533 | # Make it possible to use `sys.monitoring` for pdb/bdb
# Feature or enhancement
### Proposal:
I had a few proposals to utilize `sys.monitoring` for pdb and all of them were raising concerns. We had a discussion during language summit and I got feedbacks from several members that breaking backwards compatibility for ... | a936af924efc6e2fb59e27990dcd905b7819470a | f48887fb97651c02c5e412a75ed8b51a4ca11e6a |
python/cpython | python__cpython-120131 | # `ipaddress`: argument to `collapse_addresses()` should be described as iterable
# Documentation
In the description of the [`ipaddress.collapse_addresses()](https://docs.python.org/3/library/ipaddress.html#ipaddress.collapse_addresses) function, we can read that:
> *addresses* is an iterator of [IPv4Network](ht... | f878d46e5614f08a9302fcb6fc611ef49e9acf2f | e83ce850f433fd8bbf8ff4e8d7649b942639db31 |
python/cpython | python__cpython-120123 | # `concurrent.futures` does not include `InvalidStateError` in its `__all__`
# Bug report
### Bug description:
`InvalidStateError` is introduced in #7056, but not included in the module's `__all__`. A PR is on the way.
### CPython versions tested on:
CPython main branch
### Operating systems tested on:
... | 5d59b870effa0f576acf7264cfcbfca2b36e34e3 | 38a25e9560cf0ff0b80d9e90bce793ff24c6e027 |
python/cpython | python__cpython-120116 | # Cirrus M1 macOS runners never start on fork
The Cirrus M1 macOS runners introduced in #119979 never start on [my fork](https://github.com/nineteendo/cpython/actions/runs/9371716405/job/25801596396). This causes every workflow to fail. Can we skip this job in that case?
<!-- gh-linked-prs -->
### Linked PRs
* gh-120... | fd104dfcb838d735ef8128e3539d7a730d403422 | eeb8f67f837facb37f092a8b743f4d249515e82f |
python/cpython | python__cpython-120114 | # RecursionError during copy.deepcopy of an ast-tree with parent references
# Bug report
### Bug description:
python 3.13 raises an `RecursionError` when I try to `deepcopy` the ast in the following example.
```python
import ast
import copy
code="""
('',)
while i < n:
if ch == '':
ch = format[i]
... | 42b2c9d78da7ebd6bd5925a4d4c78aec3c9e78e6 | ead676516d4687b5e6d947a5c0808b5b93ba87e3 |
python/cpython | python__cpython-120107 | # IDLE uses incorrect screen dimension units
In two places IDLE uses incorrect unit for screen dimension:
https://github.com/python/cpython/blob/983efcf15b2503fe0c05d5e03762385967962b33/Lib/idlelib/configdialog.py#L114
https://github.com/python/cpython/blob/983efcf15b2503fe0c05d5e03762385967962b33/Lib/idlelib/search... | 4b66b6b7d6e65f9eb2d61435b9b37ffeb7bb00fb | 4c317918486348ff8486168e1003be8c1daa6cf5 |
python/cpython | python__cpython-120101 | # FrameLocalsProxy is not a mapping
# Bug report
### Bug description:
`FrameLocalsProxy` should be a mapping. I.e. it should subclass `collections.abc.Mapping` and match `{}` in a match statement.
```python
from collections.abc import Mapping
import sys
def f():
return sys._getframe().f_locals
proxy = f()
a... | d1c673b658977a8e6236feee579308e0ed6a0187 | 00257c746c447a2e026b5a2a618f0e033fb90111 |
python/cpython | python__cpython-120605 | # Add IDLE Hovertip foreground color needed for recent macOS
# Bug report
### Bug description:
### Minimal Reproducible Example
```python
import tkinter as tk
from idlelib.tooltip import Hovertip
root = tk.Tk()
root.geometry('200x100')
label = tk.Label(root, text='Hover Me!')
label.pack()
tip = Hoverti... | 5a7f7c48644baf82988f30bcb43e03dcfceb75dd | dbdbef3668293abdceac2b8a7b3e4615e6bde143 |
python/cpython | python__cpython-120088 | # `int.__round__(None)` is not supported
# Bug report
### Bug description:
The `__round__` method on floats accepts None as an explicit argument, but the one on int does not:
```python
>>> (1.0).__round__(None)
1
>>> (1).__round__(None)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeEr... | 57ad769076201c858a768d81047f6ea44925a33b | bd826b9c77dbf7c789433cb8061c733c08634c0e |
python/cpython | python__cpython-120081 | # Typo in the documentation for the time module (specifically struct_time)
# Documentation
The table under class time.struct_time says 'tm_day' instead of 'tm_mday', which is incorrect.
<!-- gh-linked-prs -->
### Linked PRs
* gh-120081
* gh-120084
* gh-120085
<!-- /gh-linked-prs -->
| b6b0dcbfc054f581b6f78602e4c2e9474e3efe21 | 770f3c1eadd3392c72fd55be47770234dd143a14 |
python/cpython | python__cpython-120068 | # Speed up `test_weakref` in the free-threaded build
The `test_weakref` test is one of the slowest tests when running in the free-threaded build.
The problem is the default period for the `collect_in_thread()` function is too short (100 µs). This isn't too much of a problem for the default build because the GIL swi... | 4bba1c9e6cfeaf69302b501a4306668613db4b28 | 5c02ea8bae2287a828840f5734966da23dc573dc |
python/cpython | python__cpython-120059 | # Add os.reload_environ() function
# Feature or enhancement
When the environment is modified outside Python, `os.environ` is not updated. I propose adding a new `os.environ.refresh()` method to manually update `os.environ`.
Discussion: https://discuss.python.org/t/method-to-refresh-os-environ/54774
<!-- gh-linked-p... | 7aff2de62bc28eb23888270b698c6b6915f69b21 | 56c3815ba14c790d2e9a227b4ac0ead5e6b1e570 |
python/cpython | python__cpython-120058 | # Add `IP_RECVTTL` and `IP_RECVERR` constants to `socket` module
# Feature or enhancement
I recently needed these three constants in a real code, I had to create them manually.
Docs from Linux: https://man7.org/linux/man-pages/man7/ip.7.html
```c
IP_RECVERR (since Linux 2.2)
Enable extended reli... | f5a9c34f38886c5cf9c2f8d860eee3473447e030 | 34e4d3287e724c065cc07b04a1ee8715817db284 |
python/cpython | python__cpython-120050 | # `test_imaplib` takes 40+ minutes in refleaks builds
# Bug report
Similar to https://github.com/python/cpython/issues/120039, `test_imaplib` has at least one test that *expects* a timeout and that time out is scaled up with the global time out, so the refleaks tests unnecessarily take 40+ minutes.
https://github.co... | 710cbea6604d27c7d59ae4953bf522b997a82cc7 | d9095194dde27eaabfc0b86a11989cdb9a2acfe1 |
python/cpython | python__cpython-120042 | # PyREPL: Completion menu does not get updated when inserting a character
# Bug report
### Bug description:
The completions menu does not get updated when inserting a character. In a related matter, if one clicks `Tab` once when there's multiple possible completion a `[ not unique ]` message apperas. If someone pres... | 8fc7653766b106bdbc4ff6154e0020aea4ab15e6 | 4dcd91ceafce91ec37bb1a9d544e41fc65578994 |
python/cpython | python__cpython-120047 | # `test_siginterrupt_off` unnecessarily takes 30 minutes in refleak test
# Bug report
The `test_siginterrupt_off` test in `test_signal` *expects* a timeout and uses `support.SHORT_TIMEOUT`.
In at least some of the refleak test runners:
* we bump the overall timeout to 200 minutes:
* which adjusts `support.SHORT_TI... | d419d468ff4aaf6bc673354d0ee41b273d09dd3f | bf8e5e53d0c359a1f9c285d855e7a5e9b6d91375 |
python/cpython | python__cpython-120028 | # Some flags are not publicly exported by `symtablemodule.c`
# Bug report
### Bug description:
The `symtablemodule.c` file does not export `DEF_COMP_ITER`, `DEF_TYPE_PARAM` and `DEF_COMP_CELL`. Those flags seem to have been added after the original ones so they were probably missed/forgotten. Here is a MWE for `DEF_... | ff1857d6ed52fab8ef1507c289d89ee545ca6478 | e69d068ad0bd6a25434ea476a647b635da4d82bb |
python/cpython | python__cpython-120027 | # Deprecate (soft) Py_HUGE_VAL macro
# Feature or enhancement
### Proposal:
Nowadays, it's just an alias for ``Py_INFINITY``. Using both macros in single codebase, probably, slightly confuse code readers. I think it worth to replace all such cases to ``Py_INFINITY``, as mentioned in [this comment](https://github.c... | 8477951a1c460ff9b7dc7c54e7bf9b66b1722459 | 28b148fb32e4548b461137d18d1ab6d366395d36 |
python/cpython | python__cpython-120018 | # Wrap some multi-line macros in `do { ... } while(0)` in `{codegen,compile}.c`
# Feature or enhancement
### Proposal:
Follow-up from the following observation (I'm sending a PR just after):
> There are similar patterns in `compile.c`, maybe it is also worth taking a look? 🤔
_Originally posted by @sobolevn in ht... | c222441fa7f89d448e476c252ba09be588568392 | bbe9b21d06c192a616bc1720ec8f7d4ccc16cab8 |
python/cpython | python__cpython-120102 | # The behavior of `multithreading.Queue.empty()` when the Queue is closed is not explained in the docs
# Documentation
https://docs.python.org/3/library/multiprocessing.html#multiprocessing.Queue.empty
It should be added that in case of the given method `Queue.empty()` is called after `Queue.close()` it will ra... | a3711afefa7a520b3de01be3b2367cb830d1fc84 | 6674c63dc7bb175acc997ddcb799e8dbbafd2968 |
python/cpython | python__cpython-120287 | # Invalid corner cases (resulting in nan+nanj) in _Py_c_prod()
# Bug report
### Bug description:
Reproducer:
```pycon
>>> z = 1e300+1j
>>> z*complex('(inf+infj)') # should be (nan+infj)
(nan+nanj)
```
<details>
<summary>c.f. C code</summary>
```c
#include <stdio.h>
#include <complex.h>
#inclu... | 8b7c194c7bf7e547e4f6317528f0dcb9344c18c7 | e991ac8f2037d78140e417cc9a9486223eb3e786 |
python/cpython | python__cpython-120000 | # Race condition in `_Py_ExplicitMergeRefcount`
# Bug report
There is a subtle possible race condition in `_Py_ExplicitMergeRefcount`: we set `ob_ref_local` and `ob_tid` to zero *after* writing the merged refcount to `ob_ref_shared`.
That's not safe, because another thread might possibly deallocate the object after ... | 4055577221f5f52af329e87f31d81bb8fb02c504 | 109e1082ea92f89d42cd70f2cc7ca6fba6be9bab |
python/cpython | python__cpython-119982 | # Wrap some multi-line macros in ``do { ... } while(0)`` in ``symtable.c``
# Feature or enhancement
### Proposal:
While I was implementing #119976, I observed that some macros are not guarded against possible constructions because their content is only wrapped in `{}` but not in the classical `do { ... } while(0)` c... | 153b118b78588209850cc2a4cbc977f193a3ab6e | 6acb32fac3511c1d5500cac66f1d6397dcdab835 |
python/cpython | python__cpython-119969 | # A small typo in Doc/c-api/monitoring.rst
# Documentation
The title of the page (https://docs.python.org/3.14/c-api/monitoring.html) should be "***Monitoring*** C API", not "***Monitorong*** C API"
<!-- gh-linked-prs -->
### Linked PRs
* gh-119969
* gh-119971
<!-- /gh-linked-prs -->
| cae4c80714e7266772025676977e2a1b98cdcd7b | d7fcaa73b71f4c49c1b24cac04c9b6f1cf69b944 |
python/cpython | python__cpython-119962 | # Tests badge in README shows incorrect status
In the repo README, the tests badge currently shows as failing even though [all the recent tests workflows on main](https://github.com/python/cpython/actions/workflows/build.yml?query=branch%3Amain) are passing.
 (also 3.12, 3.13, and 3.14) the `flags` parameter is defined in the documentation for [`re.compile()`](https://docs.python.org/3/library/re.html#re.compile... | a86e6255c371e14cab8680dee979a7393b339ce5 | b8fb369193029d10059bbb5f760092071f3a9f5f |
python/cpython | python__cpython-119976 | # Type parameters: Incorrect text in SyntaxError for disallowed expression
# Bug report
### Bug description:
We disallow certain expressions (e.g., `yield`) in type parameters bounds, constraints, and defaults. But the error message always says it's a bound:
```pycon
>>> def f[T=(yield)](): pass
File "<python-inp... | 4bf17c381fb7b465f0f26aecb94a6c54cf9be2d3 | 274f844830898355f14d6edb6e71894a2f37e53c |
python/cpython | python__cpython-121341 | # Flaky test `test_asyncio_repl_is_ok` in `test_repl`
The test fails because the running the asyncio repl exits with:
```
Fatal Python error: _enter_buffered_busy: could not acquire lock for <_io.BufferedWriter name='<stderr>'> at interpreter shutdown, possibly due to daemon threads
```
I'm not sure if this is... | 114389470ec3db457c589b3991b695258d23ce5a | 53e12025cd7d7ee46ce10cc8f1b722c55716b892 |
python/cpython | python__cpython-120467 | # [3.12] Lambda generators cause assertion failure: `python: Objects/genobject.c:400: gen_close: Assertion `exception_handler_depth > 0' failed.`
# Crash report
### What happened?
When CPython 3.12 is built with assertions enabled, the following snippet causes the interpreter to crash:
```python
x = lambda: (yield ... | 73dc1c678eb720c2ced94d2f435a908bb6d18566 | 2cf47389e26cb591342d07dad98619916d5a1b15 |
python/cpython | python__cpython-122217 | # Error exiting the new REPL with Ctrl+Z on Windows
# Bug report
### Bug description:
With the new REPL implementation on Windows, I'm getting an error from code that mistakenly tries to suspend the current process via `os.kill(os.getpid(), signal.SIGSTOP)` when exiting via Ctrl+Z, Enter. This raises the follow... | d1a1bca1f0550a4715f1bf32b1586caa7bc4487b | d27a53fc02a87e76066fc4e15ff1fff3922a482d |
python/cpython | python__cpython-119880 | # Utilize last character gap for two-way periodic needles
# Feature or enhancement
### Proposal:
Two-way algorithm currently does not incorporate *Horspool skip rule* when needle is periodic. As part of my work this led to difficulties in run-time predictions.
This rule is a significant determinant of run-tim... | a8f1152b70d707340b394689cd09aa0831da3601 | 8d63c8d47b9edd8ac2f0b395b2fa0ae5f571252d |
python/cpython | python__cpython-119858 | # pyrepl help (pydoc): "exit" does not exit, whereas "quit" does
When I enter Python help in the REPL, if I type "exit", I get:
```
Help on Quitter in module _sitebuiltins object:
exit = class Quitter(builtins.object)
| exit(name, eof)
|
| Methods defined here:
(...)
```
If I try exit(), I get an e... | 4223f1d828d3a3e1c8d803e3fdd420afd7d85faf | 1e5f615086d23c71a9701abe641b5241e4345234 |
python/cpython | python__cpython-119854 | # [C API] Split large object.h file: create refcount.h
The `Include/object.h` header file became quite big (1260 lines of C code). A large part of it is just reference count management. I propose adding a new `Include/refcount.h` header file to ease the navigation in `Include/object.h` and ease the maintenance of the ... | 891c1e36f4e08da107443772a4eb50c72a83836d | 91601a55964fdb3c02b21fa3c8dc629daff2390f |
python/cpython | python__cpython-119843 | # Honor PyOS_InputHook in the new REPL
# Bug report
We are currently not calling `PyOS_InputHook` if is set before blocking for input in the new REPL
<!-- gh-linked-prs -->
### Linked PRs
* gh-119843
* gh-120066
<!-- /gh-linked-prs -->
| d9095194dde27eaabfc0b86a11989cdb9a2acfe1 | bf5e1065f4ec2077c6ca352fc1ad940a76d1f6c9 |
python/cpython | python__cpython-119839 | # Treat Fraction as a real value in mixed arithmetic operations with complex
In arithmetic operations, if one of operands is a `Fraction`, and the other operand is a `complex` or a `numbers.Complex`, the fraction is implicitly converted to a `complex`. Third-party types implementing the `numbers.Complex` interface can... | d7fcaa73b71f4c49c1b24cac04c9b6f1cf69b944 | 70934fb46982ad2ae677cca485a730b39635919c |
python/cpython | python__cpython-119938 | # `ntpath.abspath()` always return absolute path
# Feature or enhancement
### Proposal:
`ntpath.abspath()` doesn't always return an absolute path:
```python
>>> import ntpath
>>> ntpath.abspath('C:\x00')
'C:\x00' # instead of 'C:\\Users\\wanne\\\x00'
>>> ntpath.abspath('\x00:')
'\x00:' # instead of '\x00... | 4b00aba42e4d9440d22e399ec2122fe8601bbe54 | 5610860840aa71b186fc5639211dd268b817d65f |
python/cpython | python__cpython-119882 | # Python 3.13.0b1: suboptimal `pdb._post_mortem` behavior if `.pdbrc` exists
# Bug report
### Bug description:
`pdb.post_mortem` used to display the current stack entry before the command loop (which has been useful). With Python 3.13, this is no longer the case when there is a `.pdbrc` file.
The reason is the fo... | ed60ab5fab6d187068cb3e0f0d4192ebf3a228b7 | 7fadfd82ebf6ea90b38cb3f2a046a51f8601a205 |
python/cpython | python__cpython-119822 | # Name lookup in annotation scopes in classes does not work with non-dict globals
# Bug report
### Bug description:
This works:
```python
class customdict(dict):
def __missing__(self, key):
return key
code = compile("type Alias = undefined", "test", "exec")
ns = customdict()
exec(code, ns)
Alias = ns["... | 80a4e3899420faaa012c82b4e82cdb6675a6a944 | 2237946af0981c46dc7d3886477e425ccfb37f28 |
python/cpython | python__cpython-120030 | # Python 3.12+ breaks backwards compatibility for logging QueueHandler with some Queue classes
# Bug report
### Bug description:
Related bug: https://github.com/python/cpython/issues/111615
Related pull: https://github.com/python/cpython/pull/111638
Related [codes](https://github.com/python/cpython/blob/3.12/L... | 99d945c0c006e3246ac00338e37c443c6e08fc5c | dce14bb2dce7887df40ae5c13b0d13e0dafceff7 |
python/cpython | python__cpython-124006 | # Update memory management docs for free-threaded build
The memory management docs say:
> There is no hard requirement to use the memory returned by the allocation functions belonging to a given domain for only the purposes hinted by that domain (although this is the recommended practice). For example, one could us... | e6bb1a2b28ac8aed1e1b7f1c74221ca1d02a7235 | bb904e063d0cbe4c7c83ebfa5fbed2d9c4980a64 |
python/cpython | python__cpython-119800 | # `_Py_NewRefWithLock` missing `_Py_IncRefTotal`
# Bug report
@encukou noticed that the free-threaded buildbots were reporting a lot of negative refcount deltas (among other problems). This is because `_Py_NewRefWithLock` is missing a `_Py_IncRefTotal` (although it has a `_Py_INCREF_STAT_INC`).
https://github.com/py... | 879d43b705faab0c59f1a6a0042e286f39f3a4ef | 9bc6045842ebc91ec48ab163a9e1e8644231607c |
python/cpython | python__cpython-120471 | # Add a "strict" option for map()
These two examples silently truncate the unmatched inputs:
```python
>>> list(map(pow, [1, 2, 3], [2, 2, 2, 2]))
[1, 4, 9]
>>> list(map(pow, [1, 2, 3, 4, 5], [2, 2, 2, 2]))
[1, 4, 9, 16]
```
The current workaround is:
```
starmap(pow, zip(vec1, vec2, strict=True))
```
... | 3032fcd90ecb745b737cbc93f694f9a802062a3a | bfc1d2504c183a9464e65c290e48516d176ea41f |
python/cpython | python__cpython-119792 | # Fix new Tkinter tests for wantobjects=0
Some of recently added Tkinter tests for `PhotoImage` do not pass if `tkinter.wantobjects=0`, because `PhotoImage.get()` returns a string like `"255 0 0"` instead of a 3-tuple of integers like `(255, 0, 0)`.
Other solution is to make `PhotoImage.get()` always returning a 3-... | e875c2d752fed0a8d16958dc7b331e66a2476247 | e91fc11fafb657cab88c5e6f13822432a3b9dc64 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.