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-111655
# redundant decref on the eval stack value in LOAD_FROM_DICT_OR_DEREF in error path # Crash report ### What happened? With these codes bellow, a `NameError` will be raised as expected, but there will be a runtime crash when GC happens. ```python def xxx(): class MyComplex: MyComplex xxx() `...
3a1b09e6d070778d78d81084f88d37377d38ee9b
93206d19a35106f64a1aef5fa25eb18966970534
python/cpython
python__cpython-111653
# --enable-pystats compile broken on main # Bug report ### Bug description: Compiling with `--enable-pystats` is currently broken. ``` gcc -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implici...
2bc01cc0c72a3d91bdcce09886efa987a90396d9
5add7a6724cbff6c9f0597f0257b64c4f0978c14
python/cpython
python__cpython-111647
# The requirement to keep micro-ops dense while optimizing is harmful. The tier 2 executor creation requires optimization passes to compact the micro-ops, which is onerous and error-prone. We should make it part of the job of creating the executor to compact the micro-ops. We will want to modify the tier 2 instruc...
d78c872e0d680f6e63afa6661df5021775a03690
c8faa3568afd255708096f6aa8df0afa80cf7697
python/cpython
python__cpython-111713
# test_asyncio: test_unhandled_exceptions() fails on x86-64 macOS 3.x buildbot Apparently, the test is new and was added by PR #111601. cc @kumaraditya303 Logs: ``` test_unhandled_exceptions (test.test_asyncio.test_streams.StreamTests.test_unhandled_exceptions) ... Warning -- threading_cleanup() failed to c...
ac01e2243a1104b2154c0d1bdbc9f8d5b3ada778
f62c7ccf9abf6e0493978da9cf9ca43adcd403f9
python/cpython
python__cpython-129546
# Extension for MIME type is not recognized # Bug report ### Bug description: I currently have a problem with guessing file extensions from the MIME type, unfortunately. I understood that only files with a registry at IANA can be guessed and checked the linked page. As I understand, my affected data is registered wi...
bb5c6875d6e84bf2b4e134ed482141a51d223f09
75b628adebd4594529da25ea9915600f2872fc2b
python/cpython
python__cpython-111626
# DOC: fix link redirect and correct spelling of Info-ZIP # Documentation [Download the documentation](https://docs.python.org/3.13/download.html) page links to http://www.info-zip.org/ which then redirects to the correct homepage https://infozip.sourceforge.net/ for Info-ZIP. Also, "InfoZIP" should be spelled a...
6a0d7b43df12ab4426badd09d2796e66838129ac
7215f173f5881f53728679d03b0f513716d8c099
python/cpython
python__cpython-111628
# Enable cross-interpreter sharing of tuples # Feature or enhancement ### Proposal: This issue is for adding support of sharing tuples (and tuples of tuples) through the crossinterp API and the interpreters module when that arrives. The data structure will have to have a variable length. ```c struct _shar...
178861b19324c94d98478e4c2bba075964c3baa4
70afb8d7324bc74fe64141e1af5c602bf6c0c4dd
python/cpython
python__cpython-112051
# `dict` items views have set like operations even when the values are not hashable. # Documentation > Keys views are set-like since their entries are unique and [:term:`hashable`](https://github.com/python/cpython/blob/main/Doc/library/stdtypes.rst#id650). If all values are hashable, so that (key, value) pairs a...
e31d65e0b7bb6d6fee4e8df54e10976b4cfab1de
31ad7e061ebebc484e00ed3ad5ff61061341c35e
python/cpython
python__cpython-111638
# Python 3.12 breaks backwards compatibility for logging configuration # Bug report ### Bug description: This worked fine on previous versions: ```python import logging import logging.config import logging.handlers import multiprocessing as mp def main(): config = { 'version': 1, 'handlers': {...
67655d8ad5de8666c97b0a377c6141a6abf66350
00cdd416fc60876ff21d9eafdc5d5d7a91737db5
python/cpython
python__cpython-111578
# Improve documention for tkinter.messagebox <!-- gh-linked-prs --> ### Linked PRs * gh-111578 * gh-111597 * gh-111598 <!-- /gh-linked-prs -->
eaf67e37a2da28c1241362e3b4ff1202945c83c5
33ed5fa69dbe25d64a910c450be527f4db9dc5dd
python/cpython
python__cpython-111571
# Implement Python Critical Sections from PEP 703 # Feature or enhancement [PEP 703](https://peps.python.org/pep-0703/) introduces the concept of ["Python Critical Sections"](https://peps.python.org/pep-0703/#python-critical-sections), which are an abstraction to help replace the GIL with finer grained locking. The k...
31c90d5838e8d6e4c47d98500a34810ccb33a6d4
0b718e6407da65b838576a2459d630824ca62155
python/cpython
python__cpython-112063
# Make `_Py_HashDouble` public again as "unstable" API In NumPy we use `_Py_HashDouble` for our floating point hashing needs and that seems like a pretty good candiate for the unstable API to me: https://github.com/python/cpython/issues/91744#issuecomment-1111990057 and https://github.com/python/cpython/issues/101101#...
62802b6228f001e1a4af6ac668a21d2dcec0ce57
9302f05f9af07332c414b3c19003efd1b1763cf3
python/cpython
python__cpython-111593
# AIX build breaks due to syscall.h not found # Bug report ### Bug description: AIX build breaks because of the recent commit #109914 gcc -pthread -maix64 -c -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werr...
794dff2fb1d9efe73a724640192c34b25f4fae85
230e8e924dbafe093fd1cc7b6c510dc0b9ec0caf
python/cpython
python__cpython-111600
# New warning: `unused variable ‘this_instr’` in `generated_cases.c.h` # Bug report Introduced in https://github.com/python/cpython/commit/d27acd4461ee603bcf6f4a81ca6afccc9fc87331 <img width="403" alt="Снимок экрана 2023-10-31 в 13 52 14" src="https://github.com/python/cpython/assets/4660275/8e817a04-c061-4e8b-a915-f...
5697fc2d4bff000b2b1dac493d45872ca648490b
b14e882428ceda1e5852a1c22772e7f88927bded
python/cpython
python__cpython-111533
# test_tkinter leaks references on Windows * Latest successful build: https://buildbot.python.org/all/#/builders/920/builds/543 * First failing build: https://buildbot.python.org/all/#/builders/920/builds/549 ``` test_tkinter leaked [336, 336, 337] references, sum=1009 test_tkinter leaked [151, 151, 152] memory ...
e3353c498d79f0f3f108a9baf8807a12e77c2ebe
3dbaed3caa00062087a848740b6e713ad55b0aed
python/cpython
python__cpython-111428
# Merge Tier 1 and 2 interpreters into a single function Currently the Tier 2 interpreter lives in a separate function. This looks clean but makes switching between tiers complicated. See https://github.com/faster-cpython/ideas/issues/631. So let's make `_PyEval_EvalFrameDefault()` into a single function that contains...
7e135a48d619407cd4b2a6d80a4ce204b2f5f938
5d6db168b9cda58b4897763041a6109b93e421cb
python/cpython
python__cpython-120021
# PYTHONMALLOCSTATS=1 fails with fatal error at Python exit `Py_FinalizeEx()` calls `_PyObject_DebugMallocStats()` which calls indirectly `_PyInterpreterState_GET()`. Problem: at this point, there is no "interpreter" anymore, and so `_PyInterpreterState_GET()` fails with a fatal error. It's a regression introduced ...
5a1205b641df133932ed4c65b9a4ff5724e89963
26e5c6e8351adb1a77a88920ff33fc8ebee9a99e
python/cpython
python__cpython-111496
# Add more C API tests - [x] Add tests for PyBytes C API - [x] Add tests for PyByteArray C API - [x] Add tests for PyFloat C API - [x] Add tests for PyComplex C API - [x] Add tests for PyLong C API - [x] Add tests for PyNumber C API - [x] Add tests for PyTuple C API - [x] Add tests for PyList C API - [x] Add tests for...
97b3cd38d105fd891ba46dd27d08f03d1c6dd348
937872e8ea740e22ff571eec474e38312e09bd68
python/cpython
python__cpython-111491
# `test_pyexpat` has strange `assertRaises` check # Bug report Look at this test: https://github.com/python/cpython/blob/940ee962a8a1e87543fd36338228e526e7f35067/Lib/test/test_pyexpat.py#L531-L547 It sets up a specific error class, does all the overriding just to check that raw `Exception` is raised? It is problema...
7bcf184dacf5cfbcb16b4c2735472314b03a009e
26c0e5e03a8603eccfd98045bc69fde2e24682e3
python/cpython
python__cpython-113656
# Confusing `SyntaxError` message for `x for x if range(1)` # Bug report Today I made a typo: instead of `in` I wrote `if`. I was quite interested to see the error message: ```python >>> [x for x if range(1)] File "<stdin>", line 1 [x for x if range(1)] ^^^^^^^^^^^^^ SyntaxError: expected 'else' aft...
bb4c16706059f2b10f077dce6a9f9f04e146d424
bbf214df23be3ee5daead119e8a2506d810d7d1f
python/cpython
python__cpython-111486
# The code generated for the interpreter(s) is too fragile Changing the name of an instruction, or slight changes in cache size can cause the generated code to be incorrect in odd ways. This is a result of there being too many special cases and undocumented assumptions built in to the code generator. This was a na...
d27acd4461ee603bcf6f4a81ca6afccc9fc87331
e3353c498d79f0f3f108a9baf8807a12e77c2ebe
python/cpython
python__cpython-111641
# time.clock_gettime_ns() is too slow # Feature or enhancement ### Proposal: Actually, this is a performance bug. Not a feature/enhancement. `clock_gettime_ns()` does not use floating point operations and should be faster than old `gettimeofday()`. Unfotunately in Python it's not so. Checked in Linux X86_64 ker...
4fe22c73770fe86b01ef7a4f1f38e7e925c0e090
6a0d7b43df12ab4426badd09d2796e66838129ac
python/cpython
python__cpython-111878
# Restore ncurses widechar support on macOS # Bug report ### Bug description: Python 3.12 dropped ncurses wide char support on macOS, so for example `curses.get_wch()` is not available anymore. I believe this was an unintended consequence of https://github.com/python/cpython/pull/94452, because the change is not do...
d2f305dfd183025a95592319b280fcf4b20c8694
1447af797048e62049d00bbd96d8daee3929f527
python/cpython
python__cpython-111439
# Support sharing of float types in sub interpreters # Feature or enhancement ### Proposal: The interpreters API supports sharing of `int` but not the `float` type. ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous dis...
ad6380bc340900e0977ce54928b0d3e166c7cf99
2904d99839cd4620818fd0556a1c0b0229944abc
python/cpython
python__cpython-111436
# Support sharing of bool objects in sub interpreters # Feature or enhancement ### Proposal: Bool is not a shareable type in the interpreters API. ```python Python 3.13.0a1+ (heads/master-dirty:66bea2555d, Oct 29 2023, 11:16:00) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more informat...
230e8e924dbafe093fd1cc7b6c510dc0b9ec0caf
9322ce90ac8f4d4647a59bbfab48fad6f4e4e856
python/cpython
python__cpython-111431
# Speed up `pathlib.PurePath.[is_]relative_to()` Both methods call `self.with_segments()` unconditionally. This can be skipped if the *other* argument is already an instance of `PurePath`, and no further (deprecated) positional arguments are given. Also, `relative_to()` can inline the core of the `is_relative_to()`...
d7cef7bc7ea5478abb90a37c8ffb0792cc6e7518
b2af50cb0266f654cff126c7a78a4a7755bc3fbe
python/cpython
python__cpython-111427
# `test_cmd` has `test_coverage` that does not work # Bug report https://github.com/python/cpython/blob/26553695592ad399f735d4dbaf32fd871d0bb1e1/Lib/test/test_cmd.py#L251-L262 Output: ``` » ./python.exe Lib/test/test_cmd.py -c Traceback (most recent call last): File "/Users/sobolev/Desktop/cpython2/Lib/t...
66bea2555dc7b3dd18282cc699fe9a22dea50de3
81bc802a46f6f2725913ac31b4cec0ec3a0e3732
python/cpython
python__cpython-111468
# ast.parse(type_comments=True) fails on some parenthesized context managers # Bug report ### Bug description: `ast.parse(..., type_comments=True)` doesn't deal well with parenthesized context managers, as introduced by PEP-617. ``` >>> ast.dump(ast.parse("with (a as b): # type: something\n pass", type_comments=...
453e96e3020d38cfcaebf82b24cb681c6384fa82
faa5f6053d7334a3ecc513c64947ac026439c03a
python/cpython
python__cpython-111454
# Useless code block in math.trunc() ? # Bug report ### Bug description: The math.trunc function has: https://github.com/python/cpython/blob/f013b475047b2e9d377feda9f2e16e5cdef824d7/Modules/mathmodule.c#L2073-L2076 c.f. [math.ceil](https://github.com/python/cpython/blob/f013b475047b2e9d377feda9f2e16e5cdef824d7/Modul...
efc489021c2a5dba46979bd304563aee0c479a31
28bb2961ba2f650452c949fcfc75ccfe0b5517e9
python/cpython
python__cpython-111407
# Link to bpython's website is broken # Documentation I noticed a broken link on this page: https://docs.python.org/3/tutorial/interactive.html It links to https://www.bpython-interpreter.org/, which does not exist: ```bash $ rh HEAD https://www.bpython-interpreter.org/ -s Error: error sending request for url...
8a158a753c48d166ebceae0687e88ae0c0725c02
9a2f2f46caa556eae4c3ac3b45efa85bd91cc807
python/cpython
python__cpython-111418
# Consider restoring _PyHASH_INF/BITS/MODULUS/IMAG as public This is used to implement CPython-like hashing of numeric types e.g. [in Sage](https://github.com/sagemath/sage/blob/07a2afd65fb4b0a1c9cbc43ede7d4a18c921a000/src/sage/libs/gmp/pylong.pyx#L35-L52) or [in gmpy2](https://github.com/aleaxit/gmpy/blob/master/src/...
1e68c4b87633b17da1b602b86f5d23bbe106398f
b9cb855621c0813846421e4ced97260a32e57063
python/cpython
python__cpython-111390
# Add `show_group` param to `traceback.format_exception_only` function # Feature or enhancement This function does not have this param: https://github.com/python/cpython/blob/7f9a99e8549b792662f2cd28bf38a4d4625bd402/Lib/traceback.py#L151-L166 While the `format_exception_only` method of `TracebackException` does ...
aa732459c5a69435f13a2730a057ce9d2087873b
6d42759c5e47ab62d60a72b4ff15d29864554579
python/cpython
python__cpython-111387
# New warning: `'=': conversion from 'unsigned __int64' to 'uint16_t'` in `generated_cases.c.h` # Bug report <img width="987" alt="Снимок экрана 2023-10-27 в 08 59 30" src="https://github.com/python/cpython/assets/4660275/8cabd18f-253a-42fd-bca1-770bdc85b60a"> This line was last changed in https://github.com/python...
524a701d0742d2ae469771a065c62e41656a5dc7
aa732459c5a69435f13a2730a057ce9d2087873b
python/cpython
python__cpython-111381
# Some SyntaxWarning in strings are shown twice in the presence of SyntaxErrors Example: ``` ❯ ./python.exe -Wall Python 3.13.0a1+ (heads/main:78e6d72e38e, Oct 27 2023, 11:50:08) [Clang 15.0.0 (clang-1500.0.40.1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> '\e' $ <std...
3d2f1f0b830d86f16f42c42b54d3ea4453dac318
a254120f2f1dd99fa64f12594d1ed19c67df7d64
python/cpython
python__cpython-111411
# Support configuring -X frozen_modules=on|off using an environment variable. # Feature or enhancement ### Proposal: Most of the `-X` options (https://docs.python.org/3/using/cmdline.html#cmdoption-X) can be configured via an environment variable, but not `-X frozen_modules`. This makes it harder for environm...
486d5370653d86aba4348067bd61b973297c22c3
2433cc79d79d9c1db8e53d4b9bde26e9a47fb0b9
python/cpython
python__cpython-111384
# Uninformative syntax errors from codeop._maybe_compile (IDLE Shell) ```py >>> def function(duplicate, duplicate): ... pass # Expected error message: SyntaxError: duplicate argument 'duplicate' in function definition # Actual error message: SyntaxError: incomplete input ``` ```py >>> def global_and_param...
cd6e0a04a16535d8bc727c84f73730c53267184e
624ace5a2f02715d084c29eaf2211cd0dd550690
python/cpython
python__cpython-112031
# Mention that unicodedata is updated for Unicode 15.1.0 in What's new in Python 3.13 # Documentation In Python 3.13 `unicodedata` is updated for Unicode 15.1.0 (https://github.com/python/cpython/commit/def828995a35a289c9f03500903b5917df93465f). It would be nice to have this explicitly mentioned on the [What's n...
d857d5331a3326c77f867d837014d774841017a9
4c483e011379aee9258db2e8abe479448109fd7b
python/cpython
python__cpython-111370
# text_encoding() is missing from io.__all__ # Bug report ### Bug description: The public [`io.text_encoding()`](https://docs.python.org/3/library/io.html?highlight=text_encoding#io.text_encoding) function is missing from `io.__all__`. ```python >>> import io >>> "text_encoding" in io.__all___ False ``` ### CPyth...
baeb7718f8981319c5cb1fbdd46d162ded7964ea
289af8612283508b67d7969d7182070381b4349b
python/cpython
python__cpython-111365
# remove hacks in genobject.c Refactor Objects/genobject.c to get rid of these hacks/issues: - ~~`gen_close` accesses `instr_ptr - 1`~~ - `_PyGen_yf` peeks into the execution stack - Comparisons with enum values - ``result`` arg reused in ``gen_send_ex2`` for two different purposes (one of which is not the resul...
a0c414c35d0dc0d44a885fda448652e23de2482c
309efb39dc005a834bb67e9a6f27b6689f00ec9d
python/cpython
python__cpython-111349
# `test_doctest` cannot be run directly: let's remove this option # Bug report When running `./python.exe Lib/test/test_doctest.py` you get: ``` » ./python.exe Lib/test/test_doctest.py .....................................F................FF......... ===============================================================...
31c05b72c15885ad5ff298de39456d8baed28448
b0699aa5446eb576ed8ab96989d4f60c7a2a04f8
python/cpython
python__cpython-111377
# test_asyncio: test_sendfile failed on ReFS, Windows 11 Dev Drive # Bug report ### Bug description: The full name of the failed test case is: ```text test.test_asyncio.test_sendfile.ProactorEventLoopTests.test_sendfile_close_peer_in_the_middle_of_receiving ``` Test output: ```text ===============================...
fa35b9e89b2e207fc8bae9eb0284260d0d922e7a
14ab5e51c14e4f6298826823ea94cf51252da2d5
python/cpython
python__cpython-111344
# `itertools.rst` says that `start` is a required argument for `count`, while it is not # Bug report <img width="810" alt="Снимок экрана 2023-10-26 в 10 04 40" src="https://github.com/python/cpython/assets/4660275/ae236f93-f637-4861-8ac0-630471097b84"> However, ```python >>> import itertools >>> itertools.count() c...
ee2d22f06d8a4ca13b2dba5e8a7a639a3997cc69
21f068d80c6cc5de75f9df70fdd733d0ce9c70de
python/cpython
python__cpython-111416
# Typo in math_sumprod_impl() https://github.com/python/cpython/blob/3f84a19e6291db682fc9a570e7612e80e2ffbbb5/Modules/mathmodule.c#L2835 Obviously, should be ``p_i`` in the last OR operand, c.f. [L2824](https://github.com/python/cpython/blob/3f84a19e6291db682fc9a570e7612e80e2ffbbb5/Modules/mathmodule.c#L2824). Fac...
9dc4fb820439db26b223edce30e5313a2e3182ff
c3bb10c9303503e7b55a7bdf9acfa6b3bcb699c6
python/cpython
python__cpython-111350
# Crashes and errors in test_embed with PYTHONUOPS=1 For a detailed report see https://github.com/python/cpython/pull/110384#issuecomment-1777657115 (a comment by @brandtbucher on a merged PR by @markshannon ). I am keeping notes about what I'm learning about this (though Mark said it's his). --- The issue se...
5c9d4497abd2923b4655cee2510208be8540b117
78e6d72e38ef4b490f0098b644454031f20ae361
python/cpython
python__cpython-111509
# What's new in Python 3.13: move importlib.resources removals under the `Removed` section # Documentation There is some obsolete information in the section [Pending Removal in Future Versions](https://docs.python.org/3.13/whatsnew/3.13.html#pending-removal-in-future-versions) of the What's new in Python 3.13 documen...
3dbaed3caa00062087a848740b6e713ad55b0aed
997683435693876e687cf09d3553abde18787d2e
python/cpython
python__cpython-111296
# `timemodule.c` does not handle errors on module creation # Bug report Here are the problematic lines: https://github.com/python/cpython/blob/8b44f3c54bb4f99445c108bc0240c458adae9c6f/Modules/timemodule.c#L1766-L1772 https://github.com/python/cpython/blob/8b44f3c54bb4f99445c108bc0240c458adae9c6f/Modules/timemodule.c...
81b03e78101c97c1d3fe5f90908bbf94e83d7df1
2838c550f729f3fccedb3d65c6695cb0b78045ab
python/cpython
python__cpython-111294
# test_os: test_attributes failed on ReFS, Windows 11 Dev Drive # Bug report ### Bug description: PowerShell command: ```text PS D:\cpython> .\PCbuild\build.bat -t CleanAll PS D:\cpython> .\PCbuild\build.bat -e -d PS D:\cpython> .\python.bat -m test -j1 ``` Test output: ```text 0:26:00 load avg: 0.52 [285/469/2]...
b468538d356552f0242763fe44a17b1939e8bd55
a0c414c35d0dc0d44a885fda448652e23de2482c
python/cpython
python__cpython-111285
# test_async_timeout makes multiprocessing tests with threads slow I noticed an interesting effect. When run all tests in `test.test_multiprocessing_spawn.test_threads`, progress lingers (on 30 almost seconds) on `test_terminate`. But when run only `test_terminate`, it completes quickly. Further research revealed that...
624ace5a2f02715d084c29eaf2211cd0dd550690
55df2deb1aeb182f30026bde5e8b5ea575a2dab8
python/cpython
python__cpython-111283
# Error in example of `tempfile` module # Documentation The third example in [Examples](https://docs.python.org/3.13/library/tempfile.html#examples) section of `tempfile` module shows creating `TemporaryFile` with `delete_on_close` parameter, however the parameter is present only in `NamedTemporaryFile` class. Also...
102685c4c8481ec5d9c132fcf06b46057e815969
770530679e89b06f33655b34a8c466ed906842fe
python/cpython
python__cpython-111278
# summarize_stats.py script should output error, not fail, if denominator is unexpectedly 0 # Bug report ### Bug description: The `summarize_stats.py` script will currently throw an exception if a ratio has a non-zero numerator over a zero denominator. While this is an error, it would be better to output this error ...
9495bcaf599e0961b45447b8fab7f8446945ba1a
84b4533e8446cbff3325fffe939c87f7120a3ffd
python/cpython
python__cpython-111319
# LC_CTYPE incorrectly references case sensitivity of "the functions of module `string`" # Documentation https://docs.python.org/3.12/library/locale.html#locale.LC_CTYPE says: > Locale category for the character type functions. Depending on the settings of this category, the functions of module [string](https://...
6d42759c5e47ab62d60a72b4ff15d29864554579
74f0772892c85b6e7bdfa0f44a5ff89002b0734d
python/cpython
python__cpython-111303
# Complementary re patterns such as [\s\S] or [\w\W] are much slower than . with DOTALL # Bug report ### Bug description: ```python import re from time import perf_counter as time p1 = re.compile(r"[\s\S]*") p2 = re.compile(".*", re.DOTALL) s = "a"*10000 for p in (p1,p2): t0 = time() for i in range(10000)...
309efb39dc005a834bb67e9a6f27b6689f00ec9d
67a91f78e4395148afcc33e5cd6f3f0a9623e63a
python/cpython
python__cpython-111254
# `socketmodule.c` does not handle errors on module creation extension-modules # Bug report It handles most with a specialized macro: https://github.com/python/cpython/blob/81eba7645082a192c027e739b8eb99a94b4c0eec/Modules/socketmodule.c#L7716-L7722 but not these ones: https://github.com/python/cpython/blob/81eba76...
3052c098ca2779c2d9ab9800dabe66d0efa01794
86887a2084618d1ea1afe756b24a930df7dd3543
python/cpython
python__cpython-111252
# `blake2module.c` does not handle errors on module creation # Bug report It does it in some parts: - https://github.com/python/cpython/blob/81eba7645082a192c027e739b8eb99a94b4c0eec/Modules/_blake2/blake2module.c#L88-L90 - https://github.com/python/cpython/blob/81eba7645082a192c027e739b8eb99a94b4c0eec/Modules/_blake...
86887a2084618d1ea1afe756b24a930df7dd3543
3211d5793f4437f86cd2fa11e86b4fd958932881
python/cpython
python__cpython-111483
# Listening asyncio UNIX socket isn't removed on close # Bug report ### Bug description: After creating a UNIX socket server with `loop.create_unix_server()` and then closing it using `Server.close()`, then the UNIX socket file is still left on disk. Although asyncio itself can handle this on the next startup since...
74b868f636a8af9e5540e3315de666500147d47a
f88caab467eb57cfe293cdf9fb7cce29b24fda7f
python/cpython
python__cpython-111234
# `_selectmodule.c` does not handle errors when creating a module # Bug report It is documented that `PyModule_AddIntMacro` can raise an error (and it can in fact): ```rst .. c:macro:: PyModule_AddIntMacro(module, macro) Return ``-1`` on error, ``0`` on success. ``` But, some calls are not checked for errors: ...
2838c550f729f3fccedb3d65c6695cb0b78045ab
3052c098ca2779c2d9ab9800dabe66d0efa01794
python/cpython
python__cpython-111232
# `_ssl.c` does not handle errors on module creation # Bug report `sslmodule_init_constants` does not return `-1` when any of `PyModule_Add*` calls fail. For example, `PyModule_AddIntConstant` returns `-1` on error, but it is never checked: https://github.com/python/cpython/blob/96cbd1e1db3447a33e5cc5cc2886ce79b61c...
f6304949bb9937e798ecac8b414606dc01bc6d3c
9da98c0d9a7cc55c67fb0bd3fa162fd3b2c2629b
python/cpython
python__cpython-115780
# Cross Compile for Android and issues with PyExc_OSError # Bug report ### Bug description: In trying to run Python 3.12 on Android. I have been cross-compiling Python for a number of years. Having built a 64bit version I am getting the following error when I try to run I get the following error at runtime. ...
7f5e3f04f838686d65f1053a5e47f5d3faf0b228
113687a8381d6dde179aeede607bcbca5c09d182
python/cpython
python__cpython-111216
# Errors in stats # Bug report ### Bug description: In the [Specialization effectiveness](https://github.com/faster-cpython/benchmarking/blob/main/results/bm-20231021-3.13.0a1%2B-6c23635/bm-20231021-azure-x86_64-python-main-3.13.0a1%2B-6c23635-pystats.md#specialization-effectiveness) section, there are a few issues....
b0699aa5446eb576ed8ab96989d4f60c7a2a04f8
5c9d4497abd2923b4655cee2510208be8540b117
python/cpython
python__cpython-111567
# A new Python REPL This issue will track all the different steps to bootstrap a new Python REPL with many new features. The target of this issue is that we can reach a point where new contributions can be made easily to the REPL once is written in pure Python. This issue only coveres the initial ground work to reach ...
f27f8c790af1233d499b795af1c0d1b36aaecaf5
40cc809902304f60c6e1c933191dd4d64e570e28
python/cpython
python__cpython-111188
# Postpone removal version for locale.getdefaultlocale() `locale.getdefaultlocale()` was deprecated in Python 3.11 and originally planned for removal in 3.13 (gh-90817). It's now time for 3.13 changes, but we decided to postpone its removal to 3.15 as it's still used by many projects. Re: * https://github.com/p...
81ed80d843b3f6f0109e7ad854af2c5de27e1a89
f6304949bb9937e798ecac8b414606dc01bc6d3c
python/cpython
python__cpython-111180
# `enum` doctests are silently skipped when run with libregrtest # Bug report `test_enum` has these lines: https://github.com/python/cpython/blob/663cf513b0e973ab7aa4a8609d6616ad2c283f22/Lib/test/test_enum.py#L27-L39 They are problematic, because they are not executed when run as `./python.exe -m test test_enum`. On...
c4dc5a6ae8aa13abb743182df088f1a3526d1bcd
cd6e0a04a16535d8bc727c84f73730c53267184e
python/cpython
python__cpython-124733
# UBSan: Calling a function through pointer to incorrect function type is undefined behavior # Bug report ### Bug description: UBSan (UndefinedBehaviorSanitizer) in LLVM.org Clang 17 makes [`-fsanitize=function`](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#available-checks) available for C; previousl...
4f07fd59cbd2656ae31e164098b8d10c5b7e51f0
f1b81c408fb83beeee519ae4fb9d3a36dd4522b3
python/cpython
python__cpython-111210
# `_io.BytesIO.getbuffer()`: unshare_buffer: Assertion `self->exports == 0' failed # Crash report ### What happened? ```python import io f = io.BytesIO() a = f.getbuffer() b = f.getbuffer() ``` Output: ``` python: ./Modules/_io/bytesio.c:112: unshare_buffer: Assertion `self->exports == 0' failed. Aborted (core dumpe...
9da98c0d9a7cc55c67fb0bd3fa162fd3b2c2629b
f6a45a03d0e0ef6b00c45a0de9a606b1d23cbd2f
python/cpython
python__cpython-111166
# Move test running code from test.support to libregrtest `test.support.run_unittest()` was used to run unit tests, but now all tests are collected using standard unittest mechanism. Currently it is only used in libregrtest, and its code can be moved there. `test.support.run_doctest()` was used to run doctests, but...
f6a45a03d0e0ef6b00c45a0de9a606b1d23cbd2f
a8a89fcd1ff03bb2f10126e0973faa74871874c3
python/cpython
python__cpython-111160
# `doctest` fails to compare tracebacks with notes # Bug report Minimal reproducer: ```python """ Module doctest >>> raise_with_note() Traceback (most recent call last): ... ValueError: Text Note """ def raise_with_note(): err = ValueError('Text') err.add_note('Note') raise err ``` Now, run it, you ...
fd60549c0ac6c81f05594a5141d24b4433ae39be
5e7727b05232b43589d177c15263d7f4f8c584a0
python/cpython
python__cpython-111158
# Docstring of `traceback.format_exception_only` misses the `__notes__` part # Bug report Compare the docs: https://github.com/python/cpython/blob/7237fb578dc9db9dc557759a24d8083425107b91/Doc/library/traceback.rst#L138-L146 With the docstring: https://github.com/python/cpython/blob/7237fb578dc9db9dc557759a24d8083425...
5e7727b05232b43589d177c15263d7f4f8c584a0
9a1fe09622cd0f1e24c2ba5335c94c5d70306fd0
python/cpython
python__cpython-111156
# Direct invocation of `test_pprint.py` fails # Bug report Before my fix: ``` » ./python.exe Lib/test/test_pprint.py ..........F...............x................. ====================================================================== FAIL: test_dataclass_no_repr (__main__.QueryTestC...
e136e2d640f4686b63ea05088d481115185fc305
86276fe4f8e0801f1194b55fa8d8cb7dbf8ee658
python/cpython
python__cpython-111152
# Convert unsemantic monospaced directives to :ref: Directives like `:class:`, `:func:`, etc. auto-apply a monospaced font to the displayed text, which doesn't look very nice if used unsemantically. `:ref:` directives are the way to go when it comes to internal links with non-code text, and most of other internal link...
1198076447f35b19a9173866ccb9839f3bcf3f17
9bb202a1a90ef0edce20c495c9426d9766df11bb
python/cpython
python__cpython-111148
# `test_set_of_sets_reprs` of `test_pprint` is silently ignored # Bug report Right now this test is marked as `expectedFailure` with a big comment about why: https://github.com/python/cpython/blob/b07f23259d30e61fd7cc975b8b0e3b2e846fed8f/Lib/test/test_pprint.py#L622-L646 With `self.maxDiff = None`: ``` » ./python.e...
7ac49e74c3db35365968cd2cbd395cf063d2050d
fb79e1ed4a985a487a02bb8585cc1bd2933dfa7c
python/cpython
python__cpython-114886
# C API: Consider adding public PyLong_AsByteArray() and PyLong_FromByteArray() functions # Feature or enhancement The private `_PyLong_AsByteArray()` and `_PyLong_FromByteArray()` functions were removed in Python 3.13: see PR #108429. @scoder [asked](https://github.com/python/cpython/pull/108429#issuecomment-...
7861dfd26a41e40c2b4361eb0bb1356b9b4a064b
a82fbc13d0e352b9af7d7ffbef4bc04cf635f07f
python/cpython
python__cpython-113887
# C API: Consider adding a public PyLong_GCD() function # Feature or enhancement The private _PyLong_GCD() function was removed in Python 3.13: see PR #108429. @scoder [asked](https://github.com/python/cpython/pull/108429#issuecomment-1772786659) what is the intended replacement for _PyLong_GCD(). I suppose tha...
93930eaf0acd64dc0d08d58321d2682cb019bc1a
66363b9a7b9fe7c99eba3a185b74c5fdbf842eba
python/cpython
python__cpython-111137
# Unnecessary `PyFrozenSet_Check` calls in `ast_opt.c`? This code looks strange: https://github.com/python/cpython/blob/37e4e20eaa8f27ada926d49e5971fecf0477ad26/Python/ast_opt.c#L177-L178 Function above intended as *safe mutiply*, but set (and frozenset) doesn't have `tp_as_number->nb_multiply` field, so it cannot b...
7162c3a1e8707fdea2efcc70d2cec987eba9ea78
124259f9b30f6cbab4dd2bcfb0d32f1cddcc35db
python/cpython
python__cpython-111136
# Crash of interpreter due to assign before global declaration # Crash report ### What happened? ```python def bar(): x = 11 global x return x bar() ``` Traceback: ```python File "/Users/admin/Projects/cpython/example.py", line 3 global x ^^^^^^^^ SyntaxError: name 'x' is assigned to before glo...
124259f9b30f6cbab4dd2bcfb0d32f1cddcc35db
37e4e20eaa8f27ada926d49e5971fecf0477ad26
python/cpython
python__cpython-111127
# `test_typing` has strange `assertIsInstance` calls # Bug report These line are problematic: https://github.com/python/cpython/blob/264f4af506bf5b587105eab37fcfb7dfa62d6587/Lib/test/test_typing.py#L2013-L2020 Why? 1. `self.assertIsInstance` gives the intention that this will return `True` 2. `self.assertNotIs...
ea7c26e4b89c71234c4a603567a93f0a44c9cc97
f1e751e933aa8c39c0e9cfa4cdc3f8f9f0538202
python/cpython
python__cpython-111142
# global declaration in except has incorrect prior use # Bug report ### Bug description: I think the `global a` has no prior use in this code (and pyright tells me the same). But I don't understand why cpython thinks it has a prior use. ```python a=5 def f(): try: pass except: global a ...
b578e51f026a45576930816d6784697192ed472e
f71cd5394efe154ba92228b2b67be910cc1ede95
python/cpython
python__cpython-111124
# Flaky test: test.test_capi.test_misc.Test_PyLock.test_lock_two_threads # Bug report I noticed a spurious test failure in `test_lock_two_threads` when running the test suite. I'll put up a PR to fix this. ``` test_lock_two_threads (test.test_capi.test_misc.Test_PyLock.test_lock_two_threads) ... Assertion failed: (t...
264f4af506bf5b587105eab37fcfb7dfa62d6587
cb4f7462d122d7ec9dd9d909014c548a0b945028
python/cpython
python__cpython-111113
# Misleading socketserver.TCPServer example recv semantics # Documentation Issue (on https://docs.python.org/3/library/socketserver.html#socketserver-tcpserver-example): ``` self.data = self.request.recv(1024).strip() print("{} wrote:".format(self.client_address[0])) ``` socket.recv(), as doc...
a79a27242f75fc33416d4d135a4a542898d140e5
80aa7b3688b8fdc85cd53d4113cb5f6ce5500027
python/cpython
python__cpython-111093
# turtledemo: add root arg to PanedWindow call ``` import tkinter as tk tk._support_default_root=False from turtledemo.__main__ import main main() ``` currently fails at line 165: `pane = PanedWindow(orient=HORIZONTAL, ...` with `RuntimeError: No master specified and tkinter is configured to not support default...
b802882fb2bff8b431df661322908c07491f3ce7
8d234cd315a4c98a87778cc15e7563c7fe74881f
python/cpython
python__cpython-111091
# [C API] Change PyUnicode_AsUTF8() to return NULL on embedded null characters I propose to change the `PyUnicode_AsUTF8()` API to raise an exception and return NULL if the string contains embedded null characters. If the string contains an embedded null character, the UTF-8 encoded string can be truncated if used ...
11e83488c5a4a6e75a4f363a2e1a45574fd53573
ea970fb116a114f2c47cc8f21df00166d43ab78b
python/cpython
python__cpython-111067
# Add more tests for the C API with the PySys_ prefix Currently there are only tests for `PySys_GetObject()` and `PySys_SetObject()` (added in #107735). But it seems that more than one new functions will be added in #108512. There will be more tests, and it is more convenient to have special files for the C API with t...
b2ba2985275d1200e5c44c3f224d754141fc5292
0d1cbff833f761f80383f4ce5fe31f686f3f04eb
python/cpython
python__cpython-112428
# Python 3.12 inspecting a coroutine using `getcoroutinestate` returns the wrong state. # Bug report ### Bug description: Prior to Python 3.12, we can close a just created coroutine, thus, the following test passes: ```python from inspect import getcoroutinestate, CORO_CLOSED async def do_nothing(): pass de...
bfb576ee23c133bec0ce7c26a8ecea76926b9d8e
a65a3d4806a4087f229b5ab6ab28d3e0b0a2d840
python/cpython
python__cpython-111052
# pdb should check if the executing file is modified and warn users # Feature or enhancement ### Proposal: It's possible that the file is modified during debugging, which would definitely confuse users - the source will not match the execution anymore. There's no perfect solution under such circunstances, but we sh...
8278fa2f5625b41be91191d18ee8eeab904a54ff
07ef63fb6a0fb996d5f56c79f4ccd7a1887a6b2b
python/cpython
python__cpython-111053
# IDLE: Simplify configdialog.HighPage.theme_elements dict This dict maps a selection-list display phrase, such as "Normal Code or Text", to the internal name for the theme, which is here "normal". In order to display the display phrase keys in a deterministic order, the internal name values were combined in a tuple ...
642eb8df951f2f1d4bf4d93ee568707c5bf40a96
19916941172844f9c52d7a6dce95efaa23035772
python/cpython
python__cpython-111221
# Segfault during garbage collection with GzipFile + failed urllib3 request on 3.12.0 # Crash report ### What happened? ```python import urllib3 import gzip import io import json import faulthandler faulthandler.enable() def test(): buffer = gzip.GzipFile(fileobj=io.BytesIO(), mode="w", compressl...
bb36f72efcc6a656e0907ffa83620a1e44044895
4d5d9acb22ee8c6908ebd4fdc3d17472f8b286e3
python/cpython
python__cpython-111099
# Fix threaded build under WASI # Bug report ### Bug description: https://bytecodealliance.zulipchat.com/#narrow/stream/217126-wasmtime/topic/.60missing.20required.20memory.20export.60.20for.20threaded.20CPython/near/397361259 > I think you'll want -Wl,--export-memory (the --export-memory to wasm-ld) to get past th...
5dfa71769f547fffa893a89b0b04d963a41b2441
0937b11b89a26626c51e3975f8c52522e99def26
python/cpython
python__cpython-111032
# We can now untokenize PEP 701 syntax, `test_tokenize` needs an update # Bug report It states: https://github.com/python/cpython/blob/baefbb21d91db2d950706737a6ebee9b2eff5c2d/Lib/test/test_tokenize.py#L1911-L1912 But, it works now 🎉 So, I guess we need to test `f` strings now, since it is an important part of Pyt...
e9b5399bee7106beeeb38a45cfef3f0ed3fdd703
642eb8df951f2f1d4bf4d93ee568707c5bf40a96
python/cpython
python__cpython-111020
# Align Expected and Actual titles in assert_has_calls/assert_called_with for greater readability # Feature or enhancement ### Proposal: The current output for `assert_called_with` and `assert_has_calls` has different spacing making visual identification of simple issues challenging. Example: ```pytb Fil...
77dbd956090aac66e264d9d640f6adb6b0930b87
738574fb21967a1f313f1542dd7b70ae0dcd9705
python/cpython
python__cpython-111016
# IDLE.app permissions are not set on installation # Bug report ### Bug description: The `install_IDLE` target in `Mac/Makefile.in` creates IDLE.app in the destination like this: ``` /bin/cp -PR "$(srcdir)/IDLE/IDLE.app" "$(DESTDIR)$(PYTHONAPPSDIR)" ``` It is thus created with whatever permissions were set in the so...
cb1bf89c4066f30c80f7d1193b586a2ff8c40579
3156d193b81f7fefbafa1a5299bc9588a6768956
python/cpython
python__cpython-110998
# test_gdb are not skipped properly if gdb is not available (instead, an uncaught exception is raised) # Bug report ### Bug description: I'm bootstrapping Python 3.13a1 in Fedora Linux. In my environment I've got `gdb` built without Python. Now I want to build full Python and run its tests during the RPM build. **W...
920b3dfacad615c7bb9bd9a35774469f8809b453
2dcc57008be7012b8249208282837ed4d9c3c3e2
python/cpython
python__cpython-110975
# `test_zoneinfo` tests are silently skipped # Bug report This is how `test_zoneinfo` defines its package: https://github.com/python/cpython/blob/b75b1f389f083db8568bff573c33ab4ecf29655a/Lib/test/test_zoneinfo/__init__.py This is problematic, because there are clashin test-classes names in these files. For example:...
86276fe4f8e0801f1194b55fa8d8cb7dbf8ee658
7237fb578dc9db9dc557759a24d8083425107b91
python/cpython
python__cpython-110969
# [C API] Py_MOD_PER_INTERPRETER_GIL_SUPPORTED added to limited C API without versionning Three constants for PyModuleDef_Slot were added to the limited C API in Python 3.13: * Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTED * Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTED * Py_MOD_PER_INTERPRETER_GIL_SUPPORTED Problem: th...
db15fc23c629fb7e0dfd4858c064fcd4c02582b3
9a9fba825f8aaee4ea9b3429875c6c6324d0dee0
python/cpython
python__cpython-110966
# [C API] Move undocumented private _PyArg C API to pycore_modsupport.h internal C API If a 3rd party C extension uses one of these functions, we should consider adding a clean, documented and tested public function to replace it. Private functions and structures: * _PyArg_BadArgument() * _PyArg_CheckPositional...
be5e8a010341c4d2d28ef53a1baed402ee06466e
054f496bd45cf94eac4158fd60ac95ab5f8e45c4
python/cpython
python__cpython-111017
# asyncio.wait function docstring misleading # Documentation According to [docstring](https://github.com/python/cpython/blob/99b7e1c1d7b02adaf98f24bfb843cc57b677f9d6/Lib/asyncio/tasks.py#L440) "Coroutines will be wrapped in Tasks.". This was [deprecated](https://docs.python.org/3/library/asyncio-task.html#asyncio.wa...
7025844f4c79eeb7d767009c7dad606f92079911
e7ae43ad7dde74e731a9d258e372d17f3b2eb893
python/cpython
python__cpython-111041
# Secure coding is not enabled for restorable state! WARNING on Mac OS Sonoma 14.0 # Bug report ### Bug description: With turtle_test.py containing ``` from turtle import home home() ``` running ``` python turtle_test.py ``` outputs: 2023-10-17 08:21:27.948 Python[19831:20908209] WARNING: Secure coding is not enab...
d67f947c72af8a215db2fd285e5de9b1e671fde1
de2715f086bc799b20e420a82b76180338352565
python/cpython
python__cpython-110945
# Make pdb completion work with alias, convenience variables etc. # Feature or enhancement ### Proposal: The current pdb completion could be improved for the following scenarios: 1. It should support alias if there is any 2. Convenience variables (starting with the `$`) should be supported as an expression 3. For th...
f44d6ff6e0c9eeb0bb246a3dd8f99d40b7050054
324531df909721978446d504186738a33ab03fd5
python/cpython
python__cpython-110973
# invalid_def_raw and invalid_class_def_raw rules do not account for type parameters # Bug report ### Bug description: The rules which are affected are here: https://github.com/python/cpython/blob/6a4528d70c8435d4403e09937068a446f35a78ac/Grammar/python.gram#L1371 Typically I believe they should read ``` invalid_def...
24e4ec7766fd471deb5b7e5087f0e7dba8576cfb
be5e8a010341c4d2d28ef53a1baed402ee06466e
python/cpython
python__cpython-111143
# SOURCE_DATE_EPOCH: AssertionError: 'Using random seed ([0-9]+)' not found in 'Using random seed None...' # Bug report ### Bug description: After https://github.com/python/cpython/pull/110168 when the test suite is run with `$SOURCE_DATE_EPOCH` set, `test_regrtest` fails. <details> <summary> Traceback: </...
7237fb578dc9db9dc557759a24d8083425107b91
b07f23259d30e61fd7cc975b8b0e3b2e846fed8f
python/cpython
python__cpython-112490
# Should reference to old books be retained? # Documentation A [question on the help channel](https://discuss.python.org/t/offical-documentation/36356) asked about a reference to a "twenty year old book," but didn't specify it. I assume the poster was referring to Mark Lutz's book. I realize that book has a place in ...
3fdf7ae3d1a08894e53c263945fba67fe62ac05b
a194938f33a71e727e53490815bae874eece1460
python/cpython
python__cpython-110926
# 50% of tests in `test__opcode` are not run # Bug report ### Bug description: Following https://github.com/python/cpython/commit/40f3f11a773b854c6d94746aa3b1881c8ac71b0f, `test__opcode.py` has two subclasses of `unittest.TestCase` in the global namespace that are both called `OpListTests`. This means that all tests...
14d2d1576d9301032a6a1f62caa347ff1685c872
bfc1cd8145db00df23fbbd2ed95324bb96c0b25b