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-115499
# `_xxinterpchannelsmodule.c` incorrect error handling in `SET_COUNT` macro # Bug report Right now it uses `Py_DECREF(info)`, which is strange, because `info` has `struct channel_info *` type. But, it does not clear `PyObject *self = PyStructSequence_New(state->ChannelInfoType);` which is declared right above. I thi...
fd2bb4be3dd802b1957cf37fe68a3634ab054b2e
26f23daa1ea30dea368f00c2131017cef2586adc
python/cpython
python__cpython-115573
# Keep `ob_tid`, `ob_ref_local`, and `ob_ref_shared` fields valid across allocations in free-threaded build # Feature or enhancement The free-threaded implementation of dict and list try avoid acquiring locks during read operations. To support this, we need to be able to access the reference count fields of Python ob...
cc82e33af978df793b83cefe4e25e07223a3a09e
c0b0c2f2015fb27db4306109b2b3781eb2057c2b
python/cpython
python__cpython-115493
# test_interpreters fails when running tests sequentially # Bug report ### Bug description: test_interpreters fails when running tests sequentially (which we do as part of the release process). The easiest reproducer seems to be `python -m test test_interpreters test_interpreters.test_channels`: ``` % bin/python -m...
eb22e2b251002b65f3b93e67c990c21e1151b25d
207030f5527d405940b79c10c1413c1e8ff696c1
python/cpython
python__cpython-115484
# `test.test_interpreters.test_api.TestInterpreterIsRunning.test_main` Fails in Embedded App # Bug report (See https://discuss.python.org/t/clarification-on-pep-734-subinterpreters-with-embedded-c-api/45889/1) The test fails if CPython (main/3.13) is embedded without using `Py_Main()`. This is because `Py_Main()` c...
468430189d3ebe16f3067279f9be0fe82cdfadf6
3e7b7df5cbaad5617cc28f0c005010787c48e6d6
python/cpython
python__cpython-115478
# Type/constant/value propagation for `BINARY_OP` <!-- gh-linked-prs --> ### Linked PRs * gh-115478 * gh-115507 * gh-115550 * gh-115710 * gh-118050 <!-- /gh-linked-prs -->
4ebf8fbdab1c64041ff0ea54b3d15624f6e01511
ed23839dc5ce21ea9ca087fac170fa1412005210
python/cpython
python__cpython-115558
# Split micro-ops that have different behavior depending on low bit of oparg. Splitting these micro-ops will improve performance by reducing the number of branches, the size of code generated, and the number of holes in the JIT stencils. There is no real downside; the increase in complexity at runtime is negligible a...
626c414995bad1dab51c7222a6f7bf388255eb9e
7b21403ccd16c480812a1e857c0ee2deca592be0
python/cpython
python__cpython-115451
# Direct invocation of `test_descrtut.py` fails # Bug report Output: ``` » ./python.exe Lib/test/test_descrtut.py F..F.... ====================================================================== FAIL: tut1 (__main__.__test__) Doctest: __main__.__test__.tut1 ------------------------------------------------------------...
ec8909a23931338f81803ea3f18dc2073f74a152
029ec91d43b377535ff7eb94993e0d2add4af720
python/cpython
python__cpython-115460
# New warning: `missing braces around initializer [-Wmissing-braces]` # Bug report ### Bug description: Popped up in https://github.com/python/cpython/pull/115440/files ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-1...
17773fcb863d5aef299487b07207c2ced8e9477e
a2d4281415e67c62f91363376db97eb66a9fb716
python/cpython
python__cpython-115433
# Add variant of `Py_BEGIN_CRITICAL_SECTION` that accepts a `NULL` argument # Feature or enhancement We should add a variant of `Py_BEGIN_CRITICAL_SECTION` / `Py_END_CRITICAL_SECTION` that accepts a possibly `NULL` object. If the passed object is `NULL` then nothing is locked or unlocked. Otherwise, it behaves like...
46c808172fd3148e3397234b23674bf70734fb55
68fbc00dc870f6a8dcbecd2ec19298e21015867f
python/cpython
python__cpython-115422
# Not all tests are installed. # Bug report ### Bug description: Not all of the tests in Lib/test are being installed, which means some tests are (silently) not run from an installed python: ``` % /tmp/testinstall/bin/python3 -m test test_multiprocessing_fork Traceback (most recent call last): File "<frozen runpy...
518af37eb569f52a3daf2cf9f4787deed10754ca
514b1c91b8651e8ab9129a34b7482033d2fd4e5b
python/cpython
python__cpython-115425
# _testinternalcapi.optimize_cfg returns incorrect exception handler labels ``` def test_except_handler_label(self): # insts = [ ('SETUP_FINALLY', handler := self.Label(), 10), ('POP_BLOCK', 0, -1), ('RETURN_CONST', 1, 11), handler, ...
f42e112fd86edb5507a38a2eb850d0ebc6bc27a2
3a9e67a9fdb4fad13bf42df6eb91126ab2ef45a1
python/cpython
python__cpython-116562
# Tier 2 optimizations for 3.13 # Feature or enhancement ## Prerequisites - [x] Overhaul Symbol API and add tests: https://github.com/python/cpython/pull/116028 - [x] Re-enable optimizer by default: https://github.com/python/cpython/pull/116062 - [x] https://github.com/python/cpython/issues/116088 ## Optimi...
617aca9e745b3dfb5e6bc8cda07632d2f716426d
fcd49b4f47f1edd9a2717f6619da7e7af8ea73cf
python/cpython
python__cpython-115418
# ``test_capi.test_time`` prints unnecessary information # Bug report ### Bug description: ```python ./python -m test -R 3:3 test_capi.test_time Using random seed: 1733803764 0:00:00 load avg: 0.08 Run 1 test sequentially 0:00:00 load avg: 0.08 [1/1] test_capi.test_time beginning 6 repetitions 123456 ... 1225850373 ...
225cd55fe676d128518af31f53b63a591fc4a569
02b63239f1e91f8a03c0b455c5201e6d07f642ab
python/cpython
python__cpython-115411
# co_qualname "new in version" information missing in doc # Documentation Usually documentation includes deprecated or "new in version" tags for all features. the field `co_qualname` in code objects was added in python 3.11 but the documentation does not precise that, and it feels like it was always defined h...
de07941729b8899b187b8ef9690f9a74b2d6286b
5719aa23ab7f1c7a5f03309ca4044078a98e7b59
python/cpython
python__cpython-115452
# datetime: ".. doctest:" showing above code example # Documentation There's a stray `.. doctest::` showing at https://docs.python.org/dev/library/datetime.html#datetime.time.fromisoformat ![image](https://github.com/python/cpython/assets/1324225/8fa48710-28db-4773-b214-cf8734c6e549) The markup should be fixe...
6755c4e0c8803a246e632835030c0b8837b3b676
6d9141ed766f4003f39362937dc397e9f734c7e5
python/cpython
python__cpython-115431
# Please upgrade bundled Expat to 2.6.0 (e.g. for the fix to CVE-2023-52425) # Bug report ### Bug description: Hi! :wave: Please upgrade bundled Expat to 2.6.0 (e.g. for the fix to CVE-2023-52425). - GitHub release: https://github.com/libexpat/libexpat/releases/tag/R_2_6_0 - Change log: https://github.c...
4b2d1786ccf913bc80ff571c32b196be1543ca54
671360161f0b7a5ff4c1d062e570962e851b4bde
python/cpython
python__cpython-115623
# Please expose Expat >=2.6.0 API function `XML_SetReparseDeferralEnabled` # Feature or enhancement ### Proposal: Hello CPython team! :wave: Expat 2.6.0 introduced a new [function `XML_SetReparseDeferralEnabled`](https://libexpat.github.io/doc/api/latest/#XML_SetReparseDeferralEnabled) that currently neither...
eda2963378a3c292cf6bb202bb00e94e46ee6d90
17c4849981905fb1c9bfbb2b963b6ee12e3efb2c
python/cpython
python__cpython-115440
# Doctest incorrectly locates a decorated function # Bug report ### Bug description: TL;DR: If a function is decorated, the doctest is unable to find the correct location of the function. ## Example Consider two simple files, `main.py` and `decorate.py`. Contents of `main.py`: ```python from decorate im...
bb791c7728e0508ad5df28a90b27e202d66a9cfa
6755c4e0c8803a246e632835030c0b8837b3b676
python/cpython
python__cpython-115379
# _testinternalcapi.compiler_codegen segfaults on bad input This segfaults: ``` import ast from _testinternalcapi import compiler_codegen a = ast.parse("return 42", "my_file.py", "exec") compiler_codegen(a, "my_file.py", 0) ``` Expected SyntaxError (return not in function). <!-- gh-linked-prs --> ### Lin...
3a9e67a9fdb4fad13bf42df6eb91126ab2ef45a1
94f1334e52fbc1550feba4f433b16589d55255b9
python/cpython
python__cpython-115365
# Add documentation to the pystats output (from summarize_stats.py) # Feature or enhancement ### Proposal: The output from `summarize_stats.py` ([example here](https://github.com/faster-cpython/benchmarking-public/blob/main/results/bm-20240210-3.13.0a3%2B-4821f08-PYTHON_UOPS/bm-20240210-azure-x86_64-python-4821f0867...
fbb016973149d983d30351bdd1aaf00df285c776
2ac9d9f2fbeb743ae6d6b1cbf73337c230e21f3c
python/cpython
python__cpython-115494
# Redundant NOP is generated in -OO mode Run `test_dis`: ``` $ ./python -OO -m test -vuall test_dis ... ====================================================================== FAIL: test_disassemble_recursive (test.test_dis.DisTests.test_disassemble_recursive) -----------------------------------------------------...
732faf17a618d65d264ffe775fa6db4508e3d9ff
ad4f909e0e7890e027c4ae7fea74586667242ad3
python/cpython
python__cpython-115342
# Unittests with doctests cannot be loaded in -OO mode # Bug report For example: ``` $ ./pythonx -OO -m test -vuall test_code ... 0:00:00 load avg: 1.64 [1/1] test_code Failed to call load_tests: Traceback (most recent call last): File "/home/serhiy/py/cpython/Lib/unittest/loader.py", line 113, in loadTestsFromModu...
872cc9957a9c8b971448e7377fad865f351da6c9
07ef9d86a5efa82d06a8e7e15dd3aff1e946aa6b
python/cpython
python__cpython-115332
# bytearray.extend: Misleading error message ### Bug description: ```python b=bytearray(b"abc") b.extend('def') ``` ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'str' object cannot be interpreted as an integer``` ``` … except that `bytes.extend` doesn't even accep...
948acd6ed856251dc5889cc34cf7a58210c4f9a9
e3dedeae7abbeda0cb3f1d872ebbb914635d64f2
python/cpython
python__cpython-115321
# `get_hash_info` might potentially swallow errors in `sysmodule.c` # Bug report https://github.com/python/cpython/blob/54bde5dcc3c04c4ddebcc9df2904ab325fa0b486/Python/sysmodule.c#L1494-L1526 This code only checks for errors in the very last line: https://github.com/python/cpython/blob/54bde5dcc3c04c4ddebcc9df2904a...
207030f5527d405940b79c10c1413c1e8ff696c1
01440d3a3993b26f4a5f53c44be42cdbb0925289
python/cpython
python__cpython-115324
# Changelog filter in the docs is broken # Bug report Long ago I wrote a script [to filter changelog entries](https://docs.python.org/3.10/whatsnew/changelog.html). This worked until 3.10, but broke starting from 3.11: * https://docs.python.org/3.10/whatsnew/changelog.html (see the inputbox at the top) * https://doc...
341d7874f063dcb141672b09f62c19ffedd0a557
bee2a11946a8d6df6b6c384abccf3dfb4e75d3fc
python/cpython
python__cpython-115316
# The time library documentation should include the field to catch microseconds in a date time string # Documentation # ## Summary ## Add documentation of the `%f` field to convert microseconds in the time library. ## Details ## On this webpage (https://docs.python.org/3.10/library/time.html), the discussion o...
3a72fc36f93d40048371b789e32eefc97b6ade63
6ecfcfe8946cf701c6c7018e30ae54d8b7a7ac2a
python/cpython
python__cpython-115305
# The typical initialization of PyMutex in its comment document cannot be compiled on Windows https://github.com/python/cpython/blob/2939ad02be62110ffa2ac6c4d9211c85e1d1720f/Include/internal/pycore_lock.h#L28-L29 But it cannot be compiled outside a function on Windows: https://github.com/python/cpython/actions/runs...
87a65a5bd446a6fc74db651e56b04c332e33fa07
5f7df88821347c5f44fc4e2c691e83a60a6c6cd5
python/cpython
python__cpython-115286
# `test_dataclass` fails with `-OO` mode # Bug report Output: ``` » ./python.exe -OO Lib/test/test_dataclasses/__init__.py .................................................................................................................................F...................................................................
4297d7301b97aba2e0df9f9cc5fa4010e53a8950
de7d67b19b9f31d7712de7211ffac5bf6018157f
python/cpython
python__cpython-115283
# Direct invocation of `test_traceback.py` fails # Bug report Output: ``` » ./python.exe Lib/test/test_traceback.py ............................................................................................................................................................................................................
cc573c70b7d5e169de2a6e4297068de407dc8d4d
2939ad02be62110ffa2ac6c4d9211c85e1d1720f
python/cpython
python__cpython-115275
# Direct invocation of `Lib/test/test_unittest/testmock/testpatch.py` fails # Bug report ``` » ./python.exe Lib/test/test_unittest/testmock/testpatch.py ........................................................................................................F..... ======================================================...
f8e9c57067e32baab4ed2fd824b892c52ecb7225
1f23837277e604f41589273aeb3a10377d416510
python/cpython
python__cpython-115276
# `test_functools` fails when run with `-OO` # Bug report Output: ``` ====================================================================== FAIL: test_doc (test.test_functools.TestCachedProperty.test_doc) ---------------------------------------------------------------------- Traceback (most recent call last): Fil...
27df81d5643f32be6ae84a00c5cf84b58e849b21
43986f55671ba2f7b08f8c5cea69aa136a093697
python/cpython
python__cpython-115269
# ``test_queue`` times out # Bug report ### Bug description: See https://github.com/python/cpython/actions/runs/7856342409/job/21439020143?pr=115257 for more details. ### CPython versions tested on: CPython main branch ### Operating systems tested on: _No response_ <!-- gh-linked-prs --> ### Linked PRs * gh-115...
1a6e2138773b94fdae449b658a9983cd1fc0f08a
4821f08674e290a396d27aa8256fd5b8a121f3d6
python/cpython
python__cpython-115257
# Remove reference cycle when writing tarfiles # Feature or enhancement ### Proposal: The following code keeps a file handle for eternity and even `gc.collect` does not help. ```python >>> import tarfile >>> tarfile.TarFile("archive.tar.gz","w").add("somefile.py") ``` The culprit is a line that itself says that it i...
0dfa7ce346ac003475aa45d25c76b13081b81217
cfbdce72083fca791947cbb18114115c90738d99
python/cpython
python__cpython-115255
# `test_property` fails with `-00` mode # Bug report ``` » ./python.exe -OO -m test test_property Using random seed: 1955187317 0:00:00 load avg: 2.91 Run 1 test sequentially 0:00:00 load avg: 2.91 [1/1] test_property test test_property failed -- Traceback (most recent call last): File "/Users/sobolev/Desktop/cpy...
b70a68fbd6b72a25b5ef430603e39c9e40f40d29
3a5b38e3b465e00f133ff8074a2d4afb1392dfb5
python/cpython
python__cpython-115253
# `test_enum` fails when run with `-OO` # Bug report ``` » ./python.exe -OO -m test test_enum Using random seed: 918426150 0:00:00 load avg: 2.87 Run 1 test sequentially 0:00:00 load avg: 2.87 [1/1] test_enum test test_enum failed -- Traceback (most recent call last): File "/Users/sobolev/Desktop/cpython2/L...
33f56b743285f8419e92cfabe673fa165165a580
6f93b4df92b8fbf80529cb6435789f5a75664a20
python/cpython
python__cpython-115250
# `test_descr` fails when run with `-OO` # Bug report Output: ``` » ./python.exe -OO -m test test_descr Using random seed: 1321086896 0:00:00 load avg: 3.34 Run 1 test sequentially 0:00:00 load avg: 3.34 [1/1] test_descr test test_descr failed -- Traceback (most recent call last): File "/Users/sobolev/Desktop/cpyt...
1f23837277e604f41589273aeb3a10377d416510
1a6e2138773b94fdae449b658a9983cd1fc0f08a
python/cpython
python__cpython-115247
# Use After Free in deque_index_impl # Crash report ### What happened? ### Version Python 3.13.0a3+ (heads/v3.13.0a2:e2c4038924, Feb 10 2024, 12:05:47) [GCC 11.4.0] bisect from commit 32ea16577d2fd8994730250572957888c3e48f84 ### Root cause the `deque_index_impl` function retrieves an element from the deque using `...
671360161f0b7a5ff4c1d062e570962e851b4bde
81e140d10b77f0a41a5581412e3f3471cc77981f
python/cpython
python__cpython-115239
# Redundant f-string in graphlib.TopologicalSorter prepare method. The `prepare()` method of `graphlib.TopologicalSorter` class raises a `CycleError` if any cycles are detected in the graph. https://github.com/python/cpython/blob/e2c403892400878707a20d4b7e183de505a64ca5/Lib/graphlib.py#L104-L106 The docstring for ...
917283ada6fb01a3221b708d64f0a5195e1672dc
cf472577e24911cb70b619304c0108c7fba97cac
python/cpython
python__cpython-115210
# urllib.request resolves the host before checking it against the system's proxy bypass list [Security: LOW, minor info leak] # Bug report ### Bug description: When system proxy bypass list is set, the urllib.request library on macOS and Windows resolves the hostname to an IP address and the IP address to a host...
c43b26d02eaa103756c250e8d36829d388c5f3be
6c1c94dc517b77afcebb25436a4b7b0d13b6eb4d
python/cpython
python__cpython-115188
# Fix refleak tracking in free-threaded build # Bug report There are a few bugs with refleak tracking in the free-threaded build uncovered in https://github.com/python/cpython/pull/114824: * We should account for blocks in abandoned segments * We should stop-the-world before traversing mimalloc heaps in case there a...
31633f4473966b3bcd470440bab7f348711be48f
769d4448260aaec687d9306950225316f9faefce
python/cpython
python__cpython-115181
# Add UOp Pair counts to `pystats` # Feature or enhancement ### Proposal: Add a new section to the stats produced by `--enable-pystats`, which keeps track of the pairs, triples, and longer sequences in which UOps appear. This will be useful for analyzing candidate pairs for condensing into a single superinstruction,...
acf69e09c66f8473399fabab36b81f56496528a6
c053d52edd1e05ccc339e380b705749a3240d645
python/cpython
python__cpython-115173
# Improve index for the C API Index entries are added either implicitly by directives like **c:function** or explicitly by the **index** directive. And some explicitly added index entries do not match implicitly added index entries. For example: ```rst single: PyList_GetItem() ``` creates index entry `PyList_Ge...
573acb30f22a84c0f2c951efa002c9946e29b6a3
4a08e7b3431cd32a0daf22a33421cd3035343dc4
python/cpython
python__cpython-115169
# Add pystats counter for invalidated executors # Feature or enhancement ### Proposal: As discussed [in an investigation into why some pystats are surprising](https://github.com/faster-cpython/ideas/issues/652#issuecomment-1934168807), I suggested that it would be useful to have counts for when executors are invalid...
b05afdd5ec325bdb4cc89bb3be177ed577bea41f
96c10c648565c7406d5606099dbbb937310c26dc
python/cpython
python__cpython-115176
# vcruntime140_threads.dll is erroneously vendored when building with Visual Studio 17.8 # Bug report ### Bug description: As described in https://devblogs.microsoft.com/cppblog/c11-threads-in-visual-studio-2022-version-17-8-preview-2/, Visual Studio 17.8 introduced support for C11 threads, provided by `vcruntime140...
5914a211ef5542edd1f792c2684e373a42647b04
ed1a8daf10bc471f929c14c2d1e0474d44a63b00
python/cpython
python__cpython-115213
# typing.Annotated fails for functions returning UUIDs # Bug report ### Bug description: `typing.Annotated` tries to set an attribute on the _return value_ of calling an annotated callable. This fails when the returned object is immutable. I believe that adding `TypeError` to the `except` clause in `typing. _BaseGen...
564385612cdf72c2fa8e629a68225fb2cd3b3d99
a3af3cb4f424034b56404704fdf8f18e8c0a9982
python/cpython
python__cpython-115171
# Python 3.12 tokenize generates invalid locations for f'\N{unicode}' # Bug report ### Bug description: ```python from tokenize import untokenize, generate_tokens from io import StringIO untokenize(generate_tokens(StringIO("f'\\N{EXCLAMATION MARK}'").readline)) ``` ValueError: start (1,22) precedes previous end (1,...
ecf16ee50e42f979624e55fa343a8522942db2e7
d504968983c5cd5ddbdf73ccd3693ffb89e7952f
python/cpython
python__cpython-115148
# Typo in pickletools doc for long4 opcode # Documentation The `doc` parameter for the `LONG4` opcode in [pickletools says](https://github.com/python/cpython/blob/ef3ceab09d2d0959c343c662461123d5b0e0b64b/Lib/pickletools.py#L1256): ```py doc="""Long integer using found-byte length. A more efficient encodi...
4a7f63869aa61b24a7cc2d33f8a5e5a7fd0d76a4
38b970dfcc3cdebc87a456f17ef1e0f06dde7375
python/cpython
python__cpython-124920
# `PyThreadState_DeleteCurrent` documentation incorrect The documentation for [`PyThreadState_DeleteCurrent()`](https://docs.python.org/3/c-api/init.html#c.PyThreadState_DeleteCurrent) says: > Destroy the current thread state and release the global interpreter lock. Like PyThreadState_Delete(), **the global interpr...
9eeb21bf761070649bf8d78976a62dabb6d67a99
656b7a3c83c79f99beac950b59c47575562ea729
python/cpython
python__cpython-115137
# Possible NULL dereference in `getpath_joinpath()` # Bug report ### Bug description: ```python wchar_t **parts = (wchar_t **)PyMem_Malloc(n * sizeof(wchar_t *)); memset(parts, 0, n * sizeof(wchar_t *)); ``` The return value of `PyMem_Malloc` not checked for NULL and dereferenced after it in memset() Found ...
9e90313320a2af2d9ff7049ed3842344ed236630
4a7f63869aa61b24a7cc2d33f8a5e5a7fd0d76a4
python/cpython
python__cpython-115138
# test.test_xml_etree*.XMLPullParserTest.test_simple_xml fails with (system) expat 2.6.0 # Bug report ### Bug description: [Expat 2.6.0](https://github.com/libexpat/libexpat/blob/R_2_6_0/expat/Changes) was released yesterday, with CVE fixes. After upgrading the system library and building CPython `--with-system-expa...
6a95676bb526261434dd068d6c49927c44d24a9b
d01886c5c9e3a62921b304ba7e5145daaa56d3cf
python/cpython
python__cpython-115123
# regrtest: add --bisect option to run test.bisect_cmd on failed tests When running tests with `-R 3:3` to check for a reference leak, it's not always obvious which tests lead to the leak. I propose to add a `--bisect` option which runs the `-m test.bisect_cmd` command to bisect failing tests. <!-- gh-linked-prs --> ...
1e5719a663d5b1703ad588dda4fccd763c7d3e99
0c80da4c14d904a367968955544dd6ae58c8101c
python/cpython
python__cpython-115115
# Typo in "What’s New In Python 3.13", `file:/` missing another trailing slash # Documentation The example URI prefix is missing a trailing slash: <blockquote> <p>Add <a class="reference internal" href="../library/pathlib.html#pathlib.Path.from_uri" title="pathlib.Path.from_uri"><code class="xref py py-meth doc...
60375a38092b4d4dec9a826818a20adc5d4ff2f7
3f71c416c085cfaed49ef325f70eb374a4966256
python/cpython
python__cpython-115107
# `enum.Flag.__iter__()` is marked as "changed" in Python 3.11, but it's actually new # Documentation `Doc/library/enum.rst` near line 537 reads: ![screenshot ending with "Changed in version 3.11..."](https://github.com/python/cpython/assets/38001514/9eca49f9-b738-46e0-8f5d-5f31be2be731) `Flag.__iter__()` is n...
3f71c416c085cfaed49ef325f70eb374a4966256
11ac6f5354ec7a4da2a7e052d27d636b5a41c714
python/cpython
python__cpython-115180
# Add delayed reclamation mechanism for free-threaded build (QSBR) # Feature or enhancement Many operations in the free-threaded build are protected by locks. However, in some cases, we want to allow reads to happen concurrently with updates [^1]. For example, we want to avoid locking during most list read accesses. ...
590319072773bd6cdcca655c420d3adb84838e96
711f42de2e3749208cfa7effa0d45b04e4e1fdd4
python/cpython
python__cpython-115092
# A paragraph in ctypes documentation refers to an example that is no longer present in the documentation # Documentation In ctypes documentation for 3.11 there was this excerpt in [ctypes documentation](https://docs.python.org/3.11/library/ctypes.html#accessing-values-exported-from-dlls): > [ctypes](https://doc...
915d7dd090387b52f62bdc2f572413bc87297cee
7a3518e43aa50ea57fd35863da831052749b6115
python/cpython
python__cpython-115061
# Speed up `pathlib.Path.glob()` by removing redundant regex matching In #104512 we made `pathlib.Path.glob()` use a "walk-and-filter" strategy for expanding `**` wildcards in patterns: when we encounter a `**` segment, we immediately consume subsequent segments and use them to build a regex that is used to filter res...
6f93b4df92b8fbf80529cb6435789f5a75664a20
9d1a353230f555fc28239c5ca1e82b758084e02a
python/cpython
python__cpython-115163
# io.TextIOWrapper.read does not flush the underlying write buffer when given a size argument # Bug report ### Bug description: As reported by the StackOverflow question: https://stackoverflow.com/questions/76142400/python-file-write-stuck-in-append-mode-when-read-has-byte-count-as-parameter In the code belo...
846fd721d518dda88a7d427ec3d2c03c45d9fa90
c968dc7ff3041137bb702436ff944692dede1ad1
python/cpython
python__cpython-115128
# Test failure in `tests/test_optimizer.py` # Bug report ### Bug description: As of 01dceba1, I'm seeing a test failure on macOS and iOS in the `tests/test_optimizer.py` test case. If you run the test by itself, (`python -m test tests/test_optimizer.py`) it passes. However, if you run the entire test suite in def...
93ac78ac3ee124942bca7492149c3ff0003b6e30
95ebd45613d6bf0a8b76778454f1d413d54209db
python/cpython
python__cpython-115185
# py command fails with RC_INTERNAL_ERROR (109) return code when run with an App Pool identity in Windows # Bug report ### Bug description: I have a .NET 6 web application that responds to REST requests. Amongst other things, it can execute python scripts. This is achieved by starting a new process that uses the "py...
c39272e143b346bd6a3c04ca4fbf299163888277
91bf01d4b15a40be4510fd9ee5e6dc8e9c019fce
python/cpython
python__cpython-115046
# Atomic operations for only free-threaded builds # Feature or enhancement ### Proposal: Based on discussion in https://github.com/python/cpython/pull/113830 and elsewhere, there are situations in which we need to use an atomic operation in free-threaded builds, but do not need to use one in the default build, a...
a95b1a56bbba76a382a5c676b71db025915e8695
d9f4cbe5e1e3c31518724d87d0d379d7ce6823ca
python/cpython
python__cpython-115042
# Crash in `ThreadHandle_dealloc` after fork in free-threaded build # Bug report I've seen this in the free-threaded build, but I think the problem can theoretically occur in the default build as well. The problem is that after a `fork()`, an already dead `ThreadHandle` may be deallocated **before** it's marked ...
b6228b521b4692b2de1c1c12f4aa5623f8319084
71239d50b54c90afd3fdde260848e0c6d73a5c27
python/cpython
python__cpython-115303
# Deprecate old backward compatible shims in configure_formatter()/handler(). # Feature or enhancement ### Proposal: `DictConfigurator.configure_formatter()` and `configure_handler()` contain workarounds for old configurations https://github.com/python/cpython/blob/bcccf1fb63870c1b7f8abe246e27b7fff343abd7/Lib/loggi...
d823c235495e69fb4c1286b4ed751731bb31bda9
0a6e1a4119864bec0247b04a5c99fdd9799cd8eb
python/cpython
python__cpython-115027
# Argument Clinic does not check for errors in `PyBuffer_FillInfo` in generated code # Bug report AC generates: - https://github.com/python/cpython/blob/39ec7fbba84663ab760853da2ac422c2e988d189/Modules/clinic/_codecsmodule.c.h#L300 - https://github.com/python/cpython/blob/39ec7fbba84663ab760853da2ac422c2e988d189/Mod...
87cd20a567aca56369010689e22a524bc1f1ac03
f71bdd34085d31a826148b2e5da57e0302655056
python/cpython
python__cpython-115016
# Argument Clinic generates incorrect code for METH_METHOD methods without args # Bug report Argument Clinic generates incorrect code for methods without arguments, that need the defining class (`METH_METHOD`). Currently, only positional arguments are checked; any keyword argument is silently accepted. This affects m...
09096a1647913526a3d4fa69a9d2056ec82a8f37
4aa4f0906df9fc9c6c6f6657f2c521468c6b1688
python/cpython
python__cpython-115029
# Setters of members with unsigned integer type and __index__() Yet one strange thing about member setters with unsigned integer type is that they support different ranges for `int` and int-like objects (objects with the `__index__()` method). For Py_T_ULONG the range for `int` is `LONG_MIN`-`ULONG_MAX`, but for in...
d9d6909697501a2604d5895f9f88aeec61274ab0
d2c4baa41ff93cd5695c201d40e20a88458ecc26
python/cpython
python__cpython-115065
# Upgrade Windows and macOS installers to use SQLite 3.45 SQLite 3.45 was released [a couple of weeks ago](https://sqlite.org/releaselog/3_45_1.html). A patch version recently arrived, so more might follow. There are som bug fixes for long standing bugs included, so we might want to backport this to the 3.12 and 3.11 ...
11ac6f5354ec7a4da2a7e052d27d636b5a41c714
92abb0124037e5bc938fa870461a26f64c56095b
python/cpython
python__cpython-114991
# Some mixin methods in `collections.abc` are not mentioned in the Document ## Documentation https://docs.python.org/3/library/collections.abc.html ## Set [`Set.__rsub__`](https://github.com/python/cpython/blob/848c86786be588312bff948441929816cdd19e28/Lib/_collections_abc.py#L648) and [`Set.__rxor__`](https:/...
5768fef355a55aa9c6522e5444de9346bd267972
60c415bd531392a239c23c754154a7944695ac99
python/cpython
python__cpython-114968
# Documentation says "The built-in exceptions listed below", but they are no longer just below that section # Documentation In the documentation of "Built-in Exceptions", the second paragraph states `The built-in exceptions listed below can be generated by the interpreter or built-in functions`. Because of the new ...
750489cc774df44daa2c0d23e8a404fe62be93d1
bcccf1fb63870c1b7f8abe246e27b7fff343abd7
python/cpython
python__cpython-114966
# Update bundled pip to 24.0 <!-- gh-linked-prs --> ### Linked PRs * gh-114966 * gh-114971 * gh-114973 * gh-115097 <!-- /gh-linked-prs -->
a4c298c1494b602a9650b597aad50b48e3fa1f41
94ec2b9c9ce898723c3fe61fbc64d6c8f4f68700
python/cpython
python__cpython-114960
# Tarfile ignores an error when trying to extract a directory on top of a file # Bug report During review of #112966 and #103263 I found inconsistency between `zipfile` and `tarfile`. When `zipfile` tries to extract a directory on top of an existing file, it fails. When `tarfile` tries to extract a directory on to...
96bce033c4a4da7112792ba335ef3eb9a3eb0da0
b4240fd68ecd2c22ec82ac549eabfe5fd35fab2a
python/cpython
python__cpython-114956
# Missing `clear` mixin method in MutableSequence's document Link: https://docs.python.org/3/library/collections.abc.html#collections-abstract-base-classes But `MutableSequence` do have this mixin method: https://github.com/python/cpython/blob/28bb2961ba2f650452c949fcfc75ccfe0b5517e9/Lib/_collections_abc.py#L1132 ...
b4240fd68ecd2c22ec82ac549eabfe5fd35fab2a
efc489021c2a5dba46979bd304563aee0c479a31
python/cpython
python__cpython-114945
# Race between `_PyParkingLot_Park` and `_PyParkingLot_UnparkAll` when handling interrupts # Bug report ### Bug description: There is a potential race when `_PyParkingLot_UnparkAll` is executing in one thread and another thread is unblocked because of an interrupt in `_PyParkingLot_Park`. Consider the following scen...
c32bae52904723d99e1f98e2ef54570268d86467
652fbf88c4c422ff17fefd4dcb5e06b5c0e26e74
python/cpython
python__cpython-114918
# add support for AI_NUMERICSERV in getaddrinfo emulation # Feature or enhancement ### Proposal: Add support for `AI_NUMERICSERV` in getaddrinfo emulation similar to what is done for `AI_NUMERICHOST` ### Has this already been discussed elsewhere? No response given ### Links to previous discussion of this feature...
3453b5c1d652a0424a333332b576f9b878424061
b0a4f6599a7d36cc08fe63d6f7d5d4dea64579f3
python/cpython
python__cpython-115661
# Abandoned StreamWriter isn't reliably detected # Bug report ### Bug description: A StreamWriter should be `close()`:d when you are done with it. There is code in the destructor for StreamWriter to detect when this is overlooked and trigger a `ResourceWarning`. However, the current code often maintains a strong ref...
a355f60b032306651ca27bc53bbb82eb5106ff71
686ec17f506cddd0b14a8aad5849c15ffc20ed46
python/cpython
python__cpython-114941
# Popen misleading documentation # Documentation It took me hours that I made an error in the code. However, this error was probably the result of an unfortunate formatting in the docs. The documentation for `subprocess.Popen` reads: If given, _startupinfo_ will be a [STARTUPINFO](https://docs.python.org/3/li...
1183f1e6bfba06ae6c8ea362f96e977bc288e627
c4a2e8a2c5188c3288d57b80852e92c83f46f6f3
python/cpython
python__cpython-114910
# calendar module CLI option --first-weekday is missing from usage message # Documentation PR https://github.com/python/cpython/pull/112241 added the `--first-weekday` option to the calendar module CLI. It was only partly documented in `calendar.rst`, as it's missing from the first usage message. > python -...
ee66c333493105e014678be118850e138e3c62a8
b3f0b698daf2438a6e59d5d19ccb34acdba0bffc
python/cpython
python__cpython-114919
# Add array.clear() # Bug report ### Bug description: ```python from array import array x = array("B") x.clear() # AttributeError: 'array.array' object has no attribute 'clear' ``` But `array` is a `MutableSequence`, so we expect the clear() method to be implemented. If this is correct, then I'm rea...
9d1a353230f555fc28239c5ca1e82b758084e02a
5319c66550a6d6c6698dea75c0a0ee005873ce61
python/cpython
python__cpython-114884
# `jit.c` always recompiles, even on non-JIT builds I think I messed up the `Makefile` rules for `Python/jit.o` and `regen-jit`. Since `regen-jit` is "phony", the rule isn't in the dependency graph and `make` has no way of knowing if a recompile is necessary. We *may* have to do something similar to what we did for...
1032326fe46afaef57c3e01160a4f889dadfee95
72d2d0f10d5623bceb98a2014926ea0b87594ecb
python/cpython
python__cpython-114876
# `grp` module attempts to build even if `getgrent` family of functions are unavailable # Bug report ### Bug description: In the configure script, the only prerequisite for the `grp` module is currently the `getgrgid` function. Older versions of Android have this function, but they don't have the `getgrent` function...
f35c7c070ca6b49c5d6a97be34e6c02f828f5873
1183f1e6bfba06ae6c8ea362f96e977bc288e627
python/cpython
python__cpython-114850
# JIT workflow should have `timeout-minutes: 60` set In the past our GitHub Actions hanged from time to time (up to several hours). It can happen again anytime. It is the best practice to use timeout for jobs. For long jobs like these we use 60 minutes: https://github.com/python/cpython/blob/5ce193e65a7e6f239337...
1aec0644447e69e981d582449849761b23702ec8
618d7256e78da8200f6e2c6235094a1ef885dca4
python/cpython
python__cpython-114848
# Speed up `posixpath.realpath()` Some optimizations to `posixpath.realpath()` are possible - see attached PR. <!-- gh-linked-prs --> ### Linked PRs * gh-114848 * gh-117481 <!-- /gh-linked-prs -->
abfa16b44bb9426312613893b6e193b02ee0304f
9ceaee74db7da0e71042ab0b385d844e9f282adb
python/cpython
python__cpython-115139
# Python/flowgraph.c:528: _Bool all_exits_have_lineno(basicblock *): Assertion `0' failed # Crash report ### What happened? Reproducing code: ```python class i: if i:d<2<[super for()in e] ``` ``` ~/p/cpython ❯❯❯ ./python.exe -c ' class i: if i:d<2<[super for()in e]' Assertion faile...
fedbf77191ea9d6515b39f958cc9e588d23517c9
8a3c499ffe7e15297dd4c0b446a0b97b4d32108a
python/cpython
python__cpython-114819
# `warnings.warn(...)` arguments include '\*', which is wrong - 3.12 # Documentation Looking at the online python docs at https://docs.python.org/3.11/library/warnings.html#warnings.warn. The function call is listed on the site like this: ```python warnings.warn(message, category=None, stacklevel=1, source=None, ...
ff8939e5abaad7cd87f4d1f07ca7f6d176090f6c
854e2bc42340b22cdeea5d16ac8b1ef3762c6909
python/cpython
python__cpython-114808
# Allow import of multiprocessing.connection even if _multiprocessing is missing # Bug report ### Bug description: Currently if `_multiprocessing` is missing then `from multiprocessing import connection` raises an `ImportError`. It would be nice to delay the error until someone attempts to actually use multiprocessi...
4b75032c88046505cad36157aa94a41fd37638f4
1b895914742d20ccebd1b56b1b0936b7e00eb95e
python/cpython
python__cpython-114870
# Python 3.13.0a3 metaclass `__call__` runs only once # Bug report ### Bug description: Metaclass `__call__` is expected to run everytime a class is instantiated but in Python 3.13 it only run once. Minimal reproducer: ```python class _TypeMetaclass(type): def __call__(cls, *args, **kwargs): print("Me...
e66d0399cc2e78fcdb6a0113cd757d2ce567ca7c
97cc58f9777ee8b8e91f4ca8726cdb9f79cf906c
python/cpython
python__cpython-114891
# Match on Enum with dataclass decorator # Bug report ### Bug description: Hello, when Enum with @dataclass decorator is used in a match statement, the results seem to be wrong. Consider this example: ```python from enum import Enum, auto from dataclasses import dataclass @dataclass class Color(str, Enum): Red...
72d2d0f10d5623bceb98a2014926ea0b87594ecb
ab76d37948fd506af44762dc1c3e32f27d1327a8
python/cpython
python__cpython-114791
# `require-pr-label.yml` should not be executed on forks It does not make much sense to execute it on forks, because it is a workflow specific for `python/cpython` only. Here's an example PR on my own fork: <img width="915" alt="Снимок экрана 2024-01-31 в 11 58 56" src="https://github.com/python/cpython/assets/4...
1c2ea8b33c6b1f995db0aca0b223a9cc22426708
25ce7f872df661de9392122df17111c75c77dee0
python/cpython
python__cpython-114789
# JIT workflow is executed on unrelated changes in my local fork # Bug report There are several potential problems in this: <img width="1341" alt="Снимок экрана 2024-01-31 в 11 26 45" src="https://github.com/python/cpython/assets/4660275/578aabbd-5b89-4549-abc9-a1af23a2ee73"> 1. We have a failing JIT test job, CC @b...
b25b7462d520f38049d25888f220f20f759bc077
78c254582b1757c15098ae65e97a2589ae663cd7
python/cpython
python__cpython-114805
# "Porting Python2 to Python3" recommends tools that no longer support Python2 This section recommends several tools: https://docs.python.org/3/howto/pyporting.html#how-to-port-python-2-code-to-python-3 Including: - pylint: https://github.com/pylint-dev/pylint/issues/1763 - coverage: https://pypi.org/project/cove...
705c76d4a202f1faf41027d48d44eac0e76bb1f0
72340d15cdfdfa4796fdd7c702094c852c2b32d2
python/cpython
python__cpython-114781
# Accessing attributes of a lazily-loaded module is not thread-safe # Bug report ### Bug description: Attempting to access an attribute of a lazily-loaded module causes the module's `__class__` to be reset before its attributes have been populated. ```python import importlib.util import sys import threading import ...
200271c61db44d90759f8a8934949aefd72d5724
ef6074b352a95706f44a592ffe31baace690cc1c
python/cpython
python__cpython-114957
# GIL section of the FAQ is outdated (or shortly to be outdated) # Documentation https://docs.python.org/3.13/faq/library.html#can-t-we-get-rid-of-the-global-interpreter-lock (link is to the current alpha version) Obviously work is in progress to remove the GIL which isn't reflected in the FAQ yet. Also the s...
0e2ab73dc31e0b8ea1827ec24bae93ae2644c617
d7334e2c2012defaf7aae920d6a56689464509d1
python/cpython
python__cpython-114817
# test_pendingcalls_threaded times out on Windows free-threading builds `test.test_capi.test_misc.TestPendingCalls.test_pendingcalls_threaded` usually (but not always) times out on the [AMD64 Windows Server 2022 NoGIL 3.x](https://buildbot.python.org/all/#/builders/1241) buildbot, e.g. here: https://buildbot.python.or...
e6d6d5dcc00af50446761b0c4d20bd6e92380135
5ce193e65a7e6f239337a8c5305895cf8a4d2726
python/cpython
python__cpython-114772
# `test_runpy.test_main_recursion_error()` exhausts the stack under WASI debug build # Bug report ### Bug description: Has to be run directly to trigger it. ```shell cross-build/wasm32-wasi/python.sh -m test.test_runpy ``` Seen on wasmtime 17. ### CPython versions tested on: CPython main branch ...
2ed8f924ee05ec17ce0639a424e5ca7661b09a6b
574291963f6b0eb7da3fde1ae9763236e7ece306
python/cpython
python__cpython-114755
# Fix unintended behavior change in elementtree introduced in #114269 # Bug report ### Bug description: As it was discussed [here](https://github.com/python/cpython/pull/114269#discussion_r1468734070), after merging of #114269 `it.root` is no longer `None` once an iterator is created. There was no intention to c...
66f95ea6a65deff547cab0d312b8c8c8a4cf8beb
b7688ef71eddcaf14f71b1c22ff2f164f34b2c74
python/cpython
python__cpython-116771
# WASI build fails on both SDK 20 and 21 (Mac OS) # Bug report ### Bug description: ```python # Add a code block here, if required ``` On trying to build CPython for wasmtime with both SDK 20 and 21, I get an error on running: `python Tools/wasm/wasi.py configure-host` Error: ![image](https://github.com/python/cpyt...
3a25d9c5a95d4e57513ea7edd9e184f4609ebe20
8c094c3095feb4de2efebd00f67fb6cc3b2bc240
python/cpython
python__cpython-114749
# Documentation for date and datetime comparison is outdated The implementation of comparison for `date` and `datetime` objects was changed 18 years ago, in 19960597adb65c9ecd33e4c3d320390eecd38625, but the documentation still describes the old behavior, with special-casing of other objects with a `timetuple` attribut...
05b04903a14279421ecdc6522b8202822de6ebb5
936d4611d63d0c109e05d385e99acc0592eff341
python/cpython
python__cpython-114731
# ZoneInfo gives a surprising exception for `''` # Bug report ### Bug description: ```python import zoneinfo zoneinfo.ZoneInfo('') ``` results in the following exception: ```pycon >>> zoneinfo.ZoneInfo('') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/asottile/.pyenv/versi...
fe44fc4f4351bb4b457c01d94b4ae8b9eda501aa
ca0a96dfaa686c314e9d706023a59d26b6cc33b9
python/cpython
python__cpython-114710
# posixpath.commonpath: Check for empty iterables broken # Bug report ### Bug description: This came up in python/typeshed#11310: When passing an empty sequence to `commonpath()`, a `ValueError` is raised with an appropriate error message. When an "empty" iterable is passed, an `IndexError` is raised instead, althou...
371c9708863c23ddc716085198ab07fa49968166
f9154f8f237e31e7c30f8698f980bee5e494f1e0
python/cpython
python__cpython-114748
# Allow repeatedly asking for termination of `QueueListener` # Feature or enhancement ### Proposal: Currently it's impossible to call `QueueListener.stop` twice, you get a crash: ```python from queue import Queue from logging import StreamHandler from logging.handlers import ( QueueHandler, QueueL...
e21754d7f8336d4647e28f355d8a3dbd5a2c7545
ea30a28c3e89b69a214c536e61402660242c0f2a
python/cpython
python__cpython-115152
# Tier two memory and reference "leaks" # Bug report ### Bug description: CPython was built with `./configure --enable-experimental-jit --with-pydebug` Full trace [trace.txt](https://github.com/python/cpython/files/14080416/trace.txt) ### CPython versions tested on: CPython main branch ### Operating systems tes...
235cacff81931a68e8c400bb3919ae6e55462fb5
54bde5dcc3c04c4ddebcc9df2904ab325fa0b486