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-103939
# stdlib sqlite3 executemany() does not support RETURNING statement # Problem `sqlite3.Connection.executemany()` does not support a `RETURNING` statement. All requests containing it fail with an exception: `sqlite3.ProgrammingError: executemany() can only execute DML statements.` Working shell example ``` #!/bi...
30216b69a2fc716c7cfab842364a379cd6ffe458
52cedc5c10336f0bc199d28524491e7de05bd047
python/cpython
python__cpython-100009
# Drop support for platforms without two's complement integer representation: require two's complement to build Python Require [Two's complement](https://en.wikipedia.org/wiki/Two%27s_complement) to build Python. Only very old machines (built in the 1960s?) like [UNIVAC 1100/2200 series](https://en.wikipedia.org/wi...
5ea052bb0c8fa76867751046c89f69db5661ed4f
038b151963d9d4a5f4c852544fb5b0402ffcb218
python/cpython
python__cpython-100006
# Newly added test_cmd_line_script.test_script_as_dev_fd() fails on FreeBSD: /dev/fd/3 doesn't exist I propose to skip test_cmd_line_script.test_script_as_dev_fd() on FreeBSD. Here is why. cc @Jehops @emaste @koobs The test added by PR #99768 fails on FreeBSD. test_cmd_line_script.test_script_as_dev_fd() fails w...
038b151963d9d4a5f4c852544fb5b0402ffcb218
e3a3863cb9561705d3dd59a9367427ed45dfb5ea
python/cpython
python__cpython-100002
# `python -m http.server` log messages to stderr can emit raw data Problem: The `http.server` module lets some control characters from the request thru which when emitted as is in a log message to a terminal can be used to control it or otherwise generate misleading output. `python -m http.server` is typically run wit...
d8ab0a4dfa48f881b4ac9ab857d2e9de42f72828
530cc9dbb61df55b83f0219d2282980c9cb1cbd8
python/cpython
python__cpython-100198
# Python 3.9.14: grammar/clarity improvements for str.encode, str.decode error-checking documentation # Documentation The are a couple of paragraphs about error-checking behaviour for `str.encode` and `str.decode` that appears in a few versions of Python and could potentially be improved in future versions. As fou...
a2bb3b7f9d8d15c81b724726454d68357fb31d1c
c18d83118881333b9a0afd0add83afb2ba7300f7
python/cpython
python__cpython-100036
# New warnings: `'function': conversion from 'int64_t' to 'int', possible loss of data` <!-- 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 tuto...
e9e63ad8653296c199446d6f7cdad889e492a34e
f49c735e525cf031ddbfc19161aafac4fb18837b
python/cpython
python__cpython-99971
# Possibly a missing parameter in the documentation of DocTestSuite in doctest The documentation for **DocTestSuite** in **doctest** have the following signature. > DocTestSuite(module=None, globs=None, extraglobs=None, test_finder=None, setUp=None, tearDown=None, checker=None) But the documentation also talks ...
e477348f36eff3f63ba509582622ea620fa9ae5b
a9bad4d28413666edc57551dd439bca6a6a59dd9
python/cpython
python__cpython-99958
# Add `frozen_default` parameter on `dataclass_transform` # Feature or enhancement Add a new `frozen_default` parameter to [`dataclass_transform`](https://peps.python.org/pep-0681/#dataclass-transform-parameters) similar to the existing `eq_default` and `order_default` parameters. # Pitch - Frozen dataclasses...
5c19050546e3e37a8889a0baa2954e1444e803d3
bed15f87eadc726122185cf41efcdda289f4a7b1
python/cpython
python__cpython-99956
# error handling in the compiler is inconsistent In compile.c some function return 0 for failure and 1 for success, and some return -1 for failure and 0 for success. Should be -1 / 0 consistently. <!-- gh-linked-prs --> ### Linked PRs * gh-99956 * gh-100010 * gh-100215 * gh-101412 <!-- /gh-linked-prs -->
ab02262cd0385a2fb5eb8a6ee3cedd4b4bb969f3
b4f35055496d918b42ff305b5d09ebd333204a69
python/cpython
python__cpython-100630
# sqlite3's support for "numeric" paramstyle does not appear to honor the actual numbers with positional parameters We're attempting to get some test support for "numeric" paramstyle, which while unnecessary for sqlite3, is similar to the paramstyle used by a very widely used, non-pep-249 library asyncpg. anyway, I...
b7a68ab824249ebf053b8149ebb83cd8578781c9
2366b27565ab57f053b4a551ade0e71796a1896c
python/cpython
python__cpython-100169
# "a foreign function that will call a COM method" generated by `ctypes.WINFUNCTYPE` works in Python3.7, does not work as same in newer Python # Bug report I'm contributing on [enthought/comtypes](https://github.com/enthought/comtypes). In `comtypes`, there is a [test for the behavior of Excel](https://github.co...
dfad678d7024ab86d265d84ed45999e031a03691
f5ad63f79af3a5876f90b409d0c8402fa54e878a
python/cpython
python__cpython-99946
# Chain import SystemError on unexpected exceptions # Feature or enhancement For functions, the `SystemError` chains an in-fly unexpected exceptions, for some import errors this is not the case. # Pitch Chaining seems easy, and helps debugging since it is tricky to get back the original exception otherwise, a...
474220e3a58d739acc5154eb3e000461d2222d62
a68e585c8b7b27323f67905868467ce0588a1dae
python/cpython
python__cpython-100053
# asyncio tcp transport on Windows reads bytearray instead of bytes # Bug report `asyncio.Protocol.data_received` prototype not respected: when using `create_connection` to create a tcp transport `data_received` is being called with a `bytearray` object instead of `bytes`. If this is expected behaviour libraries l...
1bb68ba6d9de6bb7f00aee11d135123163f15887
d5f8a2b6ad408368e728a389da918cead3ef7ee9
python/cpython
python__cpython-99935
# test_deterministic_sets fails on x86 (32 bit) I am observing: ``` ====================================================================== FAIL: test_deterministic_sets (test.test_marshal.BugsTestCase.test_deterministic_sets) [set([('Spam', 0), ('Spam', 1), ('Spam', 2)])] ------------------------------------------...
c68573b339320409b038501fdd7d4f8a56766275
ee6015650017ca145a48c345311a9c481949de71
python/cpython
python__cpython-99926
# Inconsistent JSON serialization error messages # Bug report When you try to serialize a `NaN`, `inf` or `-inf` with `json.dumps(..., allow_nan=False)`, the error messages are inconsistent, depending on whether you use the `indent` argument or not. ```python >>> json.dumps(float('nan'), allow_nan=False) Value...
d98ca8172c39326bb200308a5191ceeb4a262d53
a6331b605e8044a205a113e1db87d2b0a53d0222
python/cpython
python__cpython-99906
# summarize_stats.py doesn't display misses in execution counts # Bug report The `summarize_stats.py` script doesn't display misses in execution counts. You can see the example broken output here: https://github.com/faster-cpython/ideas/blob/main/stats/pystats-052bc12-2022-11-29.md <!-- gh-linked-prs --> ### Li...
bf94c653f4291ba2db506453e0e00a82fe06b70a
131801d14dfc4f0b2b79103612c88e2e282ff158
python/cpython
python__cpython-99895
# test_traceback: test_import_from_error_bad_suggestions_do_not_trigger_for_small_names() fails randomly on "wasm32-emscripten node (dynamic linking)" buildbot test_traceback: test_import_from_error_bad_suggestions_do_not_trigger_for_small_names() fails randomly on the "wasm32-emscripten node (dynamic linking)" buildb...
0563be23a557917228a8b48cbb31bda285a3a815
f08e52ccb027f6f703302b8c1a82db9fd3934270
python/cpython
python__cpython-100011
# test_unicodedata: test_normalization() fails randomly with IncompleteRead on PPC64LE Fedora buildbots For a few weeks, test_unicodedata.test_normalization() fails randomly with IncompleteRead on PPC64LE Fedora buildbots. IMO the test should be skipped on download error, rather than treating a download error as a ...
2488c1e1b66366a3a933ff248eff080fabd2351c
5ea052bb0c8fa76867751046c89f69db5661ed4f
python/cpython
python__cpython-99893
# Infinite recursion in the tokeniser when showing warnings Turns out that showing warnings in the tokenizer is quite tricky because in the process of showing the warning we need to fetch the encoding which needs to tokenize the first two lines and if the warning is there that leads to an infinite loop. Check for inst...
417206a05c4545bde96c2bbbea92b53e6cac0d48
19c38801ba2f42a220adece5d5f12e833b41822a
python/cpython
python__cpython-104096
# Directory traversal in uu module / uu.decode # Bug report The function uu.decode is vulnerable to trivial directory traversal if no output filename is given. An uu-encoded file with a path starting with a repetition of ../../ or a / allows writing a file to an arbitrary location on the filesystem. I reported ...
0aeda297931820436a50b78f4f7f0597274b5df4
afe7703744f813adb15719642444b5fd35888d86
python/cpython
python__cpython-121481
# Document (undefined) rounding behaviour of new-style formatting # Documentation Current [documentation of new-style formatting](https://docs.python.org/3/reference/lexical_analysis.html#f-strings) does not talk about rounding and that the rounding behaviour is undefined / platform-dependent. Popular platforms see...
7d7d56d8b1147a6b85e1c09d01b164df7c5c4942
868bfcc02ed42a1042851830b79c6877b7f1c7a8
python/cpython
python__cpython-99877
# compiler optimizations violate oparg invariants During code-gen, the compiler makes sure that any opcode that does not HAVE_ARG get an oparg value of 0. Then, during optimizations some instructions become NOPs but their oparg is not set to 0, so when we come to emit code we need to check HAS_ARG again. It woul...
18a6967544795cdcce45b45700b7a9ed3994b8fb
a694b8222e8b0683682958222699953379fd2d48
python/cpython
python__cpython-99846
# PEP 670: Convert _PyObject_SIZE() and _PyObject_VAR_SIZE() macros to functions The _PyObject_SIZE() and _PyObject_VAR_SIZE() macros should be converted to functions: see [PEP 670](https://peps.python.org/pep-0670/) for the rationale. My problem is that I don't know if the return type should be signed (Py_ssize_t)...
85dd6cb6df996b1197266d1a50ecc9187a91e481
18a6967544795cdcce45b45700b7a9ed3994b8fb
python/cpython
python__cpython-104444
# idlelib/NEWS.txt for 3.12.0 and backports Main became 3.12 as of 3.11.0 beta 1: 2022-05-08 However, idlelib/NEWS.txt items continued going under What's New in IDLE 3.11.0 on both main and 3.11 until 3.11.0rc1, 2022-08-08. Subsequent news items go under What's New in IDLE 3.12.0 (new header) on main branch ...
57139a6b5f0cfa04156d5c650026012a7c5a7aad
563c7dcba0ea1070698b77129628e9e1c86d34e2
python/cpython
python__cpython-101307
# Consider upgrading bundled Tk to 8.6.13 Tcl/Tk 8.6.13 with many bugfixes was released a week ago. I think it's worth trying it out in the next Python 3.12 alphas and betas. <!-- gh-linked-prs --> ### Linked PRs * gh-101307 * gh-104738 * gh-110710 <!-- /gh-linked-prs -->
8d18d1ffd52eb3917c4566b09596d596116a5532
9f2c479eaf7d922746ef2f3c85b5c781757686b1
python/cpython
python__cpython-100302
# asyncio: Document return values of AbstractEventLoop.remove_{reader,writer} # Documentation According to https://github.com/python/typeshed/pull/7042, `AbstractEventLoop.remove_{reader,writer}` return a bool, but there is no indication of this in the [documentation for these methods](https://docs.python.org/3/lib...
5234e1cbea686e38392f113707db322ad8405048
f23236a92d8796ae91772adaf27c3485fda963e8
python/cpython
python__cpython-99825
# Document sqlite3.connect() as implicitly opening transactions in the new PEP-249 manual commit mode # Documentation In `sqlite3`, @malemburg [specified](https://github.com/python/cpython/issues/83638#issuecomment-1093853924) that `connect()`, `commit()`, and `rollback()` implicitly open transactions in the new P...
19c38801ba2f42a220adece5d5f12e833b41822a
fe17d353134748dc772f8743ceadc2dd9e0db187
python/cpython
python__cpython-101589
# zipfile.Path is not Path-like This is about [`zipfile.Path`](https://github.com/python/cpython/blob/8bb7fdaee8c19f0311f15dbea7f8eee80a67a50f/Lib/zipfile.py#L2290). The doc says it is compatible to `pathlib.Path`. But it seems that is not for 100% because it doesn't derive from `pathlib.PurePath` and can treated as _...
84181c14040ed2befe7f1a55b4f560c80fa61154
59e86caca812fc993c5eb7dc8ccd1508ffccba86
python/cpython
python__cpython-21104
# inspect. _signature_fromstr has unused code The signature parsing in inspect has some code that checks whether parse_name return the sentinel "invalid", but parse_name never returns this value. So this is dead code. <!-- gh-linked-prs --> ### Linked PRs * gh-21104 <!-- /gh-linked-prs -->
ac115b51e71c24374682e2a9e6663f99d2faf000
d08fb257698e3475d6f69bb808211d39e344e5b2
python/cpython
python__cpython-99812
# logging.StringTemplateStyle's usesTime method using wrong variable to search for asctime <!-- 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 t...
1d1bb95abdcafe92c771fb3dc4722351b032cc24
ca3e611b1f620eabb657ef08a95d5f5f554ea773
python/cpython
python__cpython-99796
# Possible typo in the documentation of importlib.resources.abc The documentation for importlib.resources.abc.TraversableResources at the end of the _importlib.resources.abc_ documentation says: > ... Therefore, any loader supplying importlib.abc.**TraversableReader** also supplies ResourceReader. But importlib....
5f8898216e7b67b7de6b0b1aad9277e88bcebfdb
003f341e99234cf6088341e746ffef15e12ccda2
python/cpython
python__cpython-99771
# Make the correct `call` specialization fail kind show up The `SPEC_FAIL_KIND` is not displayed correctly due to not being adequately maintained. e.g https://github.com/python/cpython/blob/b1dcdefc3abf496a3e37e12b85dd9959f5b70341/Python/specialize.c#L1471-L1482 According to the context, `METH_FASTCALL | METH_KEY...
a02161286a67692758cac38d9dbe42625c211605
2b82c36f17ada471e734c3ad93e6eff8b36a5ad9
python/cpython
python__cpython-99928
# DOC: tp_watch was added to PyTypeObject but is not documented # Documentation PR #97875 extended the `PyTypeObject` structure with a new `tp_watch` field. It should be documented in the [tp slots](https://docs.python.org/3.12/c-api/typeobj.html#tp-slots) section, the [PyTypeObject struct](https://docs.python.org/...
b7e4f1d97c6e784d2dee182d2b81541ddcff5751
48e352a2410b6e962d40359939a0d43aaba5ece9
python/cpython
python__cpython-99742
# Implement Multi-Phase Init for _xxsubinterpreters See PEP 630 and PEP 687. This is an internal test module so the bar isn't as high as for regular stdlib modules. <!-- gh-linked-prs --> ### Linked PRs * gh-99742 * gh-99939 * gh-99940 * gh-100036 <!-- /gh-linked-prs -->
530cc9dbb61df55b83f0219d2282980c9cb1cbd8
51ee0a29e9b20c3e4a94a675e73a894ee2fe447b
python/cpython
python__cpython-99736
# Handle no arguments when using sub-commands in argparse # Documentation The example that shows the use of sub-commands and set_defaults to dispatch a function for each sub-command, fails when there are no command line arguments: `AttributeError: 'Namespace' object has no attribute 'func'` A pull request is ...
e8bedeb45b134e7ae033560353ba064738170cd3
2c178253bd1f78545d412670c59060dc7c676f8c
python/cpython
python__cpython-99731
# HEAD requests should be HEAD requests upon redirect # Bug report Currently the following is `False` ```python from urllib.request import Request, urlopen len(urlopen(Request("http://google.com", method="HEAD")).read()) == 0 # False ``` But this is `True` ```python len(urlopen(Request("http://www.g...
759e8e7ab83848c527a53d7b2051bc14ac7b7c76
49baa656cb994122869bc807a88ea2f3f0d7751b
python/cpython
python__cpython-100030
# Frame teardown can create frame objects <!-- 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 should be filed as ...
b72014c783e5698beb18ee1249597e510b8bcb5a
85d5a7e8ef472a4a64e5de883cf313c111a8ec77
python/cpython
python__cpython-99750
# Possible typo in the documentation of datetime At the bottom of the page, in the section Technical Detail, the point 9 in the notes says: > When used with the strptime() method, the leading zero is optional for formats %d, %m, %H, %I, %M, %S, **%J**, %U, %W, and %V. But **%J** (the uppercase J) does not exist....
d5f8a2b6ad408368e728a389da918cead3ef7ee9
e477348f36eff3f63ba509582622ea620fa9ae5b
python/cpython
python__cpython-99732
# 3.12: segmentation fault from compile() builtin # Crash report I can trigger a crash of the 3.12 interpreter using the following Python instruction: ```python compile("assert (False if 1 else True)", "<string>", "exec") ``` # Error messages The full output when running locally-built cpython with debug ...
ae185fdcca9d48aef425468de8a8a31300280932
5f4ae86a639fb84260d622e31468da21dc468265
python/cpython
python__cpython-99707
# 3.12 - PyASCIIObject state only 31 bits in size, should be 32 Looking at https://github.com/python/cpython/blob/d4cf192826b4c3bc91ac0de573a3a2d85760f1dd/Include/cpython/unicodeobject.h#L136-L138 I believe the bitfield is intended to have 32 bits, however summing the fields 1 + 3 + 1 + 1 + 25 = 31. This only ap...
b4d54a332ed593c9fcd0da25684c622a251d03ce
c24397a1080fa496d4e860e3054592ecb3685052
python/cpython
python__cpython-99712
# case error in test_unary.py Hello all, I was looking throw the test code in cpython to use a test cases for my own python interpreter. While looking at the code, I got curious. First is this function. > https://github.com/python/cpython/blob/7e3f09cad9b783d8968aa79ff6a8ee57beb8b83e/Lib/test/test_unary.py#L23...
54289f85b2af1ecf046089ddf535dda1bdf6af24
868bab0fdc514cfa70ce97e484a689aee8cb5a36
python/cpython
python__cpython-99678
# `inspect._getmembers` duplicates self type in `mro` for no good reason This line https://github.com/python/cpython/blame/4d82f628c44490d6fbc3f6998d2473d1304d891f/Lib/inspect.py#L540 has this logic `mro = (object,) + getmro(object)` I don't think this is correct: 1. `getmro` returns MRO including self type 2. We...
2653b82c1a44371ad0da6b5a1101abbda4acd2d3
ac115b51e71c24374682e2a9e6663f99d2faf000
python/cpython
python__cpython-99672
# Possible typo in typing.TypeVarTuple docs # Documentation In the [section about the TypeVarTuple type](https://docs.python.org/3.11/library/typing.html#typing.TypeVarTuple), there is a bit of text that I find diffcult making sense of. My guess is that the author made a typo, but of course I could be wrong and maybe...
1bf983ce7eb8bfd17dc18102b61dfbdafe0deda2
2781ec9b0e41a62cecc189c22dfc849f9a56927c
python/cpython
python__cpython-99660
# sqlite3 bigmem test catches wrong exception `Lib/test/test_sqlite3/test_types.py` has two bigmem tests: - `test_too_large_string`; and - `test_too_large_blob`. Those are skipped unless `-M` is passed to the test runner so nobody was running those tests until [I set up a bigmem buildbot](https://buildbot.python....
2781ec9b0e41a62cecc189c22dfc849f9a56927c
49e554dbafc87245c1364ae00ad064a96f5cb995
python/cpython
python__cpython-99653
# argparse docs: "optional arguments" instead of "options" Docs for [ArgumentParser.add_argument_group](https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_argument_group) say: > By default, ArgumentParser groups command-line arguments into “positional arguments” and “optional arguments” when d...
f5fea2288620cb2fda24f3eecc9d623331fe4401
d4cf192826b4c3bc91ac0de573a3a2d85760f1dd
python/cpython
python__cpython-99646
# All TestCase classes use a shared stack for class cleanup `TestCase` class methods `addClassCleanup()` and `doClassCleanups()` are similar to instance methods `addCleanup()` and `doCleanups()`. `add*Cleanup()` add a callback into a list, and `do*Cleanups()` pop them from a list and call. The main difference is that ...
c2102136be569e6fc8ed90181f229b46d07142f8
d15b9f19ac0ffb29b646735d69b29f48a71c247f
python/cpython
python__cpython-99621
# BaseExceptionGroup.derive doesn't preserve __cause__ etc. The [documentation](https://docs.python.org/3/library/exceptions.html#BaseExceptionGroup.derive) for `BaseExceptionGroup.derive` says "Returns an exception group with the same [message](https://docs.python.org/3/library/exceptions.html#BaseExceptionGroup.mess...
5d9183c7ad68eb9ddb53d54a3f9a27e29dbabf31
8f024a02d7d63315ecc3479f0715e927f48fc91b
python/cpython
python__cpython-99613
# PyUnicode_DecodeUTF8Stateful() does not set *consumed for ASCII-only string `PyUnicode_DecodeUTF8Stateful()` should save the number of successfully decoded bytes in `*consumed`. But if all bytes are in the ASCII range, it uses a fast path and does not set `*consumed`. It was found during writing coverage tests fo...
f08e52ccb027f6f703302b8c1a82db9fd3934270
d460c8ec52716a37080d31fdc0f673edcc98bee8
python/cpython
python__cpython-99583
# Freezing zipimport into _bootstrap_python # Feature or enhancement Freezing `zipimport` module into `_boostrap_python`. # Pitch Currently, `_bootstrap_python` is used to freeze modules during python building. When running `_bootstrap_python`, stdlib files can be found in the source directory. However, when ...
228c92eb5c126130316a32b44a0ce8f28cc5d544
7c0fb71fbfa8682f56c15832e2c793a6180f2ec0
python/cpython
python__cpython-99605
# heap corruption while parsing huge comment # Crash report A very large comment in [heapcrpt.py](https://github.com/python/cpython/files/10042900/heapcrpt.zip) causes `tokenizer.c` to perform an illegal write, leading to heap corruption and crashing the interpreter # Error messages Linux/glibc: `double free ...
e13d1d9dda8c27691180bc618bd5e9bf43dfa89f
abf5b6ff43c5e238e2d577c95ed27bc8ff01afd5
python/cpython
python__cpython-99642
# gc_decref: Assertion "gc_get_refs(g) > 0" failed # Bug report Error whlie testing the main branch. May be similar to: - https://github.com/python/cpython/issues/94215 # The problem When running `./python -m test`: ``` 0:18:59 load avg: 0.72 [187/433] test_imp Modules/gcmodule.c:113: gc_decref: Assert...
cb2ef8b2acbb231c207207d3375b2f8b0077a6ee
1cae31d26ba621f6b1f0656ad3d69a0236338bad
python/cpython
python__cpython-99616
# LWPCookieJar.save() gives unexpected results in 3.11.0 # Bug report `LWPCookieJar.save()` doesn't truncate the file. So removing cookies from an existing jar file then saving it gives unexpected results : ```python3 from http.cookiejar import LWPCookieJar from urllib.request import Request, urlopen lwp = ...
44892d45b038f919b0378590a776580a9d73b291
cb60b6131bc2bb11c48a15f808914d8b242b9fc5
python/cpython
python__cpython-99555
# `.pyc` files are larger than they need to be Python 3.11 made `.pyc` files almost twice as large. There are two main reasons for this: - [PEP 659](https://peps.python.org/pep-0659/) made the bytecode stream ~3x as large as 3.10. - [PEP 657](https://peps.python.org/pep-0657/) made the location tables ~9x as large a...
426569eb8ca1edaa68026aa2bab6b8d1c9105f93
4420cf4dc9ef7bd3c1c9b5465fa9397304bf0110
python/cpython
python__cpython-99572
# Subclasses of `ExceptionGroup` can wrap `BaseException`s ```python class MyEG(ExceptionGroup): """Holds BaseExceptions without itself being a BaseException.""" oops = MyEG("oops", [KeyboardInterrupt()]) assert isinstance(oops, Exception) assert not isinstance(oops.exceptions[0], Exception) ``` I belie...
c8c6113398ee9a7867fe9b08bc539cceb61e2aaa
a220c6d1ee3053895f502b43b47dc3a9c55fa6a3
python/cpython
python__cpython-99548
# isjunction for checking if a given path is a junction # Feature or enhancement (A clear and concise description of your proposal.) # Pitch I’m proposing we add a `isjunction` method to os.path and a `is_junction` method to `pathlib.Path`. Both would return True if the given path is a junction. On Posix the ...
1b2de89bce7eee3c63ce2286f071db57cd2cfa22
c2102136be569e6fc8ed90181f229b46d07142f8
python/cpython
python__cpython-99541
# Constant hash value for None to aid reproducibility # Feature or enhancement Fix `hash(None)` to a constant value. # Pitch (Updated 2022.11.18) - Under current behavior, the runtime leaks the ASLR offset, since the original address of the `None` singleton is fixed and `_Py_HashPointerRaw` is reversible. Ad...
432117cd1f59c76d97da2eaff55a7d758301dbc7
a5a7cea202d34ca699d9594d428ba527ef7ff2ce
python/cpython
python__cpython-99990
# `__annotations__` are not inherited in 3.10 while they are in 3.8 # Bug report Python 3.8.13 inherits annotations from a subclass: ```bash Python 3.8.13 (default, Oct 19 2022, 17:54:22) [Clang 12.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information. >>> c...
f5b7b19bf10724d831285fb04e00f763838bd555
e4b43ebb3afbd231a4e5630e7e358aa3093f8677
python/cpython
python__cpython-99519
# Buildbot failure: unhandled warning in `test_enum.py` Full error text: ``` AssertionError: unhandled warning {message : SyntaxWarning("invalid escape sequence '\\('"), category : 'SyntaxWarning', filename : '/Users/sobolev/Desktop/cpython/Lib/test/test_enum.py', lineno : 1481, line : None} -------------------...
5cfb7d19f5242c9b8ffd2fe30a24569e85a99e1d
00437ad30454005bc82fca75dfbabf6c95f3ea6a
python/cpython
python__cpython-99511
# multiprocessing classes SimpleQueue and Queue don't support typing in 3.11.0 # Bug report `SimpleQueue` and `Queue` classes from `multiprocessing` module in Python 3.11.0 do not support type `[str]` annotation. Minimal, reproducible example: ```python3 from multiprocessing import Queue multiprocessing_que...
ce39aaffeef9aa8af54a8554fe7a5609a6bba471
199507b81a302ea19f93593965b1e5088195a6c5
python/cpython
python__cpython-99635
# Call to _imp.source_hash with incorrect arguments in (unreachable?) part of SourceLoader.get_code (importlib._bootstrap_external) # Bug report As far as I can tell this line: https://github.com/python/cpython/blob/4e4b13e8f6211abbc0d53056da11357756daa314/Lib/importlib/_bootstrap_external.py#L1147-L1147 will r...
c69cfcdb116c4907b306e2bd0e263d5ceba48bd5
57dfb1c4c8d5298494f121d1686a77a11612fd64
python/cpython
python__cpython-99512
# secrets.compare_digest raises TypeError if one of it's arguments is None # Bug report When using `secrets.compare_digest()` with one or both of it's arguments being None the function explodes. This is [not explicitly documented](https://docs.python.org/3/library/secrets.html#secrets.compare_digest) even though th...
47d673d81fc315069c14f9438ebe61fb70ef1ccc
ec2b76aa8b7c6313293ff9c6814e8bc31e08fcaf
python/cpython
python__cpython-99484
# Remove compatibility Jython code There are several places where some Jython-specific hacks are used. For example, there are imports from `com.python.core` which is a third-party library. They are untested and undocumented. Right now Jython is stuck with 2.7 I think, we don't have to keep it: eventually Jython...
745545b5bb847023f90505bf9caa983463413780
c5726b727e26b81a267933654cf26b760a90d9aa
python/cpython
python__cpython-99444
# `descr_set_trampoline_call` return type should be `int` not `PyObject*` `getset_set` return type is `int`, `descr_set_trampoline_call`'s return type needs to be the same. I think this was a copy-paste error that occurred when applying my patch where `descr_set_trampoline_call` returns `int`: https://github.com/pyod...
bc390dd93574c3c6773958c6a7e68adc83d0bf3f
aa8b58cb33826bd2b1a1de631ebcd6a5353eecb5
python/cpython
python__cpython-111762
# pdb mangles sys.path when run with -P or ._pth # Bug report When running a script, `pdb` indiscriminately replaces `sys.path[0]`, which it assumes to be the path where `pdb` itself was found, with the path where the script was found. That assumption may not be correct: it is not when the interpreter runs in “safe...
b90a5cf11cdb69e60aed7be732e80113bca7bbe4
8f71b349de1ff2b11223ff7a8241c62a5a932339
python/cpython
python__cpython-99470
# ./configure and make failed on macOS Monterey <!-- 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/3/tutorial...
cdde29dde90947df9bac39c1d19479914fb3db09
6d8da238ccdf946dc90e20821652d8caa25b76ba
python/cpython
python__cpython-114031
# Clarify the documentation of pathlib.Path.is_relative_to() Hi, Currently (python 3.10.6 & 3.11.0): ```python from pathlib import Path p = Path('/var/log/../../opt') p.is_relative_to('/var/log') >>> True p = p.resolve() p.is_relative_to('/var/log') >>> False ``` Once you know `is_relative_to` uses `r...
3a61d24062aaa1e13ba794360b6c765d9a1f2b06
9af9ac153acb4198878ad81ef438aca2b808e45d
python/cpython
python__cpython-101396
# Add link to the first article about Python # Documentation Add link to the first article about Python (https://ir.cwi.nl/pub/18204) to part about Python articles (https://docs.python.org/3/faq/general.html#are-there-any-published-articles-about-python-that-i-can-reference) <!-- gh-linked-prs --> ### Linked PRs...
df0068ce4827471cc2962631ee64f6f38e818ec4
1a62ae84c687791bc1dfb54d1eb75e1c7277bb04
python/cpython
python__cpython-99802
# Bug report: shutil.make_archive() makes empty archive file even when root_dir does not exists # Bug report In python 3.10+, shutil.make_archive() makes empty archive file and does not raise any error even when root_dir does not exists. In python -3.9, FileNotFoundError is raised with message `[Errno 2] No such f...
a86df298df5b02e2d69ea6879e9ed10a7adb85d0
a794ebeb028f7ef287c780d3890f816db9c21c51
python/cpython
python__cpython-102518
# Extension type from documentation doesn't compile in C++20 mode # Bug report C++20 added support for designated initializers and fails to compile if you mix named and unnamed initializers. For demonstration I'll use the example from the documentation section "[Defining Extension Types: Tutorial](https://docs.pyt...
23cf1e20a6470588fbc64483031ceeec7614dc56
52bc2e7b9d451821513a580a9b73c20cfdcf2b21
python/cpython
python__cpython-100381
# /std:c++20 instead of /std:c++17 used for _wmimodule.cpp, but seems unnecessary @python/windows-team I noticed the VS project file `_wmi.cxproj` for `_wmimodule.cpp` added for 3.12 to support using WMI on Windows to get `platform` data in issue #89545 / PR #96289 specifies C++20 mode via the compiler flag `/std:...
f08209874e58d0adbb08bd1dba4f58ba63f571c5
36f2329367f3608d15562f1c9e89c50a1bd07b0b
python/cpython
python__cpython-112670
# Elide uninformative traceback indicators in `return` and simple assignment statements The new traceback indicators can be *really* nice, though at times also quite verbose. #93883/#93994 by @belm0 improved this situation by skipping the indicators for lines where the *entire* line was indicated, which helps substan...
4a08a75cf4c490f7c43ede69bdf6e5a79c6a3af3
c1bf4874c1e9db2beda1d62c8c241229783c789b
python/cpython
python__cpython-100182
# Segfault on frame.f_back when frame is created with PyFrame_New() Python segfaults when frame.f_back is accessed on a frame created with PyFrame_New() c api. Calling the PyFrame_GetBack() c api also segfaults, at least in debug builds and on win32 (it depends on the contents of uninitialized memory). Tested with 3.1...
88d565f32a709140664444c6dea20ecd35a10e94
2659036c757a11235c4abd21f02c3a548a344fe7
python/cpython
python__cpython-98993
# Some missing newlines for prompts For example, in the [enum howto](https://docs.python.org/dev/howto/enum.html#intflag) ([source](https://github.com/python/cpython/blame/main/Doc/howto/enum.rst#L675-L680)) becomes ``` class Perm(IntFlag): R = 4 W = 2 X = 1 RWX = 7 Perm.RWX ~Perm.RWX Pe...
286e3c76a9cb8f1adc2a915f0d246a1e2e408733
3e06b5030b18ca9d9d507423b582d13f38d393f2
python/cpython
python__cpython-106649
# Use OpenSSL 3.0.x in our binary builds # Feature or enhancement We currently use OpenSSL 1.1.1 series in our Windows and macOS binary builds. Per https://www.openssl.org/source/, that is only supported through September of 2023. Thus we need to switch to a supported version of OpenSSL before 3.12 is release...
e2d7366fb3df44e7434132636d49f22d6d25cc9f
2ca008e2b738b8c08b4bf46b2b23f315d6510d92
python/cpython
python__cpython-123857
# "builtins" module should link to Built-in Types and Built-in Exceptions The [`builtins`](https://docs.python.org/library/builtins.html) module documentation links to [Built-in Functions](https://docs.python.org/library/functions.html#built-in-funcs) and [Built-in Constants](https://docs.python.org/library/constants....
9256be7ff0ab035cfd262127d893c9bc88b3c84c
b3c6b2c9e19ea84f617c13399c411044afbc3813
python/cpython
python__cpython-100798
# Minor doc issue: dataclasses.KW_ONLY not documented as inspected by dataclass() # [dataclasses](https://docs.python.org/3.11/library/dataclasses.html) documentation According to [dataclasses](https://docs.python.org/3.11/library/dataclasses.html) documentation, the only places "where [dataclass()](https://docs.py...
659c2607f5b44a8a18a0840d1ac39df8a3219dd5
2f2fa03ff3d566b675020787e23de8fb4ca78e99
python/cpython
python__cpython-100771
# Add `CALL_INTRINSIC` instruction. We have a number of instructions that are complicated and executed fairly rarely. For example `MAP_KEYS`, `CHECK_EG_MATCH`, `CLEANUP_THROW`. These bulk out the interpreter, possibly slowing things down. We should move code from these into helper functions, which can be called thou...
28187141cc34063ef857976ddbca87ba09a882c2
f20c553a458659f247fac1fb829f8172aa32f69a
python/cpython
python__cpython-102032
# Fields with single underscore names can mess up dataclasses A similar issue to https://github.com/python/cpython/issues/96151. ericvsmith mentioned this is worth opening an issue for in https://github.com/python/cpython/pull/98143#issuecomment-1280306360 dataclasses uses variables with single underscore names as ...
718e86671fe62a706c460b7f049b196e434cb5b3
027223db96b0464c49a74513f82a1bf25aa510bd
python/cpython
python__cpython-103942
# TESTSUBDIRS missing some test directories # Bug report I noticed this when `test_sqlite3` was missing from the installed tests # Your environment 3.11+ though I suspect some other versions might have inaccurate testdir listings too here's the missing ones for the current primary branch for example: ...
bf0b8a9f8d647515170cbdf3b6a8c0f44e0f37b3
72adaba6dd2aa1a9aeb9a992db7d854c89202e27
python/cpython
python__cpython-99966
# `urllib.error.HTTPError(..., fp=None)` raises a `KeyError` instead of an `AttributeError` on attribute access # Bug report The exception `urllib.error.HTTPError(..., fp=None)` raises a `KeyError` instead of an `AttributeError` when accessing an attribute that does not exist. ```python >>> from urllib.error im...
dc8a86893df37e137cfe992e95e7d66cd68e9eaf
3c892022472eb975360fb3f0caa6f6fcc6fbf220
python/cpython
python__cpython-98761
# Prefer "python" over "python3" for command line examples in docs. # Documentation Currently docs are not consistent in using `python` vs. `python3` for command line examples. As far as I'm aware, we should prefer `python`, see https://peps.python.org/pep-0394/#for-end-users-of-python <!-- gh-linked-prs --> ##...
847d7708ba8739a5d5d31f22d71497527a7d8241
8795ad1bd0d6ee031543fcaf5a86a60b37950714
python/cpython
python__cpython-101618
# logging documentation is tough for beginners Something of a perennial issue that I've seen is that folks: a) complain that logging is hard to use, hard to configure. Somebody called logging an "advanced" module recently. b) a lot of real world code gets written not following what most people with even moderate...
7f418fb111dec325b5c9fe6f6e96076049322f02
8e2aab7ad5e1c8b3360c1e1b80ddadc0845eaa3e
python/cpython
python__cpython-98768
# AIX build fails with the main branch Python main branch fails to build in AIX operating system with the below error. ``` gcc -pthread -c -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Werror=implicit-function-declaration -fvisibility=hidden...
618b7a8260bb40290d6551f24885931077309590
ba4731d149185894c77d201bc5804da90ff45eee
python/cpython
python__cpython-100018
# PyMemoryView_FromMemory is part of stable ABI but the flag constants (PyBUF_READ, etc.) are not # Feature or enhancement I'd rather not write: ```c #ifndef PyBUF_READ #define PyBUF_READ 0x100 #endif ``` and instead be able to rely on these even in stable abi mode relevant error message: ``` wha...
f24738742cc5d3e00409d55ced789cd544b346b5
922a6cf6c265e2763a003291885ff74d46203fc3
python/cpython
python__cpython-98643
# configure: `--with-dbmliborder=gdbm` no longer satisfies `_dbm` # Bug report It seems that the `configure` script is no longer able to build `_dbm` module from `gdbm_compat`. Excerpts from configure log (full log: [configure.txt](https://github.com/python/cpython/files/9857724/configure.txt)): ``` $ ./conf...
02a72f080dc89b037c304a85a0f96509de9ae688
07a87f74faf31cdd755ac7de6d44531139899d1b
python/cpython
python__cpython-99664
# `sys._git` is empty on Windows Compare/contrast these two official releases: ``` C:\> python3.11 Python 3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys._git ('CPython', '', '') >>> ^Z ...
49e554dbafc87245c1364ae00ad064a96f5cb995
c450c8c9ed6e420025f39d0e4850a79f8160cdcd
python/cpython
python__cpython-102657
# Expose _Py_NewInterpreter() as Py_NewInterpreterFromConfig() A while back I added `_Py_NewInterpreter()` (a "private" API) to support configuring the new interpreter. Ultimately, I'd like to adjust the signature a little and then make the function part of the public API (as `Py_NewInterpreterFromConfig()`). My...
3bb475662ba998e1b2d26fa370794d0804e33927
910a64e3013bce821bfac75377cbe88bedf265de
python/cpython
python__cpython-104474
# `_SSLProtocolTransport` keeps reference to protocol after close `_SSLProtocolTransport` keeps reference to protocol after close. It leads to reference cyeles between the transport and the protocol and is bad for gc. Clearing this is better as it frees up the memory immediately without waiting for the gc. This causes...
fb8739f0b6291fb048a94d6312f59ba4d10a20ca
88c5c586708dcff369c49edae947d487a80f0346
python/cpython
python__cpython-98459
# Unittest: self-referencing explicit exception cause results in infinite loop # Bug report If an exception is raised with a self-referencing \_\_cause__ or \_\_context__ then TestResult._clean_tracebacks() in result.py enters an infinite loop. Minimal example 1: ```python try: raise Exception() except E...
72ec518203c3f3577a5e888b12f10bb49060e6c2
1012dc1b4367e05b92d67ea6925a39d50dce31b7
python/cpython
python__cpython-120763
# Source location of return instruction in a with block is incorrect ``` def f(): with x: return 42 import dis from pprint import pprint as pp def pos(p): return (p.lineno, p.end_lineno, p.col_offset, p.end_col_offset) pp([(pos(x.positions), x.opname, x.argval) for x in dis.get_instructions(f)]) `...
55596ae0446e40f47e2a28b8897fe9530c32a19a
8bc76ae45f48bede7ce3191db08cf36d879e6e8d
python/cpython
python__cpython-100118
# Add itertools.batched() This was requested on python-ideas: def batched(iterable, n): "Batch data into lists of length n. The last batch may be shorter." # batched('ABCDEFG', 3) --> ABC DEF G if n < 1: raise ValueError('n must be >= 1') it = iter(it...
35cc0ea736a323119157117d93e5d68d8247e89f
41d4ac9da348ca33056e271d71588b2dc3a6d48d
python/cpython
python__cpython-98637
# Give python-isal a mention in the zlib/gzip documentation # Documentation The documentation mentions several PyPI packages such as numpy and requests as an alternative for standard library packages. I would like to propose that [python-isal](https://github.com/pycompression/python-isal) gets a mention in the "...
b1fc8b69ec4c29026cd8786fc5da0c498c7dcd57
99b71efe8e9d59ce04b6d59ed166b57dff3e84d8
python/cpython
python__cpython-101508
# Update bundled pip to 22.3 # Feature or enhancement Routine update of the bundled pip and setuptools wheels in `ensurepip` following a pip release. <!-- gh-linked-prs --> ### Linked PRs * gh-101508 <!-- /gh-linked-prs -->
616aec1ff148ba4570aa2d4b8ea420c715c206e4
d9de0792482d2ded364b0c7d2867b97a5da41b12
python/cpython
python__cpython-103163
# Document new 3.11 enum APIs (ReprEnum, global_* and/or show_flag_values) As discovered in #98295 , there are several undocumented new APIs in the `enum` module: * `ReprEnum` and is documented in [What's New](https://docs.python.org/3.11/whatsnew/3.11.html#enum) (and exported in `__all__`), but not anywhere in the...
5ffc1e5a21de9a30566095386236db44695d184a
d3a7732dd54c27ae523bef73efbb0c580ce2fbc0
python/cpython
python__cpython-98252
# struct.pack error messages are misleading and inconsistent <!-- 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.o...
854a878e4f09cd961ba5135567f7a5b5f86d7be9
2ae894b6d1995a3b9f95f4a82eec6dedd3ba5298
python/cpython
python__cpython-101689
# inspect.getsource() on sourceless dataclass raises undocumented exception <!-- 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:...
b6132085ca5418f714eff6e31d1d03369d3fd1d9
58d2b30c012c3a9fe5ab747ae47c96af09e0fd15
python/cpython
python__cpython-127547
# email: get_payload(decode=True) doesn't handle Content-Transfer-Encoding with trailing white space If the Content-Transfer-Encoding header field of a message part has trailing whitespace, for example "base64 ", get_payload(decode=True) does not return the properly decoded payload. Here is a minimal code example. ...
a62ba52f1439c1f878a3ff9b8544caf9aeef9b90
3b231be8f000ae59faa04d5a2f1af11beafee866
python/cpython
python__cpython-98170
# `dataclasses.astuple` breaks on `DefaultDict` # Bug report This is very similar to https://github.com/python/cpython/issues/79721 ```python from dataclasses import dataclass, astuple from typing import DefaultDict, List from collections import defaultdict @dataclass class C: mp: DefaultDict[str, Li...
71e37d907905b0504c5bb7b25681adeea2157492
85ba8a3e03707092800cbf2a29d95e0b495e3cb7
python/cpython
python__cpython-107552
# Update Refcount-related Docs # Documentation PEP 683 includes [some docs changes](https://peps.python.org/pep-0683/#documentation) that should help narrow expectations about refcount semantics. Those changes shouldn't need to wait for the PEP. I'd be interested in backporting these changes as far back as poss...
5dc825d504ad08d64c9d1ce578f9deebbe012604
0191af97a6bf3f720cd0ae69a0bdb14c97351679
python/cpython
python__cpython-98109
# Add pickleability to zipfile.Path In [zipp 3.9.1](https://zipp.readthedocs.io/en/latest/history.html#v3-9-0), zipp.Path added support for pickleability. Let's sync with that version and incorporate that behavior. <!-- gh-linked-prs --> ### Linked PRs * gh-98109 <!-- /gh-linked-prs -->
93f22d30eb7bf579d511b1866674bc1c2513dde9
5f8898216e7b67b7de6b0b1aad9277e88bcebfdb