Commit graph

118809 commits

Author SHA1 Message Date
Miss Islington (bot)
7a1b946a8d
[3.12] gh-77782: Deprecate Py_HasFileSystemDefaultEncoding (GH-106272) (#106274)
gh-77782: Deprecate Py_HasFileSystemDefaultEncoding (GH-106272)

Deprecate Py_HasFileSystemDefaultEncoding variable.
(cherry picked from commit f3cf2ddd8d)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-06-30 10:21:36 +00:00
Miss Islington (bot)
04a165f4f9
[3.12] GH-106152: Add PY_THROW event to cProfile (GH-106256)
GH-106152: Add PY_THROW event to cProfile (GH-106161)
(cherry picked from commit cea9d4ea82)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
2023-06-29 23:39:18 +00:00
Miss Islington (bot)
2405929c35
[3.12] Fix possible refleak in CodeType.replace() (GH-106243) (GH-106244)
Fix possible refleak in CodeType.replace() (GH-106243)

A reference to c_code was leaked if PySys_Audit() failed.
(cherry picked from commit 3c70d467c1)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-06-29 21:41:01 +03:00
Miss Islington (bot)
c9b9555650
[3.12] gh-101006: Improve error handling when read marshal data (GH-101007) (GH-106226)
* EOFError no longer overrides other errors such as MemoryError or OSError at
  the start of the object.
* Raise more relevant error when the NULL object occurs as a code object
  component.
* Minimize an overhead of calling PyErr_Occurred().
(cherry picked from commit 8bf6904b22)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-06-29 13:46:51 +03:00
Miss Islington (bot)
e0fa531d7a
[3.12] gh-106033: Get rid of PyDict_GetItem in _PyFunction_FromConstructor (GH-106044) (GH-106228)
gh-106033: Get rid of PyDict_GetItem in _PyFunction_FromConstructor (GH-106044)
(cherry picked from commit 08c08d21b0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-06-29 13:45:39 +03:00
Miss Islington (bot)
e12045d648
[3.12] gh-106194: Rename duplicated tests in test_curses (GH-106196) (#106216)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-06-28 21:12:12 +00:00
Miss Islington (bot)
ed2114f1cf
[3.12] gh-106197: Deduplicate tests in test_buffer (GH-106198) (#106206)
gh-106197: Deduplicate tests in `test_buffer` (GH-106198)
(cherry picked from commit c283a0cff5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-06-28 15:13:57 +00:00
Miss Islington (bot)
0cd07b3272
[3.12] gh-101100: Fix reference to parse_args in optparse.rst (GH-105265) (#106204)
Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
2023-06-28 15:44:23 +03:00
Miss Islington (bot)
78cedf2607
[3.12] gh-106118: Add O_CLOEXEC preprocessor guard (GH-106120) (#106199)
(cherry picked from commit 6c60684bf5)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-06-28 11:54:53 +00:00
Miss Islington (bot)
7bdf2c16e6
[3.12] gh-105993: Add possible None return type to asyncio.EventLoop.start_tls docs (GH-105995) (#106188)
gh-105993: Add possible `None` return type to `asyncio.EventLoop.start_tls` docs (GH-105995)
(cherry picked from commit 6b52a581c1)

Co-authored-by: Sam Bull <git@sambull.org>
2023-06-28 16:36:49 +05:30
Miss Islington (bot)
27bd2d1a9b
[3.12] gh-101100: Fix reference to asynchronous methods (GH-106172) (#106191)
gh-101100: Fix reference to asynchronous methods (GH-106172)
(cherry picked from commit bbf722dcd3)

Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
2023-06-28 16:36:02 +05:30
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