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-109307 | # broken URL in the "Using Python on Unix platforms" documentation page
# Documentation
there are two issues in the "Using Python on Unix platforms" documentation page: https://docs.python.org/3.13/using/unix.html
1. the link for Fedora users is broken. The correct URL is https://docs.fedoraproject.org/en-US/pa... | 0b38ce440bd76b3d25b6d042ee9613841fb4a947 | e218e5022eef369573808a4f8dda9aeeab663750 |
python/cpython | python__cpython-109533 | # Compiler warnings on string comparisons in _testcapi
```
./Modules/_testcapimodule.c:226:18: warning: result of comparison against a string literal is unspecified (use an explicit string comparison function instead) [-Wstring-compare]
assert(v != UNINITIALIZED_PTR);
^ ~~~~~~~~~~~~~~~~~
... | ed582a2ed980efba2d0da365ae37bff4a2b99873 | beb5ec5817b645562ebbdd59f25683a93061c32c |
python/cpython | python__cpython-109467 | # Add ipv6_mapped property to IPv4Address
# Feature or enhancement
### Proposal:
Proposing a `ipv6_mapped` property for IPv4Address. This is the other direction of the `ipv4_mapped` property that already exists in `IPv6Address`. This can be useful if you need an ipv6 representation for an ipv4 address.
### Has thi... | ba8aa1fd3735aa3dd13a36ad8f059a422d25ff37 | 24b5cbd3dce3fe37cdc787ccedd1e73a4f8cfc3c |
python/cpython | python__cpython-109462 | # Update logging library module lock to use context manager to acquire/release lock.
# Feature or enhancement
### Proposal:
Current implementation relies on both `_acquireLock()` and `_releaseLock()` being called, otherwise a lock may never be released:
```python
def _acquireLock():
"""
Acquire the module-... | 74723e11109a320e628898817ab449b3dad9ee96 | cc54bcf17b5b5f7681f52baf3acef75b995fa1fd |
python/cpython | python__cpython-109436 | # Add a page to the documentation listing stdlib modules with a command-line interface (CLI)
While reviewing PR #109152, I discover that the sqlite3 module has a command line interface. Maybe I knew and then I forgot.
Is there a a documentation page listing all modules with a command-line interface (CLI)? I don't kno... | 59f32a785fbce76a0fa02fe6d671813057714a0a | afa7b0d743d9b7172d58d1e4c28da8324b9be2eb |
python/cpython | python__cpython-109428 | # regrtest: "Cannot read process stdout: 'utf-8' codec can't decode byte 0xdd" error
On a buildbot, a job failed because a test worker stdout cannot be decoded from UTF-8:
> Cannot read process stdout: 'utf-8' codec can't decode byte 0xdd in position 2360: invalid continuation byte
In February, @gpshead reported... | 74c72a2fc73941394839bd912c4814398b461446 | 68a6f21f47e779ddd70e33cf04d170a63f077fcd |
python/cpython | python__cpython-109419 | # test_b2a_roundtrip failure in test_binascii.py
# Bug report
### Bug description:
Seen in GitHub CI:
```pytb
======================================================================
ERROR: test_b2a_roundtrip (test.test_binascii.BytearrayBinASCIITest.test_b2a_roundtrip)
--------------------------------------... | d7dc3d9455de93310ccde13ceafe84d426790a5c | 3b9d10b0316cdc2679ccad80563b7c7da3951388 |
python/cpython | python__cpython-109440 | # Add a note to the `venv` documentation that users should **not** put their code _inside_ the virtual environment
# Documentation
The `venv` docs don't explicitly call out that the virtual environment directory should be viewed as self-contained unit and not as a directory to place one's own code.
<!-- gh-linked-... | a6846d45ff3c836bc859c40e7684b57df991dc05 | 0b38ce440bd76b3d25b6d042ee9613841fb4a947 |
python/cpython | python__cpython-109437 | # frozen dataclass inheritance is not strictly checked in multiple inheritance
# Bug report
### Bug description:
```python
import dataclasses
@dataclasses.dataclass
class NotFrozen:
pass
@dataclasses.dataclass(frozen=True)
class Frozen:
pass
@dataclasses.dataclass(frozen=True)
class Child(NotFrozen, Froze... | b6000d287407cbccfbb1157dc1fc6128497badc7 | 7dd3c2b80064c39f1f0ebbc1f8486897b3148aa5 |
python/cpython | python__cpython-109452 | # Move Azure Pipelines CI to GitHub Actions
GitHub Actions is easier to use and maintain. For example, GitHub Actions is more popular and widely used, and so more familiar. It's easier to maintain a single system. Also core devs can restart failed GitHub Actions whereas they can't for Azure Pipelines. Both are owned b... | a75daed7e004ee9a53b160307c4c072656176a02 | add16f1a5e4013f97d33cc677dc008e8199f5b11 |
python/cpython | python__cpython-109403 | # Bug in `regrtest` when name in `SPLITTESTDIRS` also matches a module name in tests
# Bug report
During https://github.com/python/cpython/pull/109368 I tried to create `Lib/test/test_future/` directory. It did not go well:
```
» ./python.exe -m test test_future
Traceback (most recent call last):
File "/Users/sobo... | 9ccd2e6aee173615012f7b8262ec890cfb1a7eb4 | d7a27e527d7e669d2e45cff80ad725978226477c |
python/cpython | python__cpython-109875 | # test_threading: test_default_timeout() fails randomly ands logs "Warning -- Unraisable exception"
Example from issue #108987:
```
test_default_timeout (test.test_threading.BarrierTests.test_default_timeout)
Test the barrier's default timeout ... Warning -- Unraisable exception
Exception ignored in thread start... | e5186c3de4194de3ea8c80edb182d786f5e20944 | e9791ba35175171170ff09094ea46b91fc18c654 |
python/cpython | python__cpython-109423 | # test_socket.LinuxKernelCryptoAPI.test_hmac_sha1() fails on "AMD64 RHEL8 FIPS Only Blake2 Builtin Hash 3.x" buildbot
# Bug report
When FIPS is enabled in Linux, LinuxKernelCryptoAPI.test_hmac_sha1() fails with ``OSError: [Errno 22] Invalid argument``.
test.pythoninfo:
```
fips.linux_crypto_fips_enabled: 1
fips.op... | e091b9f20fa8e409003af79f3c468b8225e6dcd3 | d7dc3d9455de93310ccde13ceafe84d426790a5c |
python/cpython | python__cpython-109400 | # Azure Pipelines: `macOS CI Tests` and `Ubuntu CI Tests (coverage)` jobs are always skipped
I cannot find any CI runs where these two are completed / failed. They are always skipped.
Looks like Azure only stores build result for ~1 month or so, so I cannot trace it back further.
```
Started: Today at 09:12
Dura... | 1ece084be3684e06101aa1efa82d3ed98c99c432 | 82505dc351b2f7e37aa395218709b432d83292cd |
python/cpython | python__cpython-109391 | # add C utility for debugging symbol tables, under `#if 0`
In `flowgraph.c` we have some C functions for dumping instructions and basicblocks as text. These are under `#if 0` by default, so effectively comments, but they can be very useful to uncomment and use when debugging a tricky compiler issue.
I recently had ... | 32ffe58c1298b0082ff6fe96ad45c4efe49f4338 | d41d2e69f621ce25e7719f5057a6be6776bc6783 |
python/cpython | python__cpython-109376 | # pdb: calling registered alias without command raises KeyError
# Bug report
### Bug description:
pdb allows to register an alias without a command.
Calling that alias raises an unhandled exception.
```bash
$ /tmp/ cat bar.py
breakpoint()
$ /tmp/ python bar.py
--Return--
> /tmp/bar.py(1)<module>()->None
-> breakpo... | 68a6f21f47e779ddd70e33cf04d170a63f077fcd | e091b9f20fa8e409003af79f3c468b8225e6dcd3 |
python/cpython | python__cpython-109374 | # pystats should save all metadata necessary to perform comparison in pystats .json output
# Bug report
### Bug description:
The `Tools/scripts/summarize_stats.py` script currently has the ability to save stats to a `.json` file so that collected stats can later be compared to another set of collected stats. Unfort... | 19f5effc27bc47d76b2f484a1fcb4ccdd7dc9d67 | 3d881453d32101855cd083ef79641da5e437df3d |
python/cpython | python__cpython-109385 | # Crash in test_sys_setprofile if it follows test_sys_settrace
# Crash report
`test_reentrancy` in `test_sys_setprofile` crashes if it follows `test_sys_settrace` runned in the same process.
The fastest reproducer:
```
$ ./python -m test -v test_sys_settrace test_sys_setprofile -m test_sys_settrace -m test_reentranc... | 412f5e85d6b9f2e90c57c54539d06c7a025a472a | 23f9f6f46454455bc6015e83ae5b5e946dae7698 |
python/cpython | python__cpython-109846 | # Executors might ignore instrumentation.
# Bug report
Code handed to the optimizer may not include instrumentation. If instrumentation is added later, the executor does not see it.
We remove all `ENTER_EXECUTORS` when instrumenting, but that doesn't fix the problem of executors that are still running.
### Example
... | bf4bc36069ef1ed4be4be2ae70404f78bff056d9 | 7c149a76b2bf4c66bb7c8650ffb71acce12f5ea2 |
python/cpython | python__cpython-109358 | # test_monitoring fails when run multiple times: ValueError: tool 0 is already in use
The issue broke all Refleaks buildbots :-(
Example:
```
$ ./python -m test test_monitoring -R 3:3
0:00:00 load avg: 3.50 Run 1 test sequentially
0:00:00 load avg: 3.50 [1/1] test_monitoring
beginning 6 repetitions
123456
... | 388d91cd474de80355f5a8f6a26e8962813a3128 | b544c2b1355571a36fe0c212f92e9b163ceb16af |
python/cpython | python__cpython-109352 | # Crash on compilation of invalid AST involving walrus
Running this file:
```
import ast
m = ast.Module(
body=[
ast.Expr(
value=ast.ListComp(
elt=ast.NamedExpr(
target=ast.Constant(value=1),
value=ast.Constant(value=3),
... | 79101edb03b7381b514126c68acabfcbbba2f842 | d69805b38a1815e7aaadf49bdd019c7cca105ac6 |
python/cpython | python__cpython-109353 | # Captured output in unittest.mock documentation is outdated
Refer to
* [Doc/library/unittest.mock.rst](https://github.com/python/cpython/blob/5dcbbd8861e618488d95416dee8ea94577e3f4f0/Doc/library/unittest.mock.rst)
* [Doc/library/unittest.mock-examples.rst](https://github.com/python/cpython/blob/5dcbbd8861e618488d95... | 3d881453d32101855cd083ef79641da5e437df3d | 92ed7e4df1af84fb29e678d111e8561ffcd14581 |
python/cpython | python__cpython-109349 | # compiling an AST with an invalid TypeAlias causes a segmentation fault
# Bug report
### Bug description:
The code for the following AST is:
```python
type foo['x'] = Callable
```
compiling the AST for the given code results in a segmentation fault
```python
from ast import *
m = Module(
body=[
Typ... | 987b4bc0870e1e29a88275dc3fa39bf2c3dcc763 | 79101edb03b7381b514126c68acabfcbbba2f842 |
python/cpython | python__cpython-109335 | # pystats should compare opcode counts by name, not number
# Bug report
### Bug description:
When `Tools/scripts/summarize_stats.py` is used to compare two stats .json files, it compares opcode counts by the opcode number, not the opcode name. This is a problem when comparing between two commits where the opcode nu... | 5dcbbd8861e618488d95416dee8ea94577e3f4f0 | 90cf345ed42ae4d17d2a073718985eb3432a7c20 |
python/cpython | python__cpython-109913 | # Adds stats for the tier 2 optimizer
Currently we have no stats for anything regarding the tier 2 optimizer.
Without them we are making too many guesses about what we should be doing.
The performance numbers tell us that things aren't working as well as they should, although not too badly either.
However, perfor... | e561e9805854980a61967d07869b4ec4205b32c8 | f7860295b16a402621e209871c8eaeeea16f464e |
python/cpython | python__cpython-109320 | # Deprecate dis.HAVE_ARGUMENT
dis.HAVE_ARGUMENT is only correct for 'normal' opcodes (not specialised, instrumented or pseudo ops). We have the dis.hasarg alternative now, which is correct for all opcode types.
<!-- gh-linked-prs -->
### Linked PRs
* gh-109320
<!-- /gh-linked-prs -->
| b303d3ad3e80e1d9b3befe6650f61f38b72179a4 | 3cb9a8edca6e3fa0f0045b03a9a6444cf8f7affe |
python/cpython | python__cpython-109298 | # test_asyncio and test_compileall leak temporary files/directories
Using PR #109290 fix, I found that the two following tests leak temporary files/directories.
test_compileall:
```
$ ./python -m test -j1 test_compileall --fail-env-changed -m test.test_compileall.CompileallTestsWithSourceEpoch.test_ddir_empty_m... | 09ea4b8706165fd9474165090a0ba86509abd6c8 | 391f3e3ca904449a50b2dd5956684357fdce690b |
python/cpython | python__cpython-109293 | # 3.12 What's New should mention PEP 709 impact on symtable module results
# Documentation
PEP 709 changes the output of the `symtable` for comprehensions; there is no longer a per-comprehension child symbol table. This should be mentioned in the What's New for 709.
<!-- gh-linked-prs -->
### Linked PRs
* gh-109... | 2b1e2f1cd154e6df553eda7936715ea0622b4ecf | ceeb4173aee7b835f553a8286feaa48b98c16124 |
python/cpython | python__cpython-109294 | # Transform inst(X, ...) to op(X, ...) plus macro(X) = X in code generator
This should make it easier for all further passes in the code generator -- they can just look at macros, ignoring the singleton instructions. @markshannon tried this in https://github.com/python/cpython/pull/108997 but got stuck, I hope I can g... | a7a079798d1c3542ecbb041a868429d515639e35 | 47af18859385fd996bf7f8fa4b33600c59a6d626 |
python/cpython | python__cpython-109277 | # Enhance Python regrtest test runner (test.libregrtest)
In issue gh-109162, I refactored deeply libregrtest code to easy its maintenance. While refactoring libregrtest, I saw many things that I would like to enhance. So I create this meta ticket to track enhancements :-)
<!-- gh-linked-prs -->
### Linked PRs
* gh-10... | de5f8f7d13c0bbc723eaea83284dc78b37be54b4 | baa6dc8e388e71b2a00347143ecefb2ad3a8e53b |
python/cpython | python__cpython-109267 | # document of msvcrt.kbhit's return value is incorrect
`msvcrt.kbhit`'s [document](https://docs.python.org/3.11/library/msvcrt.html#msvcrt.kbhit) said:
> Return True if a keypress is waiting to be read.
But according to it's [clinic function signature](https://github.com/python/cpython/blob/60b8341d07649194a... | e121fca33bfb03a2d2bc33ba9d6bb5616d09b033 | 42ab2cbd7b5e76e919b70883ae683e789dbd913d |
python/cpython | python__cpython-109269 | # Changes to specialized instructions requires a magic number change.
Until #107971 only changes to the set of instructions present in the pyc file required a new version change.
Now, removing or adding *any* opcode requires a pyc file.
There are a few problems with this.
* pyc files have to be regenerated for ch... | 8b55adfa8ff05477b4be7def36db7b66c73f181d | 247ee1bf841524667f883ebba5e343101f609026 |
python/cpython | python__cpython-109238 | # test_site: test_underpth_basic() fails if the current directory is non-ASCII
Failure on GHA Windows x64 CI with PR #109229 which runs test_site in a non-ASCII working directory:
```
FAIL: test_underpth_basic (test.test_site._pthFileTests.test_underpth_basic)
-----------------------------------------------------... | cbb3a6f8ada3d133c3ab9f9465b65067fce5bb42 | d6892c2b9263b39ea1c7905667942914b6a24b2c |
python/cpython | python__cpython-109322 | # Enhance `sqlite3` connection context management documentation with `contextlib.closing`
This issue covers an opportunity to enhance the existing [`sqlite3` docs on context management](https://docs.python.org/3/library/sqlite3.html#sqlite3-connection-context-manager) by adding a mention of [`contextlib.closing`](http... | 4227bfa8b273207a2b882f7d69c8ac49c3d2b57d | 2d4865d775123e8889c7a79fc49b4bf627176c4b |
python/cpython | python__cpython-109233 | # test_pyexpat: test_exception() fails on Ubuntu and macOS jobs on GitHub Actions
```
FAIL: test_exception (test.test_pyexpat.HandlerExceptionTest.test_exception)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/runner/work/cpython/cpython-ro-s... | e55aab95786e0e9fb36a9a1122d2d0fb3d2403cd | cbb3a6f8ada3d133c3ab9f9465b65067fce5bb42 |
python/cpython | python__cpython-109377 | # SystemError for pep695 type parameter with the same name as the inner class
# Bug report
### Bug description:
The following script shows the SystemError:
```python
class name_1[name_4]:
class name_4[name_2](name_4):
name_4
```
output (Python 3.12.0rc2+):
```python
SystemError: compiler_lookup_arg(na... | de1428f8c234a8731ced99cbfe5cd6c5c719e31d | 49258efada0cb0fc58ccffc018ff310b8f7f4570 |
python/cpython | python__cpython-119620 | # Invalid "equivalents" of the complex type constructor in docs
The sphinx docs says:
```
class complex(real=0, imag=0)
[...]
Return a complex number with the value real + imag*1j or convert a string or number to a complex number.
[...]
```
The docstring (btw it doesn't mention a string as an argument):
```
>... | ef01e95ae3659015c2ebe4ecdc048aadcda89930 | deda85717b2557c6bad8b9a51719c60ac510818f |
python/cpython | python__cpython-109257 | # Reference count leak when there is an error in the BUILD_MAP opcode
# Bug report
### Bug description:
```c
inst(BUILD_MAP, (values[oparg*2] -- map)) {
map = _PyDict_FromItems(
values, 2,
values+1, 2,
oparg);
if ... | 247ee1bf841524667f883ebba5e343101f609026 | 1110c5bc828218086f6397ec05a9312fb73ea30a |
python/cpython | python__cpython-109285 | # Combine SAVE_IP and SAVE_CURRENT_IP into a new uop
See https://github.com/faster-cpython/ideas/issues/621#issuecomment-1712697869:
> Now, there's an *explicit* `SAVE_CURRENT_IP` in some macros (before every `_POP_FRAME` and `_PUSH_FRAME`). That's because it also acts as a flag for the code generator, which, combi... | fbaf77eb9bd1e6812ebf984d32b29b025cc037d6 | 1ee50e2a78f644d81d341a08562073ad169d8cc7 |
python/cpython | python__cpython-109210 | # Increase minimum supported Sphinx to 4.2
# Documentation
#108184 introduces a nice improvement to https://docs.python.org/dev/library/string.html by linking the tokens. However linking to other groups was only introduced in Sphinx 3.5 (https://github.com/sphinx-doc/sphinx/pull/8247).
Using the same survey as h... | 712cb173f8e1d02c625a40ae03bba57b0c1c032a | 9ccf0545efd5bc5af5aa51774030c471d49a972b |
python/cpython | python__cpython-109225 | # SystemError when printing symbol table entry
# Bug report
### Bug description:
Platform: Windows10
Tested version: 3.10, 3.11, 3.12rc2
```python
import symtable
script = "a=0"
symt = symtable.symtable(script, "test.py", "exec")
print(symt._table)
```
```
<symtable entry top(-1), line 0>OverflowError: Python in... | 429749969621b149c1a7c3c004bd44f52bec8f44 | 2dd6a86c4ee604b331ed739c2508b0d0114993c6 |
python/cpython | python__cpython-109289 | # LOAD_GLOBAL super reports wrong source positions
# Bug report
### Bug description:
LOAD_GLOBAL super includes the paranthesis of `super()` in the source positions.
script:
```python
import dis
source="""
class VerifierFailure:
def __init__(self):
super().__init__
"""
code=compile(source,"<file>","... | ceeb4173aee7b835f553a8286feaa48b98c16124 | fbaf77eb9bd1e6812ebf984d32b29b025cc037d6 |
python/cpython | python__cpython-110239 | # Build fails with recent libedit versions
# Bug report
### Bug description:
`readline_set_completion_display_matches_hook_impl` will use either `VFunction` (if `_RL_FUNCTION_TYPEDEF` is defined) or `rl_compdisp_func_t`. The former is deprecated but available in current readline, while the latter has historically no... | f4cb0d27cc08f490c42a22e646eb73cc7072d54a | 12cc6792d0ca1d0b72712d77c6efcb0aa0c7e7ba |
python/cpython | python__cpython-92555 | # What's New in Python 3.12 (copyediting)
# Documentation
This is a meta-issue to capture PRs for copyedits to What's New in Python 3.12.
<!-- gh-linked-prs -->
### Linked PRs
* gh-92555
* gh-92562
* gh-94762
* gh-105278
* gh-105282
* gh-105315
* gh-105321
* gh-106984
* gh-106986
* gh-107005
* gh-107... | 11a608d2b1b9c10079a1fe2ebf815a638c640c79 | d8104d13cd80737f5efe1cd94aeec5979f912cd0 |
python/cpython | python__cpython-109192 | # pathlib.Path.resolve() mishandles symlink loops
# Bug report
### Bug description:
Two closely-related issues in [`pathlib.Path.resolve()`](https://docs.python.org/3/library/pathlib.html#pathlib.Path.resolve):
First, `resolve(strict=True)` raises `RuntimeError` rather than `OSError` when a symlink loop is encounte... | ecd813f054e0dee890d484b8210e202175abd632 | 859618c8cd5de86a975e68d7e5d20c04bc5db2e5 |
python/cpython | python__cpython-109201 | # The docs of "traceback.format_exception_only" is incorrect when the Exception has notes
# Documentation
The documentation of [`traceback.format_exception_only`](https://docs.python.org/3.11/library/traceback.html#traceback.format_exception_only) states the following (emphasis mine):
> Format the exception pa... | 0e76cc359ba5d5e29d7c75355d7c1bc7e817eecf | e121fca33bfb03a2d2bc33ba9d6bb5616d09b033 |
python/cpython | python__cpython-111548 | # Exceptions slow in 3.11, depending on location
# Bug report
### Bug description:
(From [Discourse](https://discuss.python.org/t/why-does-unreached-code-take-linear-time/33295?u=pochmann))
Consider these two functions:
```python
def short():
try:
if 0 == 1:
unreached
r... | abb15420c11d9dda9c89f74eac8417240b321109 | ad6380bc340900e0977ce54928b0d3e166c7cf99 |
python/cpython | python__cpython-109197 | # Notes added to "SyntaxError" (and subclasses) are not displayed
# Bug report
### Bug description:
Hi.
I noticed that using [`add_note()`](https://docs.python.org/3/library/exceptions.html#BaseException.add_note) with an error of type `SyntaxError` (or its derived such as `IndentationError` and `TabError`) produce... | ecd21a629a2a30bcae89902f7cad5670e9441e2c | de5f8f7d13c0bbc723eaea83284dc78b37be54b4 |
python/cpython | python__cpython-119234 | # Replace _PyFrame_OpAlreadyRan by a check for incomplete frame
The ``_PyFrame_OpAlreadyRan`` function in frameobject.c is not covered by any tests.
For details see https://github.com/faster-cpython/ideas/issues/623.
<!-- gh-linked-prs -->
### Linked PRs
* gh-119234
<!-- /gh-linked-prs -->
| 77ff28bb6776d583e593937df554cbf572cb47b0 | f49df4f486e531ff2666eb22854117c564b3de3d |
python/cpython | python__cpython-109175 | # Add support of SimpleNamespace in copy.replace()
# Feature or enhancement
SimpleNamespace is used as a simple data record type, a simpler alternative to named tuples and dataclasses. Although it is easy to create a copy of a SimpleNamespace instance with modified attributes (`SimpleNamespace(**vars(ns), attr=newva... | 92578919a60ebe2b8d6d42377f1e27479c156d65 | 0eab2427b149cd46e0dee3efbb6b2cfca2a4f723 |
python/cpython | python__cpython-109165 | # Replace the old `getopt` with `argparse` in pdb CLI
# Feature or enhancement
### Proposal:
`pdb` is using `getopt` for argument parsing. `getopt` is pretty old and not well maintained. Some issue in #108791 could be avoided with the modern `argparse` module. We should replace `getopt` with `argparse` when it's eas... | 73ccfa28c5e6ff68de15fdbb1321d4773a688e61 | 3e8fcb7df74248530c4280915c77e69811f69c3f |
python/cpython | python__cpython-109163 | # Refactor test.libregrtest
I propose to refactor ``test.libregrtest`` to make it easier to maintain and to prepare adding type annotations.
The regrtest project has a long history. It was added in 1996 by commit 152494aea24669a3d74460fa460a4ed45696bc75. When it was created, it was 170 lines long and had 4 command ... | 5b7303e2653a0723a3e4c767d03dd02681206ca8 | bcb2ab5ef8c646565b09c860fb14e415d7b374bd |
python/cpython | python__cpython-109157 | # Remove INSTRUCTION event monitoring will remove LINE events as well
# Bug report
### Bug description:
The current de-instrumentation code for instructions incorrectly de-instruments line too. So if INSTRUCTION events are removed, event if the LINE events are still there, it won't trigger the event.
```python
impo... | d69805b38a1815e7aaadf49bdd019c7cca105ac6 | a0c06a4f933faccd7f8201701b2491d38464212c |
python/cpython | python__cpython-109152 | # Enable readline in the sqlite3 CLI
# Feature or enhancement
```
python -m code
```
runs a REPL which supports editing, moving with arrow keys, history, etc. But
```
python -m sqlite3
```
do not supports this.
The `sqlite3` module should do the same what the `code` module does.
<!-- gh-linked-prs -->
### Linked PR... | 254e30c487908a52a7545cea205aeaef5fbfeea4 | e9f2352b7b7503519790ee6f51c2e298cf390e75 |
python/cpython | python__cpython-109141 | # `test_binascii` has duplicated tests
# Bug report
```console
$ python -m pip install ruff
...
$ ruff --select F811 Lib/test/test_binascii.py
Lib/test/test_binascii.py:279:9: F811 Redefinition of unused `test_hex_roundtrip` from line 236
Found 1 error.
```
Source:
https://github.com/python/cpython/b... | aa51182320f3c391195eb7d5bd970867e63bd978 | f63d37877ad166041489a968233b57540f8456e8 |
python/cpython | python__cpython-109137 | # Tools/scripts/summarize_stats.py fails following #108754
# Bug report
### Bug description:
After building with `./configure --enable-pystats` and collecting some pystats with this script:
```python
import sys
sys._stats_on()
for i in range(50):
pass
sys._stats_off()
```
running the `Tools/scr... | 52beebc856fedf507ac0eb9e45c2e2c9fed1e5b8 | 6275c67ea68645e5b296a80ea63b90707a0be792 |
python/cpython | python__cpython-109126 | # Run mypy on `Tools/wasm`
# Feature or enhancement
Right now we already have 3 fully typed and checked tools:
- https://github.com/python/cpython/issues/104050
- https://github.com/python/cpython/issues/108455
- https://github.com/python/cpython/issues/104504
I think we can also add `Tools/wasm` quite easily to thi... | f65497fd252a4a4df960da04d68e8316b58624c0 | ed582a2ed980efba2d0da365ae37bff4a2b99873 |
python/cpython | python__cpython-117444 | # incorrect SyntaxError
# Bug report
### Bug description:
The following input will cause a `SyntaxError`. That's all well and good, but the message for the `SyntaxError` is incorrect.
```python
f(A,*)
```
```python
SyntaxError: iterable argument unpacking follows keyword argument unpacking
```
This is no... | c97d3af2391e62ef456ef2365d48ab9b8cdbe27b | 1d5479b236e9a66dd32a24eff6fb83e3242b999d |
python/cpython | python__cpython-109123 | # Annotation scopes containing nested scopes
# Bug report
### Bug description:
The following code causes a SystemError during compilation.
```python
class name_2[*name_5, name_3: int]:
(name_3 := name_4)
class name_4[name_5: name_5]((name_4 for name_5 in name_0 if name_3), name_2 if name_3 else name_0):
... | 17f994174de9211b2baaff217eeb1033343230fc | e9e2ca7a7b4b4320009cdf85c84ec5bd6c4923c3 |
python/cpython | python__cpython-109121 | # misleading SyntaxError (f-string and type alias related)
# Bug report
### Bug description:
The following code produces a misleading syntax error.
```python
lambda name_3=f'{name_4}': {name_3}
type {}[name_4] = {}
```
output (Python 3.12.0rc2+):
```python
File "/home/frank/projects/pysource-codegen/bug.py", l... | 5bda2f637e1cfbca45a83aa6e22db25498064b27 | 87a7faf6b68c8076e640a9a1347a255f132d8382 |
python/cpython | python__cpython-109113 | # `ssl.SSLObject` and `ssl.SSLSocket` should expose method to get certificate chain
# Feature or enhancement
### Proposal:
Being able to get a certificate chain is needed to perform OCSP revocation checks.
Starting from `py3.10` we can at least call C-level API directly, but I guess such a crucial functionality shou... | 5a740cd06ec1191767edcc6d3a7d5eca7873cb7b | ddf2e953c27d529b7e321c972ede2afce5dfb0b0 |
python/cpython | python__cpython-109911 | # test_xxtestfuzz emits DeprecationWarning
test_xxtestfuzz emits deprecation warnings about modules sre_compile and sre_constants which always were internal. It should use public non-deprecated API.
```
$ ./python -Wa -m test -v test_xxtestfuzz
...
test_sample_input_smoke_test (test.test_xxtestfuzz.TestFuzzer.te... | a829356f86d597e4dfe92e236a6d711c8a464f16 | 9dbfe2dc8e7bba25e52f9470ae6969821a365297 |
python/cpython | python__cpython-109387 | # test_httpservers causes os.fork DeprecationWarning, can we deprecate CGIHTTPRequestHandler?
# Bug report
Every test class in test_httpservers starts a thread to run a server. CGIHTTPServerTestCase tests trigger htt.server.CGIHTTPRequestHandler.run_cgi() which executes a CGI script in a separate process. Using `os.f... | 59073c9ab8eb8db9304f16c46086ccc525e82570 | 19f5effc27bc47d76b2f484a1fcb4ccdd7dc9d67 |
python/cpython | python__cpython-109095 | # Replace frame->prev_instr by frame->instr_ptr
``frame->prev_instr`` has confusing semantics, we will replace it by a new field ``instr_ptr`` which is
(1) the instruction currently executing (if any), or
(2) the next instruction to execute on the frame (otherwise).
<!-- gh-linked-prs -->
### Linked PRs
* ... | 67a91f78e4395148afcc33e5cd6f3f0a9623e63a | 573eff3e2ec36b5ec77c3601592a652e524abe21 |
python/cpython | python__cpython-109142 | # test_asyncgen fails randomly on Windows
```
FAIL: test_async_gen_asyncio_gc_aclose_09 (test.test_asyncgen.AsyncGenAsyncioTest.test_async_gen_asyncio_gc_aclose_09)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\a\cpython\cpython\Lib\test\test_a... | ccd48623d4860e730a16f3f252d67bfea8c1e905 | 52beebc856fedf507ac0eb9e45c2e2c9fed1e5b8 |
python/cpython | python__cpython-109101 | # ARM Raspbian 3.x fails to build _testcapi extension: undefined symbol: __atomic_fetch_or_8
I supposed that the build error is related to ``Modules/_testcapi/pyatomic.c`` and ``Include/cpython/pyatomic.h``.
"Raspbian is a free operating system based on Debian optimized for the Raspberry Pi hardware."
Buildbot w... | 1f7e42131d2800f0fbb89bfd91fafa8a073e066d | 697c9dcf8fc746636c6187e4f110e0e6e865b710 |
python/cpython | python__cpython-109107 | # test_sys_settrace -R 3:3 does crash
```
$ ./python -m test test_sys_settrace -R 3:3 -m test_line_event_raises_before_opcode_event -m test_no_jump_backwards_into_for_block
0:00:00 load avg: 0.77 Run tests sequentially
0:00:00 load avg: 0.77 [1/1] test_sys_settrace
beginning 6 repetitions
123456
.Fatal Python e... | 057bc7249073066ed8087b548ee06f0eabfa9e7c | a56c92875699c2ba92ed49e72f6abbf363a5c537 |
python/cpython | python__cpython-109068 | # Tests: remove C API tests using @requires_legacy_unicode_capi()?
The ``@test.support.requires_legacy_unicode_capi()`` decorators uses ``from _testcapi import unicode_legacy_string``, but this module attribute has been remove since Python 3.12 by commit f9c9354a7a173eaca2aa19e667b5cf12167b7fed, and so all tests using... | b4131a13cb41d0f397776683c3b99500db9e2cfd | 17f994174de9211b2baaff217eeb1033343230fc |
python/cpython | python__cpython-109046 | # Limited API tests are now incorrectly skipped unconditionally
Commit 13a00078b81776b23b0b6add69b848382240d1f2 (#108663, cc @vstinner) made all Python builds compatible with the Limited API, and removed the `LIMITED_API_AVAILABLE` flag. However, some tests are still checking for that flag, so they are now being incor... | f42edf1e7be5018a8988a219a168e231cbaa25e5 | 3bfa24e29f286cbc1f42bdb4d2b1c0c9d643c8d6 |
python/cpython | python__cpython-109038 | # Branch prediction design for Tier 2 (uops) interpreter
I'm splitting this topic off gh-106529, notably see this comment: https://github.com/python/cpython/issues/106529#issuecomment-1625942167.
The design we've arrived at adds a "counter" to all branch (== conditional jump) instructions in Tier 1, i.e., to `POP_J... | bcce5e271815c0bdbe894964e853210d2c75949b | ecd21a629a2a30bcae89902f7cad5670e9441e2c |
python/cpython | python__cpython-109034 | # os.utime raises exceptions without a filename.
# Bug report
### Bug description:
The builtin os.utime option raises exceptions without a filename. E.g. on Linux:
```python
import os
try:
os.utime('/root', None)
except PermissionError as e:
print(e.filename) # None
```
The source actually provides a justi... | ddf2e953c27d529b7e321c972ede2afce5dfb0b0 | fd7e08a6f35581e1189b9bf12feb51f7167a86c5 |
python/cpython | python__cpython-109048 | # Instantiation of an empty Enum with any value no longer throws `ValueError`
# Bug report
### Bug description:
On Python < 3.12 instantiation of an empty `Enum` with any value resulted in `ValueError`, but on 3.12.0rc2 it returns `<enum 'bar'>` without errors. On 3.12.0rc1 it resulted in `TypeError: 'NoneType' obje... | c74e440168fab9bf91346471087a394af13fa2db | b9831e5c98de280870b6d932033b868ef56fa2fa |
python/cpython | python__cpython-109251 | # Use Kyiv instead of Kiev in test_email
# Bug report
### Bug description:
As proposed in #108533 the time zone was renamed but we can't simply rename it in the test cause it fails on old(?) MacOS systems. I would propose to prepend it with:
```python
@unittest.skipUnless(os.path.exists('/usr/share/zoneinfo/Europe... | 46407fe79ca78051cbf6c80e8b8e70a228f9fa50 | c7d68f907ad3e3aa17546df92a32bddb145a69bf |
python/cpython | python__cpython-109016 | # test_asyncio, test_imaplib and test_socket fail with FreeBSD TCP blackhole
test_asyncio, test_imaplib and test_socket fail with FreeBSD TCP blackhole. When a FreeBSD machine is configured with:
```
sudo sysctl net.inet.tcp.blackhole=2
sudo sysctl net.inet.udp.blackhole=1
```
That's the case by default in Fr... | a52a3509770f29f940cda9307704908949912276 | 60a9eea3f56c002356998f5532b3ad870a1ffa8e |
python/cpython | python__cpython-109003 | # Ensure only one wheel for each vendored package in `verify_ensurepip_wheels.py`
We've had two cases of old wheels not being removed while a new one is added. This lead to CI failures on the affected branches, which required a fix afterwards like gh-108998.
Let's fix it by making the tool complain if there's more ... | f8a047941f2e4a1848700c21d58a08c9ec6a9c68 | fbce43a251488f666be9794c908a6613bf8ae260 |
python/cpython | python__cpython-109004 | # Add tests for msvcrt module
# Bug report
### Bug description:
[msvcrt](https://docs.python.org/3/library/msvcrt.html) is a public module, but it has no tests.
<!-- gh-linked-prs -->
### Linked PRs
* gh-109004
* gh-109169
* gh-109226
<!-- /gh-linked-prs -->
| bcb2ab5ef8c646565b09c860fb14e415d7b374bd | 1f7e42131d2800f0fbb89bfd91fafa8a073e066d |
python/cpython | python__cpython-108992 | # _PyFrame_GetState is misnamed and does more than it needs to
_PyFrame_GetState is a static function so can be renamed to reflect that.
More importantly, it calculates a lot more than what it is actually used for (it is called in two places, each of which checks for one of the states: CLEARED or SUSPENDED). The re... | 39376cb93d40b8fe588be0c1987272b0f8c49e26 | 5f3433f210d25d366fcebfb40adf444c8f46cd59 |
python/cpython | python__cpython-109135 | # test_threading fails and crashes when rerun
# Crash report
First, `BarrierTests.test_default_timeout` in `test_threading` fails, producing also several unraisable exception messages. They are produced even during running few following tests.
https://github.com/python/cpython/actions/runs/6094370280/job/16535778004... | 517cd82ea7d01b344804413ef05610934a43a241 | c0f488b88f2a54d76256818e2841d868fecfd396 |
python/cpython | python__cpython-108984 | # `global x: int` is not tested
While reading https://peps.python.org/pep-0526/#where-annotations-aren-t-allowed I've noticed that not all corner-cases are covered: https://github.com/python/cpython/blob/6f8411cfd68134ccae01b0b4cb332578008a69e3/Lib/test/test_grammar.py#L347-L365
For example, explicit PEP's example:... | 1fb20d42c58924e2e941622b3539645c7b843e0e | 39376cb93d40b8fe588be0c1987272b0f8c49e26 |
python/cpython | python__cpython-109431 | # test_asyncio: test_subprocess_consistent_callbacks() fails randomly
The following test_asyncio test is unstable and fails randomly on buildbots. I saw failures on Linux and FreeBSD.
```
FAIL: test_subprocess_consistent_callbacks (test.test_asyncio.test_subprocess.SubprocessThreadedWatcherTests.test_subprocess_co... | ced6924630037f1e5b3d1dbef2b600152fb07fbb | 850cc8d0b1db0a912a6e458720e265e6a6e5c1ba |
python/cpython | python__cpython-109491 | # test_sys.test_intern() fails if run more than once in the same process
# Bug report
Example:
```
$ ./python -m test test_sys test_sys -m test_intern -v
(...)
0:00:00 load avg: 1.60 Run tests sequentially
0:00:00 load avg: 1.60 [1/2] test_sys
test_intern (test.test_sys.SysModuleTest.test_intern) ... ok
-----------... | 44b1e4ea4842c6cdc1bedba7aaeb93f236b3ec08 | f16e81f368d08891e28dc1f038c1826ea80d7801 |
python/cpython | python__cpython-108964 | # test_tempfile.test_flags() fails on FreeBSD: Operation not supported
On FreeBSD 13.2-RELEASE:
```
ERROR: test_flags (test.test_tempfile.TestTemporaryDirectory.test_flags)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/buildarea/3.x.w... | cd2ef21b076b494224985e266c5f5f8b37c66618 | b87263be9b82f778317c2bdf45ecd2ff23d0ba1b |
python/cpython | python__cpython-108929 | # test_unittest failure triggered by test_import + test_importlib
# Bug report
### Bug description:
test_unittest fails if (and only if) test_import and test_importlib are run (in the same process) before it:
```
./python -m test test_import test_importlib test_unittest
0:00:00 load avg: 3.83 Run tests sequentially... | 3f89b257639dd817a32079da2ae2c4436b8e82eb | deea7c82682848b2a0db971a4dcc3a32c73a9f8c |
python/cpython | python__cpython-109044 | # duplicate backslashes in str.split docstring
```console
$ pydoc3 str.split | grep -F '\\'
character (including \\n \\r \\t \\f and spaces) and will discard
```
These should be single backslashes.
<!-- gh-linked-prs -->
### Linked PRs
* gh-109044
* gh-109061
* gh-109062
<!-- /gh-linked-prs -->
| e7d5433f944a5725aa82595f9251abfc8a63d333 | fd5989bda119f8c0f8571aad88d8e9be3be678a4 |
python/cpython | python__cpython-108904 | # `asyncio`: do not create unneeded `lambda`s
# Bug report
There are multiple places in `asyncio` code and docs where this pattern is used: `lambda: some_call()`
While this pattern can be used in some rare cases, generally it is not a good thing to have for several reasons:
1. It creates an extra frame for no reason... | ad1d6a1c20c7bd3e880c9af7251e6f39ff0e62a9 | 1e0d62793a84001e92f1c80b511d3a212b435acc |
python/cpython | python__cpython-108870 | # C API: Rename _PyThreadState_GetUnchecked() to public PyThreadState_GetUnchecked
The _PyThreadState_UncheckedGet() function was added in Python 3.5 (2016) by issue #70342 with commit bfd316e750bc3040c08d1b5872e2de188e8c1e5f. I was asked by PyPy developers to have an API to get the current thread state, but don't cal... | d73501602f863a54c872ce103cd3fa119e38bac9 | 6ab6040054e5ca2d3eb7833dc8bf4eb0bbaa0aac |
python/cpython | python__cpython-108862 | # Markup missing in docs for `inspect.Signature.replace()`
# Documentation
The word "replace" in the docs for `inspect.Signature.replace()` is missing appropriate markup to make it not appear as just the word "replace":
https://github.com/python/cpython/blob/44fc378b598eb675a847d1b7c46c8f6e81313c04/Doc/library/i... | 6f8411cfd68134ccae01b0b4cb332578008a69e3 | cd2ef21b076b494224985e266c5f5f8b37c66618 |
python/cpython | python__cpython-108853 | # test_tomllib.test_inline_array_recursion_limit() failed on wasm32-wasi 3.11 buildbot
test_tomllib.test_inline_array_recursion_limit() failed on wasm32-wasi 3.11 buildbot:
```
ERROR: test_inline_array_recursion_limit (test.test_tomllib.test_misc.TestMiscellaneous.test_inline_array_recursion_limit)
--------------... | 8ff11425783806f8cb78e99f667546b1f7f3428e | 2cd170db40ffba357848672ff3d2f8c1e0e74f2c |
python/cpython | python__cpython-108841 | # Remove unused `TestEnumTypeSubclassing` in `test_enum`
# Bug report
Looks like this class was not ever used:
https://github.com/python/cpython/blob/f373c6b9483e12d7f6e03a631601149ed60ab883/Lib/test/test_enum.py#L4691-L4692
It was added as the part of https://github.com/python/cpython/commit/b775106d940e3d77c8af79... | b4c8cce9a7a9f3953eedffa277a3fe071731856d | 230649f5383ac28793c499ea334b16ff671c3d02 |
python/cpython | python__cpython-108839 | # regrtest should re-run failed tests in subprocesses
# Feature or enhancement
### Has this already been discussed elsewhere?
No response given
### Links to previous discussion of this feature:
_No response_
### Proposal:
Buildbots and GitHub Actions run the Python test suite with ``--verbose2`` option to re-run... | 31c2945f143c6b80c837fcf09a5cfb85fea9ea4c | c2ec174d243da5d2607dbf06c4451d0093ac40ba |
python/cpython | python__cpython-108827 | # `dis` command line interface exists, but not documented
`dis` CLI exists de facto and is useful for disassembly of source code files or code from stdin, but it is not documented and mentioned as a "test program" in source code.
There was a previous discussion #88571 and PR #26714, but the last one is closed for u... | 0d805b998ded854840f029b7f0c9a02eb3efa251 | 732532b0af9d1b5c7ae4932526c8d20d86c15507 |
python/cpython | python__cpython-108820 | # regrtest: compute statistics on executed tests
# Feature or enhancement
### Has this already been discussed elsewhere?
No response given
### Links to previous discussion of this feature:
_No response_
### Proposal:
``regrtest`` should compute statistics on all executed tests: count successes, failures and skip... | f964154b8cb74a05a3664cd34e938c0298f97680 | 7b4b788eaadb36f65b08a4a84e7096bb03dcc12b |
python/cpython | python__cpython-108795 | # doctest: count the number of skipped tests
# Feature or enhancement
### Has this already been discussed elsewhere?
No response given
### Links to previous discussion of this feature:
_No response_
### Proposal:
Currently, doctest only counts the number of failured and attempted tests, not the number of skipped... | 4f9b706c6f5d4422a398146bfd011daedaef1851 | 4ba18099b70c9f20f69357bac94d74f7c3238d7f |
python/cpython | python__cpython-108816 | # `pdb` CLI doesn't handle incorrect arguments properly
# Bug report
### Checklist
- [X] I am confident this is a bug in CPython, not a bug in a third-party project
- [X] I have searched the [CPython issue tracker](https://github.com/python/cpython/issues?q=is%3Aissue+sort%3Acreated-desc),
and am confident this bug ... | 162213f2db3835e1115178d38741544f4b4db416 | b75186f69edcf54615910a5cd707996144163ef7 |
python/cpython | python__cpython-108787 | # Split up _testinternalcapi.c
https://github.com/python/cpython/issues/93649 and associated PRs split up `_testcapimodule.c` because the file is large and hard to maintain. I'm proposing splitting the tests for the internal C API (`Modules/_testinternalcapi.c`) in the same manner for the same reasons. Additionally, I... | aa52888e6a0269f0c31a24bd0d1adb3238147261 | 76ce537fb1291f90c6dccbfea8653544de7902fd |
python/cpython | python__cpython-108764 | # C API: Cleanup header files
# Feature or enhancement
### Has this already been discussed elsewhere?
No response given
### Links to previous discussion of this feature:
_No response_
### Proposal:
Meta issue for a few changes related to C API header files.
<!-- gh-linked-prs -->
### Linked PRs
* gh-108764
* gh... | 03c5a685689fd4891d01caff8da01096fcf73d5a | 5948f562e031a4d345681e1b962da3e3083f85df |
python/cpython | python__cpython-108754 | # Enhance Py_STATS: statistics on Python performance
# Feature or enhancement
### Has this already been discussed elsewhere?
No response given
### Links to previous discussion of this feature:
_No response_
### Proposal:
When Python is built with ``./configure --enable-pystats``, it always dump statistics at exi... | a0773b89dfe5cd2190d539905dd89e7f6455668e | 8ff11425783806f8cb78e99f667546b1f7f3428e |
python/cpython | python__cpython-108752 | # Add generalized replace() function
# Feature or enhancement
### Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
### Links to previous discussion of this feature:
https://discuss.python.org/t/generalize-replace-function/28511
### Proposal:
Some classes have... | 6f3c138dfa868b32d3288898923bbfa388f2fa5d | 9f0c0a46f00d687e921990ee83894b2f4ce8a6e7 |
python/cpython | python__cpython-109470 | # `site.{usercustomize,sitecustomize}` hooks are never tested
# Bug report
They are documented:
```rst
The Customization Modules
-------------------------
Python provides two hooks to let you customize it: :mod:`sitecustomize` and
:mod:`usercustomize`. To see how it works, you need first to find the loca... | 738574fb21967a1f313f1542dd7b70ae0dcd9705 | 220bcc9e27c89bf3b3609b80a31b1398840f195e |
python/cpython | python__cpython-108741 | # make regen-all is not deterministic
# Bug report
### Checklist
- [X] I am confident this is a bug in CPython, not a bug in a third-party project
- [X] I have searched the [CPython issue tracker](https://github.com/python/cpython/issues?q=is%3Aissue+sort%3Acreated-desc),
and am confident this bug has not been repor... | db1ee6a19ab62191c16ecb732cb4dcaede98a902 | a0773b89dfe5cd2190d539905dd89e7f6455668e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.