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-134281 | # `test_strftime` incorrectly calculates expected week
# Bug report
### Bug description:
This is not a duplicate of other IST related issues, <strike>this is just a bug in the test itself from a quick look.</strike> After further investigation it appears this is indeed just a IST bug but the test also calculates it w... | e3dda8f81832008adf19906004f0cd53de95dd0b | 66aaad61037785639aec393be7618cb54b1372dc |
python/cpython | python__cpython-134244 | # segfault in gc with 3.14.0b1, trio and pytest
# Crash report
### What happened?
I'm encountering a segfault during garbage collection since 3.14.0b1 (I have not been able to reproduce it on 3.14.0a6), and while I've so far been able to minify the repro somewhat it still requires both pytest and trio
```python
imp... | 29f6dc6323759ab89ddc33096bf075037db5de5a | 1f0a294e8c2ff009c6b74ca5aa71da6269aec0dd |
python/cpython | python__cpython-134377 | # Make generator methods `gen_set_name` and `gen_set_qualname` thread-safe in free-threaded builds
# Feature or enhancement
### Proposal:
When my PR was reviewed, some problem was found: https://github.com/python/cpython/pull/133373#discussion_r2072630853
But my code on _GeneratorWrapper was simply copied from [`gen... | 52be7f445e454ccb44e368a22fe70a0fa6cab7c0 | cb394101110e13a27e08bbf2fe9f38d847db004c |
python/cpython | python__cpython-133952 | # PyManager shebangs do not document auto-install behaviour
At https://docs.python.org/dev/using/windows.html#shebang-lines it should mention that if a shebang is included but not installed, a matching runtime will be installed automatically (unless configured off).
<!-- gh-linked-prs -->
### Linked PRs
* gh-133952
*... | fc3cddd90a1674a71c1abe6a78dde14c935b1de4 | e575190abbd9409adad3e7fd95424f827236bed9 |
python/cpython | python__cpython-133933 | # pdb: Pass debug commands directly via set_trace() instead of rcLines.extend()
# Feature or enhancement
### Proposal:
Currently, when attaching a remote PDB session in _connect(), debug commands are passed indirectly by extending the rcLines list before calling set_trace():
```python
remote_pdb.rcLines.extend(comma... | ae74e3f8636382efdac441c1bc6e69aa66694927 | 86c1d439e0ccbe6baeda69322f1f8c0e6a80464c |
python/cpython | python__cpython-133929 | # `typing._UnionGenericAlias` is unhashable in 3.14
# Bug report
### Bug description:
`typing._UnionGenericAlias)` became unshable somewhere between 3.13 and 3.14.0b1 (most likely in gh-105511)
```py
import typing
hash(typing._UnionGenericAlias)
```
```python-traceback
Traceback (most recent call last):
File "<py... | 8d478c79539ed0ec7071766b7a0afe62fb11f7d4 | 27ed64575d34f04029ba1d353810f3db4f4f045b |
python/cpython | python__cpython-134725 | # Regression in 3.14: setting __dict__ on custom type broken (mypyc, pybind11)
# Bug report
### Bug description:
The work in #115776 by @markshannon broke mypyc and pybind11's tests related to pickling and setting `__dict__` on custom types. Specially, #117750 introduced the regression for pybind11, I tested all the... | 9fbd66a93d526c49fac8e1427c25e8f7f4154e29 | f6324bc7eedc615c3c961fe368a8c56697d42936 |
python/cpython | python__cpython-133907 | # Invalid error type in math.factorial sphinx docs/docstring
Documentation says: Raises [ValueError](https://docs.python.org/3.15/library/exceptions.html#ValueError) if n is not integral or is negative.
Docstring: Raise a ValueError if x is negative or non-integral.
State of art:
```pycon
>>> math.factorial(1.0)
Trac... | 27ed64575d34f04029ba1d353810f3db4f4f045b | c2989b7070b18c0b7c51521fed8bc11c159ea5b8 |
python/cpython | python__cpython-133894 | # asyncio.graph.format_call_graph() should use io.Writer instead of typing.TextIO
# Feature or enhancement
### Proposal:
The `file` argument to `format_call_graph()` gets forwarded to `print(file)`, which is annotated as `_typeshed.SupportsWrite[str]` in typeshed. `SupportsWrite` is typeshed's legacy variant of `io.... | 1d3eacedb8cc51256a5350c6d421fb85e2b21f18 | 13cb8ca3da75d6fe2a1114e58c24ca681fee411f |
python/cpython | python__cpython-133892 | # Missing error handling in `SET_COUNT` macro in `_testinternalcapi.c`
# Bug report
Refs https://github.com/python/cpython/pull/133265
Right here `PyLong_FromLong` can in theory (unlikely in practice) return `NULL`. It is missing this check. I understand that this is a test code, but I also don't see a reason why we... | cebae977a63f32c3c03d14c040df3cea55b8f585 | 3704171415c1ea6ebbeb2f992758b6565f42e378 |
python/cpython | python__cpython-134147 | # TarFile filters fail in non-UTF-8 locales
# Bug report
`test_tarfile` files in non-UTF-8 locales. For example:
```
$ LC_ALL=uk_UA ./python -m test -vuall test_tarfile -m 'NoneInfoExtractTests_*' -m test_data_filter -m test_tar_filter
```
<details>
```
===============================================================... | 9983c7d4416cac8deb2fded1ec9c7daf786c3a02 | 5cbc8c632e860941602e8f7da9aab52fae40aca6 |
python/cpython | python__cpython-133887 | # sys.remote_exec() doesn't work with non-UTF-8 paths
# Bug report
There are two symptoms:
1. It does not work with non-ASCII names in non-UTF-8 locale. All related `test_sys` tests are failed on in non-UTF-8 locale. For example:
```
$ LC_ALL=uk_UA ./python -m test -vuall test_sys -m test_remote_exec
======... | c09cec5d69f2ef6ab5e64c7e0579fbd9dcb2ca45 | 8cf4947b0f2d37f7ffeca136ac4f99cb4cb70e5c |
python/cpython | python__cpython-133943 | # `test_zstd` failed on ubuntu with free-threading
# Crash report
Link: https://github.com/python/cpython/actions/runs/14954410814/job/42008158034?pr=133876
```
0:00:11 load avg: 57.89 [ 12/491/1] test_zstd worker non-zero exit code (Exit code -11 (SIGSEGV))
test_compress_empty (test.test_zstd.CompressorTestCase.tes... | e8665d4d46921623745ca5d2b32dc576339ea53f | ae74e3f8636382efdac441c1bc6e69aa66694927 |
python/cpython | python__cpython-133910 | # introduce `list.sort()` but no details before
# Documentation
A example of [lambda expressions](https://docs.python.org/3.15/tutorial/controlflow.html#lambda-expressions) introduces `list.sort()`, but there aren't details of `list.sort()` before.
```python
>>> pairs = [(1, 'one'), (2, 'two'), (3, 'three'), (4, 'fo... | c1c9ad1d5a62a591eb2f0f0d29f3fa02e0949f14 | faac627e47f72797f5b7a65134bf4cdce6575ee9 |
python/cpython | python__cpython-133876 | # Remove deprecated `is_reserved` from `pathlib`
# Feature or enhancement
It was deprecated in 3.13:
```rst
* :mod:`pathlib`:
* Deprecate :meth:`.PurePath.is_reserved`,
to be removed in Python 3.15.
Use :func:`os.path.isreserved` to detect reserved paths on Windows.
(Contributed by Barney Gale in :gh:... | 67036f1ee1c23257d320a80c152090235b8ca892 | 7ae4749d064bd49b0dd96172fee20c1f1678d9e9 |
python/cpython | python__cpython-133874 | # Remove deprecated mark interface for `wave.Wave_{read,write}` classes
# Feature or enhancement
The methods `getmark`, `setmark` and `getmarkers` were deprecated in https://github.com/python/cpython/issues/105096 and are slated for removal in Python 3.15.
<!-- gh-linked-prs -->
### Linked PRs
* gh-133874
<!-- /gh-l... | 3f61ea3add0d432345a58f4be2229074f9f191c2 | 319acf3d6cb05f5429422fda5c15bbd64fe9bd28 |
python/cpython | python__cpython-133863 | # Remove deprecated implicit empty sequence argument for `typing.TypedDict`
# Feature or enhancement
### Proposal:
It was deprecated in 3.13 but there was no removal notice in the docs: see #105570 and https://github.com/python/cpython/pull/105780. I don't know whether it's better to delay it a bit more just to have... | 87312119dab72f23cf337bcd9c30889513f050ee | add828951e34988d2a75743a98ee0711b8dcfabf |
python/cpython | python__cpython-133822 | # Remove undocumented deprecated keyword argument syntax for `typing.NamedTuple`
# Feature or enhancement
### Proposal:
Do not use ``Point = NamedTuple("Point", x=int, y=int)``, but use the class or functional syntax instead.
### Has this already been discussed elsewhere?
This is a minor feature, which does not ne... | c5e1775825236d94e0537e79e05187390b05dc55 | 92337f666e8a076a68305a8d6dc8bc9c095000e9 |
python/cpython | python__cpython-133811 | # Remove `http.server.CGIHTTPRequestHandler` and `--cgi` flag support
# Feature or enhancement
### Proposal:
This class is insecure, barely used and as we said "*Anything* is better than CGI to interface a web server with a request handler".
### Has this already been discussed elsewhere?
This is a minor feature, w... | faac627e47f72797f5b7a65134bf4cdce6575ee9 | 2f1ecb3bc474a5895dce090cca7b8afe7b560040 |
python/cpython | python__cpython-133797 | # `__replace__` on manually created AST objects has too many required arguments
# Bug report
### Bug description:
This should work but doesn't:
```
>>> fd=ast.FunctionDef(name="hi", args=[])
>>> fd
FunctionDef(name='hi', args=[], body=[], decorator_list=[], returns=None, type_comment=None, type_params=[])
>>> fd.__... | 7dddb4e667b5eb76cbe11755051ec139b0f437a9 | 47f1722d8053fb4f79e68cba07cbf08fb58a511c |
python/cpython | python__cpython-133966 | # Python 3.14.0-beta.1 C-extension builds try to link against `python314t.lib` on non-threaded python
# Bug report
### Bug description:
I'm completely unsure where the issue stems from (it could be setuptools, https://github.com/actions/setup-python, an actual issue in the first beta, or due to one of pywin32's nume... | 986c3670285670558b6e6f77ff1507dfcc2c99fa | d55e11b8049e3abf3cc187b4958224b225a39897 |
python/cpython | python__cpython-133794 | # assigning to __annotations__ has no effect in 3.14.0b1 under from __future__ import annotations
# Bug report
### Bug description:
```python
from __future__ import annotations
import annotationlib
class A:
a: int
A.__annotations__ = {"a": str}
print(A.__annotations__)
print(annotationlib.get_annotations(A))... | 4443110c3409ecba9f0fd49495d039030cb7ed58 | 91b48868a82821c1cbfd2245212699b57d3a24c7 |
python/cpython | python__cpython-129648 | # Use-after-free in `unicode_escape` decoder with error handler
# Crash report
### What happened?
When using `.decode("unicode_escape")` with an error handler there is a use-after-free segfault.
### CPython versions tested on:
CPython main branch
### Operating systems tested on:
_No response_
### Output from ru... | 9f69a58623bd01349a18ba0c7a9cb1dad6a51e8e | 734e15b70dc044f57df4049a22dd769dffdb7d18 |
python/cpython | python__cpython-133746 | # test_multiprocessing_spawn: test_interrupt() fails randomly
On a Free Threading build when tests are run in parallel (`-F -j14`) to stress the test:
```
vstinner@mona$ /opt/py314b1-ft/bin/python3.14td -m test test_multiprocessing_spawn.test_processes -W -m test_interrupt -F -j14
Using random seed: 1851856330
0:00:0... | c2989b7070b18c0b7c51521fed8bc11c159ea5b8 | d29ddbd90c5eb9eb83bb5bbbe9fd616514ccfc21 |
python/cpython | python__cpython-136987 | # test_sysconfig fails if executed from a relocated place
# Bug report
### Bug description:
The json and the sysconfig value differ in `srcdir`
```python
[2025-05-08T15:37:25.722Z] - 'srcdir': '/someplace/python/workspace/python_python3.14-debian_PR-1/distro/refroot/amd64/opt/bb/lib64/python3.14/config-3.14-x86_64... | aafbdb5df5439adc1106ced068cf87683ae68b9e | 4d02f31cdd45d81b95540d9076222b709d4f2335 |
python/cpython | python__cpython-134468 | # test_alt_digits_nl_langinfo fails for locale uk_UA
# Bug report
### Bug description:
```python
test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) ...
test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) (locale='sr_YU') ... skipped "no loc... | 899c7dc283cb899fdfd79fb479b38352f48e454a | 8c5e5557c64a8d6310b2a958f576d5eb245cb1b6 |
python/cpython | python__cpython-133725 | # Add a `color: bool` arg to `difflib.unified_diff`
# Feature or enhancement
### Proposal:
What are people's thoughts on adding a `color: bool` arg to `difflib.unified_diff` so that it injects ANSI terminal codes to color things in the way that `git diff` would?
New API:
```python
difflib.unified_diff(a, b, fromfi... | 34d7351ac770ac49875fc39396b2a97828ba05ad | 64ee1babfb971ddbc00fd8711cccebfbddf6e4ee |
python/cpython | python__cpython-133714 | # Compare the `f->stackpointer` to the result of `_PyFrame_Stackbase(f)`
I think we should compare `f->stackpointer` to the result of the `_PyFrame_Stackbase(f)` in the `_PyFrame_StackPeek` and in the `_PyFrame_StackPop` rather than repeat the offset calculation in both of them.
https://github.com/python/cpython/blob... | 832058274dd99e30321a5f9a3773038cd0424c11 | 50b53706646cc130dcc71496f4a5bee14e9a1d9a |
python/cpython | python__cpython-133809 | # `calculate_log2_keysize` in `dictobject.c` incorrect
# Bug report
### Bug description:
Originally reported by @ThomasBr0 in https://github.com/python/cpython/issues/132762
The `_Py_bit_length()` and `_BitScanReverse64()` code paths are incorrect and don't always return the smallest log2 key size to fit the desire... | 92337f666e8a076a68305a8d6dc8bc9c095000e9 | 878e0fb8b43de62449b6d7974fb503498e1c0cf7 |
python/cpython | python__cpython-133772 | # multi-level hierarchies of TypedDict no longer return superclass elements in __annotations__ as of 3.14.0b1 when future annotations enabled
# Bug report
### Bug description:
using `get_annotations()` or accessing `__annotations__` directly on a `TypedDict` subclass previously returned a dictionary of all attribute... | 9836503b48e047db117b3bef3a812c40ed3e988a | 5d118d0a922334e47db5159089d74dda21329b74 |
python/cpython | python__cpython-133795 | # surprising new behavior in inspect/annotationlib get_annotations as of 3.14.0b1, not in 3.14.0a7. intended change?
# Bug report
### Bug description:
3.14.0b1 seems to be interpreting the annotations of a metaclass into a new format that is also interfering with the correct annotations of subclasses of that class... | 3e562b394252ff75d9809b7940020a775e4df68b | 4443110c3409ecba9f0fd49495d039030cb7ed58 |
python/cpython | python__cpython-133702 | # test.test_annotationlib.TestStringFormat.test_displays shouldn't rely on set's order of elements
# Bug report
### Bug description:
We've hit a failure during Python's 3.14.0b1 build - test apparently checks for an exact order of elements in a set which will sometimes fail:
```pytb
FAIL: test_displays (test.test_a... | a2a0fa91c483964a280b7b788418217b3d6d1411 | 3ed8d6fdd1145c48ec7c3e668636cc301de8959e |
python/cpython | python__cpython-133642 | # concurrent.futures is missing link to InterpreterPoolExecutor sources
# Documentation
https://docs.python.org/3.14/library/concurrent.futures.html only links `process.py` and `thread.py`, but not `interpreter.py`.
<!-- gh-linked-prs -->
### Linked PRs
* gh-133642
* gh-133643
<!-- /gh-linked-prs -->
| 4fcd37756382206e5a4a387cec9266815adca007 | 8679c8d5ccf657835a88de5095d4fc6e2eb47633 |
python/cpython | python__cpython-133640 | # `TestPyReplAutoindent.test_auto_indent_default()` misses `self.assertEqual()`
# Bug report
### Bug description:
The [test_auto_indent_default()](https://github.com/python/cpython/blob/main/Lib/test/test_pyrepl/test_pyrepl.py#L441-L453) forgets to run the `input_code`.
### CPython versions tested on:
3.14, 3.15
... | 4617d68d73409e83d6ab31106d10421d44048787 | afed5f88359c73f798ff6f0064e37ac1a1f0759b |
python/cpython | python__cpython-133693 | # Python 3.14.0b1 full installer does not install `pip.exe`
# Bug report
### Bug description:
Using the `python-3.14.0b1-amd64.exe` installer no longer creates `pip.exe` when using `include_pip=1` with `PrependPath=1`. Is this expected behavior? The `python-3.14.0a7-amd64.exe` installer worked fine. I thought it cou... | 6ce469dcba482772bc94c4048e90fa9598897c4a | 9546eeea90c8deb8570a0ef621f075c3c766bc12 |
python/cpython | python__cpython-133624 | # Add ssl.HAS_PSK_TLS13 to detect libssl external TLS 1.3 PSK support
### Proposal:
Due to [security concerns](https://www.rfc-editor.org/rfc/rfc9258.html#section-1), neither AWS-LC [nor BoringSSL](https://issues.chromium.org/issues/369963041) support "External PSK" (as defined [here](https://www.rfc-editor.org/rfc/r... | 6801bd32cb9bd2bfa87b52d46fb453557d9568ed | f77dac66e1867cfdf6f7549822dd64416f6063bc |
python/cpython | python__cpython-133612 | # Remove deprecated `PyUnicode_AsDecoded/Encoded` functions
Implementation will be kept as planned.
Scheduled for removal in https://github.com/python/cpython/issues/132798.
PR soon
<!-- gh-linked-prs -->
### Linked PRs
* gh-133612
<!-- /gh-linked-prs -->
| 4fd10952800413ce615bba067cf5dfb7899a42c8 | f34ec09ba51070b0693d7ced8e57e77d71beb48d |
python/cpython | python__cpython-133888 | # Remove deprecated `platform.java_ver`
Refs: #116349
PR from new contributors is very welcome!
An example of PR with removal of deprecated feature: #133602
<!-- gh-linked-prs -->
### Linked PRs
* gh-133888
<!-- /gh-linked-prs -->
| 7a4a6cf2b8d48b302c734a5cee59f42973c8fd36 | 62f66caa8c963bdf45d1e22456aea985e74fa2d5 |
python/cpython | python__cpython-133598 | # Possible memory leak on error path in _sys_getwindowsversion_from_kernel32
# Bug report
### Bug description:
If `GetFileVersionInfoW` or `VerQueryValueW` fails inside `_sys_getwindowsversion_from_kernel32` then allocated `verblock` not freed.
### CPython versions tested on:
CPython main branch
### Operating sys... | 0ec8fc83a83914d2ae97e52529e98ce63aaf831c | 45bb5ba61a8d6dcaa44312b67fe6bade5e2ad992 |
python/cpython | python__cpython-133605 | # Finish deprecation period for some sqlite3.Connection APIs
This is a continuation of #108278.
Passing some arguments by keyword or as positional was deprecated in 3.13. It is time to finish the deprecation period.
<!-- gh-linked-prs -->
### Linked PRs
* gh-133605
<!-- /gh-linked-prs -->
| dcf93c4c93b741e84fa75d2b0d00a156aaf07ecf | 2561e148ec985755baa3984b91fd0bfc089b283c |
python/cpython | python__cpython-133681 | # Initialize the `linenumber_borrow` field of the `TableEntry` struct
I think we should add the missing initialization of the `TableEntry.linenumber_borrow` field to the `make_table_entry` function.
https://github.com/python/cpython/blob/5ea24116b001a6a407ece203c2d3061ce6ffba18/Python/stackrefs.c#L22
<!-- gh-linked-p... | c838e21fda21bb3ff91f586374e0da776c1c567b | f91127ae1a8bb233aa23b449e87da6df763f85b2 |
python/cpython | python__cpython-133584 | # Add converters for standard fixed size unsigned integers in Argument Clinic
Several modules use converters to unsigned integers of fixed size: uint16_t, uint32_t, uint64_t. We could add support for these types in Argument Clinic and add the private C API for reuse the code.
A larger part of the work was already don... | 4c914e7a36033d5e8d52cdef3a4063eb9b012ed2 | 3224b99872d8ed030181e5d009ea64e8672a68ee |
python/cpython | python__cpython-133635 | # t-strings: AST unparsing does not reproduce original formatting
# Bug report
### Bug description:
The AST unparsing of `Interpolation` objects does not reproduce formatting within interpolations.
This is true both for `ast.unparse` in Python:
```
>>> ast.unparse(ast.parse('t"{a + b}"'))
"t'{a + b}'"
```
And f... | bfac7d2edc6e461e21b4762f8db03fca85f3a0be | a2c4467d06028e3dbf79edd1d6c0cc2e7f11be85 |
python/cpython | python__cpython-133574 | # `sys.getwindowsversion` can fail without setting an exception on some WinAPI partitions
# Bug report
### Bug description:
`_sys_getwindowsversion_from_kernel32` doesn't set an exception when it's called for WinAPI partitions that don't support the call. This leads to `sys.getwindowsversion` failing without setting... | 5d118d0a922334e47db5159089d74dda21329b74 | b44c824856a351472a9627da066bfbde9d8ae64e |
python/cpython | python__cpython-134327 | # Exact reporting of `curses` C function failures
When calling some curses C functions, we ignore their return values. Those are:
- in `PyCursesWindow_dealloc`, we ignore `delwin()` errors
- in `_curses_initscr_impl`, we ignore `wrefresh()` errors
- in `_curses_window_addstr_impl`, we ignore `wattrset()` errors and p... | 30dde1eeb3fa1e0e7417f9cdded8fd90766f2559 | 604f83550bc4fd5507019969247c12a6a6454ded |
python/cpython | python__cpython-133578 | # `logging.basicConfig` should support parameter `formatter_class` (currently instantiates hardcoded `logging.Formatter`)
Hi! :wave:
Currently `logging.basicConfig` instantiates `logging.Formatter` as a formatter:
https://github.com/python/cpython/blob/3dfed230928de0f649061782a36691066a0ef058/Lib/logging/__init__.py... | 2eb49d278e081b0cde057c1ffc2e8cd24ae39225 | 9ad0c7b0f14c5fcda6bfae6692c88abb95502d38 |
python/cpython | python__cpython-133576 | # Eliminate legacy checks in `curses.__init__`
# Feature or enhancement
### Proposal:
Some checks in `curses.__init__` are now obsolete, essentially because of how the C functions are now implemented. For instance, `start_color()` checks for whether `_curses.COLORS` exists, but it will always exist if the call to `_... | a054af6edd8b21c931afa05f51c856dbabd7a40c | d9b0b07098ec4bdb47151948c77bcbbf3e796a5d |
python/cpython | python__cpython-133573 | # invalid memory error reporting for windows is unsupported on some WinAPI partitions
# Bug report
### Bug description:
The error reporting for invalid memory access (`HANDLE_INVALID_MEM` and `HANDLE_INVALID_MEM_METHOD`) is using `NTSTATUS` and `LsaNtStatusToWinError` which aren't available in all WinAPI partitions.... | 43410953c26153b48554218cbe35ba5f1167b08e | 54a6875adbc9091909b1473c49595c0cc84dc438 |
python/cpython | python__cpython-133569 | # rpc runtime library isn't available in all WinAPI partitions
# Bug report
### Bug description:
On Windows we always set `HAVE_AF_HYPERV`. However the rpc runtime library isn't available in all WinAPI partitions. This leads to a compilation failure.
### CPython versions tested on:
3.13
### Operating systems test... | e7ad59bd73078c2f4cdcfddadacb51c43338fe93 | e528aef7e2952a11119cf95c9198ad183dc7af7f |
python/cpython | python__cpython-133566 | # `test_pdb` times out on FreeBSD
# Bug report
`test.test_pdb.PdbTestReadline.test_multiline_indent_completion` times out, e.g. [here](https://buildbot.python.org/#/builders/1223/builds/6144).
@gaogaotiantian said:
> the test needs to backspace a few times to simulate dedent and `\x08` is not picked up in FreeBSD. I... | 79b8a32fcb30b2c6549bacecdc7081ebd50d6e17 | 14291faa52dfb97179ce747ec9ef91d97f5ab2ab |
python/cpython | python__cpython-133557 | # "python3 -m pegen python" got broken after v3.14.0a7
# Bug report
### Bug description:
I am currently experimenting with the cpython parser/tokenizer (I want to propose a new feature at some point, but I want to come up with an implementation as well).
Following the [parser documentation](https://github.com/python... | b48599b8017f896c965e89c402bb70feef49808a | 90f476e0f8dbb3a8603f67200c2422fb098c166c |
python/cpython | python__cpython-133553 | # t-strings in the annotation STRING format
# Bug report
### Bug description:
Currently t-strings are not recovered correctly in the STRING format in annotations:
```
>>> def f(x: t"a{int}"): pass
...
>>> import annotationlib
>>> annotationlib.get_annotations(f, format=annotationlib.Format.STRING)
{'x': "Template(... | 90f476e0f8dbb3a8603f67200c2422fb098c166c | 2cc6de77bdf05e6550939856aafb9faf93795a6d |
python/cpython | python__cpython-133606 | # IndentationError in new repl
# Bug report
### Bug description:
Python version: Python 3.14.0a7+ (heads/main-dirty:8d0e07eb899.
To reproduce type the following class definition in the REPL:
```
class C:
def
m
```
Then set the cursor to the space before ``m`` and press backspace to correct the incorrect n... | b2fabce6abb24b2f2c3afae0edc5eb53729fc624 | 6ce469dcba482772bc94c4048e90fa9598897c4a |
python/cpython | python__cpython-133538 | # nt._supports_virtual_terminal missing guard for console io
# Bug report
### Bug description:
`nt._supports_virtual_terminal` uses windows console io calls even when they aren't available in the windows app partition. This leads to compilation failures
### CPython versions tested on:
3.13
### Operating systems t... | 1460ccefd07f0d6d0e97409295796a5d5730a26e | 427f8c366dcc1d9148b567c8b2cc74891abb3e98 |
python/cpython | python__cpython-133533 | # Unit test test_incremental_gc_handles_fast_cycle_creation sometimes fails
# Bug report
### Bug description:
On a debug build on Linux AMD64, this fails for me:
```pytb
./python -m test -uall test___all__ test_atexit test_audit test_ast test_argparse test_gc
[...]
test test_gc failed -- Traceback (most recent call ... | 8598e57942f26ca1feecc0aefb421935e4e9f2aa | 751db4e64993b5af98aa1c12cc9d7c7c5882961b |
python/cpython | python__cpython-133520 | # `console` resource is missing in libregrtest
We introduced the use of the `console` resource in tests in [https://github.com/python/cpython/pull/114565](https://github.com/python/cpython/pull/114565). However, `console` is not defined in `libregrtest`, so we can't enable it with `-u console`, and `-u all` still skip... | 4274b471562badc1462f520968d8e1e58ba9fe93 | 67086282fcc1fc944be2e723cfc05de16109793a |
python/cpython | python__cpython-133518 | # GetLogicalDriveStringsW is only available on windows desktop
# Bug report
### Bug description:
`os.listdrives` is currently available on any windows platform. However the underlying `GetLogicalDriveStringsW` is only available on windows desktop. This leads to a compilation failure on platforms like the xbox.
### ... | 427f8c366dcc1d9148b567c8b2cc74891abb3e98 | 1a137bc320104bff2f392e4d8b3045c81ddb7ff2 |
python/cpython | python__cpython-133523 | # Failed assertion in `codegen_nameop`
# Crash report
### What happened?
```
>>> compile(source=b'Fal\xc5\xbfe', filename="<test>", mode="exec")
python: Python/codegen.c:3189: int codegen_nameop(compiler *, location, identifier, expr_context_ty): Assertion `!_PyUnicode_EqualToASCIIString(name, "None") && !_PyUnicode... | d9b0b07098ec4bdb47151948c77bcbbf3e796a5d | 942673ed194813015d98819cfae7eba78ba5e1f9 |
python/cpython | python__cpython-134081 | # asyncio dev docs claim that asyncio debug mode checks for unawaited coroutines
# Documentation
asyncio-dev docs claim:
> asyncio checks for [coroutines that were not awaited](https://docs.python.org/3/library/asyncio-dev.html#asyncio-coroutine-not-scheduled) and logs them; this mitigates the “forgotten await” pitf... | d94b1e9cac82143048031530e6c51e59f597bccd | 7a4a6cf2b8d48b302c734a5cee59f42973c8fd36 |
python/cpython | python__cpython-134756 | # compileall: `-s` surprisingly makes path relative
# Documentation
(Filing as a documentation issue, since I suspect the behavior is intentional and has its valid use cases.)
In Gentoo, we install packages into a temporary directory whose contents resemble the actual filesystem prefix. For some packages that don't ... | fe6f8a3619242b287a793a5b5d8645f402482c71 | 965c48056633d3f4b41520c8cd07f0275f00fb4c |
python/cpython | python__cpython-133491 | # Remote PDB is never colorized
# Bug report
### Bug description:
When PDB is used in remote mode with `-p`, source code is never colorized, even though it's used interactively at a terminal.
### CPython versions tested on:
CPython main branch
### Operating systems tested on:
_No response_
<!-- gh-linked-prs --... | 982830ce564f1ed439c516533bbfeb03d655f6df | 57c9810ba4a157f9f608e5b36dcb8a3dfa1628a2 |
python/cpython | python__cpython-133957 | # Minor InterpreterPoolExecutor Issues
# Bug report
### Bug description:
* `__main__` handling isn't quite right
* non-pickleable-but-shareable objects fail
* common code with test.support.interpreters should be shared
This has gh-132775 as a prerequisite.
### CPython versions tested on:
CPython main branch
### ... | 725da50520c5cc3002f6f55bf67c56853507c604 | 15f2bac02c5e106f04a93ce73fd93cc305253405 |
python/cpython | python__cpython-133477 | # Assert with the `PyStackRef_IsTaggedInt` function
In the `_PyStackRef_AsPyObjectBorrow`, I think we should use the `PyStackRef_IsTaggedInt` rather than **asserting** the `ref.index` value directly from the function. However, the same thing applies to the `PyStackRef_UntagInt` function, which **asserts** the `i.bits`... | 6d5a8c2ec19f1c38b4558940d2444a7382bb0287 | c492ac72525ea5887082ee991b45cc237cd02a40 |
python/cpython | python__cpython-133471 | # Improve advanced install section of using/windows docs
# Documentation
Provide more actionable information on how to programmatically install the MSIX (e.g. the PowerShell cmdlets and native APIs).
<!-- gh-linked-prs -->
### Linked PRs
* gh-133471
<!-- /gh-linked-prs -->
| f9b22bb79d8a233380bc5eb3820bf846404a7258 | d270bb57923e1e319d7d701d7bcf97a31721e2be |
python/cpython | python__cpython-133456 | # Some tests consume too much memory
Several years ago, all tests, except bigmem tests could be ran sequentially with just 650 MB of memory. There were issues with some buldbots (e.g. AIX) which small RAM, because excess memory consumption not always caused a quick test failure, but could cause swapping and failing te... | 26839eae2079bd797491dfdcc00eaca1dbcbf77c | dcf93c4c93b741e84fa75d2b0d00a156aaf07ecf |
python/cpython | python__cpython-133461 | # Colorize sqlite3 CLI
# Feature or enhancement
### Proposal:
I will open a pr once https://github.com/python/cpython/pull/133393 is complete.
General idea is to follow repl color scheme:
`sqlite>`: repl magenta (i.e. `>>>`)
keywords: repl keyword blue (i.e. `def`)
`.quit`/`.help`: repl turquoise (i.e. `exit`)
res... | 30b1d8f11d5905888f696db14867eb733e7b824c | 116a9f9b3775c904c98e390d896200e1641498aa |
python/cpython | python__cpython-133440 | # sqlite3 CLI does not recognize dot commands with trailing spaces
# Bug report
### Bug description:
Dot commands with trailing spaces are mistaken for multi-line sqlite3 statements.
```
$ python -m sqlite3↵
sqlite> .version↵
3.49.1
sqlite> .version␣↵
... ↵
... ↵
```
### CPython versions tested on:
3.14
#... | ebd4881db2e8448b238d8ca2f6fcf331826132dd | 5044e85265dce38e8d649040e123f7f1af4d8312 |
python/cpython | python__cpython-133422 | # `test_external_inspection` fails on Ubuntu
# Bug report
### Bug description:
Example: https://github.com/python/cpython/actions/runs/14827808058/job/41623568354?pr=133365
```
0:12:02 load avg: 6.85 [487/491/3] test_external_inspection failed (3 failures) -- running (2): test.test_concurrent_futures.test_process_p... | c4cc5d58aee6a3be55a95efee6ec25d5774f7b5f | b64aa302d7bc09454ba8d5b19922ff6a4192dd96 |
python/cpython | python__cpython-133414 | # Fix an example in the explanation of mock autospeccing
# Documentation
The autospeccing section, in the reference for the unittest.mock module, includes an example with request.Request. The has_data method of Request is used, but it was removed in Python 3.4. A Pull Request is provided to use the header_items meth... | 86c1d439e0ccbe6baeda69322f1f8c0e6a80464c | 5dbd27db7d79af88fb3f9b47f8b80438a147d349 |
python/cpython | python__cpython-133708 | # `inst` defintion and its optional `stack_effect`
The DSL specification syntax definition of the `inst` shows that the `stack_effect` is optional,
**including its parentheses**:
```
definition:
"inst" "(" NAME ["," stack_effect] ")" "{" C-code "}"
...
stack_effect:
"(" [inputs] "--" [outputs] ")"
```
But if... | f77dac66e1867cfdf6f7549822dd64416f6063bc | 8054184f9f32c7ba561e6e23b358074824e4928d |
python/cpython | python__cpython-133382 | # Parameter's error messages say `argument` instead of `parameter`
# Bug report
### Bug description:
Setting the same name parameters gets the error message saying `duplicate argument` as shown below:
```python
def func(param, param):
pass
```
> SyntaxError: duplicate argument 'param' in function definition
S... | dbca27cfca7da44cb102c1e10508a08cebddd9d7 | f28cbc9fd3f37656ad55ef2488b65343b97fa902 |
python/cpython | python__cpython-133378 | # Improve `make regen-pegen` DX on merge conflicts
# Bug report
Right now if you have a merge conflict in `parser.c` - the easiest way is to delete this file, merge grammars and then run `make regen-pegen` to regen the parser. But, it does not work until you run `touch Parser/parser.c`, which is not really useful.
I... | 51d2459e4d70e9a6551d053b2492f9405a6d9f17 | 3f80165a26028e56f51f84dfe6663a31f8c169e2 |
python/cpython | python__cpython-133383 | # segfault when deleting an object after returning it
a slightly minimized segfault:
```python
import asyncio
async def asyncfn():
pass
def create_task(loop, coro, **kwargs):
task = asyncio.Task(coro, loop=loop, **kwargs)
try:
return task
finally:
# gh-128552: prevent a refcycle of
... | 78adb63ee198c94c6ce2a1634aa7ea1d47c011ad | 2bbcaedb75942389dacb51866948f40de5951c9c |
python/cpython | python__cpython-133369 | # Improve `ast` CLI with new options: `--feature-version`, `--optimize`, and `--show-empty`
# Feature or enhancement
Current options:
```
» ./python.exe -m ast --help
usage: python.exe -m ast [-h] [-m {exec,single,eval,func_type}] [--no-type-comments] [-a]
[-i INDENT]
... | 2b4e2b78303197dea9d3ffecfc0423fa09edf71f | 5c245ffce71b5a23e0022bb5d1eaf645fe96ddbb |
python/cpython | python__cpython-133364 | # cmd.Cmd fails tab completion for lines beginning with `! ` (bang space)
# Bug report
### Bug description:
As noted in https://github.com/python/cpython/issues/133351#issuecomment-2848895066 PDB allows commands that start with `!`, but Cmd fails to tab complete them if there's a space after the `!`, because it fall... | 1d9406e426d95eb088e4a474fccf294cc106b2b6 | 3b4333583fb98e7d85a4cc47948da540b54281bd |
python/cpython | python__cpython-133424 | # the order of dict isn't documented in an example
# Documentation
I am reading the documentation of [dictionary](https://docs.python.org/3.14/library/stdtypes.html#mapping-types-dict).
There is an example
```python
>>> a = dict(one=1, two=2, three=3)
>>> b = {'one': 1, 'two': 2, 'three': 3}
>>> c = dict(zip(['one', ... | 61ac88c06e0286cfc6465a47552d41b7dd7e083e | 79b8a32fcb30b2c6549bacecdc7081ebd50d6e17 |
python/cpython | python__cpython-133350 | # Auto-indent for pdb's multi-line mode
# Feature or enhancement
### Proposal:
PyREPL has a nice auto-indent when working on a multiline code. We can't fully utilize that on pdb yet, but we can do something similar.
Basically we can achieve this:
```python
(Pdb) def f():
... <auto-indent>
... <same-indent>
```... | 0eeaa0ef8bf60fd3b1448a615b6b1662d558990e | 4ac916ae33b962cb6b4f8849556403594b22a7f2 |
python/cpython | python__cpython-133347 | # Theming support for _colorize
As mentioned in #131507 and #130645, theming support is an important piece of the puzzle in introducing color to Python output in the terminal.
## Design goals
### Simplicity of use with type safety
It should be as easy to use theming as to operate with colors by hand.
### User confi... | f610bbdf74ea580b14353c6bfd08fd00bcbfa11e | 9cc77aaf9dce6ffa82786dc77f7f83387c857cad |
python/cpython | python__cpython-133444 | # Remove option "-J" from cmdline docs
# Documentation
File `Doc/using/cmdline.rst` mentions **Options you shouldn’t use**:
```rst
Options you shouldn't use
~~~~~~~~~~~~~~~~~~~~~~~~~
.. option:: -J
Reserved for use by Jython_.
.. _Jython: https://www.jython.org/
```
Option `-J` was added in Python 2.6. Since al... | 4c56563f7aaed8548b604b28d65ebdbcecde7a16 | c336f1c3126203fd6c38050df94e9fe8c0d7f2e2 |
python/cpython | python__cpython-133314 | # add \z as a synonym for \Z in Python REs for standardization
# Feature or enhancement
### Proposal:
Hello - I’m with the Austin Common Standards Revision Group - the joint technical working group established to develop and maintain the core open systems interfaces that are the POSIX™ 1003.1 (and former 1003.2) sta... | ac56f8cc8d36ed65228d7eaa245569f66ad16d2b | fe44fc4f4351bb4b457c01d94b4ae8b9eda501aa |
python/cpython | python__cpython-133328 | # test_pack_unpack_roundtrip_for_nans failing on RISC-V buildbot
# Bug report
### Bug description:
The `test_capi` module's `test_float` are failing on [RISC-V build bot](https://buildbot.python.org/all/?#/builders/1379/builds/2550/)
```python
======================================================================
F... | f16f06f336ed9e0a2f12a12b26f176cbe831d2b1 | 84a08f8629dffae355407cc3239c981a2b7a930a |
python/cpython | python__cpython-133302 | # argparse: make `suggest_on_error` a keyword-only parameter
# Feature or enhancement
### Proposal:
`argparse.ArgumentParser()` has a lot of parameters, `suggest_on_error` (added in 3.14) was its 15th.
https://docs.python.org/3.14/library/argparse.html#argparse.ArgumentParser
Many argparse CLIs I see already use k... | e6c518d2ebc6080710c8a1688d648bede28dad8d | f2379535fe2d2219b71653782d5e31defd9b5556 |
python/cpython | python__cpython-135899 | # Expose `_PyCriticalSection_BeginMutex` as a public API
# Feature or enhancement
### Proposal:
It would be helpful to expose `_PyCriticalSection_BeginMutex` as a public API.
There are times when one does not have really have a `PyObject`, but still might want to use a critical section. For example, we wanted to us... | 89c220b93c06059f623e2d232bd54f49be1be22d | f183996eb77fd2d5662c62667298c292c943ebf5 |
python/cpython | python__cpython-133292 | # ctypes pointer set_type doesn't cache when setting _type_
# Bug report
In #114314 (3.13) I introduced a regression: `set_type` misuses [`PyType_GetDict`](https://docs.python.org/3/c-api/type.html#c.PyType_GetDict) by modifying it.
```py
import ctypes
intptr = ctypes.POINTER(ctypes.c_int)
print(intptr._type_) # unc... | 2590774c9bb96ec75ca8a13b0c061fcc9db3eb65 | df8a02b1e1ad04cda98c69ca84f8777a6a9d4cbd |
python/cpython | python__cpython-133340 | # Incomplete pathlib Pattern Language ("seq" undefined)
# Documentation
The [pathlib Pattern Language documentation](https://docs.python.org/3/library/pathlib.html#pattern-language) (notably used by `glob()`) lists a "seq" syntax (`[seq]`), but `seq` remains undefined throughout the page.
It would arguably be very u... | ac8df4b5892d2e4bd99731e7d87223a35c238f81 | b5febf73b9b049822994b21b8f4ee9443aa2e777 |
python/cpython | python__cpython-133280 | # Use HAS_TARGET in the codegen_addop_j function
I think we should assert with `HAS_TARGET` in the definition of the `codegen_addop_j` function rather than using `OPCODE_HAS_JUMP` and `IS_BLOCK_PUSH_OPCODE` directly in the function itself.
<!-- gh-linked-prs -->
### Linked PRs
* gh-133280
<!-- /gh-linked-prs -->
| 20f8ed595d176d951a09eba045cd69ca62981b18 | 2590774c9bb96ec75ca8a13b0c061fcc9db3eb65 |
python/cpython | python__cpython-133320 | # Keep instruction definitions in `bytecodes.c` and `optimizer_bytecodes.c` in sync
# Feature or enhancement
### Proposal:
Context: https://github.com/python/cpython/pull/132940#discussion_r2060401587
> [...] In fact, it was always my intention to validate it, but if you check out the validation function in Tools/c... | 3f2f59a91dd895cf5cf7b58cf905fc5d5b87a644 | 5f3d3f2a6c8ddf7a6be340c3f4c696e2a5eb51f0 |
python/cpython | python__cpython-135337 | # Py_Main and Py_RunMain SystemExit documentation does not match actual behavior
A few months ago, #8023 added some details to the docs about how `Py_RunMain` determines its exit status. Specifically, it wrote that`Py_RunMain` exits the process on an unhandled `SystemExit`.
But this isn't the case, at least not when... | b706ff003c536c5bca24dfdd3a8917bffcfa3df1 | c87b5b2cb665b6bc413bc3a13cc2d70da14dfd66 |
python/cpython | python__cpython-133269 | # test_frame does crash randomly on Linux (x86-64, ppc64le, s390x)
# Crash report
Example: https://buildbot.python.org/#/builders/64/builds/9301
```
test_repr_deep (test.test_frame.FrameLocalsProxyMappingTests.test_repr_deep) ...
Fatal Python error: Segmentation fault
Current thread 0x00007f2ed21d5400 [python] (mo... | d10bd81b45b9fd066edc6f82675ed4305603c4f4 | e5e51bd7f72639be6548c806cc14ea53995bf1b3 |
python/cpython | python__cpython-134213 | # PyUnicode_InternFromString does not immortalize the string as the document claims
# Documentation
The document for `PyUnicode_InternFromString` currently claimed that
```
CPython implementation detail: Strings interned this way are made immortal.
```
However, testing with simple code like,
```c++
auto v =... | 4109a9c6b33faa0032ffc95d96cd0db482af3ce2 | cafbcd666a7488e9f72553708350b7091dc913fd |
python/cpython | python__cpython-133268 | # Make the python.sh script more discoverable
# Feature or enhancement
### Proposal:
(As discussed offline with @brettcannon)...
It might be helpful to display the path to the `python.sh` script after a successful run of `py Tools/wasm/wasi.py make-host`.
### Has this already been discussed elsewhere?
This is a ... | c14134020f44575635e11e4552cefcfd8cdbe22f | a4be3bc34f9d3671e42ef8a301dfbbc9bdac3421 |
python/cpython | python__cpython-133262 | # Trying to ./python -m test -R: test_index crashes with a failed assertion
# Bug report
### Bug description:
```
❯ ./configure --with-pydebug
❯ make
❯ ./python.exe -m test -R: test_index
Using random seed: 2250434908
0:00:00 load avg: 4.79 Run 1 test sequentially in a single process
0:00:00 load avg: 4.79 [1/1] tes... | a4be3bc34f9d3671e42ef8a301dfbbc9bdac3421 | d10bd81b45b9fd066edc6f82675ed4305603c4f4 |
python/cpython | python__cpython-133257 | # GCC 15 warnings: destination lacks 'nonstring' attribute
Building Python 3.14 (main branch) with GCC 15 (on Fedora 42) emits the following compiler warnings:
```
In file included from ./Include/internal/pycore_runtime_structs.h:68,
from ./Include/internal/pycore_runtime.h:11,
from ... | e26bafd107aa86a4bdd6051848640f36a56d0efb | ad2f0884b16e6af4087ba078d2255d4c81ae8e96 |
python/cpython | python__cpython-133305 | # Race in linecache under free-threading
# Bug report
### Bug description:
There is a time of check to time of use race under free-threading in linecache.py implementation:
https://github.com/python/cpython/blob/ed039b801d66736f22508c71b258b8ace0c15ef4/Lib/linecache.py#L128-L129
Here are two reproducers: one with l... | 8054184f9f32c7ba561e6e23b358074824e4928d | 6d5a8c2ec19f1c38b4558940d2444a7382bb0287 |
python/cpython | python__cpython-133233 | # Add JIT utilities in `sys._jit`
# Feature or enhancement
...as discussed in https://discuss.python.org/t/an-api-for-controlling-and-introspecting-the-jit/73356. This will include (for 3.14):
- `sys._jit.is_available() -> bool`: Return `True` if the current Python executable supports JIT compilation, and `False` ot... | b1aa515bd6b645202eda4ca07e85d92e19b1534d | f9b22bb79d8a233380bc5eb3820bf846404a7258 |
python/cpython | python__cpython-133215 | # PEP 750: Improve `TemplateIter` tests
# Bug report
Right now there are some test that ensure that `t` string can be iterated over.
But, we never test `TemplateIter` behavior in detail.
I propose to add several test that this type behaves how we expect it to.
<!-- gh-linked-prs -->
### Linked PRs
* gh-133215
<!-- ... | 0e21ed7c09c687d62d6bf054022e66bccd1fa2bc | 94b4fcd806e7b692955173d309ea3b70a193ad96 |
python/cpython | python__cpython-133212 | # PEP750: test that `Template` and `Interpolation` types are final
# Bug report
They should be final, because a lot of places use `_PyInterpolation_CheckExact` and `_PyTemplate_CheckExact`.
And they are final right now, we just need to test this. I have a PR ready.
@lysnikolaou sorry that I am finding this issues j... | f7264ddea0ceea7eaf26d7b4b6aa7a144649e214 | cc39b19f0fca8db0f881ecaf02f88d72d9f93776 |
python/cpython | python__cpython-133202 | # Improve error message for strings with conflicting prefixes
# Feature or enhancement
Right now it is:
```python
>>> ft'a'
File "<python-input-3>", line 1
ft'a'
^^^
SyntaxError: invalid syntax
```
I propose:
```python
>>> ft'a'
File "<python-input-3>", line 1
ft'a'
^^^
SyntaxError: can't u... | b451516aa69df357af829c6a9f773fb51862b5b8 | c78216e42c7548f148708fc08cfefbcda9b3ae01 |
python/cpython | python__cpython-133202 | # PEP 750 changes do no guard for usage with older versions like `ast.parse(t'', feature_version=(3, 13))`
# Bug report
Example:
```python
>>> code = 't""'
>>> import ast
>>> ast.parse(code, feature_version=(3, 8))
Module(body=[Expr(value=TemplateStr(values=[]))], type_ignores=[])
```
I would like to work on the fi... | b451516aa69df357af829c6a9f773fb51862b5b8 | c78216e42c7548f148708fc08cfefbcda9b3ae01 |
python/cpython | python__cpython-133195 | # PEP 758 changes do not have `CHECK_VERSION` guard for usage with `ast.parse(..., feature_version=(3, 13))`
# Bug report
Right now this test passes:
```python
def test_pep758_except_without_parens(self):
code = textwrap.dedent("""
try:
...
except ValueError, TypeE... | b1f893875bbbb37bdbc440886d464690999f6e3a | 44e4c479fbf2c28605bd39303b1ce484753f6177 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.