[3.15] gh-150052: Modules resolve pending lazy attributes - #150054
Closed
DinoV wants to merge 84 commits into
Closed
[3.15] gh-150052: Modules resolve pending lazy attributes#150054DinoV wants to merge 84 commits into
DinoV wants to merge 84 commits into
Conversation
Also add the python3.15.abi file as generated by the new job and remove the 'main branch only' entry from .gitignore. (adapted from commit 0eb2291)
…nGH-149519) (cherry picked from commit b142878) Co-authored-by: Brett Cannon <[email protected]>
…hon `__next__` (pythonGH-149491) (python#149523) pythongh-149481: skip `FOR_ITER` inline specialization for Python `__next__` (pythonGH-149491) (cherry picked from commit 49918f5) Co-authored-by: Neko Asakura <[email protected]> Co-authored-by: Savannah Ostrowski <[email protected]> Co-authored-by: Stan Ulbrych <[email protected]>
…on to Platforms directory (pythonGH-149543) (python#149545) pythongh-146445: Update CODEOWNERS for Android and iOS migration to Platforms directory (pythonGH-149543) (cherry picked from commit 5b58fbc) Co-authored-by: Malcolm Smith <[email protected]>
…onGH-149506) (python#149546) docs: Clarify docs for error case of `PyDict_GetItemRef` (pythonGH-149506) (cherry picked from commit 3565d31) Co-authored-by: Nathan Goldbaum <[email protected]>
… Platforms directory (pythonGH-149544) (python#149550) pythongh-145176: Update CODEOWNERS for Emscripten migration to Platforms directory (pythonGH-149544) (cherry picked from commit 52a05e8) Co-authored-by: Malcolm Smith <[email protected]>
…imizes (pythonGH-149478) (python#149552) pythongh-149459: Fix segfault when `_LOAD_SPECIAL` guard deoptimizes (pythonGH-149478) (cherry picked from commit c341e34) Co-authored-by: Hai Zhu <[email protected]>
…t_robotparser (pythonGH-149569) (pythonGH-149580) Also, use urllib.request.urlcleanup() in NetworkTestCase. (cherry picked from commit 57ef219) Co-authored-by: Serhiy Storchaka <[email protected]>
… audit hook and path-like support (pythonGH-149524) (python#149586) pythongh-149474: use `Py_fopen` in `Binary{Reader,Writer}` for audit hook and path-like support (pythonGH-149524) (cherry picked from commit 354ef33) Co-authored-by: Maurycy Pawłowski-Wieroński <[email protected]>
…e` to `sentinel` (pythonGH-149536) (python#149592) pythongh-149083: Convert `_initial_missing` for pure py `reduce` to `sentinel` (pythonGH-149536) (cherry picked from commit bc8cf07) Co-authored-by: sobolevn <[email protected]>
pythonGH-149431) (python#149602) pythongh-149430: Fix edge-cases in `profiling.sampling` outputs (pythonGH-149431) The line highlights on the heatmap are driven by the URL hash and the `:target` selector. When clicking a caller/callee link for the line that was already selected, the hash doesn't change, so the browser keeps the existing target state and doesn't restart the animation. Due to this the highlight only works the first time. With this fix, line navigation goes through JavaScript. If the target URL already points to the current location, the highlight is replayed by clearing the animation, forcing style recalculation, and restoring it. The `baseline_self` variable isn't initialized for structural elided roots. This variable is accessed later unconditionally and leads to a crash. The child process ends up being invoked with `--diff_flamegraph` instead of the correct argument. (cherry picked from commit 9587726) Co-authored-by: László Kiss Kollár <[email protected]>
…ythonGH-149518) (python#149605) pythongh-149388: Make asyncio `PipeHandle.close` idempotent (pythonGH-149518) (cherry picked from commit 7241f27) Co-authored-by: Max Schmitt <[email protected]>
Fix minor typos in unicode.rst (pythonGH-149587) (cherry picked from commit 4e97ff3) Co-authored-by: Manoj K M <[email protected]>
…GH-149520) (python#149622) pythongh-139871: Fix 3.15 bytearray.take_bytes example (pythonGH-149520) Currently: ```python buffer = bytearray(b'abc\ndef') n = buffer.find(b'\n') data = bytes(buffer[:n + 1]) del buffer[:n + 1] assert data == b'abc' Traceback (most recent call last): File "<stdin>", line 1, in <module> assert data == b'abc' ^^^^^^^^^^^^^^ AssertionError ``` Adding in the `\n` makes the two match: ```python buffer = bytearray(b'abc\ndef') n = buffer.find(b'\n') data = bytes(buffer[:n + 1]) del buffer[:n + 1] assert data == b'abc\n' assert buffer == bytearray(b'def') buffer = bytearray(b'abc\ndef') n = buffer.find(b'\n') data = buffer.take_bytes(n + 1) assert data == b'abc\n' assert buffer == bytearray(b'def') ``` (cherry picked from commit cc5cf14) Co-authored-by: Cody Maloney <[email protected]>
…taHandler (pythonGH-148904) (python#149639) pythongh-148441: Avoid integer overflow in Expat's CharacterDataHandler (pythonGH-148904) (cherry picked from commit bc1be4f) Co-authored-by: ByteFlow <[email protected]> Co-authored-by: Bénédikt Tran <[email protected]>
…9641) (python#149652) pythongh-139489: Add is_valid_text to xml.__all__ (pythonGH-149641) (cherry picked from commit b45319e) Co-authored-by: Jelle Zijlstra <[email protected]>
…ture (pythonGH-149591) (python#149653) pythongh-149083: use sentinel to fix _functools.reduce() signature (pythonGH-149591) (cherry picked from commit c6fd7de) Co-authored-by: Sergey B Kirpichev <[email protected]>
…rget (pythonGH-149487) (pythonGH-149553) pythongh-149486: tarfile.data_filter: validate written link target (pythonGH-149487) The data filter rewrote linknames with normpath() but ran the containment check against the un-normalised value, and computed a symlink's directory before stripping trailing slashes. Both let a crafted archive create links pointing outside the destination. Also reject link members that resolve to the destination directory itself, which could otherwise replace it with a symlink and redirect all subsequent members. (cherry picked from commit 5784119) Co-authored-by: Gregory P. Smith <[email protected]>
…6095) (pythonGH-149667) (cherry picked from commit 833dae7) Co-authored-by: Jonathan Dung <[email protected]>
…python#149672) pythongh-149663: fix typo in `unittest` docs (pythonGH-149670) `hastattr` -> `hasattr` (cherry picked from commit 4956d2b) Co-authored-by: Árni Már Jónsson <[email protected]>
…GH-149624) (python#149678) pythongh-144957: Fix lazy imports + module __getattr__ (pythonGH-149624) (cherry picked from commit 56171da) Co-authored-by: Jelle Zijlstra <[email protected]>
…riptors (pythonGH-149577) (python#149656) pythongh-112821: Fix rlcompleter failures on objects with descriptors (pythonGH-149577) * pythongh-112821: Fix rlcompleter failures on objects with descriptors * Confirm no accesses (cherry picked from commit f23a183) Co-authored-by: Michael Droettboom <[email protected]>
…readed builds (pythongh-145233) (python#149690) In free-threaded builds, concurrent calls to PyDict_AddWatcher, PyDict_ClearWatcher, PyDict_Watch, and PyDict_Unwatch can race on the shared callback array and the per-dict watcher tags. This change adds a mutex to serialize watcher registration and removal, atomic operations for tag updates, and atomic acquire/release synchronization for callback dispatch in _PyDict_SendEvent. (cherry picked from commit 8a48959) Co-authored-by: Alper <[email protected]>
…Parser… (python#149693) [3.15] pythongh-149614 - Restore deepcopiability of argparse.ArgumentParser instances (pythonGH-149617) (cherry picked from commit fadd9bc) Co-authored-by: David Ellis <[email protected]> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
…pythonGH-148670) (python#149703) pythongh-148669: Clarify `__reduce__()` module lookup behavior (pythonGH-148670) (cherry picked from commit 54a5fd4) Co-authored-by: Victorien <[email protected]>
Update mypy to 2.1.0 (pythonGH-149709) (cherry picked from commit b546cc1) Co-authored-by: sobolevn <[email protected]>
pythongh-149231: Revert extra NEWS entry This reverts commit dc7cad2.
…honGH-149842) (cherry picked from commit c62c371) Co-authored-by: Zachary Ware <[email protected]>
… js_output() (pythonGH-149157) (pythonGH-149846) pythongh-149144: Use decodeURIComponent() for UTF-8 support in js_output() (pythonGH-149157) (cherry picked from commit 461b1d9) Co-authored-by: Seth Larson <[email protected]>
…honGH-149764) (python#149854) pythongh-149763: Improve availablity docs in `select.rst` (pythonGH-149764) (cherry picked from commit 7e98deb) Co-authored-by: sobolevn <[email protected]>
…pythonGH-149648) (python#149792) pythongh-87451: Apply CVE-2021-4189 PASV fix to ftplib.ftpcp() (pythonGH-149648) ftpcp() called parse227() directly and passed the source server's self-reported PASV IPv4 address to the target server's PORT command, bypassing the CVE-2021-4189 fix that was applied only to FTP.makepasv(). A malicious source FTP server could use this to redirect the target server's data connection to an arbitrary host:port (SSRF). ftpcp() now uses the source server's actual peer address, honoring the existing trust_server_pasv_ipv4_address opt-out, the same as makepasv(). Thanks to Qi Ding at Aurascape AI for the report. (GHSA-w8c5-q2xf-gf7c) (cherry picked from commit eac4fe3) Co-authored-by: Gregory P. Smith <[email protected]>
…r() (python#149791) (python#149865) pythongh-149707: Fix compiler warning in _ctypes_test on strchr() (python#149791) Change my_strchr() return type to "const char*" (add "const"). Fix the compiler warning: Modules/_ctypes/_ctypes_test.c: In function 'my_strchr': Modules/_ctypes/_ctypes_test.c:451:12: warning: return discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers] 451 | return strchr(s, c); | ^~~~~~ When using C23, strchr(text, ch) return type is "const char*" if text type is "const char*". (cherry picked from commit 5465b69)
…149778) (python#149869) pythongh-148675: Use a string for ctypes cparam tag (pythonGH-149778) (cherry picked from commit 3ecca22) Co-authored-by: Victor Stinner <[email protected]>
…ading zeros (pythonGH-149804) (pythonGH-149870) Like IBM00858, CP00858, IBM01140, CP01140. (cherry picked from commit 2043886) Co-authored-by: Serhiy Storchaka <[email protected]>
…threading (pythonGH-149858) (python#149875) pythongh-149816: Fix race condition in `memoryview` with free-threading (pythonGH-149858) (cherry picked from commit 1fdf033) Co-authored-by: sobolevn <[email protected]>
pythonGH-149153) (cherry picked from commit 4aa296f) Co-authored-by: Steve Dower <[email protected]>
…eaded (pythonGH-149847) (cherry picked from commit 1c5fe21) Co-authored-by: Steve Dower <[email protected]>
…ython#149889) pythongh-142349: Add `help("lazy")` support (pythonGH-149886) (cherry picked from commit 8be3fb1) Co-authored-by: sobolevn <[email protected]>
…ith free-threading (pythonGH-149909) (python#149911) pythongh-149816: Fix a race condition in `_PyBytes_FromList` with free-threading (pythonGH-149909) (cherry picked from commit 46afba7) Co-authored-by: sobolevn <[email protected]>
…ncode in test_email (pythonGH-149917) (pythonGH-149937) (cherry picked from commit 1cbe035) Co-authored-by: Serhiy Storchaka <[email protected]>
…nterpqueues modules (pythonGH-149922) (python#149943) pythongh-149921: Fix reference leaks in _interpchannels and _interpqueues modules (pythonGH-149922) (cherry picked from commit acefff9) Co-authored-by: AN Long <[email protected]>
…bjects.c` (pythonGH-149956) (python#149976) pythongh-149953: Fix null pointer dereference order in `code_objects.c` (pythonGH-149956) Move check before (cherry picked from commit 0ed497a) Co-authored-by: Nezuko Agent <[email protected]>
…install (pythonGH-149900) pythongh-149887: Install python3t.lib for GIL-enabled Windows install (pythonGH-149900) (cherry picked from commit bd6bf91) Co-authored-by: Nathan Goldbaum <[email protected]>
…ythonGH-149824) (python#149997) pythongh-149816: Fix a RC in `_random.Random.__init__` method (pythonGH-149824) (cherry picked from commit 14af19e) Co-authored-by: sobolevn <[email protected]>
pythonGH-149978) (python#150016) pythongh-149977: Fix extra output of `-m test test_lazy_import` (pythonGH-149978) (cherry picked from commit 6d5be4b) Co-authored-by: sobolevn <[email protected]>
…H-148574) (python#150008) pythongh-95816: Fix TLS version range example in docs (pythonGH-148574) docs(ssl): Fix TLS version range example (cherry picked from commit dbd8985) Co-authored-by: Jan Brasna <[email protected]>
python#150037) pythongh-149590: Remove faulthandler_traverse (pythonGH-150023) `faulthandler_traverse` visits Python objects owned by `_PyRuntime`, not by the module instance. With multi-phase init allowing multiple module instances, each instance's GC traversal decrements `gc_refs` on the same runtime-owned objects, driving it negative when two instances are collected simultaneously. (cherry picked from commit 5673748) Co-authored-by: Armaan Vakharia <[email protected]>
…_dict_exact and fix race condition (pythonGH-150025) (python#150039) pythongh-146452: Improve locking granularity in pickle's batch_dict_exact and fix race condition (pythonGH-150025) Remove assertion that could fail in rare race condition. Replace the coarse critical section wrapping the entire function with fine-grained sections covering only PyDict_Next + Py_INCREF. Also handle PyDict_Next returning 0 in the single-item fast path. (cherry picked from commit 57a0e57) Co-authored-by: Saul Cooperman <[email protected]>
…rnal lazy submodules tra… (python#150014) Make sys.lazy_modules match PEP and keep internal lazy submodules tracking internal
…ythonGH-149936) (python#150003) pythongh-149816: fix thread safety of deletion of list slice (pythonGH-149936) (cherry picked from commit 00ea776) Co-authored-by: Kumar Aditya <[email protected]>
…ith non-embedded values (pythonGH-149914) (python#150000) pythongh-149816: fix `dict.clear()` race on split-table dict with non-embedded values (pythonGH-149914) (cherry picked from commit 1692854) Co-authored-by: Kumar Aditya <[email protected]>
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
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.
Instead of publishing the value update _Py_module_getattro_impl to return these values. This is maybe more in the spirit of the changes we've made to push things into the module object in general. We'd publish nothing into the module but it would magically become available if we resolve it and then presumably we'd publish it into the module.