Commit Graph

115114 Commits

Author SHA1 Message Date
Miss Islington (bot) 254494c4b9
gh-99553: add tests for ExceptionGroup wrapping (GH-99615)
(cherry picked from commit 4cd1cc843a)

Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
2023-04-11 00:07:25 -07:00
Miss Islington (bot) a836d79111
Docs: don't render files in includes/, they're for embedding only (GH-103313)
(cherry picked from commit 280bd536b5)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-04-10 23:26:07 -07:00
Miss Islington (bot) 4a05392adb
Doc: Avoid error lexing multiprocessing docs code block on Pygments 2.15.0 (GH-103421)
(cherry picked from commit 75b6ab80da)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-10 21:07:21 -07:00
Miss Islington (bot) b80e4c89d8
[3.11] gh-103059: Clarify gc.freeze documentation (GH-103058) (#103416)
gh-103059: Clarify gc.freeze documentation (GH-103058)
(cherry picked from commit 8b1b17134e)

Co-authored-by: raylu <lurayl@gmail.com>
2023-04-10 11:17:48 -06:00
Miss Islington (bot) 0f6319fc8c
gh-97797: Mention `__metadata__` in docstrings of `typing.{_AnnotatedAlias, Annotated}` (GH-103405)
(cherry picked from commit dc604a8c58)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Kirill <80244920+Eclips4@users.noreply.github.com>
2023-04-10 08:21:45 -07:00
Miss Islington (bot) 4e284ffa2e
gh-103395: Improve `typing._GenericAlias.__dir__` coverage (GH-103396)
(cherry picked from commit a28e2ce3fb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-04-10 04:37:40 -07:00
Miss Islington (bot) da3b77b828
CI: Do not allow merge if labelled DO-NOT-MERGE (GH-103337)
(cherry picked from commit 090e26ea80)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-09 00:01:49 -07:00
Miss Islington (bot) 4fa5fda14b
gh-103242: Migrate SSLContext.set_ecdh_curve not to use deprecated APIs (GH-103378)
Migrate `SSLContext.set_ecdh_curve()` not to use deprecated OpenSSL APIs.
(cherry picked from commit 35167043e3)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2023-04-08 11:21:27 -07:00
Miss Islington (bot) 77359a86b8
gh-103373: Improve documentation for `__mro_entries__` (GH-103374)
(cherry picked from commit 0ba0ca05d2)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-04-08 07:16:43 -07:00
Miss Islington (bot) 7b03d0f7c5
gh-100574: add examples/links to the `strptime`/`strftime` docs (GH-100575)
(cherry picked from commit 3310b94d3d)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2023-04-08 01:56:31 -07:00
Miss Islington (bot) 31bec9198b
Docs: use Node.findall to avoid a deprecation warning (GH-99403)
(cherry picked from commit 1e9dfdacef)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-04-08 01:24:27 -07:00
Miss Islington (bot) b4f3318207
gh-75729: Fix os.spawn tests not handling spaces on Windows (GH-99150)
* Quote paths in os.spawn tests on Windows so they work with spaces

* Add NEWS entry for os spawn test fix

* Fix code style to avoid double negative in os.spawn tests

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

---------

(cherry picked from commit a34c796238)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-04-08 01:03:58 -07:00
Miss Islington (bot) 29a1e89c9f
gh-103329: Add regression test for PropertyMock with side effect (GH-103358)
(cherry picked from commit 26c65980dc)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2023-04-08 00:01:20 -07:00
Miss Islington (bot) 70bc8c936d
[3.11] GH-88013: Fix TypeError raised by ntpath.realpath in some cases (GH-102813, GH-103343)
(cherry picked from commit 4dc339b4d6)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Barney Gale <barney.gale@gmail.com>
2023-04-07 21:38:56 +01:00
Miss Islington (bot) b8d1623f73
gh-103272: regression test for getattr exception in property (GH-103336)
(cherry picked from commit 5d7d86f2fd)

Co-authored-by: sunmy2019 <59365878+sunmy2019@users.noreply.github.com>
2023-04-07 12:36:10 -07:00
Miss Islington (bot) 1b1f0164cb
gh-74690: Add more tests for runtime-checkable protocols (GH-103347)
(cherry picked from commit 800382a2b0)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-04-07 10:47:49 -07:00
Łukasz Langa ecb09a8496
[3.11] bpo-46523: fix tests rerun when `setUp[Class|Module]` fails (GH-30895) (GH-103342)
(cherry picked from commit 995386071f)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-04-07 19:35:16 +02:00
Miss Islington (bot) 8740fd855c
gh-103256: Fix hmac algorithm to support fallback implementation (gh-103286)
(cherry picked from commit efb0a2cf3a)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-04-06 19:27:46 -07:00
Miss Islington (bot) bbe04d9d1c
gh-103266: Fix a typo in example code for bisect() function (GH-103267)
(cherry picked from commit f0424ba4b6)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-04-06 17:45:07 -07:00
Miss Islington (bot) 123680f9aa
[3.11] GH-102700: allow built-in modules to be submodules (GH-103162) (GH-103322)
GH-102700: allow built-in modules to be submodules (GH-103162)
(cherry picked from commit 5d08c3ff7d)

Co-authored-by: Brett Cannon <brett@python.org>
2023-04-06 16:06:02 -07:00
Ethan Furman 58e330ac9c
[3.11] gh-93910: [Enum] remove member.member deprecation (GH-103236) (GH-103299)
i.e. Color.RED.BLUE is now officially supported..
(cherry picked from commit 4ec8dd10bd)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-04-05 21:29:14 -07:00
Ned Deily 0291397c57
[3.11] gh-103207: Fix Welcome formatting issues when macOS Installer is run in dark mode. (GH-103302) 2023-04-05 23:43:19 -04:00
Miss Islington (bot) 851e74441e
gh-99069: Consolidate checks for static_assert (GH-94766)
Several platforms don't define the static_assert macro despite having
compiler support for the _Static_assert keyword. The macro needs to be
defined since it is used unconditionally in the Python code. So it
should always be safe to define it if undefined and not in C++11 (or
later) mode.

Hence, remove the checks for particular platforms or libc versions,
and just define static_assert anytime it needs to be defined but isn't.
That way, all platforms that need the fix will get it, regardless of
whether someone specifically thought of them.

Also document that certain macOS versions are among the platforms that
need this.

The C2x draft (currently expected to become C23) makes static_assert
a keyword to match C++. So only define the macro for up to C17.

(cherry picked from commit 96e1901a59)

Co-authored-by: Joshua Root <jmr@macports.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2023-04-05 08:44:13 -07:00
Miss Islington (bot) 09fb27fa51
gh-102899: Fix doc link for getting filesystem error handler (GH-102901)
(cherry picked from commit fdd0fff277)

Co-authored-by: Olivier Gayot <olivier.gayot@sigexec.com>
2023-04-05 08:03:47 -07:00
Miss Islington (bot) 9357fc9b89
gh-81762: Clarify and simplify description of print's flush param (GH-103264)
(cherry picked from commit c396b6ddf3)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-05 04:49:08 -07:00
Pablo Galindo bd769d7d91 Merge remote-tracking branch 'upstream/3.11' into 3.11 2023-04-05 12:16:29 +01:00
Pablo Galindo ff844aa16e Post 3.11.3 2023-04-05 12:16:08 +01:00
Miss Islington (bot) 6258c3cd53
Improve some grammar in the socket docs (GH-103254)
(cherry picked from commit bceb9e00ad)

Co-authored-by: Tim Burke <tim.burke@gmail.com>
2023-04-04 15:54:37 -07:00
Pablo Galindo f3909b8bc8 Python 3.11.3 2023-04-04 23:22:17 +01:00
Ned Deily 6abd0486bb
[3.11] gh-103207: Add instructions to the macOS installer welcome display on how to workaround the macOS 13 Ventura “The installer encountered an error” failure. GH-103252) 2023-04-04 16:43:54 -04:00
Miss Islington (bot) 5342f5e713
gh-102549: [Enum] fail enum creation when data type raises in __init__ (GH-103149)
(cherry picked from commit 2a4d8c0a9e)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-04-03 16:01:31 -07:00
Miss Islington (bot) cf72cc25f6
gh-98298, gh-74730: [Enum] update docs (GH-103163)
fix FlagBoundary statements
add warning about reloading modules and enum identity
(cherry picked from commit 5ffc1e5a21)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-04-03 15:27:33 -07:00
Miss Islington (bot) 823622212e
gh-102994: Profile docs has typo in example (GH-103074)
(cherry picked from commit 55decb72c4)

Co-authored-by: Nouran Ali <nouranalimohammed@gmail.com>
2023-04-02 15:52:11 -07:00
Miss Islington (bot) 0854bdf15f
gh-103109: Document ignore_warnings() test support helper (GH-103110)
(cherry picked from commit 32937d6aa4)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-04-02 15:42:43 -07:00
Miss Islington (bot) 4664a7cf68
Quote literal tokens in standard format specifier grammar (GH-102902)
Reported by Damian Dureck: https://mail.python.org/archives/list/docs@python.org/thread/UZTWBJIXC3MBKTHXVTIBPGDPKBNWZ5LN/
(cherry picked from commit f6405a4662)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-03-31 05:52:52 -07:00
Miss Islington (bot) 41e3ea1396
Minor docs improvements fix for `codeop` (GH-103123)
(cherry picked from commit c1e71ce56f)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
2023-03-30 15:58:54 -07:00
Miss Islington (bot) 1b40618247
gh-103099: Link mypy docs from typing.rst (GH-103100)
(cherry picked from commit fda95aa194)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-03-30 01:39:49 -07:00
Miss Islington (bot) ae42c1d168
[3.11] gh-103112: Add http.client.HTTPResponse.read docstring and fix pydoc output (GH-103113) (#103119)
(cherry picked from commit d052a383f1)

Co-authored-by: Bernhard Wagner <github.comNotification20120125@xmlizer.net>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Éric <merwok@netwok.org>
2023-03-29 18:30:03 -04:00
Steve Dower cbe14c87c6
gh-103097: Add workaround for Windows ARM64 compiler bug (GH-103098)
See https://developercommunity.visualstudio.com/t/Regression-in-MSVC-1433-1434-ARM64-co/10224361 for details of the issue. It only applies to version 14.34.
2023-03-29 15:33:29 +01:00
Miss Islington (bot) d189e2db0b
[3.11] gh-102582: Fix invalid JSON in Doc/howto/logging-cookbook.rst (GH-102635) (GH-103106)
(cherry picked from commit d835b3f05d)

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
2023-03-29 10:04:53 +01:00
Miss Islington (bot) 766038d995
gh-103054: typing: Improve `Callable` type substitution tests (GH-103055)
(cherry picked from commit 60bdc16b45)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Eclips4 <80244920+Eclips4@users.noreply.github.com>
2023-03-28 20:28:34 -07:00
Miss Islington (bot) abd6e97020
[3.11] GH-102711: Fix warnings found by clang (GH-102712) (#103075)
There are some warnings if build python via clang:

Parser/pegen.c:812:31: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_clear_memo_statistics()
                              ^
                               void

Parser/pegen.c:820:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
_PyPegen_get_memo_statistics()
                            ^
                             void

Fix it to make clang happy.

(cherry picked from commit 7703def37e)

Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>
Co-authored-by: Chenxi Mao <chenxi.mao@suse.com>
2023-03-28 11:27:30 +02:00
Miss Islington (bot) 5ba5ce47f6
gh-102558: [Enum] better handling of non-Enum EnumType classes (GH-103060)
(cherry picked from commit f4ed2c6ae5)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-03-27 16:49:15 -07:00
Miss Islington (bot) 13df5d3497
[3.11] GH-95494: Fix transport EOF handling in OpenSSL 3.0 (GH-95495) (#103006)
GH-25309 enabled SSL_OP_IGNORE_UNEXPECTED_EOF by default, with a comment
that it restores OpenSSL 1.1.1 behavior, but this wasn't quite right.
That option causes OpenSSL to treat transport EOF as the same as
close_notify (i.e. SSL_ERROR_ZERO_RETURN), whereas Python actually has
distinct SSLEOFError and SSLZeroReturnError exceptions. (The latter is
usually mapped to a zero return from read.) In OpenSSL 1.1.1, the ssl
module would raise them for transport EOF and close_notify,
respectively. In OpenSSL 3.0, both act like close_notify.

Fix this by, instead, just detecting SSL_R_UNEXPECTED_EOF_WHILE_READING
and mapping that to the other exception type.

There doesn't seem to have been any unit test of this error, so fill in
the missing one. This had to be done with the BIO path because it's
actually slightly tricky to simulate a transport EOF with Python's fd
based APIs. (If you instruct the server to close the socket, it gets
confused, probably because the server's SSL object is still referencing
the now dead fd?)
(cherry picked from commit 420bbb783b)

Co-authored-by: David Benjamin <davidben@google.com>
2023-03-27 16:14:01 +02:00
Max Bachmann b28f919007
[3.11] gh-102281: Fix potential nullptr dereference + use of uninitia… (#103040)
[3.11] gh-102281: Fix potential nullptr dereference + use of uninitialized memory (gh-102282)
(cherry picked from commit afa6092ee4)
2023-03-25 16:35:00 -07:00
Miss Islington (bot) e1094c6e6a
Update pdb docs for arguments (GH-102965)
(cherry picked from commit 027223db96)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
2023-03-25 14:42:28 -07:00
Miss Islington (bot) aae91fa63c
[3.11] gh-103025: fix a ctypes doc typo (GH-103026) (#103029)
* gh-103025: fix two ctypes doc issues  (GH-103026)
(cherry picked from commit 0708437ad0)

Co-authored-by: Peter Jiping Xie <peter.jp.xie@gmail.com>
2023-03-25 10:00:44 +00:00
Hugo van Kemenade 85c686a1a5
[3.11] gh-101100: Document PyObject_ClearWeakRefs, gzip's name, and asyncio.iscoroutine (#103001) 2023-03-25 09:43:52 +02:00
Miss Islington (bot) a08b65faa0
gh-102980: Add tests for pdf's display, alias and where commands (GH-102981)
(cherry picked from commit ded9a7fc19)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
2023-03-24 14:17:20 -07:00
Miss Islington (bot) c834a4c713
gh-102873: logging.LogRecord docs: improve description of `msg` parameter (GH-102875)
(cherry picked from commit f2e5a6ee62)

Co-authored-by: Amin Alaee <mohammadamin.alaee@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-24 08:08:48 -07:00