cpython
cpython copied to clipboard
The Python programming language
Since 3.12, when server.wait_closed() was fixed, cancelling a serve_forever() call would wait for the last handler to exit, which may be never if it is waiting to read from a...
Python's [Full Grammar specification](https://docs.python.org/3/reference/grammar.html#full-grammar-specification) and [PEP 617](https://peps.python.org/pep-0617/) states: > `~` (“cut”): commit to the current alternative and fail the rule ~~even~~ [NB: typo?] if this [alternative] fails to parse It...
It was incorrect in case of mixed tabs and spaces in indentation. * Issue: gh-143346
# Bug report There is the `indent` parameter in `plistlib._PlistWriter`, which is `b'\t'` by default. `write_bytes()` calculates the width of the indentation, but doe it incorrect if the indentation is...
The documentation is currently pretty inconsistent about listing the type flags as part of the Stable ABI. Some are listed and some aren't. I've hopefully got all the important ones....
# Bug report ### Bug description: ```python #!/usr/bin/python3 from email.message import MIMEPart from email.policy import compat32 m = MIMEPart(policy=compat32) m.set_content(b'\x00'*100, 'image', 'phg') ``` This raises the following exception: ``` Traceback...
* Issue: gh-133315 ---- 📚 Documentation preview 📚: https://cpython-previews--143307.org.readthedocs.build/
(singlephase == NULL) check in update_global_state_for_extension could be removed because it's only called with pointers to stack objects. I've tried creating a minimal working reproducer instead of importing numpy with...
# Bug report ### Bug description: Currently, all blocking operations in [`concurrent.interpreters.Queue`](https://docs.python.org/3/library/concurrent.interpreters.html#concurrent.interpreters.Queue) work via polling. In general, this approach is satisfactory for an initial implementation (unfortunately, this is a cancer...
This PR adds a note to the print() documentation to clarify how Python’s stdout buffering works with newline (\n) characters inside a single print call. Motivation: Current documentation mentions that...