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-102159
# keyword: Tests for `softkwlist` In 3.10 version python have introduced new type of keywords such as `soft`. There's no tests for it, so i decided to write it =) Follows issue at [typeshed](https://github.com/python/typeshed/pull/9680) about typehints of `kwlist` & `softkwlist`, we have came to conclusion to use `a...
9f3ecd1aa3566947648a053bd9716ed67dd9a718
0c857865e4f255f99d58678f878e09c11da89892
python/cpython
python__cpython-102152
# test_freeze_simple_script in test_tools fails to fetch CONFIG_ARGS `Tools/freeze/test/freeze.py` fetches `CONFIG_ARGS` from the [clean] build directory, instead of fetching it from the source directory. Discovered while working on #102131. <!-- gh-linked-prs --> ### Linked PRs * gh-102152 * gh-102176 <!-- /gh-l...
c3a178398c199038f3a0891d09f0363ec73f3b38
665730d2176aabd05ca5741056aef43189b6f754
python/cpython
python__cpython-102142
# replace use of getpid on Windows with GetCurrentProcessId # Feature or enhancement Windows provides `getpid`, `_getpid` and `GetCurrentProcessId` to retrieve the process identifier. `getpid` is deprecated in favor of `_getpid`. In addition both `getpid` and `_getpid` cannot be used by application that execute in ...
1fa38906f0b228e6b0a6baa89ab6316989b0388a
347f7406df62b2bbe551685d72a466f27b951f8e
python/cpython
python__cpython-119271
# Entering interactive mode after -m # Documentation This might be an omission in the docs or a bug in `-m`, not certain. [Documentation](https://docs.python.org/3/using/cmdline.html#cmdoption-i) currently states `-i` used before a script of the `-c` switch launches the REPL: > When a script is passed as first a...
172690227e771c2e8ab137815073e3a172c08dec
423bbcbbc43cacfb6a217c04f890a47d3cf7c3a9
python/cpython
python__cpython-102137
# "wikipedia" turtledemo example in docs is supposed to be "rosette" The `turtle` module documentation, at [this link](https://docs.python.org/3.12/library/turtle.html) has a section on `turtledemo`. It says the demo scripts are 1. bytedesign 2. chaos 3. clock 4. colormixer 5. forest 6. fractalcurves 7. lind...
8d46c7ed5e83e22d55fe4f4e6e873d87f340c1dc
3ba7743b0696202e9caa283a0be253fd26a5cfbd
python/cpython
python__cpython-102222
# Possible deadlock at shutdown while recursively acquiring head lock https://github.com/HypothesisWorks/hypothesis/issues/3585 is reproducible on Python 3.10.10 but not 3.10.9, and so we suspect that https://github.com/python/cpython/pull/100922 may have introduced a (rare?) deadlock while fixing the data race in htt...
5f11478ce7fda826d399530af4c5ca96c592f144
56e93c8020e89e1712aa238574bca2076a225028
python/cpython
python__cpython-102128
# tarfile's cache balloons in memory when streaming a big tarfile # Bug report I've got a bunch of tar files containing millions of small files. Never mind how we got here - I need to process those tars, handling each of the files inside. Furthermore, I need to process a lot of these tars, and I'd like to do it rel...
50fce89d123b25e53fa8a0303a169e8887154a0e
097b7830cd67f039ff36ba4fa285d82d26e25e84
python/cpython
python__cpython-102115
# dis._try_compile: traceback printed on error in source argument is too wordy `_try_compile` function from `dis` module firstly tries to compile given source string with `'eval'` mode and, if exception is occured, catches it and tries again with `'exec'` mode. These actions lead to a long chained traceback if given s...
2b6f5c3483597abcb8422508aeffab04f500f568
8af8f52d175959f03cf4a2786b6a81ec09e15e95
python/cpython
python__cpython-106995
# `\N` not properly documented in `re` module documentation # Documentation In the `re` module, the `\N` escape is documented in the changelog from Python 3.8 but never actually explained in the documentation proper. The changelog entry (which is quite helpful) says the following: > Changed in version 3.8: T...
0af247da0932692592ed85ba8b4a1520627ab4ac
9eeb4b485f4f9e13e5cb638e43a0baecb3ff4e86
python/cpython
python__cpython-102189
# Predicates in itertools and filter # Documentation ## `filterfalse` The [doc](https://docs.python.org/3/library/itertools.html#itertools.filterfalse) says *"Make an iterator that filters elements from iterable returning only those for which the predicate is `False`"*. That's not correct, it also returns other ...
81bf10e4f20a0f6d36b67085eefafdf7ebb97c33
e5e1c1fabd8b5626f9193e6c61b9d7ceb7fb2f95
python/cpython
python__cpython-102104
# Classes and instances produced by `dataclasses.make_dataclass` are not pickleable Repro: ```python ## Setup >>> import pickle >>> import dataclasses >>> A = dataclasses.make_dataclass('A', []) >>> @dataclasses.dataclass ... class B: pass ... ## Correct >>> pickle.loads(pickle.dumps(B)) <class '...
b48be8fa18518583abb21bf6e4f5d7e4b5c9d7b2
ee6f8413a99d0ee4828e1c81911e203d3fff85d5
python/cpython
python__cpython-102360
# Optimize `iter_index` itertools recipe # Documentation The *"Slow path for general iterables"* somewhat reinvents `operator.indexOf`. it seems faster to use it, and could show off an effective combination of the other itertools. Benchmark with the current implementation and two new alternatives, finding the in...
eaae563b6878aa050b4ad406b67728b6b066220e
2f62a5da949cd368a9498e6a03e700f4629fa97f
python/cpython
python__cpython-102075
# Unexpected behavior with dataclasses and weakref We recently discovered the following error in our project: `TypeError: descriptor '__weakref__' for 'XYZ' objects doesn't apply to a 'XYZ' object` XYZ in our case is a dataclass which uses slots (added v3.10) and weakref_slot (added v3.11) parameters. We furthe...
d97757f793ea53dda3cc6882b4a92d3e921b17c9
71e37d907905b0504c5bb7b25681adeea2157492
python/cpython
python__cpython-102078
# Assertion failure on interrupt when catching exception group This (maybe too made-up and detached from reality) repro causes assertion failure when executed on current main (32df540635cacce1053ee0ef98ee23f3f6a43c02). On 3.11 it warns about "lost sys.stderr" and terminates. ```python3 import time import threadi...
022b44f2546c44183e4df7b67e3e64502fae9143
4d3bc89a3f54c4f09756a9b644b3912bf54191a7
python/cpython
python__cpython-102039
# site.py does a sometimes unnecessary stat I had reason to look at site.py and noticed that if pyvenv.cfg exists alongside sys.executable, we do an unnecessary stat. It's a small thing, but we do run site.py on almost every interpreter startup. <!-- gh-linked-prs --> ### Linked PRs * gh-102039 <!-- /gh-linked-p...
385b5d6e091da454c3e0d3f7271acf3af26d8532
55decb72c4d2e4ea00ed13da5dd0fd22cecb9083
python/cpython
python__cpython-102066
# Syntax error in _delim.py # Bug report As part of packaging in fink, we try to byte-compile all .py using the just-built interpretter in the staging directory for installation. After compiling from the source tarball: ``` make install DESTDIR=/sw/build.build/root-python311-3.11.2-1 [...] DYLD_LIBRARY_PATH=/sw...
1ca315538f2f9da6c7b86c4c46e76d454c1ec4b9
7559f5fda94ab568a1a910b17683ed81dc3426fb
python/cpython
python__cpython-102071
# `threading.RLock` must not support `*args, **kwargs` arguments Right now we have an interesting problem: `_CRLock` supports `*args, **kwargs` in `__new__`, while `_PYRLock` does not. See: 1. https://github.com/python/cpython/blob/128379b8cdb88a6d3d7fed24df082c9a654b3fb8/Lib/threading.py#L133 2. https://github.c...
80f30cf51bd89411ef1220d714b33667d6a39901
0b243c2f665e6784b74ac4d602d4ee429a2ad7f0
python/cpython
python__cpython-102124
# blake2-config.h `HAVE_SSE4_1` typo fix # Bug report ### Unable to compile cpython on Windows with **`AVX`** enable 1. adding `<EnableEnhancedInstructionSet>AdvancedVectorExtensions</EnableEnhancedInstructionSet>` for `</ClCompile>` in vcxproj files (result `/arch:AVX` in cl.exe cmd line) 2. `MSBuild.exe C:\sdk\...
ea93bde4ece139d4152a59f2c38aa6568559447c
61405da9a5689f554aa53929a2a9c168cab6056b
python/cpython
python__cpython-102025
# Reduce _idle_semaphore calls in ThreadPoolExecutor # Feature or enhancement In `concurrent.futures.thread.ThredPoolExecutor` method `executor._idle_semaphore.release()` should be called if only work queue is empty # Pitch Currently `_idle_semaphore.release()` is called after processing every item in queue. ...
0242e9a57aa87ed0b5cac526f65631c654a39054
72c3d2e105f120f6f2bce410699b34dac4e948fd
python/cpython
python__cpython-102022
# Enable definition for generated interpreter cases to be composed from multiple files # Feature or enhancement Allow specifying multiple input files to the `generate_cases.py` script, making it behave mostly as if the input files were concatenated. Additionally allow existing definitions of instructions to be expl...
8de59c1bb9fdcea69ff6e6357972ef1b75b71721
cb944d0be869dfb1189265467ec8a986176cc104
python/cpython
python__cpython-102014
# Add a public C-API function to iterate over GC’able objects # Feature or enhancement An API similar to: ``` /* Visit all live GC-capable objects, similar to gc.get_objects(None). * * Users should avoid allocating or deallocating objects on the Python heap in * the callback. */ typedef void (*gcvisitobjects_t)...
cbd3fbfb6e5c1cc96bbeb99483a580f165b01671
457e4d1a516c2b83edeff2f255f4cd6e7b114feb
python/cpython
python__cpython-102012
# Some of the docs no longer need to mention sys.exc_info() There are a number of places in the documentation where sys.exc_info() is no longer necessary, and can be replaced by sys.exception(). They can be updated now. <!-- gh-linked-prs --> ### Linked PRs * gh-102012 * gh-102101 <!-- /gh-linked-prs -->
4d3bc89a3f54c4f09756a9b644b3912bf54191a7
36854bbb240e417c0df6f0014924fcc899388186
python/cpython
python__cpython-102009
# test_except_star can be simplified with sys.exception() migrating test_except_star to use sys.exception() instead of sys.exc_info() can make it a bit simpler. It won't cause any backporting issues because this test was only added in 3.11. <!-- gh-linked-prs --> ### Linked PRs * gh-102009 * gh-102116 <!-- /gh-lin...
c2b85a95a50687a2e5d1873e17266370876e77e9
7346a381be1bc5911924fcf298408e6909f3949f
python/cpython
python__cpython-101998
# Upgrade the bundled version of pip to 23.0.1 # Feature or enhancement This is the latest pip bugfix release. # Pitch This ensures that users who install newest release of Python get the newest version of pip. <!-- gh-linked-prs --> ### Linked PRs * gh-101998 * gh-102241 * gh-102242 * gh-102243 * gh-10224...
89d9ff0f48c51a85920c7372a7df4a2204e32ea5
b7c11264476ccc11e4bdf4bd3c3664ccd1b7c5f9
python/cpython
python__cpython-101994
# plistlib documentation examples are not runnable # Documentation The current `plistlib` documentation does not run as written. It would be helpful if users were able to copy and paste the code example and successfully run it. <!-- gh-linked-prs --> ### Linked PRs * gh-101994 * gh-101999 * gh-102000 * gh-102133...
a1723caabfcdca5d675c4cb04554fb04c7edf601
f482ade4c7887c49dfd8bba3be76f839e562608d
python/cpython
python__cpython-107680
# The annotations in c_annotations.py cannot be translated The c_annotations Sphinx extension at https://github.com/python/cpython/blob/main/Doc/tools/extensions/c_annotations.py adds some markup to the documentation files but those do not appear in the translation dumps, e.g. the file at https://git.afpy.org/AFPy/pyt...
9cdf05bc28c5cd8b000b9541a907028819b3d63e
42a86df3a376a77a94ffe6b4011a82cf51dc336a
python/cpython
python__cpython-102318
# argparse metavar parentheses dropped on usage line Parentheses in argparse `metavar`s are dropped on the `usage` line but appear as expected in the argument list. In particular, the very first and very last parentheses disappear. It looks from other issues (e.g. #56083) that braces, brackets and parentheses in `meta...
9a478be1a4314734c697dda7a7b0e633a6fb0751
66aa78cbe604a7c5731f074b869f92174a8e3b64
python/cpython
python__cpython-102803
# Potential SegFault with multithreading garbage collection. For now, I can only occationally observe the segfault on github actions. This is an issue that's not easy to reproduce, but I tried to understand the cause of it. The direct cause would be in `deduce_unreachable` in `gcmodule.c`. In that function, `gc` tr...
039714d00f147be4d018fa6aeaf174aad7e8fa32
b3cc11a08e1e9121ddba3b9afb9fae032e86f449
python/cpython
python__cpython-101976
# Docs: Name of parameter should be 'def' in PyModule_FromDefAndSpec. # Documentation In the description of **PyModule_FromDefAndSpec** and **PyModule_FromDefAndSpec2**, the definition(PyModuleDef) parameter should be _def_, not _module_. https://docs.python.org/3/c-api/module.html <!-- gh-linked-prs --> ### ...
a3bb7fbe7eecfae6bf7b2f0912f9b2b12fac8db1
984f8ab018f847fe8d66768af962f69ec0e81849
python/cpython
python__cpython-101968
# ceval.c: `positional_only_passed_as_keyword` can be failed with segfault https://github.com/python/cpython/blob/4d8959b73ac194ca9a2f623dcb5c23680f7d8536/Python/ceval.c#L1251-L1285 This implemention doesn't take in account case when `PyList_New` returns `NULL`. If `PyList_New(0)` returns a `NULL`, `PyList_Append`...
89413bbccb9261b72190e275eefe4b0d49671477
7f1c72175600b21c1c840e8988cc6e6b4b244582
python/cpython
python__cpython-101966
# `Py_EnterRecursiveCall()`/`_Py_EnterRecursiveCall()` return value misused in a number of places Using ``grep``, I identified 3 instances in `main` where code checks if ``Py_EnterRecursiveCall(...) < 0`` (which just returns ``_Py_EnterRecursiveCall(...)``) or ``_Py_EnterRecursiveCall(...) < 0``. 1. ``Py_EnterRecur...
0f7a9725300e750947159409abbf5722a4a79f8b
02d9f1504beebd98dea807f4b8761d3675a500d0
python/cpython
python__cpython-102068
# Exception using fileinput.hook_compressed in binary mode <!-- If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not the right place to seek help. Consider the following options instead: - reading the Python tutorial: https://docs.python.org...
6f25657b83d7a680a97849490f6e973b3a695e1a
022b44f2546c44183e4df7b67e3e64502fae9143
python/cpython
python__cpython-111362
# SystemError in re.match with a "*+" pattern # Bug report The following code raises a SystemError. ```python import re re.match('((x)|y|z)*+', 'xyz') ``` Error message: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\Arttu\AppData\Local\Programs\Python\Pytho...
f9c5573dedcb2f2e9ae152672ce157987cdea612
7538e7f5696408fa0aa02fce8a413a7dfac76a04
python/cpython
python__cpython-101958
# Set: `BUILD_SET` opcode can be failed with segfault https://github.com/python/cpython/blob/36b139af638cdeb671cb6b8b0315b254148688f7/Python/generated_cases.c.h#L1648-L1667 & https://github.com/python/cpython/blob/36b139af638cdeb671cb6b8b0315b254148688f7/Python/bytecodes.c#L1303-L1316 Doesn't take in account case...
ed4dfd8825b49e16a0fcb9e67baf1b58bb8d438f
5a1559d9493dd298a08c4be32b52295aa3eb89e5
python/cpython
python__cpython-101950
# use textwrap.dedent in compiler tests to make them more readable Some of them use dedent and some don't, it looks messy. <!-- gh-linked-prs --> ### Linked PRs * gh-101950 <!-- /gh-linked-prs -->
36b139af638cdeb671cb6b8b0315b254148688f7
df7ccf6138b1a2ce0b82ff06aa3497ca4d38c90d
python/cpython
python__cpython-102914
# test_sqlite3 failure with SQLite 3.40.1 Since we recently updated from SQLite 3.35.5 to 3.40.1, I am seeing the following test failure: ``` ====================================================================== FAIL: test_serialize_deserialize (test.test_sqlite3.test_dbapi.SerializeTests.test_serialize_deserializ...
61405da9a5689f554aa53929a2a9c168cab6056b
3d7eb66c963c0c86021738271483bef27c425b17
python/cpython
python__cpython-102100
# HTTPError fp.read returns string instead of bytes Due to https://github.com/python/cpython/pull/99966/files However, this returns a bytes stream on the live run: ```python from http import HTTPStatus from mailbox import Message from urllib.error import HTTPError from urllib.request import urlopen try: ...
0d4c7fcd4f078708a5ac6499af378ce5ee8eb211
c2b85a95a50687a2e5d1873e17266370876e77e9
python/cpython
python__cpython-101933
# Multi-line arguments in a function call crashes CPython <!-- Use this template for hard crashes of the interpreter, segmentation faults, failed C-level assertions, and similar. Do not submit this form if you encounter an exception being unexpectedly raised from a Python function. Most of the time, these sho...
df7ccf6138b1a2ce0b82ff06aa3497ca4d38c90d
0b13575e74ff3321364a3389eda6b4e92792afe1
python/cpython
python__cpython-101899
# Missing term references for hashable definition In the documentation, the `hashable` word is written in plain text without the term keyword(`:term:'hashable'`). Example; ``` - Remove the entry in dictionary *p* with key *key*. *key* must be hashable; + Remove the entry in dictionary *p* with key *key*. *...
3690688149dca11589af59b7704541336613199a
e5da9ab2c82c6b4e4f8ffa699a9a609ea1bea255
python/cpython
python__cpython-101896
# Callable iterator can SystemError if call exhausts the iterator # Bug report If the callable of a callable iterator (with sentinel) exhausts the iterator itself during the call, a SystemError occurs. > Example discovered by @chilaxan ```python def bug(): if bug.clear: return 1 else: ...
705487c6557c3d8866622b4d32528bf7fc2e4204
b022250e67449e0bc49a3c982fe9e6a2d6a7b71a
python/cpython
python__cpython-101882
# os: support blocking functions on Windows The os.get_blocking and os.set_blocking functions are only currently supported on Unix. <!-- gh-linked-prs --> ### Linked PRs * gh-101882 <!-- /gh-linked-prs -->
739c026f4488bd2e37d500a2c3d948aaf929b641
36b139af638cdeb671cb6b8b0315b254148688f7
python/cpython
python__cpython-101883
# Docs: link hash doc to `object.__hash__` doc # Documentation A note in the documentation for the hash builtin writes ``` See __hash__ for details ``` `__hash__` should include a link. <!-- gh-linked-prs --> ### Linked PRs * gh-101883 * gh-106546 * gh-106547 <!-- /gh-linked-prs -->
ec7180bd1b3c156d4484e8e6babc5ecb707420e3
69a39bd9ad52241ca0e9a1926b4536c73017d067
python/cpython
python__cpython-101886
# Documentation for smtplib Missing Italics The input parameter `source_address` for `class smtplib.SMTP` is missing _italics_. I was scanning the text looking for the documentation for this input and couldn't find it because I am used to scanning for _italics_ according to the conventions of Python docs. Here is a hi...
28a05f4cc2b150b3ff02ec255daf1b6ec886ca6f
37e37553b09dba073cfe77d9fb96863b94df2fbc
python/cpython
python__cpython-101866
# `co_lnotab` must be removed in 3.12 according to PEP 626 > The co_lnotab attribute will be deprecated in 3.10 and removed in 3.12. https://peps.python.org/pep-0626/#backwards-compatibility It was documented as deprecated in 3.10 and to-be-removed in 3.12: https://docs.python.org/3/whatsnew/3.10.html#pep-626-pr...
2a721258a199e9bcdcee2069719ad9c8f8c0d030
e6f7d35be7fb65d8624e9411251554c9dee0c931
python/cpython
python__cpython-102417
# euc_kr char '0x3164' decode('ksx1001') cause UnicodeDecodeError <!-- If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not the right place to seek help. Consider the following options instead: - reading the Python tutorial: https://docs.py...
77a3196b7cc17d90a8aae5629aa71ff183b9266a
90801e48fdd2a57c5c5a5e202ff76c3a7dc42a50
python/cpython
python__cpython-101876
# Add `__name__` to property ```python class C: @property def foo(self): return 1 assert C.foo.__name__ == "foo" ``` It would be very handy if this worked, so properties can be introspected the same way as functions, classmethods, etc. Name can be simply taken from `fget` the same way this is ...
c0b0c2f2015fb27db4306109b2b3781eb2057c2b
9af80ec83d1647a472331bd1333a7fa9108fe98e
python/cpython
python__cpython-101858
# `posixmodule.c` doesn't detect xattr support on Linux with non-glibc (e.g. musl) # Bug report `posixmodule.c` detects xattr support by checking for `__GLIBC__` (and some other conditions) at https://github.com/python/cpython/blob/86ebd5c3fa9ac0fba3b651f1d4abfca79614af5f/Modules/posixmodule.c#L277. This incorrectl...
8be8101bca34b60481ec3d7ecaea4a3379fb7dbb
928752ce4c23f47d3175dd47ecacf08d86a99c9d
python/cpython
python__cpython-101877
# Windows Launcher MSI package has wrong version in 3.11.2, breaks upgrade from 3.11.0, .1 # Bug report The upgrade from Python 3.11.1 to 3.11.2 on Windows fails because the launcher package refuses to downgrade itself. That it believes a downgrade to be involved in the installation is surprising. The reason is tha...
0c6fe81dce9d6bb1dce5e4503f1b42bc5355ba24
95cbb3d908175ccd855078b3fab7f99e7d0bca88
python/cpython
python__cpython-101846
# Doc: content of availability directive lost in i18n # Bug report See https://git.afpy.org/AFPy/python-docs-fr/issues/28 For example, take the `os.getgid` function. https://docs.python.org/3/library/os.html#os.getgid reads """ os.getgid() Return the real group id of the current process. [Availability]...
6ef6915d3530e844243893f91bf4bd702dfef570
dfc2e065a2e71011017077e549cd2f9bf4944c54
python/cpython
python__cpython-120884
# Accessing a tkinter object's string representation converts the object to a string on Windows Introduced in #16545 Affects Python 3.7+ on Windows only --- The [`FromObj`](https://github.com/python/cpython/blob/3eb12df8b526aa5a2ca6b43f21a1c5e7d38ee634/Modules/_tkinter.c#L1115) function in `_tkinter.c` attempt ...
f4ddaa396715855ffbd94590f89ab7d55feeec07
18b6ca9660370c7fb5fd50c4036be078c3267f4c
python/cpython
python__cpython-101843
# as_integer_ratio docstring's For builtin/stdlib types we have int: ``` Return integer ratio. Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator. ``` Fraction: ``` as_integer_ratio(self) Return the integer ratio as a tuple. ...
4624987b296108c2dc1e6e3a24e65d2de7afd451
4f3786b7616dd464242b88ad6914053d409fe9d2
python/cpython
python__cpython-101822
# `ast.main` is not covered All this code is not covered: https://github.com/python/cpython/blob/b652d40f1c88fcd8595cd401513f6b7f8e499471/Lib/ast.py#L1712-L1737 Proof: https://github.com/python/cpython/blob/b652d40f1c88fcd8595cd401513f6b7f8e499471/Lib/test/test_ast.py If I remove `def main`, tests still pass. ...
bb396eece44036a71427e7766fbb8e0247373102
534660f1680955c7a6a47d5c6bd9649704b74a87
python/cpython
python__cpython-101904
# Isolate the `_io` extension module Isolate the `_io` extension module by moving all global variables to module state, porting static types to heap types, and implementing multi-phase init. All global variables in the `_io` module are static types: - Modules/_io/bufferedio.c: PyBufferedIOBase_Type - Modules/_io/b...
eb0c485b6c836abb71932537a5058344d11d7bc8
c7766245c14fa03b8afd3aff9be30b13d0069f95
python/cpython
python__cpython-101811
# Duplicated st_ino calculation # Feature or enhancement The `status->st_ino = (((uint64_t)info.nFileIndexHigh) << 32) + info.nFileIndexLow;` in function `_Py_fstat_noraise()` in file `Python/fileutils.c` is already calculated and assigned in the function `_Py_attribute_data_to_stat()` in same file. So I'm proposing...
95cbb3d908175ccd855078b3fab7f99e7d0bca88
2db2c4b45501eebef5b3ff89118554bd5eb92ed4
python/cpython
python__cpython-101800
# PREP_RERAISE_STAR can be replaced by an intrinsic function The PREP_RERAISE_STAR bytecode is not performance critical and it can be implemented as a binary instrinsic function. <!-- gh-linked-prs --> ### Linked PRs * gh-101800 <!-- /gh-linked-prs -->
81e3aa835c32363f4547b6566edf1125386f1f6d
3690688149dca11589af59b7704541336613199a
python/cpython
python__cpython-101798
# Allocate PyExpat_CAPI capsule on heap To make it compatible with sub-interpreters it needs to be allocated on heap rather than static storage. <!-- gh-linked-prs --> ### Linked PRs * gh-101798 <!-- /gh-linked-prs -->
b652d40f1c88fcd8595cd401513f6b7f8e499471
17143e2c30ae5e51945e04eeaec7ebb0e1f07fb5
python/cpython
python__cpython-103877
# Incorrect / incomplete documentation of asyncio.Server # Documentation URL: https://docs.python.org/3.7/library/asyncio-eventloop.html#asyncio.Server.sockets The documentation states that `sockets` is a list of `socket.socket` objects The actual type is a list of `asyncio.trsock.TransportSocket` (that is no...
1c0a9c5a1c84bc334f2bde9d45676f19d9632823
214e5684c274f359d4cc34381f65e9f1a9952802
python/cpython
python__cpython-102026
# Weird PriorityQueue description # Documentation Someone asked [Does PriorityQueue call sorted every time get is called?](https://stackoverflow.com/questions/75407200/does-priorityqueue-call-sorted-every-time-get-is-called). First I laughed, how did they come up with that silly idea, but then I saw they got it fro...
350ba7c07f8983537883e093c5c623287a2a22e5
0f7a9725300e750947159409abbf5722a4a79f8b
python/cpython
python__cpython-101780
# Optimize creation of unnormalized Fraction's in private methods (arithmetics, etc) Right now we just use `__new__()` with a private kwarg `_normalize=False`. That's slightly less efficient, then a dedicated class method. POC patch --------------- ```diff diff --git a/Lib/fractions.py b/Lib/fractions.py index...
4f3786b7616dd464242b88ad6914053d409fe9d2
bb0cf8fd60e71581a90179af63e60e8704c3814b
python/cpython
python__cpython-101942
# Refleak in `test_importlib` on `aarch64 RHEL8` I am not sure what is going on with this test run: ``` Ran 1377 tests in 3.713s OK (skipped=18, expected failures=1) ...... test_importlib leaked [6, 4, 2] references, sum=12 test_importlib leaked [4, 4, 2] memory blocks, sum=10 0:32:52 load avg: 0.42 Re-runnin...
775f8819e319127f9bfb046773b74bcc62c68b6a
3c0a31cbfd1258bd96153a007dd44a96f2947dbf
python/cpython
python__cpython-101769
# iter `__reduce__` can segfault if accessing `__builtins__.__dict__['iter']` mutates the iter object # Crash report Example from @chilaxan ```python corrupt = iter(lambda:0, 0) class Cstr: def __hash__(self): return hash('iter') def __eq__(self, other): [*corrupt] return o...
d71edbd1b7437706519a9786211597d95934331a
a498de4c0ef9e264cab3320afbc4d38df6394800
python/cpython
python__cpython-101784
# Update libffi in Windows installer to 3.4.4 libffi-3.4.4 was released a few months ago, and claims to fix unspecified issues on all Windows platforms. We're currently using 3.4.3 and 3.11 and 3.12, so should update them both. <!-- gh-linked-prs --> ### Linked PRs * gh-101784 * gh-101795 <!-- /gh-linked-prs -->
e1aadedf099e645fd2eb1aa8bdcde5a105cee95d
366b94905869d680b3f1d4801fb497e78811e511
python/cpython
python__cpython-101764
# impaplib's IMAP4 last example does not use the 'host' parameter which leads to a crash # Documentation When using the example at the bottom of the page: ```python import getpass, imaplib M = imaplib.IMAP4() M.login(getpass.getuser(), getpass.getpass()) M.select() typ, data = M.search(None, 'ALL') for num...
39df7732178c8e8f75b12f069a3dbc1715c99995
a1e948edba9ec6ba61365429857f7a087c5edf51
python/cpython
python__cpython-101761
# Bump to SQLite 3.40.1 in macOS and Windows installers SQLite 3.40.1 has been out for more than one month now. Suggesting to bump in all active branches (main/3.12 through 3.10). See also [the SQLite 3.40 release log](https://sqlite.org/releaselog/3_40_1.html) <!-- gh-linked-prs --> ### Linked PRs * gh-101761 * g...
d40a23c0a11060ba7fa076d50980c18a11a13a40
448c7d154e72506158d0a7a766e9f1cb8adf3dec
python/cpython
python__cpython-101891
# Isolate PyModuleDef to Each Interpreter for Extension/Builtin Modules Typically each `PyModuleDef` for a builtin/extension module is a static global variable. Currently it's shared between all interpreters, whereas we are working toward interpreter isolation (for a variety of reasons). Isolating each `PyModuleDef`...
984f8ab018f847fe8d66768af962f69ec0e81849
4d8959b73ac194ca9a2f623dcb5c23680f7d8536
python/cpython
python__cpython-101840
# Document that `os.environ` forcibly upper-cases keys on case-insensitive OSs # Documentation [`os.environ` docs](https://docs.python.org/3/library/os.html?highlight=os%20environ#os.environ) don't mention that the keys get upper-cased automatically on e.g. Windows. <!-- gh-linked-prs --> ### Linked PRs * gh-101...
4e7c0cbf59595714848cf9827f6e5b40c3985924
12011dd8bafa6867f2b4a8a9e8e54cb0fbf006e4
python/cpython
python__cpython-101748
# Refleak after new `OrderedDict` repr It is reported by @corona10 that after https://github.com/python/cpython/commit/790ff6bc6a56b4bd6e403aa43a984b99f7171dd7 we have a new refleak: * test_ordered_dict * test_pprint * test_trace Looks like `dcopy = PyDict_Copy((PyObject *)self);` is created, but never freed :( ...
34c50ceb1e2d40f7faab673d2033ecaafd3c611a
5b946d371979a772120e6ee7d37f9b735769d433
python/cpython
python__cpython-101746
# enum.Flag: default for boundary is incorrect In c9480d5ad59b052ad3d3422fcf0ac8dd5fed7f6d the default was changed from `STRICT` to `CONFORM`, but the docs were never updated to reflect this. See https://docs.python.org/3.11/library/enum.html#enum.FlagBoundary > STRICT > Out-of-range values cause a [ValueError...
7f1c72175600b21c1c840e8988cc6e6b4b244582
77d95c83733722ada35eb1ef89ae5b84a51ddd32
python/cpython
python__cpython-118425
# test_ssl fails after 2038 # Environment - i.MX6 32 bits CPU - Yocto Kirkstone (kirkstone-4.0.6) - Linux 5.10.109 - glibc 2.35 (8d125a1f9145ad90c94e438858d6b5b7578686f2) - openssl 3.0.7 - Python 3.10.8 - RFS built with "-D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64" flags - System date set after 011903142038 (2038...
37ccf167869d101c4021c435868b7f89ccda8148
ca269e58c290be8ca11bb728004ea842d9f85e3a
python/cpython
python__cpython-101727
# OpenSSL used in binary builds needs updating for CVE-2023-0286 https://www.openssl.org/news/secadv/20230207.txt https://nvd.nist.gov/vuln/detail/CVE-2023-0286 The just released binaries on Windows and macOS were all build using 1.1.1s, we need to use 1.1.1t in the release branches. <!-- gh-linked-prs --> ### Li...
b41c47cd0606e8273aef4813e83fe2deaf9ab33b
6d92373f500eb81a175516b3abb16e21f0806c1f
python/cpython
python__cpython-101697
# `_PyStaticType_Dealloc` does not invalidate type version tag `_PyStaticType_Dealloc` does not invalidate the type version tag and when the interpreter is reinitialized it still points to the old index. It should be cleared after the runtime finalization to avoid a rare case where there is a cache hit from the old in...
d9de0792482d2ded364b0c7d2867b97a5da41b12
2a8bf2580441147f1a15e61229d669abc0ab86ee
python/cpython
python__cpython-101698
# sqlite3: issue a warning if a sequence of params are used with named placeholders in queries (See [Discourse topic](https://discuss.python.org/t/sqlite3-consider-deprecating-combining-named-placeholders-with-sequence-of-params/22450?u=erlendaasland).) Per now, it is possible to supply a sequence of params to querie...
8a2b7ee64d1bde762438b458ea7fe88f054a3a88
d777790bab878b8d1a218a1a60894b2823485cca
python/cpython
python__cpython-101827
# Add typing.get_orig_bases and typing.get_orig_class # Feature or enhancement typing has had `type.__orig_bases__` and `type.__orig_class__` for quite some time now, there is no stable API to access these attributes. # Pitch I would like to propose adding `typing.get_orig_bases` as something like ```py @ov...
730bbddfdf610343a2e132b0312d12254c3c73d6
05b3ce7339b9ce44eec728e88e80ba1f125436ed
python/cpython
python__cpython-101679
# Refactor math module to use C99+ special functions (erf, erfc, etc) The PEP 7 documents, that we must use C11 (without optional features) since CPython 3.11. erf, erfc, lgamma and tgamma (math.gamma) are part of the C99 (and mandatory for C11 too). Probably, it's not a bad idea to get rid of custom implementatio...
58395759b04273edccf3d199606088e0703ae6b1
244d4cd9d22d73fb3c0938937c4f435bd68f32d4
python/cpython
python__cpython-101674
# pdb loses local variable change after command longlist # Bug report In pdb, `ll` will clear the local variable change. ```python def main(): a = 1 breakpoint() print(a) main() ``` ```python -> print(a) (Pdb) p a 1 (Pdb) !a = 2 (Pdb) p a 2 (Pdb) ll 1 def main(): 2 ...
5d677c556f03a34d1c2d86e4cc96025870c20c12
f6ca71a42268dcd890bd1930501b6c7e6d7ce66e
python/cpython
python__cpython-101672
# Grammatical error in message string for `FatalError` when calling `PyImport_AppendInittab()` after `Py_Initialize()` The following line should have the first instance of "be" replaced with "not": https://github.com/python/cpython/blob/aacbdb0c650492756738b044e6ddf8b72f89a1a2/Python/import.c#L2695 <!-- gh-linked-...
35dd55005ee9aea2843eff7f514ee689a0995df8
86ebd5c3fa9ac0fba3b651f1d4abfca79614af5f
python/cpython
python__cpython-101660
# Isolate the Default Object Allocator between Interpreters (see gh-100227) By default, the allocator for the "object" and "mem" domains is historically known as "obmalloc". The implementation of the allocator is `_PyObject_Malloc()`, etc., for which the runtime state is found in `_PyRuntimeState.obmalloc`. Thus ...
df3173d28ef25a0f97d2cca8cf4e64e062a08d06
01be52e42eac468b6511b56ee60cd1b99baf3848
python/cpython
python__cpython-101657
# New warning: `conversion from 'Py_ssize_t' to 'int', possible loss of data` in `Modules/_testcapimodule.c` <img width="910" alt="Снимок экрана 2023-02-07 в 21 22 57" src="https://user-images.githubusercontent.com/4660275/217332496-cef2e448-0522-47fc-89b1-c87c60fab42f.png"> This happens because: - `Py_ssize_t c_a...
acc2f3b19d28d4bf3f8fb32357f581cba5ba24c7
dec1ab03879e959f7efb910a723caf4a9ce453cf
python/cpython
python__cpython-101802
# argparse: Check if stderr is defined before writing to it # Bug report `argparse` tries to write to stderr inconditionally, even when it's `None`. This is only a problem on Windows. Here: https://github.com/python/cpython/blob/3.11/Lib/argparse.py#L2596-L2600 I detected this when using [PyInstaller](https:/...
42f54d1f9244784fec99e0610aa05a5051e594bb
92d8bfffbf377e91d8b92666525cb8700bb1d5e8
python/cpython
python__cpython-106169
# regrtest can reports false SUCCESS and skip tests when a -j worker dies See in https://buildbot.python.org/all/#/builders/424/builds/3407/steps/5/logs/stdio (Raspbian) ``` ... 0:04:46 load avg: 7.28 [ 48/434] test_isinstance passed -- running: test_largefile (2 min 54 sec) 0:05:03 load avg: 7.39 [ 49/434] test...
2ac3eec103cf450aaaebeb932e51155d2e7fb37b
3f8483cad2f3b94600c3ecf3f0bb220bb1e61d7d
python/cpython
python__cpython-101633
# Add return const instruction From the pystats doc ([pystats-2023-02-05-python-5a2b984.md](https://github.com/faster-cpython/ideas/blob/main/stats/pystats-2023-02-05-python-5a2b984.md)), I find that `LOAD_CONST + RETURN_VALUE` is a very high frequency (Because the default return of the function is None). Success...
753fc8a5d64369cd228c3e43fef1811ac3cfde83
0d3d5007b136ff1bc0faa960d6526e047dd92396
python/cpython
python__cpython-101617
# Mention the Docs Discourse forum in the "Reporting Documentation Bugs" section # Documentation On the section for reporting [Documentation bugs](https://docs.python.org/3/bugs.html#documentation-bugs), we tell people to use the "tracker" or to email docs@python.org about it. The Documentation Discourse forum w...
949c58f945b93af5b7bb70c6448e940da669065d
132b3f8302c021ac31e9c1797a127d57faa1afee
python/cpython
python__cpython-101615
# Cannot import extensions linked against `python3_d.dll` debug build on Windows # Bug report Build a debug version of CPython on Windows. Build an an extension module linked against this debug CPython's `python3_d.dll`. This crashes at runtime with the following error: ``` ImportError: Module use of python...
3a88de7a0af00872d9d57e1d98bc2f035cb15a1c
eb49d32b9af0b3b01a5588626179187f11d145c9
python/cpython
python__cpython-101610
# New warning: `‘state’ may be used uninitialized in this function` in `_xxinterpchannelsmodule.c` I am not sure if this is a false-positive or not, but here's the warning: <img width="747" alt="Снимок экрана 2023-02-06 в 21 57 19" src="https://user-images.githubusercontent.com/4660275/217060580-f1888605-77ce-48ad-8d...
262003fd3297f7f4ee09cebd1abb225066412ce7
b96b344f251954bb64aeb13c3e0c460350565c2a
python/cpython
python__cpython-103372
# ``argparse`` Prints options per flag name when only once is necessary <!-- If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not the right place to seek help. Consider the following options instead: - reading the Python tutorial: https://do...
c4a2e8a2c5188c3288d57b80852e92c83f46f6f3
73d20cafb54193c94577ca60df1ba0410b3ced74
python/cpython
python__cpython-104965
# Deprecate pickle support for itertools Pickle support was long ago added to some itertools. It was done mostly to support an atypical use case for a single company. It was implemented in a very inefficient manner, essentially replaying iteration from the beginning to the mid-stream state where it was frozen. The im...
402ee5a68b306b489b782478ab96e8e3b913587a
328422ce6162eb18735a2c0de12f8a696be97d0c
python/cpython
python__cpython-101607
# `PyErr_SetObject()` behavior is strange and not as documented. Briefly: `PyErr_SetObject(exc_type, exc_val)` does not create a new exception iff `isinstance(exc_val, BaseException)`, but uses `exc_val` instead. Callers of `PyErr_SetObject()` need various workarounds to handle this. The long version: Intern...
feec49c40736fc05626a183a8d14c4ebbea5ae28
027adf42cd85db41fee05b0a40d89ef822876c97
python/cpython
python__cpython-101737
# Document the behaviour of Decimal.__round__ # Documentation The documentation is missing a description of the behaviour of `round` on `Decimal` objects. It's worth documenting, since the behaviour (particularly with respect to the context) is non-obvious. Of particular note: * two-argument `round` respects...
7dd8c37a067f9fcb6a2a658d6a93b294cc2e6fb4
02e74c356223feb0771759286d24d1dbac01d4ca
python/cpython
python__cpython-101571
# Update the bundled version of pip to 23.0 # Feature or enhancement Update the copy of pip bundled with CPython to 23.0 (the current latest). # Pitch This ensures that users can use functionality in the newer versions of pip. <!-- gh-linked-prs --> ### Linked PRs * gh-101571 * gh-102239 * gh-102240 <!-- /...
19ac43629e6fd73f2dbf9fd5a0b97d791c28acc7
39017e04b55d4c110787551dc9a0cb753f27d700
python/cpython
python__cpython-102018
# ZipFile.extractall fails if zipfile.Path object is created based on the ZipFile object # Bug report The following code works fine with Python 3.8 and 3.9 but starts failing with Python 3.10. It seems that `zipfile.Path` creates an entry in the `zipfile.ZipFile` object that does not exist in the underlying file...
36854bbb240e417c0df6f0014924fcc899388186
84181c14040ed2befe7f1a55b4f560c80fa61154
python/cpython
python__cpython-101563
# typing: Inheritance with `NotRequired` or `Required` in parent fields is not tested Such case `Lib/test/test_typing.py` doesn't cover. ```py from typing import TypedDict, Required, NotRequired, get_type_hints class Parent(TypedDict, total=False): field: Required[str] class Child(Parent): another_f...
b96b344f251954bb64aeb13c3e0c460350565c2a
7a253103d4c64fcca4c0939a584c2028d8da6829
python/cpython
python__cpython-101564
# Add typing.override decorator # Feature or enhancement See [PEP 698](https://peps.python.org/pep-0698/) for details. The `typing.override` decorator should, at runtime, attempt to set the `__override__` attribute on its argument to `True` and then return the argument. If it cannot set the `__override__` flag i...
12011dd8bafa6867f2b4a8a9e8e54cb0fbf006e4
71db5dbcd714b2e1297c43538188dd69715feb9a
python/cpython
python__cpython-124669
# The builtin `help(...)` should unstringify (and "unforwardref") annotations # Feature or enhancement When using `help(...)`, annotations should be unstringified and displayed without `typing.ForwardRef`. # Pitch Current behavior displays string annotations with quotes as follows: ```python def foo(x: Li...
78406382c97207b985b5c1d24db244ec398b7e3f
b502573f7f800dbb2e401fa2a7a05eceac692c7a
python/cpython
python__cpython-101550
# wrong type documented for xml.etree.ElementInclude.default_loader # Documentation In the description of xml.etree.ElementInclude in the funtion reference at [ElementInclude reference](https://docs.python.org/3.7/library/xml.etree.elementtree.html?highlight=xml#elementinclude-functions) in all versions starting wi...
898f6de63fd5285006ee0f4993aeb8ed3e8f97f9
91d7605ac3c15a185fd67921907cebaf0def1674
python/cpython
python__cpython-101544
# Python 3.11 on Windows prioritises registry paths over build directory If you have Python 3.11 installed by the EXE installer, and then build from source and run it from the build directory, it will detect and use the installed stdlib rather than its own. I believe this is a regression since 3.11.1, so it hasn't ...
7a253103d4c64fcca4c0939a584c2028d8da6829
46416b9004b687856eaa73e5d48520cd768bbf82
python/cpython
python__cpython-101590
# Unexpected behaviour of IntFlag with a custom __new__ in Python 3.11.0. # Bug report According to the [enum documentation](https://docs.python.org/3/howto/enum.html#when-to-use-new-vs-init), it is possible to customize the enumeration *value* via a custom ``__new__`` method and the enumeration *member* (e.g., by...
ef7c2bfcf1fd618438f981ace64499a99ae9fae0
d3e2dd6e71bd8e5482973891926d5df19be687eb
python/cpython
python__cpython-101540
# System transitions tests are skipped in datetime tester <!-- If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not the right place to seek help. Consider the following options instead: - reading the Python tutorial: https://docs.python.org/...
ddd619cffa457776a22f224b7111bd39de289d66
5a2b984568f72f0d7ff7c7b4ee8ce31af9fd1b7e
python/cpython
python__cpython-101537
# Add threading support based on wasi-threads # Feature or enhancement use [wasi-threads](https://github.com/WebAssembly/wasi-threads) via [wasi-sdk](https://github.com/WebAssembly/wasi-sdk) # Pitch # Previous discussion <!-- New features to Python should first be discussed elsewhere before creating iss...
d8f87cdf94a6533c5cf2d25e09e6fa3eb06720b9
13237a2da846efef9ce9b93fd4bcfebd49933568
python/cpython
python__cpython-101612
# HTTPError documentation needs improvement # Bug report The [documentation for HTTPError](https://docs.python.org/dev/library/urllib.error.html#urllib.error.HTTPError) needs some love. At least: - include the arguments that needs to receive (currently none is listed) - describe those arguments below (currently ...
af446bbb76f64e67831444a0ceee6863a1527088
89413bbccb9261b72190e275eefe4b0d49671477
python/cpython
python__cpython-101526
# Maybe Drop "channels" from _xxsubinterpreters The `_xxsubinterpreters` module is essentially the low-level implementation of PEP 554. However, we added it a while back for testing purposes, especially to further exercise the runtime relative to subinterpreters. Since then, I've removed "channels" from PEP 554. So...
c67b00534abfeca83016a00818cf1fd949613d6b
d4c410f0f922683f38c9d435923939d037fbd8c2