forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 1
[pull] main from python:main #584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…1543) Co-authored-by: Yizheng Meng <[email protected]>
Co-authored-by: Adam Turner <[email protected]>
…8992) * Release the enter frame reference within bdb callback * 📜🤖 Added by blurb_it. --------- Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
…122753) Email generators using email.policy.default could incorrectly omit the quote ('"') characters from a quoted-string during header refolding, leading to invalid address headers and enabling header spoofing. This change restores the quote characters on a bare-quoted-string as the header is refolded, and escapes backslash and quote chars in the string.
…ND` (#128963) Co-authored-by: Tomas R. <[email protected]> Co-authored-by: Irit Katriel <[email protected]>
Postpone the global configuration variables removal to Python 3.15. Do the same for PySys_SetArgvEx(), PySys_SetArgv(), Py_SetProgramName() and Py_SetPythonHome().
``gettext`` is often imported in programs that may not end up translating anything. In fact, the ``struct`` module already has a delayed import when parsing ``GNUTranslations`` to speed up the no ``.mo`` files case. The re module is also used in the same situation, but behind a function chain only called by ``GNUTranslations``. Cache the compiled regex globally the first time it is used. The finditer function is converted to a method call on the compiled object which is slightly more efficient, and necessary for the delayed re import.
The same change was made, and for the same reason, by ``argparse`` back in 2017. The ``textwrap`` module is only used when printing help text, so most invocations will never need it imported. Co-authored-by: Adam Turner <[email protected]>
Co-authored-by: Alyssa Coghlan <[email protected]>
Document the new PyInitConfig API before the old PyConfig API.
…tderr (#128498) Co-authored-by: Serhiy Storchaka <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
…ead state (#128361) Co-authored-by: Kumar Aditya <[email protected]>
* Document PyDictObject.ma_version_tag removal. * Add "Limited C API Changes" section. * Move entries from New Features to Porting to Python 3.14. * Include Pending removal documents at the right place.
* Remove all 'if (0)' and 'if (1)' conditional stack effects * Use array instead of conditional for BUILD_SLICE args * Refactor LOAD_GLOBAL to use a common conditional uop * Remove conditional stack effects from LOAD_ATTR specializations * Replace conditional stack effects in LOAD_ATTR with a 0 or 1 sized array. * Remove conditional stack effects from CALL_FUNCTION_EX
* Use f-string. * Fix grammar: replace 'datas' with 'data' (and replace 'data' with 'item'). * Remove unused variables: 'pid' and 'old_mask'. * Factorize test_read() and test_readinto() code. Co-authored-by: Cody Maloney <[email protected]>
#128958) This reduces the size of _PyInterpreterFrame by 8 bytes on 64-bit platforms using the free threading build due to alignment requirements. This allows for slightly more recursive calls into the interpreter (from C), but `test_call.test_super_deep` still crashes.
Updates the Emscripten test skips to reflect recent changes in Emscripten capabilities.
…onse.read()` (#128270) The parameter `amt` of `HTTPResponse.read()`, which could be a negative integer, has not been handled before and led to waiting for the connection to close for `keep-alive connections`. Now, this has been fixed, and passing negative values to `HTTPResponse().read()` works the same as passing `None` value.
`os.read()` allocated and filled a buffer by calling `read(2)`, than that data was copied into the user provied buffer. Read directly into the caller's buffer instead by using `os.readinto()`. `os.readinto()` uses `PyObject_GetBuffer()` to make sure the passed in buffer is writeable and bytes-like, drop the manual check.
This exposes `_Py_TryIncref` as `PyUnstable_TryIncref()` and the helper function `_PyObject_SetMaybeWeakref` as `PyUnstable_EnableTryIncRef`. These are helpers for dealing with unowned references in a safe way, particularly in the free threading build. Co-authored-by: Petr Viktorin <[email protected]>
Unlike `ReadablePath.[r]glob()` and `JoinablePath.full_match()`, the `JoinablePath.match()` method doesn't support the recursive wildcard `**`, and matches from the right when a fully relative pattern is given. These quirks means its probably unsuitable for inclusion in the pathlib ABCs, especially given `full_match()` handles the same use case.
The `dict.get` implementation uses `_Py_dict_lookup_threadsafe`, which is thread-safe, so we remove the critical section from the argument clinic. Add a test for concurrent dict get and set operations.
Skips an additional test due to non_blocking not working reliably on Emscripten.
Enable free-threaded specialization of LOAD_CONST.
Use relative includes in Include/cpython/pyatomic.h for pyatomic_gcc.h, pyatomic_std.h and pyatomic_msc.h. Do a similar change in Include/cpython/pythread.h for pthread_stubs.h include.
The stack pointers in interpreter frames are nearly always valid now, so use them when visiting each thread's frame. For now, don't collect objects with deferred references in the rare case that we see a frame with a NULL stack pointer.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )
📚 Documentation preview 📚: https://cpython-previews--584.org.readthedocs.build/