Commit graph

119166 commits

Author SHA1 Message Date
Miss Islington (bot)
c784b3e8fc
[3.12] gh-85453: Make numeric literals consistent across datetime.rst (GH-118245) (#118248)
Remove code formatting from remaining numeric literals.
(cherry picked from commit 59a4d52973)

Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
2024-04-24 20:27:19 +00:00
Miss Islington (bot)
0049e2bd38
[3.12] gh-85453: Adapt datetime.rst to devguide recommendations for code snippets and variables (GH-118068) (#118244)
Also remove formatting from numeric literals.

(cherry picked from commit 809aa9a682)

Co-authored-by: edson duarte <eduarte.uatach@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2024-04-24 20:02:53 +00:00
Miss Islington (bot)
0691bd860d
[3.12] gh-118013: Use weakrefs for the cache key in inspect._shadowed_dict (GH-118202) (#118232)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-24 15:27:08 +00:00
Petr Viktorin
f86b17ac51
[3.12] gh-113171: gh-65056: Fix "private" (non-global) IP address ranges (GH-113179) (GH-113186) (GH-118177)
* GH-113171: Fix "private" (non-global) IP address ranges (GH-113179)

The _private_networks variables, used by various is_private
implementations, were missing some ranges and at the same time had
overly strict ranges (where there are more specific ranges considered
globally reachable by the IANA registries).

This patch updates the ranges with what was missing or otherwise
incorrect.

100.64.0.0/10 is left alone, for now, as it's been made special in [1].

The _address_exclude_many() call returns 8 networks for IPv4, 121
networks for IPv6.

[1] https://github.com/python/cpython/issues/61602

* GH-65056: Improve the IP address' is_global/is_private documentation (GH-113186)

It wasn't clear what the semantics of is_global/is_private are and, when
one gets to the bottom of it, it's not quite so simple (hence the
exceptions listed).

(cherry picked from commit 2a4cbf17af)
(cherry picked from commit 40d75c2b7f)

---------

Co-authored-by: Jakub Stasiak <jakub@stasiak.at>
2024-04-24 14:29:30 +02:00
Miss Islington (bot)
2eaf9ba9ce
[3.12] bpo-40944: Fix IndexError when parse emails with truncated Message-ID, address, routes, etc (GH-20790) (GH-117974)
(cherry picked from commit 1aa8bbe62f)

Co-authored-by: Ivan Savin <acccko@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-04-23 20:50:43 +03:00
Miss Islington (bot)
4d34b7f201
[3.12] Fix typo in py_compile.rst (GH-118102) (GH-118191)
(cherry picked from commit 0d221e9a19)

Co-authored-by: Animesh Kumar <animesh0721@gmail.com>
2024-04-23 17:22:19 +00:00
Miss Islington (bot)
30e25d4ff9
[3.12] gh-118168: Fix Unpack interaction with builtin aliases (GH-118169) (#118178)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-23 13:57:36 +00:00
Miss Islington (bot)
fbe29e639d
[3.12] gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242) (GH-117508)
* gh-59215: unittest: restore _top_level_dir at end of discovery (GH-15242)
(cherry picked from commit fc5f68e58e)


Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2024-04-23 12:41:32 +00:00
Miss Islington (bot)
30725f0ad2
[3.12] gh-116741: Upgrade libexpat to 2.6.2 (GH-117296) (GH-118166)
gh-116741: Upgrade libexpat to 2.6.2 (GH-117296)

Upgrade libexpat to 2.6.2
(cherry picked from commit c9829eec08)

Co-authored-by: Seth Michael Larson <seth@python.org>
2024-04-23 01:30:59 +00:00
Serhiy Storchaka
8ae70c8761
[3.12] gh-117968: Add tests for the part of the PyRun family of the C API (GH-117982) (GH-118011)
(cherry picked from commit 6078f2033e)

Co-authored-by: NGRsoftlab <78017794+NGRsoftlab@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-04-22 18:59:28 +00:00
Miss Islington (bot)
c869f4ed5c
[3.12] gh-118030: Group definitions for ParamSpecArgs and ParamSpecKwargs in typing.rst (GH-118154) (#118155)
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-04-22 15:04:11 +00:00
Miss Islington (bot)
312d8192f3
[3.12] gh-118148: Improve tests for shutil.make_archive() (GH-118149) (GH-118151)
(cherry picked from commit 287d939ed4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-04-22 13:43:34 +00:00
Miss Islington (bot)
b1e5f2746d
[3.12] gh-115986 Improve pprint documentation accuracy (GH-117403) (#118146)
(cherry picked from commit ceb6038b05)

Co-authored-by: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-22 10:34:48 +00:00
Miss Islington (bot)
9ddaf75a4c
[3.12] gh-117995: Don't raise DeprecationWarnings for indexed nameless params (GH-118001) (#118142)
Filter out '?NNN' placeholders when looking for named params.

(cherry picked from commit 550483b7e6)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
2024-04-22 06:58:41 +00:00
Miss Islington (bot)
6d87cb494b
[3.12] Docs: replace Harry Potter reference with Monty Python (GH-118130) (#118135)
Docs: replace Harry Potter reference with Monty Python (GH-118130)
(cherry picked from commit 1446024124)

Co-authored-by: Clément Robert <cr52@protonmail.com>
2024-04-21 18:10:15 +00:00
Nikita Sobolev
e3671ead94
[3.12] gh-118121: Fix test_doctest.test_look_in_unwrapped (#118122) (#118129) 2024-04-21 07:41:54 +00:00
Miss Islington (bot)
4d85f0ae76
[3.12] Clarifying nonlocal doc: SyntaxError is raised if nearest enclosing scope is global (GH-114009) (#118128)
Clarifying nonlocal doc: SyntaxError is raised if nearest enclosing scope is global (GH-114009)
(cherry picked from commit 1558d99316)

Co-authored-by: Quazi Irfan <quazirfan@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-21 01:50:01 +00:00
Miss Islington (bot)
23192aba20
[3.12] GH-115874: Fix segfault in FutureIter_dealloc (GH-118114)
GH-115874: Fix segfault in FutureIter_dealloc (GH-117741)
(cherry picked from commit d8f350309d)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-04-19 22:53:18 +00:00
Miss Islington (bot)
ecb8e2bdac
[3.12] gh-118100: Improve links in ast.rst (GH-118101) (#118110)
gh-118100: Improve links in `ast.rst` (GH-118101)
(cherry picked from commit 2aa11cca11)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-04-19 18:34:55 +00:00
Alex Waygood
5430f61437
[3.12] gh-114053: Fix bad interaction of PEP-695, PEP-563 and `get_type_hints` (#118009) (#118104)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-19 13:41:28 +00:00
Miss Islington (bot)
6584ad9aa7
[3.12] gh-88035: update doc-string of epoch in timemodule.c (GH-118076) (GH-118097)
Follow GH-88035, update doc-string of epoch in timemodule.c

The epoch is `January 1st, 1970 on all platforms`, according to
current documentation.
(cherry picked from commit 7c6cc00211)

Co-authored-by: lit <litlighilit@foxmail.com>
2024-04-19 11:44:59 +00:00
Miss Islington (bot)
26c659ecbd
[3.12] gh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at() (GH-25384) (GH-118046)
gh-87969: Align docs and docstrings with implementation for ctypes' [w]string_at() (GH-25384)

The implementation uses 'ptr' for the name of the first parameter of
ctypes.string_at() and ctypes.wstring_at(). Align docs and docstrings
with the naming used in the implementation.

(cherry picked from commit 81a926bd20)

Co-authored-by: Shreyan Avigyan <shreyan.avigyan@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2024-04-19 13:23:26 +02:00
Miss Islington (bot)
f278b8fefc
[3.12] gh-116935: Document that heap types need to support garbage collection (GH-118021) (GH-118092)
gh-116935: Document that heap types need to support garbage collection (GH-118021)
(cherry picked from commit 5d54436574)

Co-authored-by: Savannah Ostrowski <savannahostrowski@gmail.com>
2024-04-19 11:44:19 +02:00
Miss Islington (bot)
15be34ade8
[3.12] gh-117518: Clarify PyTuple_GetItem() borrowed reference in the doc (GH-117920) (#118087)
gh-117518: Clarify PyTuple_GetItem() borrowed reference in the doc (GH-117920)
(cherry picked from commit 4605a197bd)

Co-authored-by: Victor Stinner <vstinner@python.org>
2024-04-19 10:57:51 +02:00
Miss Islington (bot)
a0f82dd6cc
[3.12] gh-64588: Clarify the difference between mu and xbar in statistics docs (GH-117333) (#118080)
gh-64588: Clarify the difference between mu and xbar in statistics docs (GH-117333)

Thanks Davin Potts for the clarification idea.
(cherry picked from commit fefd5d9711)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2024-04-19 05:42:35 +00:00
Tian Gao
bbb1a8e768
[3.12] gh-117535: Ignore made up file name "sys" for warnings (#118014) 2024-04-19 04:07:05 +00:00
Miss Islington (bot)
632f353d9e
[3.12] Use "Contributed by" in a couple of occurrences of 3.12 whatsnew (GH-118070) (#118078)
Use "Contributed by" in a couple of occurrences of 3.12 whatsnew (GH-118070)
(cherry picked from commit 398abdd6fa)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2024-04-19 03:34:56 +00:00
Miss Islington (bot)
be1fe1149f
[3.12] gh-117503: Fix test for posixpath.expanduser() when pw_dir ends with / (GH-118056) (GH-118058)
(cherry picked from commit ccdcd1d95a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-04-18 17:17:05 +00:00
Miss Islington (bot)
dd8b4d4d37
[3.12] gh-116932: Remove redundant NEWS entry (GH-118040) (#118041)
Co-authored-by: lyc8503 <me@lyc8503.site>
2024-04-18 12:24:43 +00:00
Miss Islington (bot)
aa2fc81ea3
[3.12] Doc: Render version/language selector on Read the Docs (GH-116966) (#118038)
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
2024-04-18 11:40:05 +00:00
Miss Islington (bot)
5af8fcaf05
[3.12] gh-116932: Add note on how to report python documentation theme bugs (GH-117989) (GH-118031)
gh-116932: Add note on how to report python documentation theme bugs (GH-117989)
(cherry picked from commit 468b9aeb92)

Co-authored-by: lyc8503 <me@lyc8503.site>
2024-04-18 08:52:09 +00:00
neonene
9f4ae13d2a
[3.12] gh-117613: Argument Clinic: ensure that defining class params are positional-only (#117939) 2024-04-17 21:11:17 +00:00
Mariusz Felisiak
a72c4a93ef
[3.12] gh-115009: Update Windows installer to use SQLite 3.45.3 (GH-117445) (#118008)
(cherry picked from commit de0dc68b82)
2024-04-17 19:23:58 +00:00
Miss Islington (bot)
859fdee0b6
[3.12] gh-114539: Clarify implicit launching of shells by subprocess (GH-117996) (#118002)
gh-114539: Clarify implicit launching of shells by subprocess (GH-117996)
(cherry picked from commit a4b44d39cd)

Co-authored-by: Steve Dower <steve.dower@python.org>
2024-04-17 19:44:38 +01:00
Miss Islington (bot)
fda8cd1fd3
[3.12] gh-80361: Fix TypeError in email.Message.get_payload() (GH-117994) (GH-117998)
It was raised when the charset is rfc2231 encoded, e.g.:

   Content-Type: text/plain; charset*=ansi-x3.4-1968''utf-8
(cherry picked from commit deaecb88fa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-04-17 16:59:35 +00:00
Miss Islington (bot)
e95a535ea2
[3.12] gh-117977: Amend version changed annotation for os.chmod, os.chown, and os.listdir (GH-117978) (#117992)
(cherry picked from commit fccedbda93)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-04-17 15:05:35 +00:00
Miss Islington (bot)
2b68c81283
[3.12] gh-117975: Ensure flush level is checked when configuring a logging MemoryHandler. (GH-117976) (GH-117986)
(cherry picked from commit 6d0bb43232)
2024-04-17 14:48:09 +01:00
Miss Islington (bot)
c270caf966
[3.12] gh-115009: Update macOS installer to use SQLite 3.45.3 (GH-117443) (#117981)
(cherry picked from commit b9b3c455f0)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2024-04-17 12:27:03 +00:00
Miss Islington (bot)
7e0141e07e
[3.12] gh-71966: Move the module docstring from _pydecimal to decimal (GH-117919) (GH-117962)
Now it is set even if the C implementation is used.

Also add a one-line synopsis.
(cherry picked from commit c69968ff69)
2024-04-17 15:13:21 +03:00
Miss Islington (bot)
c34c962d07
[3.12] gh-117313: Fix re-folding email messages containing non-standard line separators (GH-117369) (GH-117971)
Only treat '\n', '\r' and '\r\n' as line separators in re-folding the email
messages.  Preserve control characters '\v', '\f', '\x1c', '\x1d' and '\x1e'
and Unicode line separators '\x85', '\u2028' and '\u2029' as is.
(cherry picked from commit aec1dac4ef)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-04-17 10:48:56 +00:00
Serhiy Storchaka
96b29b32c1
[3.12] gh-117503: Fix support of non-ASCII user names in posixpath.expanduser() (GH-117504) (GH-117970)
They are now supported in bytes paths as well as in string paths.
(cherry picked from commit 51132da0c4)
2024-04-17 10:43:37 +00:00
Miss Islington (bot)
ac48fdeb0d
[3.12] gh-73231: Update documentation for PyErr_SetFromWindowsErr() (GH-117226) (GH-117973)
(cherry picked from commit 438b7c3071)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-04-17 10:28:55 +00:00
Miss Islington (bot)
0a40580b85
[3.12] gh-117879: Fix test_httpservers for the build with profiling (GH-117932) (GH-117969)
(cherry picked from commit 8429b4565d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-04-17 10:15:22 +00:00
Miss Islington (bot)
95982c983f
[3.12] gh-86650: Fix IndexError when parse emails with invalid Message-ID (GH-117934) (GH-117965)
In particularly, one-off addresses generated by Microsoft Outlook:
https://learn.microsoft.com/en-us/office/client-developer/outlook/mapi/one-off-addresses

(cherry picked from commit f74e51229c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: fsc-eriker <72394365+fsc-eriker@users.noreply.github.com>
2024-04-17 08:03:12 +00:00
Miss Islington (bot)
03108045d2
[3.12] gh-75171: Fix parsing invalid email address headers starting or ending with a dot (GH-15600) (GH-117964)
(cherry picked from commit 8cc9adbfdd)

Co-authored-by: tsufeki <tsufeki@ymail.com>
Co-authored-by: Tim Bell <timothybell@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2024-04-17 07:55:11 +00:00
Miss Islington (bot)
5f4c7cf3f4
[3.12] gh-117945: Fix os.path.ismount() documentation (GH-117947) (#117952)
gh-117945: Fix `os.path.ismount()` documentation (GH-117947)
(cherry picked from commit a23fa3368e)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
2024-04-16 23:02:13 +00:00
Miss Islington (bot)
d9e2126013
gh-112844: Fix xz CPE identifier (GH-117656)
(cherry picked from commit d70ee13e57)

Co-authored-by: Seth Michael Larson <seth@python.org>
2024-04-16 22:20:47 +00:00
Miss Islington (bot)
67dc68141a
[3.12] Docs: Add classes to C API return value annotations (GH-117926) (#117937)
Docs: Add classes to C API return value annotations (GH-117926)
(cherry picked from commit 3284b84c43)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2024-04-16 19:29:52 +03:00
Miss Islington (bot)
aa26dc3c4a
[3.12] gh-117691: Add an appropriate stacklevel for PEP-706 tarfile deprecation warnings (GH-117872) (GH-117930)
gh-117691: Add an appropriate stacklevel for PEP-706 tarfile deprecation warnings (GH-117872)
(cherry picked from commit cff0a2db00)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-16 11:54:01 +00:00
Inada Naoki
2a58923687
gh-77102: site: try utf-8 and locale encoding when reading .pth file (GH-117802)
(cherry picked from commit 6dc661bc9f)
2024-04-16 18:51:06 +09:00