Commit graph

118681 commits

Author SHA1 Message Date
Miss Islington (bot)
05a2546e85
[3.12] gh-101100: Fix Sphinx warnings in library/pyclbr.rst (GH-113739) (#113748)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-01-05 21:36:31 +02:00
Miss Islington (bot)
99d8dfd430
[3.12] gh-80532: Do not set ipv6type when cross-compiling (GH-17956) (#113740)
(cherry picked from commit 5e1916ba1b)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Xavier de Gaye <xdegaye@gmail.com>
2024-01-05 15:56:43 +00:00
Diego Russo
b95cebf2b6
[3.12] gh-110190: Fix ctypes structs with array on PPCLE64 (GH-112959) (#113170)
Fix the same issue of PR #112604 on PPC64LE platform
Refactor tests to make easier to add more platfroms if needed.

(cherry picked from commit 6644ca45cd)
Change-Id: I31730a3ebe558570ce1d7a3b26db8392f18d1770
2024-01-05 16:45:26 +01:00
Miss Islington (bot)
1dc25ae0da
[3.12] gh-101100: Fix Sphinx warnings for 2.6 deprecations and removals (GH-113725) (#113734)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-05 16:01:58 +02:00
Pablo Galindo Salgado
0affc3d0f0
[3.12] gh-113703: Correctly identify incomplete f-strings in the codeop module (GH-113709) (#113733)
(cherry picked from commit 3003fbbf00)
2024-01-05 13:23:40 +00:00
Alex Waygood
8435fbfe4e
[3.12] gh-113320: Reduce the number of dangerous getattr() calls when constructing protocol classes (#113401) (#113722)
- Only attempt to figure out whether protocol members are "method members" or not if the class is marked as a runtime protocol. This information is irrelevant for non-runtime protocols; we can safely skip the risky introspection for them.
- Only do the risky getattr() calls in one place (the runtime_checkable class decorator), rather than in three places (_ProtocolMeta.__init__, _ProtocolMeta.__instancecheck__ and _ProtocolMeta.__subclasscheck__). This reduces the number of locations in typing.py where the risky introspection could go wrong.
- For runtime protocols, if determining whether a protocol member is callable or not fails, give a better error message. I think it's reasonable for us to reject runtime protocols that have members which raise strange exceptions when you try to access them. PEP-544 clearly states that all protocol member must be callable for issubclass() calls against the protocol to be valid -- and if a member raises when we try to access it, there's no way for us to figure out whether it's a callable member or not!

(cherry-picked from commit ed6ea3ea79)
2024-01-05 01:51:17 +00:00
Miss Islington (bot)
6f90399c23
[3.12] gh-113696: Docs: Annotate PyObject_CallOneArg and PyObject_CallNoArgs as returning a strong reference (GH-113697) (#113698)
(cherry picked from commit 1ae7ceba29)

Co-authored-by: Jamie Phan <jamie@ordinarylab.dev>
2024-01-05 01:17:15 +01:00
Miss Islington (bot)
92ba4e10fa
[3.12] gh-113538: Don't error in stream reader protocol callback when task is cancelled (GH-113690) (#113713)
(cherry picked from commit 4681a5271a)

Co-authored-by: Guido van Rossum <guido@python.org>
2024-01-04 20:51:53 +00:00
Alex Waygood
d3f2051eec
[3.12] Document the co_lines method on code objects (#113682) (#113686)
(cherry-picked from commit f1f8392432)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-03 20:09:15 +00:00
Hugo van Kemenade
d2cdc6717a
[3.12] gh-101100: Fix Sphinx warnings for removed dead batteries (GH-113669) (#113681)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>.
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-03 15:50:10 +02:00
Miss Islington (bot)
5f3fe8448c
[3.12] gh-113637: Let c_annotations.py to handle the spacing of Limited/Unstable API & Stable ABI translation strings (GH-113638) (#113676)
Co-authored-by: Ege Akman <egeakmanegeakman@hotmail.com>
2024-01-03 14:57:32 +02:00
Miss Islington (bot)
c267901289
[3.12] functools.partial docs: Use the more common spelling for "referenceable" (GH-113675) (#113677)
`functools.partial` docs: Use the more common spelling for "referenceable" (GH-113675)
(cherry picked from commit 4de468cce1)

Co-authored-by: Rodrigo Girão Serrão <5621605+rodrigogiraoserrao@users.noreply.github.com>
2024-01-03 12:57:05 +00:00
Miss Islington (bot)
329f8d1f0b
[3.12] gh-113628: Fix test_site test with long stdlib paths (GH-113640) (#113671)
gh-113628: Fix test_site test with long stdlib paths (GH-113640)
(cherry picked from commit 5dc79e3d7f)

Co-authored-by: Itamar Oren <itamarost@gmail.com>
2024-01-02 17:59:39 -07:00
Miss Islington (bot)
499f1d0a03
[3.12] gh-113602: Bail out when the parser tries to override existing errors (GH-113607) (#113652)
gh-113602: Bail out when the parser tries to override existing errors (GH-113607)
(cherry picked from commit 9ed36d533a)

Signed-off-by: Pablo Galindo <pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2024-01-02 13:27:20 +00:00
Donghee Na
20631e840e
[3.12] Use the official term "free-threading" for GitHub Action (g… (#113646) 2024-01-02 15:04:40 +02:00
Hugo van Kemenade
7643545905
[3.12] gh-101100: Fix Sphinx warnings from removed ~! references (GH-113629) (#113641)
(cherry picked from commit 7595380347)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-01-02 12:59:42 +00:00
Miss Islington (bot)
3b5c2da079
[3.12] gh-81094: Refer to PEP 318 in compound_statements.rst (GH-113588) (#113643)
Co-authored-by: John D. McDonald <43117960+Rasputin2@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2024-01-02 08:46:01 +00:00
Miss Islington (bot)
c7a1431c43
[3.12] GH- gh-111700: Fix syntax highlighting for C code in the "What's New In Python 3.12" documentation (GH-113609) (#113610)
GH- gh-111700: Fix syntax highlighting for C code in the "What's New In Python 3.12" documentation (GH-113609)

Fix PEP 684 syntax highlighting in what's new Python 3.12
(cherry picked from commit 9ce6c01e38)

Co-authored-by: Parth Doshi <doshi.parth9@gmail.com>
2024-01-01 08:14:31 +00:00
Miss Islington (bot)
f3d3663a47
[3.12] gh-101578: [doc] mention that PyErr_GetRaisedException returns NULL when the error indicator is not set (GH-113369) (#113606)
gh-101578: [doc] mention that PyErr_GetRaisedException returns NULL when the error indicator is not set (GH-113369)
(cherry picked from commit 2849cbb53a)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2023-12-31 23:22:55 +00:00
Hugo van Kemenade
a8011d5eb0
[3.12] gh-101100: Fix Sphinx warnings in library/configparser.rst (GH-113598) (#113599)
(cherry picked from commit 30a6d79fb8)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-31 18:17:33 +00:00
Miss Islington (bot)
9a2dadf689
[3.12] Update ConfigParser docs defining valid section name (GH-110506) (#113589)
Co-authored-by: Delgan <4193924+Delgan@users.noreply.github.com>
2023-12-30 23:24:32 +00:00
Miss Islington (bot)
c4eaae1864
[3.12] gh-89414: Document that SIGCLD is not available on macOS (GH-113580) (#113585)
gh-89414: Document that SIGCLD is not available on macOS (GH-113580)

Document that SIGCLD is not available on macOS
(cherry picked from commit f48a1bcb29)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2023-12-30 18:09:50 +01:00
Miss Islington (bot)
c0de843c12
[3.12] gh-113543: Make sure that MacOSXOSAScript sends webbrowser.open audit event (GH-113544) (#113549)
gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` audit event (GH-113544)
(cherry picked from commit fba324154e)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-12-29 09:56:18 +01:00
Miss Islington (bot)
f982ab5d72
[3.12] Doc/library/os.rst: os.waitid absent on MacOS (GH-104558) (#113553)
Doc/library/os.rst: `os.waitid` absent on MacOS (GH-104558)

* Doc/library/os.rst: `os.waitid` absent on MacOS

(cherry picked from commit db1c882239)

Co-authored-by: John Hawkinson <jhawk@alum.mit.edu>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
2023-12-29 09:27:04 +01:00
Miss Islington (bot)
5a122ad7e7
[3.12] gh-101100: Fix Sphinx warnings in library/random.rst (GH-112981) (#113551)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-28 12:40:21 -07:00
Miss Islington (bot)
0e3cf5bcac
[3.12] bpo-11102: Make configure enable major(), makedev(), and minor() on HP-UX (GH-19856) (GH-113540)
Always include <sys/types.h> before <sys/sysmacros.h>.

(cherry picked from commit f108468970)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-28 11:12:16 +00:00
Miss Islington (bot)
72073ca560
[3.12] gh-110459: Make sure --with-openssl-rpath works on macOS (GH-113441) (#113535)
gh-110459: Make sure --with-openssl-rpath works on macOS (GH-113441)

* gh-110459: Make sure --with-openssl-rpath works on macOS

On macOS the `-rpath` linker flag is spelled differently
than on on platforms.
(cherry picked from commit cc13eabc7c)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2023-12-28 10:21:12 +01:00
Miss Islington (bot)
c1b396cdf3
[3.12] gh-57795: Add news to idlelib/News3.txt (GH-113522) (#113523)
gh-57795: Add news to idlelib/News3.txt (GH-113522)
(cherry picked from commit 6c98fce33a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-12-27 21:05:59 +00:00
Miss Islington (bot)
72410a3ecf
[3.12] gh-67641: Clarify documentation on bytes vs text with non-seeking tarfile stream (GH-31610) (GH-113519)
(cherry picked from commit 0651936ae2)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2023-12-27 17:32:10 +00:00
Miss Islington (bot)
b8207711ce
[3.12] bpo-26791: Update shutil.move() to provide the same symlink move behavior as the mv shell when moving a symlink into a directory that is the target of the symlink (GH-21759) (GH-113517)
(cherry picked from commit c66b577d9f)

Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
2023-12-27 19:03:30 +02:00
Miss Islington (bot)
b2ef35842c
[3.12] gh-57795: IDLE: Enter the selected text when opening the "Replace" dialog (GH-17593) (GH-113514)
(cherry picked from commit 712afab5ac)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Roger Serwy <roger.serwy@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-27 14:57:01 +00:00
Miss Islington (bot)
ba3e19a5d7
[3.12] gh-111615: Fix regression in QueueHandler configuration. (GH-111638) (GH-113507) 2023-12-27 14:20:36 +00:00
Hugo van Kemenade
6177a852c4
[3.12] gh-101100: Fix Sphinx warnings in library/cmd.rst (GH-113502) (#113511)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-12-27 10:27:13 +00:00
Hugo van Kemenade
11fd024286
[3.12] gh-101100: Fix Sphinx warnings in library/calendar.rst (GH-113500) (#113509) 2023-12-27 09:45:32 +00:00
Miss Islington (bot)
356f59677e
[3.12] gh-101100: Fix Sphinx warnings in library/bisect.rst (GH-113496) (#113504)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-26 14:54:02 -07:00
Miss Islington (bot)
a3f53a006c
[3.12] bpo-36959: Fix error messages for invalid ISO format string in _strptime() (GH-13408) (GH-113495)
Previously some error messages complained about incompatible
combinations of directives that are not contained in the format string.

(cherry picked from commit 4b2c3e8e43)

Co-authored-by: Gordon P. Hemsley <me@gphemsley.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-26 21:56:42 +02:00
Miss Islington (bot)
2f5bfc7e66
[3.12] gh-101100: Fix Sphinx warnings in howto/isolating-extensions.rst (GH-113493) (#113497)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-26 19:46:40 +00:00
Miss Islington (bot)
f445aeac26
[3.12] Docs: make htmllive: open browser when ready (GH-113288) (#113484)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-12-26 12:08:43 +00:00
Miss Islington (bot)
1cf576a358
[3.12] gh-113468: Remove the "_new_ suffix from class names in pydocfodder (GH-113469) (GH-113483)
(cherry picked from commit 8a3d0e4a66)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-26 11:27:18 +00:00
Miss Islington (bot)
8a95500367
[3.12] Misc minor improvements to the itertools recipes (gh-113477) (gh-113478) 2023-12-25 22:32:05 +00:00
Serhiy Storchaka
d58a5f453f
[3.12] gh-106905: Use separate structs to track recursion depth in each PyAST_mod2obj call. (GH-113035) (GH-113472)
(cherry picked from commit 48c49739f5)

Co-authored-by: Yilei Yang <yileiyang@google.com>
Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org>
2023-12-25 19:20:07 +00:00
Miss Islington (bot)
2c07540e7d
[3.12] gh-112252: Fix error on unset $OSNAME in venv/activate (GH-112253) (GH-112297)
(cherry picked from commit e1540ae74d)

Co-authored-by: James Turk <dev@jamesturk.net>
2023-12-25 21:07:09 +02:00
Miss Islington (bot)
fc7e67f51a
[3.12] bpo-37013: Fix the error handling in socket.if_indextoname() (GH-13503) (GH-112597)
* Fix a crash when pass UINT_MAX.
* Fix an integer overflow on 64-bit non-Windows platforms.
(cherry picked from commit 0daf555c6f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2023-12-25 20:55:08 +02:00
Jeff Allen
bdad5c367f
[3.12] gh-76785: Make test.test_interpreters executable (GH-112982) (GH-113470)
This is so that we can run python -m test.test_interpreters. As such it
backports that aspect of commit 86a77f4e1a,
where it is implemented by a package __main__.py.
2023-12-25 20:31:57 +02:00
Miss Islington (bot)
c0e58168e2
[3.12] [doc] Make subprocess.wait documentation more precise (GH-98700) (GH-112153)
An active loop is only used when the `timeout` parameter is used on
POSIX.

When no timeout is used, the code calls `os.waitpid` internally (which puts
the process on a sleep status). On Windows, the internal Windows API
call accepts a timeout parameter, so that is delegated to the OS.
(cherry picked from commit 81ab0e8a4a)

Co-authored-by: Luis Pedro Coelho <luis@luispedro.org>
2023-12-25 20:27:06 +02:00
Miss Islington (bot)
78ccb41c56
[3.12] docs: specify that PyBytes_AsStringAndSize returns 0 on success (GH-110888) (GH-111690)
(cherry picked from commit 9f33ede127)

Co-authored-by: lefp <70862148+lefp@users.noreply.github.com>
2023-12-25 20:24:22 +02:00
Miss Islington (bot)
bd306a9299
[3.12] gh-113407: Fix import of unittest.mock when CPython is built without docstrings (GH-113408) (GH-113454)
(cherry picked from commit 0c574540e0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-24 11:54:35 +00:00
Miss Islington (bot)
fbfb90c820
[3.12] gh-113440: Ignore the "ver" command failure with exit code 0xc0000142 (GH-113435) (GH-113453)
(cherry picked from commit 53330f1677)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-12-24 10:49:34 +00:00
Miss Islington (bot)
1bff2fd013
[3.12] gh-113421: Fix multiprocessing logger for "%(filename)s" (GH-113423) (GH-113450)
(cherry picked from commit ce77ee5035)

Co-authored-by: Xu Song <xusong.vip@gmail.com>
2023-12-24 10:23:32 +00:00
Miss Islington (bot)
269cb342ad
[3.12] gh-113028: Correctly memoize str in pickle when escapes added (GH-113436) (GH-113448)
This fixes a divergence between the Python and C implementations of pickle
for protocol 0, such that it pickle.py fails to re-use the first pickled
representation of strings involving characters that have to be escaped.
(cherry picked from commit 08398631a0)

Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
2023-12-24 10:01:08 +00:00