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-112396
# Support getters and setters in Argument Clinic # Feature or enhancement In the C API, getters and setters are implemented using `PyGetSetDef`. Argument Clinic doesn't currently support writing getters and setters, probably because they are pretty straightforward to write manually -- there's not much argument parsin...
7eeea13403882af63a71226433c9a13b80c22564
0785c685599aaa052f85d6163872bdecb9c66486
python/cpython
python__cpython-112201
# Race between asyncio Condition.notify() and Task.cancel() may result in lost wakeups. # Bug report ### Bug description: A Task which issues a `condition.notify(1)` to wake up a `Task` from a set of waiting tasks to perform some task, e.g. consume a piece of data, may hit a *race condition* with a simultaneous `can...
6b53d5fe04eadad76fb3706f0a4cc42d8f19f948
96bce033c4a4da7112792ba335ef3eb9a3eb0da0
python/cpython
python__cpython-112195
# Convert more examples to doctests in `typing` module # Feature or enhancement There are multiple examples that are very similar to doctests, but are not doctests. I propose adding `>>>` and `...` to them, so these examples would be checked during tests (since now we have this feature). There are some easy one...
949b2cc6eae6ef4f3312dfd4e2650a138446fe77
9fb0f2dfeed6cf534b0188154e96b976d6a67152
python/cpython
python__cpython-126972
# Increase the precision of the summary in `trace` module # Feature or enhancement ### Proposal: With the current trace module, you'll have a summary like this if you enable summary ``` lines cov% module (path) 154 24% _weakrefset (/home/gaogaotiantian/programs/mycpython/Lib/_weakrefset.py) 1...
12397a5781664bf43da98454db07cdfdec3ab815
dabcecfd6dadb9430733105ba36925b290343d31
python/cpython
python__cpython-112187
# Improve test case `test_loop_is_closed_resource_warnings` If this exception is expected then why not use `self.assertRaises` etc? _Originally posted by @kumaraditya303 in https://github.com/python/cpython/pull/111983#discussion_r1393608295_ <!-- gh-linked-prs --> ### Linked PRs * gh-1...
18c692946953e586db432fd06c856531a2b05127
2bcc0f7d348fd978c8e7c7c377fcdcb7b050cb1d
python/cpython
python__cpython-113220
# `StopIteration` in a generator in a thread hanging on asyncio # Bug report ### Bug description: ```python import asyncio def a(): raise StopIteration try: await asyncio.to_thread(a) except: print(3.12.0) ``` other cases: https://github.com/agronholm/anyio/pull/477 ### CPython versions tested on: ...
4826d52338396758b2d6790a498c2a06eec19a86
5d8a3e74b51a59752f24cb869e7daa065b673f83
python/cpython
python__cpython-115194
# Move the `eval_breaker` to `PyThreadState` # Feature or enhancement The `eval_breaker` is a variable that keeps track of requests to break out of the eval loop to handle things like signals, run a garbage collection, or handle asynchronous exceptions. It is currently in the interpreter state (in `interp->ceval.eval...
0749244d13412d7cb5b53d834f586f2198f5b9a6
e71468ba4f5fb2da0cefe9e923b01811cb53fb5f
python/cpython
python__cpython-112191
# `asyncio.getaddrinfo` manifests in misleading DNS timeouts when thread pool executor is saturated # Bug report ### Bug description: There is no mention in https://docs.python.org/3/library/asyncio-eventloop.html#dns that `asyncio.getaddrinfo` is just a ThreadPoolExecutor-based wrapper around sync getaddrinfo (...
fc297b4ba4c61febeb2d8f5d718f2955c6bbea0a
1500a23f33f5a6d052ff1ef6383d9839928b8ff1
python/cpython
python__cpython-112183
# Off-by-one index error in __main__.py doc Very minor issue, the '2' here should be '3' on the RHS of the comparison (given we really want to return sys.argv[2] from the ternary). <img width="635" alt="image" src="https://github.com/python/cpython/assets/135147320/77b4c680-0c6e-48e1-9642-6e2fa55f8bae"> https://...
8cd70eefc7f3363cfa0d43f34522c3072fa9e160
f92ea63f6f2c37917fc095a1bc036a8b0c45a084
python/cpython
python__cpython-112161
# Backport `regen-configure` target to supported branches # Feature or enhancement ### Proposal: Follow-up from https://github.com/python/cpython/pull/112090 and related to https://github.com/python/release-tools/issues/70, I am proposing using the `regen-configure` makefile target in release tools and therefore...
f21a5f773964d34c7b6deb7e3d753fae2b9c70e2
33a5f2af59ddcf3f1b0447a8dbd0576fd78de303
python/cpython
python__cpython-112156
# `typing.py` contains two doctests that are not executed, ever # Feature or enhancement `typing.py` contains at least two doctests: https://github.com/python/cpython/blob/81ab0e8a4add53035c87b040afda6d554cace528/Lib/typing.py#L3377-L3414 But, they are not ever executed. I propose to add a `DocTestSuite` to `test_t...
7680da458398c5a08b9c32785b1eeb7b7c0887e4
12c7e9d573de57343cf018fb4e67521aba46c90f
python/cpython
python__cpython-112158
# Typo in docstring for override decorator from `typing` module. # `typing` module documentation ## Typo description A typo in docstring for `override` decorator. Under `Usage::` we see the following code. ```python class Base: def method(self) -> None: ... pass class Child(Base): @override...
12c7e9d573de57343cf018fb4e67521aba46c90f
bd89bca9e2a57779c251ee6fadf4887acb364824
python/cpython
python__cpython-112143
# help(): Display complex signatures in multiple lines # Feature or enhancement ### Proposal: Here's the help() output for a reasonably complex typed method ([link](https://github.com/quora/pyanalyze/blob/fc239e15e52cb524138c02b16135a03008a08c64/pyanalyze/name_check_visitor.py#L1107)): ``` Help on function __init__...
a9574c68f04695eecd19866faaf4cdee5965bc70
0229d2a9b1d6ce6daa6a773f92e3754e7dc86d50
python/cpython
python__cpython-112138
# Change dis output to display labels instead of offsets TODO: - [x] test for output with offsets - [x] ``--`` instead of ``None`` for missing line number? - in another PR. # Feature or enhancement ``` >>> def f(): ... for i in x: ... if y: ... z ... >>> dis.dis(f) 1 ...
10e1a0c91613908757a5b97602834defbe575ab0
790db85c7737c2ebbb145f9a26f675a586c5f0d1
python/cpython
python__cpython-121262
# [C API] Removed private _PyArg_Parser API has no replacement in Python 3.13 Copy of @tacaswell's [message](https://github.com/python/cpython/issues/112026#issuecomment-1813356876): > aio-libs/multidict is also using `_PyArg_Parser` and friends (e.g. https://github.com/aio-libs/multidict/blob/18d981284b9e97b11a4c0...
f8373db153920b890c2e2dd8def249e8df63bcc6
7c66906802cd8534b05264bd47acf9eb9db6d09e
python/cpython
python__cpython-112504
# None __ne__ behavior changes in 3.12 # Bug report ### Bug description: ``` Python 3.11.6 (tags/v3.11.6:8b6ee5b, Oct 2 2023, 14:57:12) [MSC v.1935 64 bit (AMD64)] on win32 >>> None.__ne__(None) False ``` ``` Python 3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)] on win32 >>> None....
9c3458e05865093dd55d7608810a9d0ef0765978
b449415b2f1b41e1c44cb453428657fdf6ff1d36
python/cpython
python__cpython-112106
# `readline.set_completer_delims` has no effect with libedit # Bug report ### Bug description: `readline.set_completer_delims` works fine with GNU readline, but not with libedit. A quick example: ```python import readline readline.set_completer_delims("\n") if "libedit" in getattr(readline, "__doc__", ""): re...
2df26d83486b8f9ac6b7df2a9a4669508aa61983
ac4b44266d61651aea5928ce7d3fae4de226f83d
python/cpython
python__cpython-112093
# Contradicting statement in c-api/stable.rst # Documentation > So, code compiled for Python 3.10.0 will work on 3.10.8 and vice versa, but will need to be compiled separately for 3.9.x and 3.10.x. > \- [https://docs.python.org/3/c-api/stable.html](https://docs.python.org/3/c-api/stable.html#stable:~:text=So%2C%20co...
68a7b78cd5185cbd9456f42c15ecf872a7c16f44
7fa511ba576b9a760f3971ad16dbbbbf91c3f39c
python/cpython
python__cpython-112090
# Consider avoiding the dependency on quay.io server in the GitHub Action "Check if generated files are up to date" job Last weeks/months, the `quay.io` server failed time time time. The problem is that the Python workflow has a GitHub Action "Check if generated files are up to date" job which pulls a container image ...
d9fd33a869d2be769ff596530f63ee099465b037
7e2308aaa29419eadeef3a349c7c4d78e2cbc989
python/cpython
python__cpython-113764
# Make `list` objects thread-safe in `--disable-gil` builds # Feature or enhancement I expect this to be implemented across multiple PRs. For context, here is the change from the `nogil-3.12` fork, but things might be done a bit differently in CPython 3.13: https://github.com/colesbury/nogil-3.12/commit/df4c51f8...
a023bc252dc744736bd21897c5a23a25b800df92
10d3f04aec745c6676ef31611549b970a78338b3
python/cpython
python__cpython-112128
# Make `random.Random` thread-safe in `--disable-gil` builds # Feature or enhancement `random.Random` has mutable internal state. We should use the critical section API to make it thread-safe in `--disable-gil` builds. For context, here is the change from the `nogil-3.12` fork. https://github.com/colesbury/nogil...
ac4b44266d61651aea5928ce7d3fae4de226f83d
154f099e611cea74daa755c77df3b8003861cc76
python/cpython
python__cpython-112111
# Make `functools.lru_cache` thread-safe in `--disable-gil` builds # Feature or enhancement We should make `functools.lru_cache` thread-safe in the `--disable-gil` builds. For context, here is the commit from the `nogil-3.12` fork: https://github.com/colesbury/nogil-3.12/commit/041a08e339 **NOTES** (differenc...
0ee2d77331f2362fcaab20cc678530b18e467e3c
8cd70eefc7f3363cfa0d43f34522c3072fa9e160
python/cpython
python__cpython-113800
# Make `set` thread-safe in `--disable-gil` builds # Feature or enhancement The `set` object is not currently thread-safe in `--disable-gil` builds. We should make it thread-safe by using the ["critical section" API](https://github.com/python/cpython/blob/0ff6368519ed7542ad8b443de01108690102420a/Include/internal/py...
c951e25c24910064a4c8b7959e2f0f7c0d4d0a63
3cdfdc07a9dd39bcd6855b8c104584f9c34624f2
python/cpython
python__cpython-112123
# Provide a variant of `PyDict_SetDefault` that returns a new reference (instead of a borrowed reference) The `PyDict_SetDefault(mp, key, defaultobj)` function returns a borrowed reference to the value corresponding to key. This poses a thread-safety issue particularly for the case where `key` is already in the dict. ...
de61d4bd4db868ce49a729a283763b94f2fda961
0e2ab73dc31e0b8ea1827ec24bae93ae2644c617
python/cpython
python__cpython-128270
# http.client.HTTPResponse.read(-1) handled incorrectly # Bug report ### Bug description: `http.client.HTTPResponse` doesn't handle negative reads the same as other readers, for example the following code will hang for a significant amount of time: ```python con = http.client.HTTPConnection("httpbin.org") con.reque...
4d0d24f6e3dff2864007c3cfd1cf7d49c6ee5317
8e57877e3f43e80762196f6869526d0c1585783a
python/cpython
python__cpython-112094
# Make `_struct` module thread-safe in `--disable-gil` builds # Feature or enhancement The `_struct` module has a few small issues: * The use of `PyDict_GetItemWithError` returns a borrowed reference (should use `PyDict_GetItemRef`) * The `state->cache` is lazily created; we should instead create it during `_st...
4744f59a5e86690e76c35d9b9d79971ebe9a87d7
55f3cce821f8f18ddb485aa07bdf0190c358d081
python/cpython
python__cpython-113830
# Make collections.deque thread-safe in `--disable-gil` builds # Feature or enhancement The `collections.deque` object has mutable internal state that would not be thread-safe without the GIL. We should use the critical section API to make it thread-safe. I think it might be cleanest to first convert most of the dequ...
dc978f6ab62b68c66d3b354638c310ee1cc844a6
474204765bdbdd4bc84a8ba49d3a6558e9e4e3fd
python/cpython
python__cpython-114153
# [Doc] Wrong parameter name for `concurrent.futures.Executor.map(fn, ...) # Documentation Just noticed that in the published documentation, the `concurrent.futures.Executor.map` says it takes some parameter named `func` as the first argument, however the implementation has it as `fn`. This is a strictly documenta...
8d26db45df479a54eccd2aced7d8a5ea9fd0ffa5
05008c27b73da640b63c0d335c65ade517c0eb84
python/cpython
python__cpython-113372
# mimalloc: warning: unable to directly request hinted aligned OS memory # Bug report ### Bug description: Configuration: ```sh ./configure --disable-gil --with-pydebug ``` Test Output: ```pytb dietpi@DietPi:~/cpython$ ./python -m test test_cmd_line -v =====================================================...
9afb0e1606cad41ed57c42ea0a53ac90433f211b
7de9855410d034b2b7624a057dbf7c3f58ee5328
python/cpython
python__cpython-112046
# [C API] Revert of private functions removed in Python 3.13 causing most problems Copy of my [Discourse message](https://discuss.python.org/t/revert-python-3-13-c-api-incompatible-changes-causing-most-troubles/38214). Hi, My [C API: My plan to clarify private vs public functions in Python 3.13](https://discuss....
b338ffa4bc078fd363e8b0078eef4e0d6a071546
4bbb367ba65e1df7307f7c6a33afd3c369592188
python/cpython
python__cpython-112018
# Provide `ctypes.memoryview_at()` # Feature or enhancement ### Proposal: It should be possible to easily make memoryview objects from pointer-able ctypes objects with an arbitrary length. In the same way we can currently use `ctypes.string_at()` to create `bytes` objects. The advantage of using `memoryview` objects...
b4f799b1e78ede17b41de9a2bc51b437a7e6dd74
f21af186bf21c1c554209ac67d78d3cf99f7d7c0
python/cpython
python__cpython-112017
# quit() and exit() don't work in interactive help # Bug report ### Bug description: I tried to use quit and exit to return to the interactive Python shell but these not work. I need to use Ctr +Z. ```python Python 3.13.0a1 (tags/v3.13.0a1:ad056f0, Oct 13 2023, 09:51:17) [MSC v.1935 64 bit (AMD64)] on win32 # Add a ...
b28bb130bbc2ad956828819967d83e06d30a65c5
d5491a6eff516ad47906bd91a13d71cdde18f5ab
python/cpython
python__cpython-115540
# inspect.unwrap() does not work with types with the `__wrapped__` data descriptor # Bug report `inspect.unwrap()` follows the chain by links `__wrapped__` and returns the last item in a chain or the original object if it does not have a `__wrapped__` attribute (there is also additional stop predicate and protectio...
68c79d21fa791d7418a858b7aa4604880e988a02
b05afdd5ec325bdb4cc89bb3be177ed577bea41f
python/cpython
python__cpython-112002
# Fix test_builtins_have_signatures in test_inspect `test_builtins_have_signatures` in `test_inspect` is only passed by accident. It always passed because it checked the same object (the last object the `builtins` module, `zip`) in the loop that had no signature. But after adding the signature for `zip` in #111999 it ...
40752c1c1e8cec80e99a2c9796f4fde2f8b5d3e2
12a30bc1aa0586308bf3fe12c915bcc5e54a032f
python/cpython
python__cpython-112000
# Add signatures for some builtins # Feature or enhancement Signature can be manually added for some builtin functions and classes that do not use Argument Clinic. <!-- gh-linked-prs --> ### Linked PRs * gh-112000 * gh-119540 * gh-119543 <!-- /gh-linked-prs -->
1d75ef6b6186619081c166b21c71c15b4f98beb8
d0058cbd1cd7e72307adab45759e1ea6adc05866
python/cpython
python__cpython-116413
# C-API for signalling monitoring events # Feature or enhancement ### Proposal: Language implementations for the CPython runtime (Cython, JIT compilers, regular expression engines, template engines, etc.) need a way to signal [PEP-669](https://peps.python.org/pep-0669/) monitoring events to the registered listen...
85af78996117dbe8ad45716633a3d6c39ff7bab2
da2cfc4cb6b756b819b45bf34dd735c27b74d803
python/cpython
python__cpython-111994
# socket module does not include all getnameinfo flags The `socket` module does not include `NI_IDN` `getnameinfo` flag. See: https://man7.org/linux/man-pages/man3/getnameinfo.3.html <!-- gh-linked-prs --> ### Linked PRs * gh-111994 <!-- /gh-linked-prs -->
fe9db901b2446b047e537447ea5bad3d470b0f78
62802b6228f001e1a4af6ac668a21d2dcec0ce57
python/cpython
python__cpython-113279
# Update to SQLite 3.44 in Windows and macOS installers SQLite 3.44 [is out](https://sqlite.org/releaselog/3_44_0.html). Let's wait some weeks and see if patch releases appear before bumping the version used by the installers. <!-- gh-linked-prs --> ### Linked PRs * gh-113279 * gh-113281 <!-- /gh-linked-prs -->...
6a1d5a4c0f209d51ab33d6529935d643bcdb3ba2
76bef3832bae64664882e27ecb6f89800a12cf43
python/cpython
python__cpython-112249
# unicode: make ucnhash_capi initialization thread-safe in `--disable-gil` builds # Feature or enhancement The `_PyUnicode_Name_CAPI` provides functions to get the name for a given Unicode character code and vice versa. It is lazily initialized and stored in the per-interpreter `_Py_unicode_state`: https://github.co...
0785c685599aaa052f85d6163872bdecb9c66486
81261fa67ff82b03c255733b0d1abbbb8a228187
python/cpython
python__cpython-113489
# unicode: make `_PyUnicode_FromId` thread-safe in `--disable-gil` builds # Feature or enhancement The `_PyUnicode_FromId(_Py_Identifier *id)` function gets a Python `str` object (i.e., a `PyUnicodeObject`) from a static C string. Subsequent calls to `_PyUnicode_FromId()` return the same object. The initialization is...
8f5b9987066f46daa67b622d913ff2c51c949ed4
36adc79041f4d2764e1daf7db5bb478923e89a1f
python/cpython
python__cpython-111970
# refactor dis so that it's easier to construct and display a list of Instruction() instances I would like to use the dis module to display a list of Instruction instances, which is constructed externally. Since the dis module currently expects a code object or string src code, this requires a refactor. <!-- gh-...
b2af50cb0266f654cff126c7a78a4a7755bc3fbe
40752c1c1e8cec80e99a2c9796f4fde2f8b5d3e2
python/cpython
python__cpython-113584
# Use per-thread freelists in `--disable-gil` builds # Feature or enhancement CPython uses freelists for frequently allocated Python objects, like `dict`, `list`, and `slice`. There freelists are generally stored in the per-interpreter state, which is not thread-safe without the GIL. In `--disable-gil` builds, the ...
57bdc6c30d2665c2760ff5a88487e57c8b3c397a
cdca0ce0ad47604b7007229415817a7a152f7f9a
python/cpython
python__cpython-112116
# Use critical sections to protect I/O objects (in `--disable-gil` builds) # Feature or enhancement The I/O objects, like [`io.BufferedIOBase`](https://docs.python.org/3/library/io.html#io.BufferedIOBase), [`io.TextIOWrapper`](https://docs.python.org/3/library/io.html#io.TextIOWrapper), and [`io.StringIO`](https://...
77d9f1e6d9aad637667264c16c83d255526cc1ba
a6d25de375087e27777ebc1c0bd106d532ef9083
python/cpython
python__cpython-112471
# Implement stop-the-world functionality (for `--disable-gil` builds) # Feature or enhancement The `--disable-gil` builds occasionally need to pause all but one thread. Some examples include: * Cyclic garbage collection, where this is often called a "stop the world event" * Before calling `fork()`, to ensure a consi...
441affc9e7f419ef0b68f734505fa2f79fe653c7
5f1997896d9c3ecf92e9863177c452b468a6a2c8
python/cpython
python__cpython-112291
# sys.monitoring: local events still sent after free_tool_id # Bug report ### Bug description: I use set_local_events with a tool id. Later I free the tool id, but then still get those events. Shouldn't freeing the tool id stop all events? ```python import sys print(sys.version) sysmon = sys.monitoring events = ...
46500c42f09a8342efde48ad74327d5225158ff3
9d70831cb7127855a8bf83b585525f13cffb9f59
python/cpython
python__cpython-112049
# dtoa: thread safety in `--disable-gil` builds # Feature or enhancement The `Python/dtoa.c` library is responsible for formatting floating point numbers (`double`) as strings and for parsing strings into numbers. The shared state is not thread-safe without the GIL: 1. `Balloc` and `Bfree` use a per-interpreter free...
2d76be251d0aee89f76e6fa5a63fa1ad3f2b76cf
9f67042f28bf886a9bf30fed6795d26cff255f1e
python/cpython
python__cpython-111960
# Thread-safe one-time initialization # Feature or enhancement Some CPython internals require initialization exactly once. Some of these one time initializations are not thread-safe without the GIL or have data races according to the C11 memory model. We should add a lightweight, thread-safe one-time initialization ...
446f18a911916eabd2c0ceed0c2a109fc8480727
f66afa395a6d06097ad1ca222ed076e18a7a8126
python/cpython
python__cpython-111977
# Document better assignment expression parentheses requirements # Feature or enhancement ### Proposal: Should we maybe thinks about allowing unparenthesized top-level assignment expressions. It came up on ipython/ipython#14214 that people would like to have something like that, especially in REPLs, in order to ...
9a2f25d374f027f6509484d66e1c7bba03977b99
d7cef7bc7ea5478abb90a37c8ffb0792cc6e7518
python/cpython
python__cpython-111976
# TextIOWrapper.reconfigure() crashes if encoding is not string or None # Crash report ### What happened? Unlike to `TextIOWrapper` constructor, `TextIOWrapper.reconfigure()` does not check that the encoding argument is actually None or string. If it is not None, it calls `_PyUnicode_EqualToASCIIString` that only wo...
ee06fffd38cb51ce1c045da9d8336d9ce13c318a
a519b87958da0b340caef48349d6e3c23c98e47e
python/cpython
python__cpython-111937
# broken link to A.Neumaier article in built-in sum comment # Bug report ### Bug description: The new implementation of `sum` on Python 3.12 (cfr. https://github.com/python/cpython/issues/100425 , https://github.com/python/cpython/pull/100426 , https://github.com/python/cpython/pull/107785 ) is not associative on **...
12a30bc1aa0586308bf3fe12c915bcc5e54a032f
ce6a533c4bf1afa3775dfcaee5fc7d5c15a4af8c
python/cpython
python__cpython-112005
# json: make "memo" dict local to scan_once call # Feature or enhancement The `Modules/_json.c` parser is mostly stateless (or the state is immutable). The one exception is the "memo" dictionary, which is used to avoid duplicate `PyUnicodeObject` instances for the same JSON C strings. https://github.com/python/cpyth...
d0058cbd1cd7e72307adab45759e1ea6adc05866
9a2f25d374f027f6509484d66e1c7bba03977b99
python/cpython
python__cpython-112189
# Make weakref thread-safe without the GIL # Feature or enhancement The current weakref implementation relies on the GIL for thread-safety. The `nogil-3.12` fork substantially modifies the weakref implementation. I think we can implement a simpler change in CPython 3.13 (main) now that all PyObject's have their own ...
0566ab9c4d966c7280a1c02fdeea8129ba65de81
eb3c94ea669561a0dfacaca715d4b2723bb2c6f4
python/cpython
python__cpython-112207
# Avoid changing the PYMEM_DOMAIN_RAW allocator during initialization and finalization # Bug report CPython current temporarily changes `PYMEM_DOMAIN_RAW` to the default allocator during initialization and shutdown. The motivation is to ensure that core runtime structures are allocated and freed using the same allo...
f823910bbd4bf01ec3e1ab7b3cb1d77815138296
f8dcb8200626a1a06c4a26d8129257f42658a9ff
python/cpython
python__cpython-111981
# Make hashlib related modules thread-safe without the GIL # Feature or enhancement The hashlib based modules already have some locking to make some operations thread-safe (with the GIL), but the logic isn't sufficient if running with the GIL disabled. Relevant files: * Modules/_blake2/blake2b_impl.c * Modules...
a6465605c1417792ec04ced88340cdf104a402b6
7218bac8c84115a8e9a18a4a8f3146235068facb
python/cpython
python__cpython-111913
# Run test_posix on Windows When I searched for a place for tests for gh-111841, I have found that they already exist, but in `test_posix` which is skipped on Windows. The simplest way is to make `test_posix` running on Windows. It turned out that most tests are already compatible with Windows, except this test and...
64fea3211d08082236d05c38ee728f922eb7d8ed
65d6dc27156112ac6a9f722b7b62529c94e0344b
python/cpython
python__cpython-111907
# Unused function warnings during mimalloc build on FREEBSD # Bug report ### Bug description: ```c cc -pthread -c -fno-strict-overflow -Wsign-compare -g -Og -Wall -O2 -pipe -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=...
0ff6368519ed7542ad8b443de01108690102420a
ee06fffd38cb51ce1c045da9d8336d9ce13c318a
python/cpython
python__cpython-111904
# Argument Clinic: Add support for PEP 703's critical sections (`Py_BEGIN_CRITICAL_SECTION()`) # Feature or enhancement PEP 703 in large part relies on replacing the GIL with fine grained per-object locks. The primary way to acquire and release these locks is through the critical section API (https://github.com/pyt...
324531df909721978446d504186738a33ab03fd5
16055c160412544e2a49794aaf3aa70c584f843a
python/cpython
python__cpython-111898
# Enum HOWTO doesn't render well on mobile Specifically the purple sidebar on in section [Functional API](https://docs.python.org/3/howto/enum.html#functional-api). * The bar itself is hard to read. * Text is way wider than the rest of the site. * Text renders in a different font size. In Chrome devtools devic...
7d21e3d5ee9858aee570aa6c5b6a6e87d776f4b5
bc12f791127896cd3538fac4465e3190447b2257
python/cpython
python__cpython-111884
# libregrtest: Reduce number of imports at startup Currently, when a test is run by ``./python -m test (...)``, the test starts with 170 modules already imported. The problem is that imports can have side effects and I would prefer to start tests in a "minimal environment". Running a test with ``./python -m test (....
6f09f69b7f85962f66d10637c3325bbb2b2d9853
2f2a0a3a6c5494bcf13a8f587c28e30d86617ff0
python/cpython
python__cpython-113716
# os.stat returns incorrect a/c/mtime for files without permissions under Windows in Python 3.12 # Bug report ### Bug description: We are switching our product to Python 3.12 from Python 3.11.2 and our tests caught a difference in the way `os.stat` works under Windows. It returns negative values of `st_atime`, `...
ed066481c76c6888ff5709f5b9f93b92c232a4a6
e68806c7122070078507b370b13bb225f8501ff8
python/cpython
python__cpython-111876
# Objects in `NamedTuple` class namespaces don't have `__set_name__` called on them # Bug report ### Bug description: Generally speaking, any objects present in the namespace of a class `Foo` that define the special `__set_name__` method will have that method called on them as part of the creation of the class `Foo`...
22e411e1d107f79a0904d41a489a82355a39b5de
ffe1b2d07b88e185f373ad696fbea5a7f2a315c1
python/cpython
python__cpython-118134
# No max_children in socketserver.ForkingMixIn documentation # Documentation There is nothing about max_children attribute of socketserver.ForkingMixIn class in documentation. <!-- gh-linked-prs --> ### Linked PRs * gh-118134 <!-- /gh-linked-prs -->
ff5751a208e05f9d054b6df44f7651b64d415908
705a123898f1394b62076c00ab6008c18fd8e115
python/cpython
python__cpython-111864
# Rename `Py_NOGIL` to a positive term From the [PEP 703 acceptance](https://discuss.python.org/t/pep-703-making-the-global-interpreter-lock-optional-in-cpython-acceptance/37075?u=hugovk): > We want to avoid negatives in terms and flags and such, so we won’t get into double-negative terrain (like we do when we talk...
3b3ec0d77f0f836cbe5ff1ab97efcc8b7ed5d787
1c8f912ebdfdb146cd7dd2d7a3a67d2c5045ddb0
python/cpython
python__cpython-112038
# os.fstat() fails on FAT32 file system on Windows # Bug report ### Bug description: This is Python 3.12.0 x64 running on Windows 11. On a FAT32 drive, I have a file `f.txt`. ```python >>> import os >>> os.stat('f.txt') os.stat_result(st_mode=33206, st_ino=4194560, st_dev=1589430838, st_nlink=1, st_uid=0, st_gid=0,...
29af7369dbbbba8cefafb196e977bce8189a527d
d2f305dfd183025a95592319b280fcf4b20c8694
python/cpython
python__cpython-111849
# Unify branches and deopts in the tier 2 IR. The basic premise of optimizing traces is that most branches are highly biased. So we use `DEOPT_IF` to branch in the uncommon case. However in the optimizer we may want to move work to exit branches, which needs jumps. Unifying branches and jumps also simplifies the ti...
06efb602645226f108e02bde716f9061f1ec4cdd
11e83488c5a4a6e75a4f363a2e1a45574fd53573
python/cpython
python__cpython-111850
# Far too may failed optimization attempts in the tier 2 optimizer. The [stats show](https://github.com/faster-cpython/benchmarking-public/blob/main/results/bm-20231102-3.13.0a1%2B-8794817/bm-20231102-azure-x86_64-mdboom-collect_tier2_stats-3.13.0a1%2B-8794817-pystats.md) that there are millions of optimization attemp...
34a03e951b027902d993c7066ba8e6b7e92cb2a9
25c49564880e6868e4c76602f9f1650f0bc71c75
python/cpython
python__cpython-111842
# os.putenv() on Windows truncates value on an embedded NUL `os.putenv()` on Windows truncates a value containing an embedded null character. ```pycon >>> import os >>> os.putenv('xyz', 'abc\0def') >>> os.system('''python.bat -c "import os; print(repr(os.environ['xyz']))"''') Running Debug|x64 interpreter... '...
0b06d2482d77e02c5d40e221f6046c9c355458b2
2e7f0700800c0337a0b1b9471fcef410e3158250
python/cpython
python__cpython-111852
# Add `seekable` method for `mmap.mmap` # Bug report ### Bug description: `mmap.mmap` has a `seek()` method, but no `seekable()` method. Because of this, it cannot be used an argument for ZipFile, which requires a file-like object with seekable. A small patch is enough to fix this ```python class SeekableMma...
6046aec377311efb89c4438f7cf412e2c6568ba1
30ec968befde2313f66af4754d410dc5a080a20a
python/cpython
python__cpython-112130
# `test_recursive_repr` from `test_xml_etree` triggers stack overflow protections for a debug build under WASI Detected with WASI-SDK 20 and wasmtime 14. <!-- gh-linked-prs --> ### Linked PRs * gh-112130 * gh-112131 * gh-112132 <!-- /gh-linked-prs -->
7218bac8c84115a8e9a18a4a8f3146235068facb
d9fd33a869d2be769ff596530f63ee099465b037
python/cpython
python__cpython-112197
# `test_repr_deep` from `test_userlist` triggers stack overflow protections for a debug build under WASI Detected with WASI-SDK 20 and wasmtime 14. <!-- gh-linked-prs --> ### Linked PRs * gh-112197 <!-- /gh-linked-prs -->
43b1c33204d125e256f7a0c3086ba547b71a105e
f489ace9e7aaa29b5a83b0a74a247abc8b032910
python/cpython
python__cpython-112229
# `test_repr_deep` from `test_userdict` triggers stack overflow protections for a debug build under WASI Detected with WASI-SDK 20 and wasmtime 14. <!-- gh-linked-prs --> ### Linked PRs * gh-112229 <!-- /gh-linked-prs -->
14e539f0977aaf2768c58f1dcbbbab5ad0205ec5
10e1a0c91613908757a5b97602834defbe575ab0
python/cpython
python__cpython-111819
# `test_forward_recursion_actually` from `test_typing` triggers stack overflow protections for a debug build under WASI Detected with WASI-SDK 20 and wasmtime 14. <!-- gh-linked-prs --> ### Linked PRs * gh-111819 * gh-112223 <!-- /gh-linked-prs -->
0e83d941bea921380ce4a1494121f3ec30ae652e
2f9cb7e095370e38bde58c79c8a8ea7705eefdc2
python/cpython
python__cpython-112225
# `test_error_on_parser_stack_overflow` from `test_syntax` triggers triggers-out-of-bounds memory protection for a debug build under WASI Detected with WASI-SDK 20 and wasmtime 14. <!-- gh-linked-prs --> ### Linked PRs * gh-112225 <!-- /gh-linked-prs -->
56e59a49ae4d9f518c5cc918aefe7eeee11736b4
ce1096f974d3158a92e050f9226700775b8db398
python/cpython
python__cpython-111830
# `test_recursion` from `test_richcmp` triggers stack overflow protections for a debug build under WASI Detected with WASI-SDK 20 and wasmtime 14. <!-- gh-linked-prs --> ### Linked PRs * gh-111830 * gh-111831 * gh-111832 <!-- /gh-linked-prs -->
f115a55f0e455a4b43a1da9fd838a60a101f182a
0e83d941bea921380ce4a1494121f3ec30ae652e
python/cpython
python__cpython-111869
# `test_posix_fallocate()` fails under `test_posix` under WASI ``` ====================================================================== ERROR: test_posix_fallocate (__main__.PosixTester.test_posix_fallocate) ---------------------------------------------------------------------- Traceback (most recent call last):...
97c4c06d0d235aad00e5b6b10af8b8d68c889b9b
31c90d5838e8d6e4c47d98500a34810ccb33a6d4
python/cpython
python__cpython-113996
# `test_bad_getatttr` from `test_pickle` triggers stack exhaustion protections in a debug build under WASI Detected using WASI-SDK 20 and wasmtime 14. <!-- gh-linked-prs --> ### Linked PRs * gh-113996 <!-- /gh-linked-prs -->
8aa126354d93d7c928fb35b842cb3a4bd6e1881f
b44b9d99004f096619c962a8b42a19322f6a441b
python/cpython
python__cpython-113997
# `test_infinitely_many_bases` from `test_isinstance` triggers stack overflow protection for a debug build under WASI Detected with WASI-SDK 20 and wasmtime 14. <!-- gh-linked-prs --> ### Linked PRs * gh-113997 <!-- /gh-linked-prs -->
3c19ee0422e9b9f1582fb74931c174a84583bca0
a47353d587b78bb5501b21343d9bca739c49a43a
python/cpython
python__cpython-112150
# `test_recursive_repr` from `test_io` triggers stack overflow protections in a debug build under WASI Detected with WASI-SDK 20 and wasmtime 14. <!-- gh-linked-prs --> ### Linked PRs * gh-112150 <!-- /gh-linked-prs -->
974847be443e9798615e197ec6642e546a71a6b0
762eb58220992d1ab809b9a281d47c0cd48a5aec
python/cpython
python__cpython-112181
# `testRecursiveRepr` from `test_fileio` trigger stack overflow protections in a debug build under WASI Detected using WASI-SDK 20 and wasmtime 14. <!-- gh-linked-prs --> ### Linked PRs * gh-112181 <!-- /gh-linked-prs -->
f92ea63f6f2c37917fc095a1bc036a8b0c45a084
ceefa0b0795b5cc7adef89bd036ce843b5c78d3e
python/cpython
python__cpython-112124
# `test_super_deep()` for `test_call` triggers a stack overflow protection under a debug build for WASI Tested using WASI-SDK 20 and wasmtime 14. <!-- gh-linked-prs --> ### Linked PRs * gh-112124 * gh-114010 <!-- /gh-linked-prs -->
bd89bca9e2a57779c251ee6fadf4887acb364824
81ab0e8a4add53035c87b040afda6d554cace528
python/cpython
python__cpython-111794
# PGO build broken on Windows # Bug report ### Bug description: Building with --pgo on Windows seems to be broken on main (853b4b5). My *hunch*, since this is failing in `ceval.c`, is that the recent [merge of the Tier 1 and Tier 2 interpreters](https://github.com/python/cpython/pull/111428) may have made the...
bc12f791127896cd3538fac4465e3190447b2257
6f09f69b7f85962f66d10637c3325bbb2b2d9853
python/cpython
python__cpython-111778
# Assertion errors in Py_DEBUG mode when forgetting to untrack GC objects This has been distilled from a crash we found at Google while upgrading to Python 3.11. It's a complicated setup and I have only been able to partially reproduce the issue, but I believe my solution is correct. When extension types set `Py_TP...
ce6a533c4bf1afa3775dfcaee5fc7d5c15a4af8c
21615f77b5a580e83589abae618dbe7c298700e2
python/cpython
python__cpython-111773
# Specialization of member descriptors only handles `Py_T_OBJECT_EX` but `_Py_T_OBJECT` seems more common Despite `_Py_T_OBJECT` being marked as deprecated in `descrobject.h` it is commonly used in the standard library. `LOAD_ATTR_SLOT` de-optimizes if the stored value is `NULL`. If the stored value is not `NULL`, bo...
a7b0f63cdb83c0652fab19bbbc8547dfe309b1d2
d78c872e0d680f6e63afa6661df5021775a03690
python/cpython
python__cpython-111770
# Visibility of wsgiref.util.is_hop_by_hop # Documentation `wsgiref.util.is_hop_by_hop` is available inside the official documentation (https://docs.python.org/3/library/wsgiref.html#wsgiref.util.is_hop_by_hop), but https://github.com/python/cpython/blob/ba8aa1fd3735aa3dd13a36ad8f059a422d25ff37/Lib/wsgiref/util.py#...
f88caab467eb57cfe293cdf9fb7cce29b24fda7f
fe3fd2c333ac080dba1fa64452c2f62098107731
python/cpython
python__cpython-111766
# Move old C API tests for floats to Lib/test/test_capi/ After #111624, we have C API tests for PyFloat_* both in Lib/test/test_float.py (pack/unpack tests) and Lib/test/test_capi/test_float.py. I think we should move remaining tests to Lib/test/test_capi/. <!-- gh-linked-prs --> ### Linked PRs * gh-111766 * gh-1118...
a077b2fbb88f5192bb47e514334f760bf08d0295
931f4438c92ec0eb2aa894092a91749f1d5bd216
python/cpython
python__cpython-135578
# CI should run Undefined Behavior Sanitizer (UBSAN), as already done for ASAN # Feature or enhancement ### Proposal: cpython's CI should run Undefined Behavior Sanitizer (UBSAN), like it already does for Address Sanitizer (ASAN). It already has support in configure for this with `./configure --with-undefined-behav...
7a20c72cb612653fa46c41c3a969aefa2b52738b
140731ff671395fb7a869c2784429c14dc83fb27
python/cpython
python__cpython-111748
# DOC: fix link redirect to "Documentation Translations" # Documentation On the [Dealing with Bugs](https://docs.python.org/3.13/bugs.html) page there is a link to [Documentation Translations](https://devguide.python.org/documenting/#translating) which has been moved from https://devguide.python.org/documenting/#tr...
72e27a67b97993f277e69c9dafb063007ba79adf
853b4b549dab445c1b54610e118fefaeba3f35e2
python/cpython
python__cpython-111834
# `breakpoint` does not enter pdb until the "next event" happens # Bug report ### Bug description: Consider the following code: ```python try: raise ValueError() except Exception as exc: breakpoint() ``` You can't stop in the `except` block, you'll get: ``` --Return-- > /home/gaogaotiantian/programs/mycpy...
f34e965e52b9bdf157b829371870edfde45b80bf
f6b5d3bdc83f8daca05e8b379190587a236585ef
python/cpython
python__cpython-111742
# Support webp formats in mimetypes as standard types # Feature or enhancement ### Proposal: WEBP is not recognised as a standard type and demands the user to use `strict=False` as in `mimetypes.guess_type("foobar.webp", strict=False)` to recognise it. This is because it was previously not recognised by IANA as an o...
b905fad83819ec9102ecfb97e3d8ab0aaddd9784
765b9ce9fb357bdb79a50ce51207c827fbd13dd8
python/cpython
python__cpython-111734
# Outdated example code of typing.Concatenate # Documentation https://docs.python.org/3.12/library/typing.html#typing.Concatenate Changed in version 3.12: Added support new generic syntax (pep695) ```python from collections.abc import Callable from threading import Lock from typing import Concatenate, ParamSpec,...
c3e19c3a62e82b9e77563e934059895b6230de6e
3e99c9cbf67225ec1d3bb6af812e883f19ef53de
python/cpython
python__cpython-111730
# `Doc/library/sqlite3.rst` has multiple doctest warnings # Bug report Link: https://github.com/python/cpython/actions/runs/6753865568/job/18360794210?pr=111723#step:8:82 ```pytb Document: library/sqlite3 ------------------------- Exception ignored in: <sqlite3.Connection object at 0x7f1684307130> Traceback ...
a7702663e3f7efc81f0b547f1f13ba64c4e5addc
e338e1a4ec5e43a02447f4ec80320d7fc12b3ed4
python/cpython
python__cpython-111725
# `Doc/howto/descriptor.rst` has a warning during doctest run # Bug report Warning: ``` Document: howto/descriptor -------------------------- 1 items passed all tests: 173 tests in default 173 tests in 1 items. 173 passed and 0 failed. Test passed. Exception ignored in: <sqlite3.Connection object at 0x7f8ea14d0d10> ...
f48e669504ce53040a04e0181064c11741a87817
ac01e2243a1104b2154c0d1bdbc9f8d5b3ada778
python/cpython
python__cpython-111720
# Input validations for `alias` command in `pdb` # Feature or enhancement ### Proposal: This is kind of between a bug and a feature. `alias`, admittedly a rarely used command, is very unpolished. The documentation claimed > Replaceable parameters can be indicated by %1, %2, and so on But that's not the truth, `%1...
853b4b549dab445c1b54610e118fefaeba3f35e2
a6c1c04d4d2339f0094422974ae3f26f8c7c8565
python/cpython
python__cpython-113609
# What’s New In Python 3.12: bad highlighting for Py_NewInterpreterFromConfig() example In the "[PEP 684: A Per-Interpreter GIL](https://docs.python.org/3/whatsnew/3.12.html#pep-684-a-per-interpreter-gil)" section of "What’s New In Python 3.12", the C code snippet is highlighted as if it was Python. <!-- gh-linked-pr...
9ce6c01e38a2fc7a5ce832f1f8c8d9097132556d
2849cbb53afc8c6a4465f1b3490c67c2455caf6f
python/cpython
python__cpython-111707
# [C API] Py_mod_multiple_interpreters Added to Limited C API Without Versioning # Bug report (See https://github.com/python/cpython/issues/110968#issuecomment-1766504893.) When I added `Py_mod_multiple_interpreters`[^1] to Include/moduleobject.h, I forgot to restrict the limited API version in which it should be th...
836e0a75d565ecb7e2485fee88dbe67e649a1d5f
c5063fd62a3fd3c5c2af33fc17c60fabe54282fe
python/cpython
python__cpython-111694
# asyncio.Condition.wait() sometimes propagates incorrect asyncio.CancelledError # Bug report ### Bug description: `asyncio.Condition.wait()` contains an edge case where a `CancelledError` on lock re-aquire is overwritten with a fresh `CancelledError` instance. ### CPython versions tested on: CPython mai...
52161781a6134a4b846500ad68004fe9027a233c
c6ca562138a0916192f9c3100cae678c616aed29
python/cpython
python__cpython-111706
# New warning: "‘_session_is_active’ defined but not used [-Wunused-function]" # Bug report <img width="536" alt="Снимок экрана 2023-11-03 в 11 51 48" src="https://github.com/python/cpython/assets/4660275/98a21700-9d5e-44b3-88f8-a7204bb3e6b6"> Introduced in https://github.com/python/cpython/commit/93206d19a35106f64a...
df9815eb11b58dfaae02a8e3fb85ae8aa725dc17
20cfab903db70cf952128bc6b606e3ec4a216498
python/cpython
python__cpython-111667
# Speed up `BaseExceptionGroup.{derive,subgroup,split}` by ~20% There's a simple change that we can make to increase the preformance of these three methods. Right now they are defined as: https://github.com/python/cpython/blob/f4b5588bde656d8ad048b66a0be4cb5131f0d83f/Objects/exceptions.c#L1491-L1493 However, the...
a28a3967ab9a189122f895d51d2551f7b3a273b0
890ef1b035457fe5d0b0faf27a703c74c33e0141
python/cpython
python__cpython-111664
# Tier 2 pystats uop counts are missing # Bug report ### Bug description: 7e135a48d619407cd4b2a6d80a4ce204b2f5f938 inadvertently removed the uop count pystats. ### CPython versions tested on: CPython main branch ### Operating systems tested on: Linux <!-- gh-linked-prs --> ### Linked PRs * gh-111664 <!-- /gh-li...
25937e31883862c8f290bfb1f3b8ba0cd16675b3
f4b5588bde656d8ad048b66a0be4cb5131f0d83f
python/cpython
python__cpython-111661
# socket.htons uses unnecessary METH_VARARGS # Feature or enhancement ### Proposal: By replacing calling convention to ```METH_O``` it will run faster ### Has this already been discussed elsewhere? This is a minor feature, which does not need previous discussion elsewhere ### Links to previous discussion of this ...
8fbe5314cd6544bdcd50b3a57e0f8a9c6bf97374
06efb602645226f108e02bde716f9061f1ec4cdd