summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [3.13] gh-118692: Avoid creating unnecessary StopIteration instances for ↵Miss Islington (bot)2024-05-2410-35/+61
| | | | | | | | | | monitoring (GH-119216) (#119497) * gh-118692: Avoid creating unnecessary StopIteration instances for monitoring (GH-119216) (cherry picked from commit 6e9863d7a3516cc76d6ce13923b15620499f3855) --------- Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.13] GH-113464: Run the JIT interpreter before any other JIT CI (GH-119490)Miss Islington (bot)2024-05-241-0/+15
| | | (cherry picked from commit b48a3dbff4d70e72797e67b46276564fc63ddb89)
* [3.13] gh-119461: Fix ThreadedVSOCKSocketStreamTest (#119465) (#119479)Victor Stinner2024-05-231-4/+6
| | | | | | | | | | | | gh-119461: Fix ThreadedVSOCKSocketStreamTest (#119465) Fix ThreadedVSOCKSocketStreamTest: if get_cid() returns the host address or the "any" address, use the local communication address (loopback): VMADDR_CID_LOCAL. On Linux 6.9, apparently, the /dev/vsock device is now available but get_cid() returns VMADDR_CID_ANY (-1). (cherry picked from commit e94dbe4ed83460f18bd72563c5f09f6cdc71f604)
* [3.13] gh-118727: Don't drop the GIL in `drop_gil()` unless the current ↵Miss Islington (bot)2024-05-235-55/+68
| | | | | | | | | | | | | | | | | | | | thread holds it (GH-118745) (#119474) `drop_gil()` assumes that its caller is attached, which means that the current thread holds the GIL if and only if the GIL is enabled, and the enabled-state of the GIL won't change. This isn't true, though, because `detach_thread()` calls `_PyEval_ReleaseLock()` after detaching and `_PyThreadState_DeleteCurrent()` calls it after removing the current thread from consideration for stop-the-world requests (effectively detaching it). Fix this by remembering whether or not a thread acquired the GIL when it last attached, in `PyThreadState._status.holds_gil`, and check this in `drop_gil()` instead of `gil->enabled`. This fixes a crash in `test_multiprocessing_pool_circular_import()`, so I've reenabled it. (cherry picked from commit be1dfccdf2c5c7671b8a549e969b8cf7d60d9936) Co-authored-by: Brett Simmers <swtaarrs@users.noreply.github.com>
* [3.13] gh-119469: Fix _pyrepl reference leaks (GH-119470) (#119471)Miss Islington (bot)2024-05-232-12/+30
| | | | | (cherry picked from commit 6e012ced6cc07a7502278e1849c5618d1ab54a08) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] GH-117195: Avoid assertion error in `object.__sizeof__` (GH-117220) ↵Miss Islington (bot)2024-05-233-2/+9
| | | | (GH-119456)
* [3.13] Fix typos in what's new documentation (GH-119448) (#119449)Miss Islington (bot)2024-05-236-9/+9
|
* [3.13] gh-90562: Mention slots pitfall in dataclass docs (GH-107391) (#119350)Miss Islington (bot)2024-05-231-1/+4
| | | | | | | | Co-authored-by: Josh Cannon <joshdcannon@gmail.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.13] gh-111201: Speed up paste mode in the REPL (#119341) (GH-119432) ↵Miss Islington (bot)2024-05-236-16/+22
| | | | | | | | | | | | | | (#119439) (cherry picked from commit e6572e8f98d33994d2d0dd3afa92a2a72ee642a9) Also includes: * gh-111201: Use calc_complete_screen after bracketed paste in PyREPL (GH-119432) (cherry picked from commit 14b063cbf1bb11a489d04a31f277edba0fc8893c) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* [3.13] gh-118911: Trailing whitespace in a block shouldn't prevent the user ↵Lysandros Nikolaou2024-05-235-9/+79
| | | | | | | | from terminating the code block (GH-119355) (#119404) (cherry picked from commit 5091c4400c9ea2a2d1e4d89a28c9d0de2651fa6d) Co-authored-by: Aya Elsayed <ayah.ehab11@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-119434: Fix culmitive errors in wrapping as lines proceed ↵Miss Islington (bot)2024-05-231-3/+9
| | | | | | | | (GH-119435) (#119441) Fix culmitive errors in wrapping as lines proceed (cherry picked from commit e3bf5381fd056d0bbdd775463e3724aab2012e45) Co-authored-by: Dino Viehland <dinoviehland@gmail.com>
* [3.13] gh-117657: Fix missing atomic in dict_resize (GH-119312) (#119417)Miss Islington (bot)2024-05-221-1/+1
| | | | | | | | gh-117657: Fix missing atomic in dict_resize (GH-119312) Fix missing atomic in dict_resize (cherry picked from commit 2b3fb767bea1f96c9e0523f6cc341b40f0fa1ca1) Co-authored-by: Dino Viehland <dinoviehland@meta.com>
* [3.13] gh-70795: Rework RLock documentation (GH-103853) (#119436)Miss Islington (bot)2024-05-221-24/+51
| | | | | | | | | | | | | | | | | | | | | gh-70795: Rework RLock documentation (GH-103853) Attempted to simultaneously reduce verbosity, while more descriptively describing behavior. Fix links (RLock acquire/release previously linking to Lock acquire/release, seems like bad copy pasta). Add a seealso for with-locks. Switch section to use bullet points. --------- (cherry picked from commit 2fbea81d646688cf438be1dc0be82112a9ae4325) Co-authored-by: uıɐɾ ʞ ʇɐɯɐs <_@skj.io> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* [3.13] gh-111201: auto-indentation in _pyrepl (GH-119348) (#119427)Lysandros Nikolaou2024-05-222-58/+179
| | | | | | (cherry picked from commit cd516cd1f5e94dba887353f421513fd172efadf3) Co-authored-by: Arnon Yaari <wiggin15@yahoo.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] Enable some stricter mypy settings on `Lib/_pyrepl` (GH-119077) (#119428)Miss Islington (bot)2024-05-221-4/+1
| | | | | (cherry picked from commit 0883fd22e6d4a3e360b48f30f6afa34553b3786a) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.13] gh-113978: Ignore warnings on text completion inside REPL (GH-113979) ↵Miss Islington (bot)2024-05-222-4/+7
| | | | | | | (#119429) (cherry picked from commit e03dde5a24d3953e0b16f7cdefdc8b00aa9d9e11) Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
* [3.13] gh-119357: Increase test coverage for keymap in _pyrepl (GH-119358) ↵Lysandros Nikolaou2024-05-223-53/+94
| | | | | | | | (#119414) (cherry picked from commit 73ab83b27f105a4509046ce26e35f20d66625195) Co-authored-by: Eugene Triguba <eugenetriguba@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* gh-117505: Run ensurepip in isolated env in Windows installer (GH-118257)Miss Islington (bot)2024-05-222-2/+3
| | | | | | ensurepip forks a subprocess to run pip itself, but that subprocess only inherits a -I isolated mode flag (see _run_pip() in Lib/ensurepip/__init__.py), not the "-E -s" flags that the installer has been using. This means that parts of ensurepip don't actually run in an isolated environment and can make incorrect decisions based on packages installed in the user site-packages. (cherry picked from commit c9073eb1a99606df1efeb8959e9f11a8ebc23ae2) Co-authored-by: Michael Vincent <377567+Vynce@users.noreply.github.com>
* [3.13] gh-112066: Fix versionadded in PyDict_SetDefaultRef docs (GH-118696) ↵Miss Islington (bot)2024-05-221-0/+1
| | | | | | | (#119430) (cherry picked from commit 447edb6e987d22c91f6dfad043f3472ce07bdfc0) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
* [3.13] gh-119247: Add macros to use PySequence_Fast safely in free-threaded ↵Miss Islington (bot)2024-05-224-3/+106
| | | | | | | | | | | build (GH-119315) (#119419) Add `Py_BEGIN_CRITICAL_SECTION_SEQUENCE_FAST` and `Py_END_CRITICAL_SECTION_SEQUENCE_FAST` macros and update `str.join` to use them. Also add a regression test that would crash reliably without this patch. (cherry picked from commit baf347d91643a83483bae110092750d39471e0c2) Co-authored-by: Josh {*()} Rosenberg <26495692+MojoVampire@users.noreply.github.com>
* [3.13] Improve `pyrepl` type-annotation coverage (GH-119081) (#119415)Miss Islington (bot)2024-05-226-14/+31
| | | | | (cherry picked from commit 033f5c87f1f876088701d1ae078dc39c41177d4a) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.13] gh-119213: Be More Careful About _PyArg_Parser.kwtuple Across ↵Miss Islington (bot)2024-05-2210-3/+144
| | | | | | | | | | | | | Interpreters (gh-119331) (gh-119410) _PyArg_Parser holds static global data generated for modules by Argument Clinic. The _PyArg_Parser.kwtuple field is a tuple object, even though it's stored within a static global. In some cases the tuple is statically allocated and thus it's okay that it gets shared by multiple interpreters. However, in other cases the tuple is set lazily, allocated from the heap using the active interprepreter at the point the tuple is needed. This is a problem once that interpreter is destroyed since _PyArg_Parser.kwtuple becomes at dangling pointer, leading to crashes. It isn't a problem if the tuple is allocated under the main interpreter, since its lifetime is bound to the lifetime of the runtime. The solution here is to temporarily switch to the main interpreter. The alternative would be to always statically allocate the tuple. This change also fixes a bug where only the most recent parser was added to the global linked list. (cherry picked from commit 81865002aee8eaaeb3c7e402f86183afa6de77bf) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-118893: Evaluate all statements in the new REPL separately ↵Miss Islington (bot)2024-05-225-9/+128
| | | | | | | | (GH-119318) (#119408) (cherry picked from commit a3e4fec8734a304d654e4ae24a4aa2f41a7b0640) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-119205: Fix autocompletion bug in new repl (GH-119229) (#119407)Miss Islington (bot)2024-05-223-8/+28
| | | | | | (cherry picked from commit 506b1a3ff66a41c72d205c8e4cba574e439d8e76) Co-authored-by: Koudai Aono <koxudaxi@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-111201: Add append to screen method to avoid recalculation ↵Miss Islington (bot)2024-05-224-14/+43
| | | | | | | | (GH-119274) (#119405) (cherry picked from commit c886bece3b3a49f8a0f188aecfc1d6ff89d281e6) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.13] gh-111201: Remove readline dependency from the PyREPL (GH-119262) ↵Lysandros Nikolaou2024-05-223-3/+3
| | | | | (#119403) (cherry picked from commit 561ff1fa710493dee8c6482f990bd17535b27040)
* [3.13] gh-119306: Break up _pyrepl tests (GH-119307) (#119362)Lysandros Nikolaou2024-05-2210-395/+883
| | | | | (cherry picked from commit f49df4f486e531ff2666eb22854117c564b3de3d) Co-authored-by: Eugene Triguba <eugenetriguba@gmail.com>
* [3.13] gh-118643: Fix AttributeError in the email module (GH-119099) (GH-119389)Miss Islington (bot)2024-05-223-5/+24
| | | | | | | | | | Fix regression introduced in gh-100884: AttributeError when re-fold a long address list. Also fix more cases of incorrect encoding of the address separator in the address list missed in gh-100884. (cherry picked from commit 858b9e85fcdd495947c9e892ce6e3734652c48f2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] Fix version number in use_load_tests deprecation reference ↵Miss Islington (bot)2024-05-221-1/+1
| | | | | | | | (GH-119151) (GH-119386) Deprecation took place in d78742a260ba09e53c844de7b1fd11a11c674945 (3.5) (cherry picked from commit aee8f03abbebfb76357f459dfb297026862e3c0b) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* [3.13] Fix typos in NEWS entries for 3.13 (GH-119374) (GH-119385)Miss Islington (bot)2024-05-222-17/+17
| | | | | (cherry picked from commit 904e256292a0ed6c36f3490da9e4f8245370f535) Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
* [3.13] gh-119189: Add yet more tests for mixed Fraction arithmetic ↵Miss Islington (bot)2024-05-221-3/+32
| | | | | | | (GH-119298) (GH-119346) (cherry picked from commit 10b1bd926a5546e0f5cbd1a47d00dc5ff84f1979) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] Clarify that dklen is expected in bytes for the hashlib functions ↵Miss Islington (bot)2024-05-221-2/+2
| | | | | | | (GH-106624) (GH-119383) (cherry picked from commit 5adf78f546a5dc3f5b8eeaa209a2e8437ae96ac8) Co-authored-by: Mathijs Mortimer <thiezn@users.noreply.github.com>
* [3.13] DOCS: fix error in exec namespace note (gh-119380)Miss Islington (bot)2024-05-221-4/+0
| | | | | | | | | | When updating the new exec note added in gh-119235 as part of the PEP 667 general docs PR, I suggested a workaround that isn't valid. The first half of the note is still reasonable, so just omit the invalid text. (cherry picked from commit 31d61a75c9ae8c1b1bc6447f517122be8adce2ef) Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
* [3.13] gh-110383: Align dict.get(), .fromkeys(), and .setdefault() docs with ↵Miss Islington (bot)2024-05-221-3/+3
| | | | | | | docstrings (GH-119330) (#119370) (cherry picked from commit 0e3c8cda1f04c983994e76aea93600dbb4714832) Co-authored-by: Landon Wood <landon@elkrange.com>
* [3.13] gh-118877: Fix AssertionError crash in pyrepl (GH-118936) (#119363)Miss Islington (bot)2024-05-222-4/+25
| | | | | (cherry picked from commit c0d81b256604a1079349d82d136db43eefcb3df1) Co-authored-by: Daniel Hollas <daniel.hollas@bristol.ac.uk>
* gh-118507 : Refactor `nt._path_is*` to improve applicability for other cases ↵Miss Islington (bot)2024-05-226-365/+453
| | | | | | | (GH-118755) (cherry picked from commit b64182550f73e556344bd754d32e3be5d22a74e1) Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
* [3.13] gh-119102: Fix REPL for dumb terminal (GH-119332) (#119359)Miss Islington (bot)2024-05-221-1/+6
| | | | | | The site module gets the __main__ module to get _pyrepl.__main__. (cherry picked from commit de8f530841b55885b919677a6938ab33d4a92f20) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.13] Docs: Add central references to free-threading-related options ↵Miss Islington (bot)2024-05-214-6/+8
| | | | | | | | (GH-119017) (#119367) Docs: Add central references to free-threading-related options (GH-119017) (cherry picked from commit 9fa206aaeccc979a4bd03852ba38c045294a3d6f) Co-authored-by: Brett Simmers <swtaarrs@users.noreply.github.com>
* [3.13] Fix typos in documentation (GH-119295) (#119337)Miss Islington (bot)2024-05-217-9/+9
| | | | Co-authored-by: Xie Yanbo <xieyanbo@gmail.com>
* [3.13] gh-119035: Add Ctrl+← and Ctrl+→ word-skipping keybindings to new ↵Miss Islington (bot)2024-05-212-3/+8
| | | | | | | | repl (GH-119248) (#119323) add word-skipping ctrl keybindings to new repl (cherry picked from commit 0398d9339217aa0710c0de45a7e9b587136e7129) Co-authored-by: Alastair Stanley <alastairstanley@ntlworld.com>
* [3.13] gh-110383: Document `socket.makefile()` accepts combined modes ↵Miss Islington (bot)2024-05-212-2/+4
| | | | | | | | (GH-119150) (#119324) The supported mode values are 'r', 'w', and 'b', or a combination of those. (cherry picked from commit 62a29be5bb01c2d0f72d8f9b1b5539816e65310c) Co-authored-by: Daniel Williams <dann0a@gmail.com>
* [3.13] GH-110383: Improve Tutorial for Input Ouput (GH-119230) (GH-119326)Miss Islington (bot)2024-05-211-4/+16
| | | | | | | | GH-110383: Improve Tutorial for Input Ouput (GH-119230) (cherry picked from commit 9db2fd7edaa9d03e8c649c3bb0e8d963233cde22) Co-authored-by: Blaise Pabon <blaise@gmail.com> Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
* [3.13] GH-119292: Add job to JIT CI to build and test with --disable-gil ↵Miss Islington (bot)2024-05-211-0/+18
| | | | | | | (GH-119314) (cherry picked from commit c4722cd0573c83aaa52b63a27022b9048a949f54) Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.13] gh-119053: Implement the fast path for list.__getitem__ (gh-119112) ↵Miss Islington (bot)2024-05-211-5/+10
| | | | | | | | (gh-119309) gh-119053: Implement the fast path for list.__getitem__ (gh-119112) (cherry picked from commit ab4263a82abe8b684d8ad1edf7c7c6ec286ff756) Co-authored-by: Donghee Na <donghee.na@python.org>
* [3.13] Docs: Ensure no warnings are found in the NEWS file before a given ↵Hugo van Kemenade2024-05-214-4/+45
| | | | line number (GH-119221) (#119261)
* [3.13] gh-119102: Fix REPL for dumb terminal (GH-119269) (#119308)Miss Islington (bot)2024-05-211-1/+2
| | | | | | | | | gh-119102: Fix REPL for dumb terminal (GH-119269) Use CAN_USE_PYREPL of _pyrepl.__main__ in the site module to decide if _pyrepl.write_history_file() can be used. (cherry picked from commit 73f4a58d36b65ec650e8f00b2affc4a4d3195f0c) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.13] Use `fail-fast: false` in `mypy.yml` (GH-119297) (#119304)Miss Islington (bot)2024-05-211-0/+1
| | | | | | | | Use `fail-fast: false` in `mypy.yml` (GH-119297) See docs about this setting: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actionsGH-jobsjob_idstrategyfail-fast (cherry picked from commit b36533290608aed757f6eb16869a679650d32e17) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.13] gh-74929: PEP 667 general docs update (gh-119291)Miss Islington (bot)2024-05-2111-66/+163
| | | | | | | | | | | * expand on What's New entry for PEP 667 (including porting notes) * define 'optimized scope' as a glossary term * cover comprehensions and generator expressions in locals() docs * review all mentions of "locals" in documentation (updating if needed) * review all mentions of "f_locals" in documentation (updating if needed) (cherry picked from commit e870c852c0ea96fa4e4569e9c39c7ceb80ce858d) Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
* [3.13] gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) ↵Miss Islington (bot)2024-05-215-11/+26
| | | | | | | | | | | windows blurry (GH-119175) (#119289) gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175) ------ (cherry picked from commit 538ed5e4818aa0d0aa759634e8bfa23e317434a1) Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
* [3.13] gh-118912: Remove description of issue fixed in 3.5 from autospeccing ↵Miss Islington (bot)2024-05-201-32/+8
| | | | | | | | | | | | | | | | | | guide (GH-119232) (#119284) gh-118912: Remove description of issue fixed in 3.5 from autospeccing guide (GH-119232) * Remove description of issue fixed in 3.5 from autospeccing guide * Make autospeccing note text more succint and lint whitespace * Add linting changes (missed in last commit) --------- (cherry picked from commit 7e57640c7ec6b7b5ce9b5eac465f6b771fd6ae69) Co-authored-by: Shauna <shaunagm@gmail.com> Co-authored-by: Carol Willing <carolcode@willingconsulting.com>