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-122110 | # CSV reader inconsistent with combination of QUOTE_NONNUMERIC and escapechar
```pycon
>>> next(csv.reader([r'2\.5'], escapechar='\\', quoting=csv.QUOTE_NONNUMERIC))
[2.5]
>>> next(csv.reader([r'.5'], escapechar='\\', quoting=csv.QUOTE_NONNUMERIC))
[0.5]
>>> next(csv.reader([r'\.5'], escapechar='\\', quoting=csv.... | a3327dbfd4db9e5ad1ca514963d503abbbbfede7 | 9b4fe9b718f27352ba0c1cf1184f5b90d77d7df4 |
python/cpython | python__cpython-113813 | # AttributeError for `tracemalloc.is_tracing`
In two different PRs (gh-113754 and gh-11166) (both making separate, innocent-seeming changes to async generators), some test (but not the same one) is consistently reporting an attribute on `tracemalloc.is_tracing()`. Here's one.
```
test_async_gen_ags_gen_agt_gen (test... | 0297418cacf998e778bc0517aa11eaac827b8c0f | a5db6a3351b440a875a5af84a8b2447981356e34 |
python/cpython | python__cpython-113756 | # Adapt the remaining functions in gcmodule.c to Argument Clinic
# Feature or enhancement
Follow-up from #64384: there are only three remaining functions in gcmodule.c that were not converted to use Argument Clinic. Suggesting to adapt the three remaining functions, so we get nicely formatted signatures for these (an... | 35fa13d48b3247ea5e83b17c05a98163904e5a0b | ace4d7ff9a247cbe7350719b996a1c7d88a57813 |
python/cpython | python__cpython-113754 | # `PyAsyncGenASend` objects allocated from freelists may not have their finalizers called
# Bug report
CPython uses freelists to speed up allocation of certain frequently allocated types of objects. CPython also supports finalizers (i.e., `tp_finalize`) that are only called once, even if the object is resurrected by ... | 73ae2023a76f199ff854f8da14bd9ff8e93ee7fd | 901a971e161e060bd95f3cf3aeebe8b48d6e6dac |
python/cpython | python__cpython-113751 | # Fix Python object resurrection on free-threaded builds
# Bug report
Python objects can be resurrected due to side effects of their finalizers (`__del__` functions). The relevant code is in `PyObject_CallFinalizerFromDealloc` in `object.c` (as well as in test code in `Modules/_testcapi/gc.c`):
https://github.com/py... | d0f0308a373298a8906ee5a7546275e1b2e906ea | 3375dfed400494ba5cc1b744d52f6fb8b7796059 |
python/cpython | python__cpython-113745 | # Formalize incomplete error exceptions to improve codeop module handling
Currently the way we detect incomplete errors in the `codeop` module is based on the exception text, which is suboptimal at least. To do this properly, add a new `SyntaxError` subclass called `IncompleteInputError` and use that in the codeop mod... | 39d102c2ee8eec8ab0bacbcd62d62a72742ecc7c | 1f515e8a109204f7399d85b7fd806135166422d9 |
python/cpython | python__cpython-113930 | # Make the MRO cache thread-safe in free-threaded builds
# Feature or enhancement
The MRO (method resolution order) cache is used to cache lookups on the type hierarchy, such as method lookups. It's currently implemented per-interpreter, which will not be thread-safe in free-threaded builds.
https://github.com/pytho... | ae460d450ab854ca66d509ef6971cfe1b6312405 | e74fa294c9b0c67bfcbefdda5a069f0a7648f524 |
python/cpython | python__cpython-113738 | # CSV reader should support QUOTE_NOTNULL and QUOTE_STRINGS
# Feature or enhancement
New quoting rules QUOTE_NOTNULL and QUOTE_STRINGS were introduced in #67230. But they only affect CSV writer, not CSV reader. I think that they should affect CSV reader in the same way as QUOTE_NONNUMERIC does.
* QUOTE_NOTNULL -... | ea30a28c3e89b69a214c536e61402660242c0f2a | 58f883b91bd8dd4cac38b58a026397363104a129 |
python/cpython | python__cpython-113731 | # IDLE.app on macOS stops when selection Help -> IDLE Help
# Bug report
### Bug description:
To reproduce:
- open IDLE.app
- open the help menu
- select "IDLE help"
Opening IDLE using `python3 -m idlelib` shows the following traceback when doing this:
```
$ python3.12 -m idlelib ... | 66f39648154214621d388f519210442d5fce738f | d0f0308a373298a8906ee5a7546275e1b2e906ea |
python/cpython | python__cpython-113711 | # The Tier 2 Optimizer
# Feature or enhancement
### Proposal:
We're getting a JIT. Now it's time to optimize the traces to pass them to the JIT. The following workstreams are somewhat parallel, and split into two parts. They will not necessarily land in order.
1. The specializer. This will be done as its own ... | ac92527c08d917dffdb9c0a218d06f21114614a2 | 79970792fd2c70f77c38e08c7b3a9daf6a11bde1 |
python/cpython | python__cpython-113707 | # C Comments about long integer representation are out of date
I've recently been working on improving the performance of long integers that contain a single "digit". This ultimately is probably leading nowhere, but I did discover along the way that the comments about long integer representation in `longintrepr.h` re... | 07824995a056b2894adac69813444307835cc245 | 015b97d19a24a169cc3c0939119e1228791e4253 |
python/cpython | python__cpython-113709 | # `code.InteractiveInterpreter.runsource()` regression on Python 3.12+
# Bug report
### Bug description:
`InteractiveInterpreter.runsource()` is supposed to return True when the input is incomplete, as per the doc: https://docs.python.org/3/library/code.html#code.InteractiveInterpreter.runsource. This appears to hav... | 3003fbbf00422bce6e327646063e97470afa9091 | 0ae60b66dea5140382190463a676bafe706608f5 |
python/cpython | python__cpython-113697 | # PyObject_CallOneArg and PyObject_CallNoArgs should be marked as returning a new reference
# Documentation
[`PyObject_CallOneArg` and `PyObject_CallNoArgs` should be updated in the docs](https://docs.python.org/3/c-api/call.html#c.PyObject_CallOneArg) with the reference count annotation `"Return value: New referen... | 1ae7ceba29771baf8f2e8d2d4c50a0355cb6b5c8 | 35ef8cb25917bfd6cbbd7c2bb55dd4f82131c9cf |
python/cpython | python__cpython-113704 | # `test_logging`'s test_111615 fails under WASI
# Bug report
### Bug description:
https://github.com/python/cpython/pull/111638 broke WASI builds due to assuming multiprocessing was always available.
Failure can be seen at https://buildbot.python.org/all/#/builders/1046/builds/3844 .
### CPython versions tested on... | 842b738129021f52293dc053e014ecb4fe095baa | f3d5d4aa8f0388217aeff69e28d078bdda464b38 |
python/cpython | python__cpython-113694 | # Negative refcount crash in test_monitoring with -Xuops
# Bug report
### Bug description:
```sh
./python.exe -Xuops -m test test_monitoring -v
```
<details>
<summary>Full output</summary>
```
== CPython 3.13.0a2+ (heads/main:4c4b08dd2bd, Jan 3 2024, 14:05:09) [Clang 15.0.0 (clang-1500.1.0.2.5)]
== macOS-14.1.2-arm... | 35ef8cb25917bfd6cbbd7c2bb55dd4f82131c9cf | 4c4b08dd2bd5f2cad4e41bf29119a3daa2956f6e |
python/cpython | python__cpython-113715 | # Split up Modules/gcmodule.c
# Feature or enhancement
The free-threaded builds require substantial changes to the garbage collection implementation, but we don't want to make those changes to the default build. In other parts of CPython, we have used "local" `#ifdef Py_GIL_DISABLED` guards around free-threaded speci... | 99854ce1701ca4d1a0d153e501a29f9eec306ce5 | 0b7476080b58ea2ee71c6c1229994a3bb62fe4fa |
python/cpython | python__cpython-113667 | # Missing UF_ and SF_ flags in `Lib/stat.py`
# Feature or enhancement
### Proposal:
The list of `UF_` and `SF_` constants is missing a number definitions from recent versions of macOS, in particular:
- meta constants: UF_SETTABLE, SF_SUPPORTED, SF_SETTABLE, SF_SYNTHETIC
- UF_TRACKED
- UF_DATAVAULT
- SF_RESTRICTED
... | 2010d45327128594aed332befa687c8aead010bc | 892155d7365c9c4a6c2dd6850b4527222ba5c217 |
python/cpython | python__cpython-113856 | # 3.12 starts to return an error when all tests in a test file are skipped
# Bug report
### Bug description:
See https://github.com/apache/thrift/blob/5cf71b2beec3c67a4c8452ddabbbc6ae43fff16f/lib/py/test/test_sslsocket.py for a full example, we skipped all tests in that file via:
```python
@unittest.skip("failing S... | 3a9096c337c16c9335e0d4eba8d1d4196258af72 | 0297418cacf998e778bc0517aa11eaac827b8c0f |
python/cpython | python__cpython-113660 | # Security risk of hidden pth files
"pth files are evil." (Barry Warsaw, #78125)
There is a special kind of evilness:
1. pth files allow to execute arbitrary Python code.
2. pth files are executed automatically, unlike to normal py files which need explicit import or passing as argument to Python interpreter.
... | 74208ed0c440244fb809d8acc97cb9ef51e888e3 | 7a24ecc953e1edc9c5bbedbd19cc587c3ff635ea |
python/cpython | python__cpython-113662 | # Test failures when running with Tier 2 enabled
# Bug report
### Bug description:
Over the last two weeks, some test failures were introduced when the Tier 2 compiler is turned on, such that building with `--pgo` and Tier 2 fails.
I am going to bisect to see if I can find the moment at which the failures were intr... | b0fb074d5983f07517cec76a37268f13c986d314 | bab0758ea4a1d4666a973ae2d65f21a09e4478ba |
python/cpython | python__cpython-113638 | # The whitespaces in the Doc/tools/templates/dummy.html make the translation process harder
These whitespaces in the [dummy.html](https://github.com/python/cpython/blob/main/Doc/tools/templates/dummy.html) become an issue when it comes to translating them.
- If the translator forgets to add a leading or a trailing ... | ea978c645edd7bc29d811c61477dff766d7318b6 | dc8df6e84024b79aa96e85a64f354bf8e827bcba |
python/cpython | python__cpython-113634 | # Use module state for _testcapi
Replace the "TestError" global variable with a module state structure.
<!-- gh-linked-prs -->
### Linked PRs
* gh-113634
<!-- /gh-linked-prs -->
| b2566d89ce50e9924bb2fccb87dcfa3ceb6cc0d6 | 8e4ff5c7885abb04a66d079499335c4d46106aff |
python/cpython | python__cpython-115192 | # Update autoconf to warn when building under `wasm32-unknown-emscripten`
# Bug report
### Bug description:
Support for wasm32-unknown-emscripten was dropped in https://github.com/python/peps/pull/3612 . As [part of PEP 11](https://peps.python.org/pep-0011/#unsupporting-platforms), a `configure` error needs to be tr... | c968dc7ff3041137bb702436ff944692dede1ad1 | 553c90ccc2f5b15be76a2bb6e38d23e58d739e2f |
python/cpython | python__cpython-113640 | # test_site _pth file tests fail when stdlib path is very long
# Bug report
### Bug description:
The `getpath` module [tries to read certain `_pth` files during initialization](https://github.com/python/cpython/blob/b4b2cc101216ae1017898dfbe43c90da2fd0a308/Modules/getpath.py#L462)).
This is tested in `test_site` wi... | 5dc79e3d7f26a6a871a89ce3efc9f1bcee7bb447 | b0fb074d5983f07517cec76a37268f13c986d314 |
python/cpython | python__cpython-113648 | # Safer data serialization with marshal module
# Feature or enhancement
The main purpose of the `marshal` module -- serialization of precompiled module code objects. This requires support of code objects, strings for names, and other primitive Python types and simple collection types referred by the code object.
It ... | d2d8332f71ae8059150a9d8d91498493f9b443fc | a482bc67ee786e60937a547776fcf9528810e1ce |
python/cpython | python__cpython-113894 | # [improvement] Align object addresses in the Descriptor HowTo Guide
# Documentation
In the [Functions and methods](https://docs.python.org/3.12/howto/descriptor.html#functions-and-methods) chapter of this wonderful guide there is an inconsistency between object addresses in the provided code examples and outputs.
... | 901a971e161e060bd95f3cf3aeebe8b48d6e6dac | 70497218351ba44bffc8b571201ecb5652d84675 |
python/cpython | python__cpython-113636 | # Python/flowgraph.c:483: _Bool no_redundant_jumps(cfg_builder *): Assertion `last->i_target != b->b_next' failed
# Bug report
### Bug description:
The fuzz_pycompile fuzzer identified an assertion failure:
```
<fuzz input>:1: SyntaxWarning: invalid decimal literal
--
| <fuzz input>:1: SyntaxWarning: invalid dec... | 7d01fb48089872155e1721ba0a8cc27ee5c4fecd | 0c3455a9693cfabcd991c4c33db7cccb1387de58 |
python/cpython | python__cpython-113607 | # Objects/call.c:342: PyObject *_PyObject_Call(PyThreadState *, PyObject *, PyObject *, PyObject *): Assertion `!_PyErr_Occurred(tstate)' failed.
# Bug report
### Bug description:
The `fuzz_pycompile` fuzzer identified an assertion failure:
(https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=65451 - which ... | 9ed36d533ab8b256f0a589b5be6d7a2fdcf4aff2 | 8ff44f855450244d965dbf82c7f0a31de666007c |
python/cpython | python__cpython-113596 | # We shouldn't be entering invalid executors, it rather invalidates the invalidation.
# Bug report
### Bug description:
`ENTER_EXECUTOR` doesn't check if an executor is invalid. We currently get away with this because only instrumentation invalidates executors, and it cleans up the `ENTER_EXECUTOR`s.
It would be saf... | dc8df6e84024b79aa96e85a64f354bf8e827bcba | 5dc79e3d7f26a6a871a89ce3efc9f1bcee7bb447 |
python/cpython | python__cpython-113577 | # reprlib (used by pytest) infers builtin types based on class `__name__`
# Bug report
### Bug description:
Code like the following:
```python
import reprlib
class array:
def __repr__(self):
return "not array.array!"
reprlib.repr(array())
```
raises
```
Traceback (most recent call last):
File "<st... | 04d6dd23e2d8a3132772cf7ce928676e26313585 | ad3eac1963a5f195ef9b2c1dbb5e44fa3cce4c72 |
python/cpython | python__cpython-113573 | # Display actual calls for unittest.assert_has_calls even if empty
# Feature or enhancement
### Proposal:
Running this:
```python
import unittest
from unittest.mock import Mock, call
class TestCase(unittest.TestCase):
def test_thing(self):
mock = Mock()
mock.assert_has_calls([call(a=1)])
unitte... | 1600d78e2d090319930c6538b496ffcca120a696 | 1ae7ceba29771baf8f2e8d2d4c50a0355cb6b5c8 |
python/cpython | python__cpython-113571 | # pathlib ABCs should not raise auditing events or deprecation warnings
# Bug report
The (private) `pathlib._abc.PathBase` class raises auditing events in its implementations of `glob()`, `rglob()` and `walk()`. These events should only be raised from the concrete implementations of these methods in `pathlib.Path`,... | 3c4e972d6d0945a5401377bed25b307a88b19c75 | 99854ce1701ca4d1a0d153e501a29f9eec306ce5 |
python/cpython | python__cpython-119816 | # configure prefers system install of ncurses over available pkg-config on macOS
# Feature or enhancement
### Proposal:
I have ncurses 6.4 installed locally with corresponding pkg-config files. I'd expect that `configure` will pick up that installation, but it seems to prefer the system installation.
I ended up run... | f80376b129ad947263a6b03a6c3a874e9f8706e6 | bd473aa598c5161521a7018896dc124728214a6c |
python/cpython | python__cpython-113562 | # `help(set.issubset)` does not tell the truth that it could accept any iterable as an argument
# Documentation
The `set` [docs](https://docs.python.org/3.13/library/stdtypes.html#set) tell us:
> Note, the non-operator versions of [union()](https://docs.python.org/3.13/library/stdtypes.html#frozenset.union), [inte... | 11c582235d86b6020710eff282eeb381a7bf7bb7 | 6a8944acb61d0a2c210ab8066cdcec8602110e2f |
python/cpython | python__cpython-113557 | # pdb CLI argument parsing errors with arguments to module targets
# Bug report
### Bug description:
The `pdb` CLI is no longer correctly forwarding arguments to other tools.
Example reproduction:
- It raises an error `pdb: error: argument pyfile: not allowed with argument -m`
```
vscode ➜ ~ $ docker run -it --rm ... | b3e8c78ed7aa9bbd1084375587b99200c687cec9 | 48c0b05cf0dd2db275bd4653f84aa36c22bddcd2 |
python/cpython | python__cpython-113544 | # `MacOSXOSAScript` does not send `webbrowser.open` audit event
# Bug report
All other browsers do this:
- https://github.com/python/cpython/blob/f108468970bf4e70910862476900f924fb701399/Lib/webbrowser.py#L173
- https://github.com/python/cpython/blob/f108468970bf4e70910862476900f924fb701399/Lib/webbrowser.py#L193
- h... | fba324154e65b752e42aa59dea287d639935565f | f108468970bf4e70910862476900f924fb701399 |
python/cpython | python__cpython-113561 | # webbrowser.py cannot use a non-standard browser under MacOS
# Bug report
### Bug description:
webbrowser.py reads the environment variable "BROWSER" to find executable using "_synthesize".
This does not work with macOS, where the browser is open by either
```zsh
/Applications/Google\ Chrome.app/Contents/MacOS/Goog... | 25e49841e3c943d5746f2eb57375a7460651d088 | 1a70f66ea856de1b1b0ca47baf9ee8ba6799ae18 |
python/cpython | python__cpython-113690 | # Cannot cleanly shut down an asyncio based server
# Bug report
### Bug description:
When writing an asyncio based service, you basically have this sequence:
1. Create an event loop
2. Register a SIGTERM handler
3. Start your server
4. `loop.run_forever()`
5. SIGTERM causes a `loop.stop()`
6. Close the server
7. Cl... | 4681a5271a8598b46021cbc556ac8098ab8a1d81 | 1600d78e2d090319930c6538b496ffcca120a696 |
python/cpython | python__cpython-113582 | # support `str` type parameter in `plistlib.loads`
# Feature or enhancement
### Proposal:
The `plistlib`'s [loads](https://docs.python.org/3/library/plistlib.html#plistlib.loads) function only accepts `bytes` as input. If the input format is XML against binary, it's normal to pass a XML content in `str` type in user... | bbf214df23be3ee5daead119e8a2506d810d7d1f | 66f39648154214621d388f519210442d5fce738f |
python/cpython | python__cpython-113542 | # `os.waitid` explicitly excludes macOS
# Feature or enhancement
### Proposal:
Expose `os.waitid` on macOS as well.
As mentioned in https://github.com/python/cpython/issues/55021 the `waitid(2)` function is exposed in `posixmodule.c`, but that code explicitly hides the function on macOS without a clear reason. And ... | d0b0e3d2eff30f699c620bc87c4dadd8cd4a77d5 | 5f3cc90a12d6df404fd6f48a0df1334902e271f2 |
python/cpython | python__cpython-113527 | # Deoptimise pathlib ABCs
# Feature or enhancement
`pathlib._abc.PurePathBase` and `PathBase` have a few slots and methods that facilitate fast path object generation:
- `_drv`, `_root`, `_tail_cached`: roughly, the result of `os.path.splitroot()` on the path
- `_str`: the normalized path string
- `_make_child... | a9df076d7d5e113aab4dfd32118a14b62537a8a2 | aef375f56ec93740f0a9b5031c3d2063c553fc12 |
python/cpython | python__cpython-115495 | # Build fails with WASI SDK 21
# Bug report
### Bug description:
Hello!
when executing
`python3 Tools/wasm/wasi.py make-host`
on `ubuntu 22.04` with wasi-ld version: LLD 17.0.6 (tried earlier versions too)
Errors are as follows:
```
/opt/wasi-sdk/bin/wasm-ld -z stack-size=524288 -Wl,--stack-first -Wl,... | 18343c09856fcac11f813a5a59ffe3a35928c0cc | 468430189d3ebe16f3067279f9be0fe82cdfadf6 |
python/cpython | python__cpython-113680 | # Coverage.py test suite fails on 3.13 (since June?)
# Bug report
### Bug description:
The coverage.py test suite is failing on Python3.13 using sys.settrace. Sorry it's taken so long to report. This is blocking me claiming 3.13 support, and running the test suite on nightly builds.
The test suite fails as ... | 0ae60b66dea5140382190463a676bafe706608f5 | ed6ea3ea79fac68b127c7eb457c7ecb996461010 |
python/cpython | python__cpython-115890 | # Enhance itertools.takewhile() to allow the failed transition element to captured
The current version of `takewhile()` has a problem. The element that first fails the predicate condition is consumed from the iterator and there is no way to access it. This is the premise behind the existing recipe `before_and_after(... | a0a8d9ffe0ddb0f55aeb02801f48e722c2660ed3 | cb287d342139509e03a2dbe5ea2608627fd3a350 |
python/cpython | python__cpython-113469 | # Remove the "_new_ suffix from class names in pydocfodder
Previously this file contained two sets of classes: old-style classes and new-style classes. In Python 3 they are the same, and the set of "old-style" classes was removed in #99430. Classes that remain have the "_new" suffix which is useless, because all class... | 8a3d0e4a661e6c27e4c17c818ce4187a36579e5f | e87cadc1ce194aae2c076e81298d6e8074f1bb45 |
python/cpython | python__cpython-113465 | # JIT Compilation
It's probably about time to start thinking seriously about just-in-time compilation. To kick things off, here's my talk from this year's sprint about "copy-and-patch", which I think is a really promising path forward: https://youtu.be/HxSHIpEQRjs
I'll also be opening a draft PR for discussion soon... | a16a9f978f42b8a09297c1efbf33877f6388c403 | f6d9e5926b6138994eaa60d1c36462e36105733d |
python/cpython | python__cpython-114900 | # Incrementing class variable about 2**32 times causes the Python 3.12.1 interpreter to crash
# Crash report
### What happened?
The below example stores an integer counter as a class variable `C.counter`. Incrementing the counter using `C.counter += 1` between 2^32 - 2^24 and 2^32 times makes the Python 3.12.1 inter... | 992446dd5bd3fff92ea0f8064fb19eebfe105cef | 87cd20a567aca56369010689e22a524bc1f1ac03 |
python/cpython | python__cpython-113457 | # Prepare ssl failed because the file name of LICENSE of openssl changed
While running `PCbuild\prepare_ssl.bat` for python 3.11.5+, it will occur MSB3030 error like:
`my_private_directory\Python-3.11.7\PCbuild\openssl.vcxproj(109,5): error MSB3030: Could not copy the file 'my_private_directory\Python-3.11.7\PCbuil... | c5140945c723ae6c4b7ee81ff720ac8ea4b52cfd | 4e704d7847f2333f581f87e31b42e44a471df93a |
python/cpython | python__cpython-113891 | # Invalid "python equivalent" in PyObject_RichCompareBool()
It should be ``bool(o1 op o2)`` instead. Or (better?) the sentence "This is the equivalent of the Python expression ``o1 op o2``, where ``op`` is the operator corresponding to *opid*." could be removed, as the note below shows there is no simple equivalent p... | 926881dc10ebf77069e02e66eea3e0d3ba500fe5 | 7a7bce5a0ab249407e866a1e955d21fa2b0c8506 |
python/cpython | python__cpython-113455 | # Documentation about PyUnicode_AsWideChar() function
In file [_winapi.c](https://github.com/python/cpython/blob/3.11/Modules/_winapi.c#L851)
We can see code:
```c
size = PyUnicode_AsWideChar(key, NULL, 0);
```
Py_ssize_t PyUnicode_AsWideChar(PyObject *unicode, wchar_t *wstr, Py_ssize_t size)
But the doc say... | 5719aa23ab7f1c7a5f03309ca4044078a98e7b59 | f9f6156c5affc039d4ee6b6f4999daf0d5896428 |
python/cpython | python__cpython-121060 | # Crash of interpreter due to unclosed sub-interpreters
# Crash report
### Reproducer:
```python
import _xxsubinterpreters as interp
interp_id = interp.create()
```
Trace:
```
Fatal Python error: PyInterpreterState_Delete: remaining subinterpreters
Python runtime state: finalizing (tstate=0x00005576a7... | 4be1f37b20bd51498d3adf8ad603095c0f38d6e5 | 1c13b29d54ad6d7c9e030227d575ad7d21b4054f |
python/cpython | python__cpython-113423 | # multiprocessing logger get bad %(filename)s
# Bug report
### Bug description:
`util.info` and `util.debug` get bad `%(filename)s` in `multiprocessing` logger.
https://github.com/python/cpython/blob/c3f92f6a7513340dfe2d82bfcd38eb77453e935d/Lib/multiprocessing/pool.py#L116
### Reproducible example
tes... | ce77ee50358c0668eda5078f50b38f0770a370ab | 08398631a0298dcf785ee7bd0e26c7844823ce59 |
python/cpython | python__cpython-113408 | # Importing unittest.mock fails when CPython is built without docstrings
```
$ ./python -c 'import unittest.mock'
Traceback (most recent call last):
File "<string>", line 1, in <module>
import unittest.mock
File "/home/serhiy/py/cpython/Lib/unittest/mock.py", line 2233, in <module>
_CODE_SIG = inspec... | 0c574540e07792cef5487aef61ab38bfe404060f | 0d74e9683b8567df933e415abf747d9e0b4cd7ef |
python/cpython | python__cpython-113420 | # Outdated PyObject_HasAttr documentation (it no longer behaves like builtin `hasattr`)
# Documentation
The documentation says
https://github.com/python/cpython/blob/c31943af16f885c8cf5d5a690c25c366afdb2862/Doc/c-api/object.rst#L50-L52
but since https://github.com/python/cpython/issues/53875 this is no longer... | 61dd77b04ea205f492498d30637f2d516d8e2a8b | a03ec20bcdf757138557127689405b3a525b3c44 |
python/cpython | python__cpython-113390 | # test_tools.test_freeze broken on Mac framework build–probably should be skipped
# Bug report
### Bug description:
I've been messing around with the Mac framework build and encountered a failing `test_tools.test_freeze`. It runs `Tools/freeze/freeze.py` which has this buried in it:
```
if sys.platform == "darw... | bee627c1e29a070562d1a540a6e513d0daa322f5 | c31943af16f885c8cf5d5a690c25c366afdb2862 |
python/cpython | python__cpython-113371 | # Makefile.pre.in missing some mimalloc dependencies
# Bug report
The dependencies list for `obmalloc.o` is missing some files like `Objects/mimalloc/prim/unix/prim.c`, so modifying those files doesn't rebuild `obmalloc.o`.
https://github.com/python/cpython/blob/5f7a80fd02158d9c655eff4202498f5cab9b2ca4/Makefile.pre... | 31d8757b6070010b0fb92a989b1812ecf303059f | 61e818409567ce452af60605937cdedf582f6293 |
python/cpython | python__cpython-113359 | # Exception with broken __getattr__ causes error rendering tracebacks
# Bug report
### Bug description:
Running this code:
```python
import logging
class X(Exception):
def __getattr__(self, a):
raise KeyError(a) # !!!
try:
raise X()
except X:
logging.getLogger().exception('')... | 04fabe22dd98b4d87f672254b743fbadd5206352 | 17b73ab99ef12f89d41acec7500a244e68b1aaa4 |
python/cpython | python__cpython-113342 | # mmap(2) should check whether return value is MAP_FAILED instead of NULL
According to the [man page](https://man7.org/linux/man-pages/man2/mmap.2.html#RETURN_VALUE), mmap(2) returns MAP_FAILED (-1) on error instead of NULL. by @namhyung
<!-- gh-linked-prs -->
### Linked PRs
* gh-113342
* gh-113374
<!-- /gh-linked-pr... | 6b70c3dc5ab2f290fcdbe474bcb7d6fdf29eae4c | 5f7a80fd02158d9c655eff4202498f5cab9b2ca4 |
python/cpython | python__cpython-113341 | # Argument Clinic: remove the 'version' directive
# Feature or enhancement
The `version` directive was added in #63929 (Nov 2013), to make it possible for a programmer to require a specific version of Argument Clinic. However, since the "version number" has been hard-coded to "1" since Nov 2013, the `version` directi... | fae096cd4b7025f91473546ca6a243c86374dd6a | 4b90b5d857ba88c7d85483e188a73323df9ba05c |
python/cpython | python__cpython-113333 | # _ssl.c calls SSL_CTX_get_verify_callback unnecessarily
# Bug report
### Bug description:
I'll upload a PR shortly for a small bit of cleanup. The PR template wants a GitHub issue, so this is that.
### CPython versions tested on:
CPython main branch
### Operating systems tested on:
_No response_
<!-- gh-linked... | af2b8f6845e31dd6ab3bb0bac41b19a0e023fd61 | 2b53c767de0a7afd29598a87da084d0e125e1c34 |
python/cpython | python__cpython-113331 | # Makefile does not capture mimalloc header dependencies
# Bug report
Modifying `pycore_mimalloc.h` or any of the `mimalloc/*.h` files does not trigger recompilation of C files as one would expect. The problem is that we should use `$(MIMALLOC_HEADERS)` instead of `@MIMALLOC_HEADERS@` in Makefile.pre.in.
https://git... | a3e8afe0a3b5868440501edf579d1d4711c0fb18 | 713e42822f5c74d8420f641968c3bef4b10a513a |
python/cpython | python__cpython-113368 | # Unnecessary call of `print` in `test_symtable`?
# Bug report
### Bug description:
This line: https://github.com/python/cpython/blob/11ee912327ef51100d2a6b990249f25b6b1b435d/Lib/test/test_symtable.py#L340
Looks strange for me. Does this really need to be in test output?
<details>
<summary> Test output </summary>
... | 5f7a80fd02158d9c655eff4202498f5cab9b2ca4 | df1eec3dae3b1eddff819fd70f58b03b3fbd0eda |
python/cpython | python__cpython-113401 | # Should typing be calling getattr on arbitrary classes?
# Bug report
### Bug description:
I was updating my CI to support python3.12 and ran into the following error that isn't present in the 3.12 builds https://github.com/Gobot1234/steam.py/actions/runs/7276342755/job/19825996032
MRE:
```python
from enum... | ed6ea3ea79fac68b127c7eb457c7ecb996461010 | fcb3c2a444709d2a53faa20c5b43541674064018 |
python/cpython | python__cpython-113402 | # Argument Clinic: split out global stateless helpers and constants from clinic.py
# Feature or enhancement
`clinic.py` has a lot of globals in various forms. Getting rid of the globals will make it possible to split out `clinic.py` in multiple files (https://github.com/python/cpython/issues/113299). Combined, this w... | 9c3ddf31a34295ebcef6dc49b9e0ddd75d0ea9f1 | d1c711e757213b38cff177ba4b4d8ae201da1d21 |
python/cpython | python__cpython-113377 | # Documentation for object.__getitem__ is over-specified.
# Bug report
### Bug description:
`collections.deque` is a sequence but doesn't implement the full sequence protocol (doesn't support slices).
`collections.deque` is a sequence:
```py
from collections import deque
from collections.abc import Seque... | 6a5b4736e548fc5827c3bcf1a14193f77e1a989d | 31d8757b6070010b0fb92a989b1812ecf303059f |
python/cpython | python__cpython-115934 | # `uuid` has a bunch of deprecated functions: let's decide what to do with them
# Feature or enhancement
`uuid.py` has several protected deprecated functions which are no longer in use:
https://github.com/python/cpython/blob/4afa7be32da32fac2a2bcde4b881db174e81240c/Lib/uuid.py#L591-L594
https://github.com/python/cp... | 61f576a5eff7cc1a7c163fbed491c1e75e0bd025 | 66fb613d90fe3dea32130a5937963a9362c8a59e |
python/cpython | python__cpython-113327 | # Segmentation fault with `compile`
# Crash report
### What happened?
### Minimal reproducible example
#### tests.py
```python
def mocks(self, search_rv=None, mock_internal_search=False):
with mock.patch.object(
TestResourceController, "_search" if mock_internal_search else "search", return_value=search... | c31943af16f885c8cf5d5a690c25c366afdb2862 | 9afb0e1606cad41ed57c42ea0a53ac90433f211b |
python/cpython | python__cpython-113271 | # IDLE - Fix test_editor hang on macOS with installed Python
On my MacBook Air Catalina, Python 3.13.0a2, IDLE's test_editor hangs in IndentSearchTest.test_searcher. The problem is `insert` using `update()` instead of `update_idletasks()`. I added function in bpo-39885. It is called earlier in IndentAnd...Test with... | fa9ba02353d79632983b9fe24da851894877e342 | c895403de0b1c301aeef86921348c13f608257dc |
python/cpython | python__cpython-114470 | # `TestResult.stopTest` called when test is skipped, despite `TestResult.startTest` not being called
# Bug report
### Bug description:
Following commit [551aa6ab9419109a80ad53900ad930e9b7f2e40d](https://github.com/python/cpython/commit/551aa6ab9419109a80ad53900ad930e9b7f2e40d) a bug seems to have been introduced... | ecabff98c41453f15ecd26ac255d531b571b9bc1 | ca715e56a13feabc15c368898df6511613d18987 |
python/cpython | python__cpython-113303 | # Frozen modules shouldn't be written to the source tree on Windows
# Feature or enhancement
### Proposal:
As a follow-up to gh-113039, this issue suggests we change the Windows build to avoid writing the generated frozen modules back into the source tree.
[Quoting @zooba ](https://github.com/python/cpython/issues/... | 178919cf2132a67bc03ae5994769d93cfb7e2cd3 | 7d01fb48089872155e1721ba0a8cc27ee5c4fecd |
python/cpython | python__cpython-113262 | # Automate pip's SBOM package entry
# Feature or enhancement
### Proposal:
Part of https://github.com/python/cpython/issues/112302
Most of the vendored dependencies in CPython's source tree can't be automated due to being "outside" a package ecosystem therefore being difficult to automatically parse a version... | 4658464e9cf092be930d0d8f938e801a69f7f987 | fa9ba02353d79632983b9fe24da851894877e342 |
python/cpython | python__cpython-113286 | # Consistency of reveal_type results with other type checkers
# Bug report
### Bug description:
Not sure if this bug is reported before.
FWIK, CPython's `reveal_type` was introduced based on the motivation of the same features in type checkers. But I found out the behavior is inconsistent, at least between [C... | 11ee912327ef51100d2a6b990249f25b6b1b435d | de8a4e52a5f5e5f0c5057afd4c391afccfca57d3 |
python/cpython | python__cpython-113249 | # Update bundled pip to 23.3.2
<!-- gh-linked-prs -->
### Linked PRs
* gh-113249
* gh-113253
* gh-113254
<!-- /gh-linked-prs -->
| 4a24bf9a13a7cf055113c04bde0874186722c62c | f428c4dafbfa2425ea056e7f2ed2ea45fa90be87 |
python/cpython | python__cpython-113236 | # Add remaining TOML types to tomllib conversation table documentation
# Documentation
[The conversion table for Python's TOML parser](https://docs.python.org/3/library/tomllib.html#conversion-table) does not contain entries for two types listed on the TOML specification:
1. inline table (dict)
2. array of tabl... | 76d757b38b414964546393bdccff31c1f8be3843 | d71fcdee0f1e4daa35d47bbef103f30259037ddb |
python/cpython | python__cpython-113226 | # Optimize `pathlib.Path.iterdir()` and friends by using `os.DirEntry.path`
`pathlib.Path.glob()` calls [`os.scandir()`](https://docs.python.org/3/library/os.html#os.scandir) under the hood, converting [`os.DirEntry`](https://docs.python.org/3/library/os.html#os.DirEntry) objects to path objects using a private `_make... | c2e8298eba3f8d75a58e5b3636f8edc8d60e68da | 4681a5271a8598b46021cbc556ac8098ab8a1d81 |
python/cpython | python__cpython-113334 | # asyncio.sslproto.SSLProtocol exception handling triggers TypeError: SSLProtocol._abort() takes 1 positional argument but 2 were given
# Bug report
### Bug description:
There are several pathways to this bug, all which call `asyncio.sslproto._SSLProtocolTransport._force_close()` with an exception instance:
- Durin... | 1ff02385944924db7e683a607da2882462594764 | a3e8afe0a3b5868440501edf579d1d4711c0fb18 |
python/cpython | python__cpython-113307 | # Improve `super()` error message and document zero-arg `super()` usage inside nested functions and generator expressions.
# Bug report
### Bug description:
I tried searching for something related but I could not find exactly this case with `super`. Maybe I missed… so posting it here.
Following code works fine:
... | 4a3d2419bb5b7cd862e3d909f53a2ef0a09cdcee | 237e2cff00cca49db47bcb7ea13683a4d9ad1ea5 |
python/cpython | python__cpython-113209 | # The statement` __init__.py files are required to make Python treat directories containing the file as packages.` might be confusing
# Documentation
The statement ` __init__.py files are required to make Python treat directories containing the file as packages.` might be confusion.
It is possible to have a pac... | d71fcdee0f1e4daa35d47bbef103f30259037ddb | 4658464e9cf092be930d0d8f938e801a69f7f987 |
python/cpython | python__cpython-114186 | # Occasionally `multiprocessing.test.*.test_threads` can take 10 minutes
# Bug report
### Bug description:
See the logs in https://buildbot.python.org/all/#/builders/1138/builds/498
```
10 slowest tests:
- test.test_multiprocessing_spawn.test_threads: 10 min 14 sec
- test.test_multiprocessing_fork.test_threads: 10 ... | c1db9606081bdbe0207f83a861a3c70c356d3704 | e2c097ebdee447ded1109f99a235e65aa3533bf8 |
python/cpython | python__cpython-113203 | # Add a strict option to itertools.batched()
This is modeled on the `strict` option for `zip()`.
One use case is improving the `reshape()` recipe. In numpy, a reshape will raise an exception if the new dimensions do not exactly fit the data.
<!-- gh-linked-prs -->
### Linked PRs
* gh-113203
* gh-115889
<!-- /gh-l... | 1583c40be938d2caf363c126976bc8757df90b13 | fe479fb8a979894224a4d279d1e46a5cdb108fa4 |
python/cpython | python__cpython-113200 | # `http.client.HTTPResponse.read1` does not close response after reading all data
# Bug report
### Bug description:
While trying to use `read1` in urllib3, we discovered that `read1` unlike `read` never closes the response after reading all data when the content length is known (https://github.com/urllib3/urllib3/pu... | 41336a72b90634d5ac74a57b6826e4dd6fe78eac | 2feec0fc7fd0b9caae7ab2e26e69311d3ed93e77 |
python/cpython | python__cpython-113192 | # Add os.fchmod() on Windows
# Feature or enhancement
After implementing `os.lchmod()` and `os.chmod(follow_symlinks=True)` on Windows in #59616, adding `os.fchmod()` is easy.
<!-- gh-linked-prs -->
### Linked PRs
* gh-113192
<!-- /gh-linked-prs -->
| 1f06baeabd7ef64b7be6af7cb6fc03ec410b1aa2 | 53330f167792a2947ab8b0faafb11019d7fb09b6 |
python/cpython | python__cpython-113601 | # python3.12 introduces numerous memory leaks (as reported by ASAN)
# Bug report
### Bug description:
Let example illustrate:
```
$ LD_PRELOAD=/usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.asan-x86_64.so \
PYTHONMALLOC=malloc \
/usr/bin/python3.10 -c 'print("Hello")'
Hello
$ LD_PRELOAD=... | 3203a7412977b8da3aba2770308136a37f48c927 | b6cb435ac06fe2bef0549bd1e46e15518a23089f |
python/cpython | python__cpython-113189 | # Harmonize shutil.copymode() on Windows and POSIX
The behavior of `shutil.copymode()` on Windows was changed by adding `os.lchmod()` in #59616. Now if *follow_symlinks* is false and both *src* and *dst* are symlinks, it copies the symlink mode (only the read-only bit). Previously it did nothing.
But there is still... | 6e02d79f96b30bacdbc7a85e42040920b3dee915 | bdc8d667ab545ccec0bf8c2769f5c5573ed293ea |
python/cpython | python__cpython-113175 | # Apply changes from importlib_metadata for Python 3.13
This bug tracks merging changes in importlib_metadata for Python 3.13.
- [x] v7.0.0: There have been a [number of changes in importlib_metadata](https://importlib-metadata.readthedocs.io/en/latest/history.html#v7-0-0) ([changelog](https://github.com/python/imp... | 2d91409c690b113493e3e81efc880301d2949f5f | 6b70c3dc5ab2f290fcdbe474bcb7d6fdf29eae4c |
python/cpython | python__cpython-113173 | # Compiler warnings in Modules/_xxinterpqueuesmodule.c
In every old PR I get warnings in Modules/_xxinterpqueuesmodule.c. For example: https://github.com/python/cpython/pull/92635/files
"unused variable ‘name’ [-Wunused-variable]" for line 239.
https://github.com/python/cpython/pull/92635/files#file-modules-_xxint... | e365c943f24ab577cf7a4bf12bc0d2619ab9ae47 | 4a153a1d3b18803a684cd1bcc2cdf3ede3dbae19 |
python/cpython | python__cpython-113179 | # ipaddress considers some not globally reachable addresses global and vice versa
# Bug report
### Bug description:
Judging by what the `is_private` and `is_global` implementations in the `ipaddress` module do[1], everything that IANA special-purpose address registries[2][3] considers globally reachable should r... | 40d75c2b7f5c67e254d0a025e0f2e2c7ada7f69f | 3be9b9d8722696b95555937bb211dc4cda714d56 |
python/cpython | python__cpython-113227 | # Improving error message with trailing comma in json
# Bug report
### Bug description:
```python
import json
json.loads('{"a":1,}')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.11/json/__init__.py", line 346, in loads
return _default_decoder.decod... | cfa25fe3e39e09612a6ba8409c46cf35a091de3c | 21d52995ea490328edf9be3ba072821cd445dd30 |
python/cpython | python__cpython-113120 | # subprocess.Popen can pass incomplete environment when posix_spawn is used
# Bug report
### Bug description:
Subprocess created with `posix_spawn` can have different environment when compared to a process created with stardard `fork/exec`.
The reason is that `posix_spawn` uses `os.environ` (when no env was given),... | 48c907a15ceae7202fcfeb435943addff896c42c | cde1335485b7bffb12c378d230ae48ad77d76ab1 |
python/cpython | python__cpython-113118 | # Add support for posix_spawn call in subprocess.Popen with close_fds=True
# Feature or enhancement
### Proposal:
One of the reasons `posix_spawn` is rarely used with subprocess functions is that it doesn't support `close_fds=True` (which is the default value).
Previously, it was deemed infeasible to support this (... | 2b93f5224216d10f8119373e72b5c2b3984e0af6 | 32d87a88994c131a9f3857d01ae7c07918577a55 |
python/cpython | python__cpython-113114 | # doc: use less ambiguously named variable
# Documentation
In the control flow tutorial -- https://docs.python.org/3/tutorial/controlflow.html -- one of the examples uses 'ok' as the variable name to capture input(). 'Ok' is ambiguous and, at least to me, read as a boolean type when I was learning python with the t... | fb4cb7ce310e28e25d3adf33b29cb97c637097ed | fd81afc624402816e3455fd8e932ac7702e4d988 |
python/cpython | python__cpython-113091 | # os_support.can_chmod() is broken
`test.support.os_support.can_chmod()` tests for `hasattr(os, "chown")` instead of `hasattr(os, "chmod")`. This, and also the fact that it tests bits not supported on Windows, makes it always returning False on Windows. It may make some meaningful tests skipped on Windows and prevents... | c6e953be125c491226adc1a5bc9c804ce256aa17 | 23a5711100271e5a8b9dd9ab48b10807627ef4fb |
python/cpython | python__cpython-113087 | # Add tests for os.chmod() and os.lchmod()
Currently only tests that test os.chmod() and os.lchmod() are tests that they raise exceptions for invalid arguments. There are no tests for working os.chmod() and os.lchmod() and their behavior with symlinks (there is a difference between Windows and POSIX).
<!-- gh-linked-... | b4f2c89118d5a48ce6c495ba931d7f6493422029 | fddc829236d7b29a522a2160e57b2d7ca23b9b95 |
python/cpython | python__cpython-113139 | # Python/flowgraph.c:1813: void insert_superinstructions(cfg_builder *): Assertion `no_redundant_nops(g)' failed
# Bug report
### Bug description:
The `fuzz_pycompile` identified an assertion failure:
```
Running: /mnt/scratch0/clusterfuzz/bot/inputs/fuzzer-testcases/crash-09bb1aea9610b3c790c03fc92383fb3d19f08654
... | e51b4009454939e3ee5f1bfaed45ce65689a71b8 | 76d757b38b414964546393bdccff31c1f8be3843 |
python/cpython | python__cpython-113207 | # Error in the documentation for csv.reader
# Documentation
In the description for [csv.reader](https://docs.python.org/3/library/csv.html#csv.reader) function it says:
Return a reader object which will iterate over lines in the given csvfile. csvfile can be any object which supports the [iterator](https://docs.... | 84df3172efe8767ddf5c28bdb6696b3f216bcaa6 | 5ae75e1be24bd6b031a68040cfddb71732461f67 |
python/cpython | python__cpython-113022 | # Relative include path of generated frozen module in getpath.c
# Feature or enhancement
### Proposal:
in `getpath.c`, the generated frozen `getpath.h` is [included using relative path](https://github.com/python/cpython/blob/c6e614fd81d7dca436fe640d63a307c7dc9f6f3b/Modules/getpath.c#L25
I'd like to consider changin... | 2feec0fc7fd0b9caae7ab2e26e69311d3ed93e77 | d00dbf541525fcb36c9c6ebb7b41a5637c5aa6c0 |
python/cpython | python__cpython-113436 | # Difference between pickle.py and _pickle for certain strings
# Bug report
### Bug description:
There is a logical error in `pickle.Pickler.save_str` for protocol 0, such that it repeats pickling of a string object each time it is presented. The design clearly intends to re-use the first pickled representation,... | 08398631a0298dcf785ee7bd0e26c7844823ce59 | 894f0e573d9eb49cd5864c44328f10a731852dab |
python/cpython | python__cpython-113821 | # test_variable_tzname fails in 3.11.7 and 3.12.1 due to timezone change
Commit 46407fe79ca78051cbf6c80e8b8e70a228f9fa50 seems to not be generic enough because running the test in a system where tests where passing before now fails:
```
======================================================================
FAI... | 931d7e052e22aa01e18fcc67ed71b6ea305aff71 | 92f96240d713a5a36c54515e44445b3cd0947163 |
python/cpython | python__cpython-113025 | # C API: Add PyObject_GenericHash() function
# Feature or enhancement
Just added `Py_HashPointer()` function can be used to implement the default Python object hashing function (`object.__hash__()`), but only in CPython. In other Python implementations the default object hash can depend not on the object address, but... | e2e0b4b4b92694ba894e02b4a66fd87c166ed10f | 567ab3bd15398c8c7b791f3e376ae3e3c0bbe079 |
python/cpython | python__cpython-113032 | # pystats specialization deferred numbers are wrong
# Bug report
### Bug description:
For many of the "deferred" values in the "specialization" section for each bytecode, the number is enormous. [For example](https://github.com/faster-cpython/benchmarking-public/blob/main/results/bm-20231210-3.13.0a2%2B-23df46a... | dfaa9e060bf6d69cb862a2ac140b8fccbebf3000 | 81a15ea74e2607728fceb822dfcc1aabff00478a |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.