cpython
cpython copied to clipboard
The Python programming language
Validate the types returned from `_weak_cache.get()` and `_weak_cache.setdefault()` to prevent type confusion when a ZoneInfo subclass provides a misbehaving cache implementation. Fixes gh-142781.
### What happened? In `save_picklebuffer` a user `buffer_callback` returns an object whose `__bool__` releases the `PickleBuffer`, freeing the bytearray while the function still holds `view->buf`. The pickler then proceeds into...
# Bug report ### Bug description: ## Vulnerability Description The `send_header` method in `Lib/http/server.py` writes headers directly to the output stream without checking for line breaks. When user-controlled input is...
This is a meta issue to group all the items to improve the UX of the tachyon profiler. ## Tasks ### CLI - [x] **Standardize timing arguments** — Currently mixing...
This is generally a work in progress; tests are needed. The asyncio patch is simple and ready. * Issue: gh-140287
# Bug report ### Bug description: ``` gdb ./python r Ctrl-C py-bt ``` ``` (gdb) py-bt Traceback (most recent call first): (unable to read python frame information) ``` 3.14.0b1 is...
`cached_property` supports set and delete but this is [not currently tested](https://github.com/python/cpython/blob/v3.14.0/Lib/test/test_functools.py#L3522). Minimal test extending `TestCachedProperty.test_cached`: ```python class TestCachedProperty(unittest.TestCase): def test_cached(self): item = CachedCostItem() self.assertEqual(item.cost, 2) self.assertEqual(item.cost, 2) # not 3...
urllib.parse.parse_qsl earlier it was accepting the illegal characters as well. Proof (that I reproduce) :  Closes issue : #138284 Proof (after fixing error):  I added the test for...
### What happened? `_channelend_shared` trusts an end's `_id` attribute and hands it to `_channelid_shared`, which blindly treats the object as a `_ChannelID` struct; a crafted end type can return an...
Heap buffer overflow in `_format_TracebackException` when `TracebackException.format` omits newline
### What happened? `_format_TracebackException` assumes the `TracebackException.format` result is a newline-terminated buffer and truncates it in place, so a crafted override that returns an empty sequence makes the code treat...