cpython
cpython copied to clipboard
The Python programming language
# Bug report ### Bug description: ```python import threading import unittest class SimpleLock: def __init__(self, name=None): self._lock = threading.Lock() def acquire(self, blocking=True, timeout=+1): if timeout is None or timeout ==...
# Bug report ### Bug description: ```python test test_struct failed -- Traceback (most recent call last): File "/usr/lib/python3.14/test/test_struct.py", line 946, in test_half_float self.assertEqual(packed[1] & 0x7e, expected) ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 124 !=...
### Description This PR skips some NaN encoding tests in Lib/test/test_struct.py for the MIPS architecture. `math.nan` depends on toolchain settings for a MIPS build, as setting `-mnan=legacy` and `-mnan=2008` result...
Python 3.14 introduced a new stack overflow detection mecanism: [InternalDocs/stack_protection.md](https://github.com/python/cpython/blob/main/InternalDocs/stack_protection.md) (#130396). The KiCad application uses C++ Boost `make_fcontext()` coroutines which runs coroutine in **their own stack**. Code example from [fcontext...
(cherry picked from commit 9609574e7fd36edfaa8b575558a82cc14e65bfbc) (cherry picked from commit c99f7667436d8978b4077704333e2a351f2a026f) * Issue: gh-143309
# Bug report ### Bug description: I found an issue related to free-threaded build detection in `Lib/profiling/sampling/sample.py`. ``` python _FREE_THREADED_BUILD = sysconfig.get_config_var("Py_GIL_DISABLED") is not None ``` I am running a...
# Bug report ### Bug description: ```python from pathlib import Path path = Path("foo.txt") path.write_text("foo\r\nbar") print(path.read_bytes()) # b'foo\r\r\nbar' ``` i know i can workaround this behavior by passing `newline=""` to...
Reading the whole body of the HTTP response could cause OOM if the Content-Length value is too large even if the server does not send a large amount of data....
### Description This PR corrects a logic error in `Lib/profiling/sampling/sample.py` where `_FREE_THREADED_BUILD` was incorrectly evaluated as `True` on Windows non-free-threaded builds when `Py_GIL_DISABLED` was explicitly set to `0`. The detection...
This patch fix all re-entrant flush problem by adding an attr flushing and. refactor the file check to `_textiowrapper_flush` * Issue: gh-143008 all crash problem in 143008 can be fix...