Commit graph

117648 commits

Author SHA1 Message Date
Miss Islington (bot)
442f5ec042
[3.12] GH-106160: Fix test_gzip failing under WASI, which does not have zlib. (GH-106167) (#106170)
GH-106160: Fix test_gzip failing under WASI, which does not have zlib. (GH-106167)

Fix test_gzip's failure under WASI, which does not have zlib, by using
test.support.import_helper.import_module to import zlib. (gzip
unconditionally imports zlib, so this does not cause any new skips.)
(cherry picked from commit 161012fc25)

Co-authored-by: T. Wouters <thomas@python.org>
2023-06-28 16:16:16 +05:30
Miss Islington (bot)
56e39192c8
[3.12] Refer to TimeoutError instead of asyncio.TimeoutError in asyncio-task.rst (GH-106136) (#106179)
Co-authored-by: lightdrk <108566237+lightdrk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-27 23:38:01 -06:00
Miss Islington (bot)
0373c2ccd5
[3.12] Fix c-analyzer for GCC: ignore LANG env var (GH-106173) (#106178)
Fix c-analyzer for GCC: ignore LANG env var (GH-106173)

The c-analyzer doesn't support GCC localized messages, so just unset
the LANG environment variable.
(cherry picked from commit 1f74b9e933)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-06-28 03:41:36 +00:00
Miss Islington (bot)
c1c6738526
[3.12] gh-101634: regrtest reports decoding error as failed test (GH-106169) (#106174)
gh-101634: regrtest reports decoding error as failed test (GH-106169)

When running the Python test suite with -jN option, if a worker stdout
cannot be decoded from the locale encoding report a failed testn so the
exitcode is non-zero.
(cherry picked from commit 2ac3eec103)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-06-28 02:55:27 +00:00
Pablo Galindo Salgado
20315d141a
[3.12] gh-106140: Reorder some more fields to facilitate out-of-process inspection (GH-106148) (#106155)
(cherry picked from commit 9126a6a9ce)
2023-06-27 18:33:01 +00:00
Miss Islington (bot)
ac80beb1ec
[3.12] gh-106140: Reorder some fields to facilitate out-of-process inspection (GH-106143) (#106147)
gh-106140: Reorder some fields to facilitate out-of-process inspection (GH-106143)
(cherry picked from commit 2d5a1c2811)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2023-06-27 17:44:37 +00:00
Miss Islington (bot)
264b54bf51
[3.12] IDLE: Condense run.main threading.Thread start. (GH-106125) (#106154)
IDLE: Condense run.main threading.Thread start. (GH-106125)

Use daemon argument added in 3.3 and directly call .start.
Remove now unused 'sockthread' name.
(cherry picked from commit eaa1eae55e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-06-27 17:35:48 +00:00
Miss Islington (bot)
0555722a8a
[3.12] gh-92788: Add docs for ast.Module, ast.Expression, and others (GH-101055) (#106139)
gh-92788: Add docs for `ast.Module`, `ast.Expression`, and others (GH-101055)
(cherry picked from commit 33608fd67d)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-06-27 13:44:44 +00:00
Miss Islington (bot)
0efbe4d189
[3.12] gh-106123: Modules/_sha3 appears to no longer be necessary (GH-106124) (#106127)
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2023-06-26 22:49:32 -07:00
Miss Islington (bot)
c2e8e347b3
[3.12] GH-105774: Clarify operation of normalize() (GH-106093) (GH-106128) 2023-06-26 23:32:16 -05:00
Miss Islington (bot)
1bb2bf7cd6
[3.12] gh-106030: Miscellaneous fixes in Python/suggestions.c (GH-106031) (#106036)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-06-26 20:43:20 -07:00
Miss Islington (bot)
364cb6683b
[3.12] gh-84976: Add back UTC to datetime.__all__ (GH-104920) (#106019)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-06-26 20:41:52 -07:00
Miss Islington (bot)
1acfecbc00
[3.12] Revert "GH-96145: Add AttrDict to JSON module for use with object_hook (GH-96146)" (GH-105948) (#106117)
Revert "GH-96145: Add AttrDict to JSON module for use with object_hook (GH-96146)" (GH-105948)

This reverts commit 1f0eafa844.
(cherry picked from commit d3af83b934)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2023-06-26 21:11:49 +02:00
Miss Islington (bot)
ea6a4b7523
[3.12] gh-106107: document correct error that's raised when a mutable default value for a field is detected (gh-106109) (gh-106115)
gh-106107: document correct error that's raised when a mutable default value for a field is detected (gh-106109)
(cherry picked from commit 512f299e55)

Co-authored-by: Roderich Schupp <roderich.schupp@gmail.com>
2023-06-26 14:12:52 -04:00
Miss Islington (bot)
fa3a75dc68
[3.12] gh-106111: Remove zipapp documentation on creating a Windows executable (GH-106112) (#106114)
Remove zipapp documentation on creating a Windows executable

(cherry picked from commit 5d4dbf0e30)

Co-authored-by: Paul Moore <p.f.moore@gmail.com>
2023-06-26 18:26:40 +02:00
Miss Islington (bot)
e923971c6d
[3.12] Update test.support.interpreters to include missing RunFailedError import (GH-103841) (#106110)
(cherry picked from commit 1a2bc94fc2)

Co-authored-by: Bruce Eckel <BruceTEckel@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-26 18:11:48 +02:00
Miss Islington (bot)
8d5d60f72d
[3.12] gh-106075: add asyncio.taskgroups.__all__ to asyncio.__all__ (GH-106090) (#106098)
gh-106075: add `asyncio.taskgroups.__all__` to `asyncio.__all__` (GH-106090)
(cherry picked from commit a12e8ffb49)

Co-authored-by: James Webber <jamestwebber@users.noreply.github.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-06-26 12:26:15 +00:00
Kumar Aditya
9e6f8d4615
[3.12] gh-105987: Fix reference counting issue in `_asyncio._swap_cur… (#106099)
[3.12] gh-105987: Fix reference counting issue in `_asyncio._swap_current_task` (GH-105989).
(cherry picked from commit d2cbb6e918)

Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
2023-06-26 08:51:28 +00:00
Miss Islington (bot)
84189640b7
[3.12] Improve typing docs on the type of class objects (GH-106081) (#106096)
Improve typing docs on the type of class objects (GH-106081)
(cherry picked from commit 3eeb8c8906)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-26 09:43:24 +01:00
Miss Islington (bot)
592d1eadc6
[3.12] gh-84436: update docs on Py_None/Py_True/Py_False/Py_Ellipsis becoming immortal (GH-105195) (#105977)
gh-84436: update docs on Py_None/Py_True/Py_False/Py_Ellipsis becoming immortal (GH-105195)
(cherry picked from commit a2392720d6)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-06-26 14:02:00 +05:30
Miss Islington (bot)
b786fe8a09
[3.12] gh-105979: Fix exception handling in unmarshal_frozen_code (Python/import.c) (GH-105980) (#106055)
gh-105979: Fix exception handling in `unmarshal_frozen_code` (`Python/import.c`) (GH-105980)
(cherry picked from commit cd5280367a)

Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
2023-06-26 14:01:01 +05:30
Miss Islington (bot)
e9366df3ec
[3.12] gh-104212: Explain how to port imp.load_source() (GH-105978) (#106083)
gh-104212: Explain how to port imp.load_source() (GH-105978)

Explain how to port removed imp.load_source() to importlib in What's
New in Python 3.12.
(cherry picked from commit 18a7c86697)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-06-25 17:14:18 +02:00
Miss Islington (bot)
f955ed9da7
[3.12] Add end-of-file-fixer to pre-commit (GH-106065) (#106080)
Add end-of-file-fixer to pre-commit (GH-106065)
(cherry picked from commit 8c24a83737)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-25 11:18:22 +00:00
Miss Islington (bot)
f930bee003
[3.12] Docs: add links to 'callable' term in sqlite3 docs (GH-106072) (#106073)
(cherry picked from commit bef1c8761e)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-06-25 10:16:12 +02:00
Serhiy Storchaka
9cd366462b
[3.12] gh-106033: Get rid of new occurrences of PyDict_GetItem and Py… (#106041)
[3.12] gh-106033: Get rid of new occurrences of PyDict_GetItem and PyObject_HasAttr (GH-106034)

These functions are broken by design because they discard any exceptions raised
inside, including MemoryError and KeyboardInterrupt.  They should not be
used in new code.
(cherry picked from commit 1d33d53780)
2023-06-24 16:36:34 -07:00
Miss Islington (bot)
746c0f3d8f
[3.12] gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047) (#106070)
gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047)

Use a note:: tag so that these dict and object API deficiencies show up clearly.

A caution:: tag was considered, but our current python docs rendering doesn't do much with that (no box or color change).  warning:: seemed too extreme.  note looks good.
(cherry picked from commit 19d6511b0b)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-06-24 16:30:27 -07:00
Barney Gale
ef58c0428d
[3.12] GH-104375: Use versionchanged to describe new arguments in pathlib docs (GH-104376, GH-106058)
(cherry picked from commit 4a6c84fc1e)
2023-06-24 16:25:47 +01:00
Miss Islington (bot)
de1c090879
[3.12] Typing docs: fix typo in annotating tuples comment (GH-106048) (#106049)
Typing docs: fix typo in annotating tuples comment (GH-106048)
(cherry picked from commit 8ef0ee4ebc)

Co-authored-by: Eamon Tracey <66919574+EamonTracey@users.noreply.github.com>
2023-06-23 21:35:00 +01:00
Miss Islington (bot)
7d6ee298e9
[3.12] gh-105974: Revert unintentional behaviour change for protocols with non-callable members and custom __subclasshook__ methods (GH-105976) (#106032)
gh-105974: Revert unintentional behaviour change for protocols with non-callable members and custom `__subclasshook__` methods (GH-105976)
(cherry picked from commit 9499b0f138)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-23 15:26:37 +00:00
Miss Islington (bot)
1ffcd49be2
[3.12] Typing docs: improve the guidance on annotating tuples (GH-106021) (#106027)
Typing docs: improve the guidance on annotating tuples (GH-106021)
(cherry picked from commit 968435ddb1)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-23 15:48:29 +01:00
Miss Islington (bot)
3cc5523312
[3.12] Docs: Avoid a DeprecationWarning in pyspecific.py when running with Sphinx >=6.1 (GH-105886) (#106010)
Docs: Avoid a DeprecationWarning in `pyspecific.py` when running with Sphinx >=6.1 (GH-105886)
(cherry picked from commit a72683ba8e)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-23 09:07:58 +01:00
Miss Islington (bot)
c407ef0a8a
[3.12] gh-98931: Add custom error messages to invalid import/from with multiple targets (GH-105985) (#105991)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-22 16:28:06 +00:00
Miss Islington (bot)
025c9912ee
[3.12] stdtypes.rst: remove a period (GH-105959) (#105968)
stdtypes.rst: remove a period (GH-105959)
(cherry picked from commit c5a722be5f)

Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>
2023-06-21 15:40:54 +01:00
Miss Islington (bot)
5729b418fe
[3.12] gh-104212: Explain how to port imp code to importlib (GH-105905) (#105952)
gh-104212: Explain how to port imp code to importlib (GH-105905)
(cherry picked from commit 7a56a4148c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-06-20 23:03:54 +00:00
Miss Islington (bot)
c5c8111acf
[3.12] gh-105915: Fix SyntaxWarning becoming a SyntaxError with -We in test_fstring (GH-105943) (#105945)
(cherry picked from commit 6e40ee6e84)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2023-06-20 15:08:29 +00:00
Thomas Wouters
e149448595 Merge branch '3.12' of https://github.com/python/cpython into 3.12 2023-06-20 15:32:39 +02:00
Thomas Wouters
e904c35c31 Post 3.12.0b3 2023-06-20 15:32:24 +02:00
Miss Islington (bot)
164fa93001
[3.12] gh-105915: Add 'r' prefix to not emit SyntaxWarning in test_fstring (GH-105940) (#105942)
(cherry picked from commit 4b431d2e90)

Co-authored-by: @sunmy2019
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2023-06-20 13:16:21 +00:00
Miss Islington (bot)
fea0d2fbaa
[3.12] gh-105938: Emit a SyntaxWarning for escaped braces in an f-string (GH-105939) (#105941)
(cherry picked from commit 6586cee27f)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2023-06-20 13:09:48 +00:00
Miss Islington (bot)
cc18a8b78a
[3.12] gh-105908: fix barry_as_FLUFL future import (GH-105909) (#105930)
(cherry picked from commit 28187a9c4f)

Co-authored-by: Crowthebird <78076854+thatbirdguythatuknownot@users.noreply.github.com>
2023-06-20 03:05:20 +00:00
Thomas Wouters
f992a60014 Python 3.12.0b3 2023-06-19 20:56:16 +02:00
Miss Islington (bot)
225cc4c043
[3.12] GH-105808: Fix a regression introduced in GH-101251 (GH-105910) (#105920)
GH-105808: Fix a regression introduced in GH-101251 (GH-105910)

Fix a regression introduced in pythonGH-101251, causing GzipFile.flush() to
not flush the compressor (nor pass along the zip_mode argument).
(cherry picked from commit 1858db7cbd)

Co-authored-by: T. Wouters <thomas@python.org>
2023-06-19 17:42:23 +00:00
Miss Islington (bot)
5e524ef346
[3.12] typing docs: Improve the intro to each section (GH-105901) (#105902)
typing docs: Improve the intro to each section (GH-105901)
(cherry picked from commit 4426279a43)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-19 01:02:48 +01:00
Miss Islington (bot)
1606cbc2fd
[3.12] gh-105844: Use devguide terminology to denote versions (GH-105882) (#105892)
(cherry picked from commit dba7217511)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-18 19:56:35 +02:00
Miss Islington (bot)
6baddd9fb2
[3.12] Docs: move sphinx-lint to pre-commit (GH-105750) (#105894)
Docs: move sphinx-lint to pre-commit (GH-105750)
(cherry picked from commit bc07c8f096)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-06-18 13:21:34 +01:00
Miss Islington (bot)
b34f1df5fa
[3.12] CI: Bump macOS build to use OpenSSL v3.0 (GH-105538) (#105867)
(cherry picked from commit 34e93d3998)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-06-16 19:34:46 +00:00
Miss Islington (bot)
560adb01f9
[3.12] GH-105840: Fix assertion failures when specializing calls with too many __defaults__ (GH-105863)
GH-105840: Fix assertion failures when specializing calls with too many __defaults__ (GH-105847)
(cherry picked from commit 2beab5bdef)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2023-06-16 18:29:55 +00:00
Miss Islington (bot)
32c0aeb8a7
[3.12] bpo-44530: Document the change in MAKE_FUNCTION behavior (GH-93189) (#105841)
bpo-44530: Document the change in MAKE_FUNCTION behavior (GH-93189)

* bpo-44530: Document the change in MAKE_FUNCTION behavior

Fixes dis module documentation for MAKE_FUNCTION due to 2f180ce2cb (bpo-44530, released as part of 3.11) removes the qualified name at TOS
(cherry picked from commit 486b52a315)

Co-authored-by: Alex Doe <alexdoesh@gmail.com>
2023-06-16 12:17:33 -05:00
Miss Islington (bot)
5ca707d1e4
[3.12] gh-104799: PEP 695 backward compatibility for ast.unparse (GH-105846) (#105862)
(cherry picked from commit 957a974d4f)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-06-16 16:59:25 +00:00
Miss Islington (bot)
e6982c5860
[3.12] gh-105834: Add tests for calling issubclass() between two protocols (GH-105835) (#105859)
Some parts of the implementation of `typing.Protocol` had poor test coverage
(cherry picked from commit 70c075c194)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-06-16 16:20:19 +00:00