Commit graph

112318 commits

Author SHA1 Message Date
Miss Islington (bot)
581dd8caba
[3.10] gh-102027: Fix macro name (GH-102124) (#102917)
gh-102027: Fix macro name (GH-102124)

This fixes the ssse3 / sse2 detection when sse4 is available.

(cherry picked from commit ea93bde4ec)

Co-authored-by: Max Bachmann <kontakt@maxbachmann.de>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-03-24 13:40:32 +01:00
Miss Islington (bot)
0a2b63f6ad
[3.10] gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (GH-96932) (#102919)
gh-96931: Fix incorrect results in ssl.SSLSocket.shared_ciphers (GH-96932)
(cherry picked from commit af9c34f6ef)

Co-authored-by: Benjamin Fogle <benfogle@gmail.com>
2023-03-24 13:33:32 +01:00
Miss Islington (bot)
206c2b1b12
GH-100989: Revert Improve the accuracy of collections.deque docstrings (GH-102979)
(cherry picked from commit 7f01a11199)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2023-03-23 18:10:34 -07:00
Miss Islington (bot)
77e54fe98a
gh-98239: Document that inspect.getsource() can raise TypeError (GH-101689)
(cherry picked from commit b6132085ca)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-03-23 12:41:50 -07:00
Miss Islington (bot)
6c667d025a
gh-102936: typing: document performance pitfalls of protocols decorated with @runtime_checkable (GH-102937)
(cherry picked from commit 58d2b30c01)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-23 11:28:11 -07:00
Alex Waygood
4531fd0cea
[3.10] gh-102947: Improve traceback when calling fields() on a non-dataclass (#102948) (#102954) 2023-03-23 15:13:05 +00:00
Miss Islington (bot)
100da7c31a
gh-100989: Improve the accuracy of collections.deque docstrings (GH-100990)
(cherry picked from commit c74073657e)

Co-authored-by: Timo Ludwig <ti.ludwig@web.de>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-22 05:39:45 -07:00
Miss Islington (bot)
3c2a7bb6b5
Docs: improve accuracy of sqlite3.Connection.interrupt() (GH-102904)
(cherry picked from commit 7b2d53dacc)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-22 04:59:56 -07:00
Miss Islington (bot)
2e0505a1d9
Docs: improve the accuracy of the sqlite3.connect() timeout param (GH-102900)
(cherry picked from commit c24f1f1e87)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-22 04:49:32 -07:00
Miss Islington (bot)
00b50606c0
Docs: improve accuracy of pdb alias example (GH-102892)
(cherry picked from commit e0c63b7267)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
2023-03-22 04:41:54 -07:00
Miss Islington (bot)
eaafea86a0
gh-102595: Document PyObject_Format c-api function (GH-102596)
(cherry picked from commit 910a64e301)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Def: https://github.com/python/cpython/blame/5ffdaf748d98da6065158534720f1996a45a0072/Include/abstract.hGH-L389
2023-03-22 02:32:08 -07:00
Miss Islington (bot)
21b94028ef
Add link to sys.exit function documentation (GH-102805)
* Add link to `sys.exit` function documentation

* Update Doc/library/os.rst

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>

* Update Doc/library/os.rst

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>

---------

(cherry picked from commit 41ef502d74)

Co-authored-by: David Poirier <1152277+david-poirier@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-21 15:05:32 -07:00
Miss Islington (bot)
d5fdc3f07e
gh-98608: Fix Failure-handling in new_interpreter() (gh-102658)
The error-handling code in new_interpreter() has been broken for a while.  We hadn't noticed because those code mostly doesn't fail.  (I noticed while working on gh-101660.)  The problem is that we try to clear/delete the newly-created thread/interpreter using itself, which just failed.  The solution is to switch back to the calling thread state first.

(cherry picked from commit d1b883b52a)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
https: //github.com/python/cpython/issues/98608
2023-03-21 12:10:36 -07:00
Nikita Sobolev
e732a85934
[3.10] gh-102721: Improve coverage of _collections_abc._CallableGenericAlias (GH-102790)
This is a manual backport of https://github.com/python/cpython/pull/102722 but without `typing.py` changes and without `TypeVarTuple` case, because it was added in 3.11

Automerge-Triggered-By: GH:AlexWaygood
2023-03-17 13:11:58 -07:00
Steve Dower
744a41bf49
Increase stack reserve size for Windows debug builds to avoid test crashes (GH-102776) 2023-03-17 11:37:56 +00:00
Miss Islington (bot)
99b38bebfd
[3.10] Fix outdated note about 'int' rounding or truncating (GH-102736) (#102767)
Fix outdated note about 'int' rounding or truncating (GH-102736)
(cherry picked from commit 405739f916)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
2023-03-16 20:43:03 +00:00
Miss Islington (bot)
97812403bf
gh-94440: Fix issue of ProcessPoolExecutor shutdown hanging (GH-94468)
Fix an issue of concurrent.futures ProcessPoolExecutor shutdown hanging.

(cherry picked from commit 2dc94634b5)

Co-authored-by: yonatanp <yonatan.perry@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-15 22:08:11 -07:00
Miss Islington (bot)
bef189b5c7
gh-101100: Documenting --prefix and --exec-prefix. (GH-102695)
(cherry picked from commit 61b9ff35cb)

Co-authored-by: Julien Palard <julien@palard.fr>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-03-15 15:14:00 -07:00
Hugo van Kemenade
087fb56b9d
[3.10] Remove misformatted exclamation marks in docs (GH-102694) (#102717)
Remove the exclamation mark from :program:`!foo` in .rst files because
it inadvertently shows up in the rendered HTML.

(Sphinx's cross-referencing roles use a '!' prefix to suppress
hyperlinking[1], but :program: is not a cross-referencing role so the
'!' is displayed verbatim.)

The exclamation marks in venv.rst were introduced in #98350. See
comments [2] and [3] for additional discussion.

[1]: https://www.sphinx-doc.org/en/master/usage/restructuredtext/roles.html#cross-referencing-syntax
[2]: https://github.com/python/cpython/pull/98350#issuecomment-1285965759
[3]: https://github.com/python/cpython/pull/98350#issuecomment-1286394047

Reported-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Tom Levy <tomlevy93@gmail.com>
2023-03-15 09:26:46 +02:00
Miss Islington (bot)
6f4df729bd
gh-101377: improving test_locale_calendar_formatweekday of calendar (GH-101378)
---------

(cherry picked from commit 5e0865f22e)

Co-authored-by: Andre Hora <andrehora@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-03-14 19:59:49 -07:00
Miss Islington (bot)
95fd2dfd3f
gh-102703: Fix typo in modules tutorial documentation (GH-102707)
**Before**
This prevents directories with a common name, such as ``string``, unintentionally hiding ...
**After**
This prevents directories with a common name, such as ``string``, from unintentionally hiding ...
(cherry picked from commit 0a539b5db3)

Co-authored-by: Robert Prater (B. Eng) <robcprater@gmail.com>
2023-03-14 17:10:39 -07:00
Miss Islington (bot)
df38f7c577
[3.10] gh-102354: change python3 to python in docs examples (GH-102696) (#102698)
gh-102354: change python3 to python in docs examples (GH-102696)
(cherry picked from commit 80abd62647)

Co-authored-by: Paul Watson <paul.hermeneutic@gmail.com>
2023-03-14 12:52:27 -06:00
Miss Islington (bot)
2c015a674d
gh-100315: clarification to __slots__ docs. (GH-102621)
refer to tp_itemsize in discussion on "variable-length" built-in types
(cherry picked from commit 88c262c086)

Co-authored-by: T <tnie@tuta.io>
2023-03-14 02:30:28 -07:00
Miss Islington (bot)
125f75cc13
doc: Remove a duplicate 'versionchanged' in library/asyncio-task (gh-102677)
(cherry picked from commit 7bdb331b67)

Co-authored-by: Joongi Kim <me@daybreaker.info>
2023-03-13 19:26:24 -07:00
Miss Islington (bot)
0275b12a0f
gh-102627: Replace address pointing toward malicious web page (GH-102630)
* Replace known bad address pointing toward a malicious web page.

(cherry picked from commit 61479d4684)

Co-authored-by: Blind4Basics <32236948+Blind4Basics@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-03-13 15:42:37 -07:00
Alex Waygood
83ccaf2c09
[3.10] Fix duplicated words in the docs (#102645)
(cherry-picked from commit f6ca71a)

With grep utility found some duplicated words

Co-authored-by: Виталий Дмитриев <vitaldmit@bk.ru>
2023-03-13 14:31:25 +00:00
Irit Katriel
d4f8fafd2d
[3.10] GH-101673: Fix pdb bug where local variable changes are lost after longlist (#101674) (#102633)
GH-101673: Fix pdb bug where local variable changes are lost after longlist (#101674)

(cherry picked from commit 5d677c556f)

Co-authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
2023-03-13 14:24:01 +00:00
Miss Islington (bot)
5e10479ede
Fix broken link to MSDN (GH-102355)
(cherry picked from commit 9a8b66b58c)

Co-authored-by: 谭九鼎 <109224573@qq.com>
2023-03-13 06:41:01 -07:00
Miss Islington (bot)
a01ad527e7
gh-101100: Fix Sphinx warnings in turtle module (GH-102340)
(cherry picked from commit 78e4e6c3d7)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2023-03-13 04:11:34 -07:00
Miss Islington (bot)
5bdcb08250
GH-102537: Handle check for PYTHONTZPATH failing in zoneinfo test (GH-102538)
It is possible but unlikely for the `python_tzpath_context` function to fail between the start of the `try` block and the point where `os.environ.get` succeeds, in which case `old_env` will be undefined. In this case, we want to take no action.

Practically speaking this will really only happen in an error condition anyway, so it doesn't really matter, but we should probably do it right anyway.
(cherry picked from commit 64bde502cf)

Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
2023-03-13 04:11:09 -07:00
Miss Islington (bot)
281078794f
gh-102433: Add tests for how classes with properties interact with isinstance() checks on typing.runtime_checkable protocols (GH-102449)
(cherry picked from commit 5ffdaf748d)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Carl Meyer <carl@oddbird.net>
2023-03-10 17:45:40 -08:00
Miss Islington (bot)
7276ee0d12
gh-101100: Fix sphinx warnings in zipapp and zipfile modules (GH-102526)
(cherry picked from commit 1f557f94c2)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-03-08 00:44:34 -08:00
Miss Islington (bot)
c4fb41816f
[3.10] GH-102397: Fix segfault from race condition in signal handling (GH-102399) (#102527)
GH-102397: Fix segfault from race condition in signal handling (GH-102399)
(cherry picked from commit 1a84cc007e)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-03-08 13:51:13 +05:30
Miss Islington (bot)
5e6351c1fb
[3.10] gh-101759: Update macOS installer SQLite 3.40.1 checksum (gh-102485) (GH-102489)
(cherry picked from commit f9cdeb7b99)

Co-authored-by: Ned Deily <nad@python.org>
2023-03-06 20:32:53 -05:00
Miss Islington (bot)
4248c24b41
Add gettext support to tools/extensions/c_annotations.py (GH-101989)
(cherry picked from commit d959bcd4a0)

Co-authored-by: Rémi Lapeyre <remi.lapeyre@lenstra.fr>
2023-03-06 13:53:24 -08:00
Pablo Galindo Salgado
6b49cc64a4
[3.10] gh-102416: Do not memoize incorrectly loop rules in the parser (GH-102467). (#102474) 2023-03-06 16:59:16 +00:00
Alex Waygood
f5280e2ed8
[3.10] gh-102444: Fix minor bugs in test_typing highlighted by pyflakes (#102445) (#102452)
(cherry picked from commit 96e1022)
2023-03-05 22:16:08 +00:00
Miss Islington (bot)
9cec6022e4
GH-102341: Improve the test function for pow (GH-102342)
(cherry picked from commit 32220543e2)

Co-authored-by: Partha P. Mukherjee <ppm.floss@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-03-05 09:53:50 -08:00
Miss Islington (bot)
94e08e174d
Fix unused classes in a typing test (GH-102437)
As part of investigation issue https://github.com/python/cpython/issues/102433, I discovered what I believe to be an error where two classes `CI` and `DI` are not being used. The assertions beneath them act on `C` and `D`, duplicating existing assertions in this test.
(cherry picked from commit 7894bbe94b)

Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Automerge-Triggered-By: GH:AlexWaygood
2023-03-05 07:37:33 -08:00
Miss Islington (bot)
2a062f2759
gh-101979: argparse: fix a bug where parentheses in metavar argument of add_argument() were dropped (GH-102318)
(cherry picked from commit 9a478be1a4)

Co-authored-by: Yeojin Kim <yeojin.dev@gmail.com>
2023-03-05 07:16:14 -08:00
Miss Islington (bot)
d4a04e55d8
gh-102356: Add thrashcan macros to filter object dealloc (GH-102426)
Add thrashcan macros to the deallocator of the filter objects to protect against deeply nested destruction of chains of nested filters.
(cherry picked from commit 66aa78cbe6)

Co-authored-by: Marta Gómez Macías <mgmacias@google.com>
2023-03-05 03:20:41 -08:00
Miss Islington (bot)
d4992c7315
gh-101992: update pstlib module documentation (GH-102133)
(cherry picked from commit e4609cbe4c)

Co-authored-by: Dustin Rodrigues <dust.rod@gmail.com>
2023-03-04 22:36:07 -08:00
Miss Islington (bot)
925ebfbfd2
[3.10] gh-102179: Fix os.dup2 error reporting for negative fds (GH-102180) (#102419)
* gh-102179: Fix `os.dup2` error reporting for negative fds (GH-102180)
(cherry picked from commit c2bd55d26f)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2023-03-04 20:57:32 +05:30
Oleg Iarygin
fe36778968
[3.10] gh-101892: Fix SystemError when a callable iterator call exhausts the iterator (GH-101896) (#102422)
gh-101892: Fix `SystemError` when a callable iterator call exhausts the iterator (#101896)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
(cherry picked from commit 705487c655)

Co-authored-by: Raj <51259329+workingpayload@users.noreply.github.com>
2023-03-04 20:56:12 +05:30
Kumar Aditya
6c2e052ee0
[3.10] GH-102126: fix deadlock at shutdown when clearing thread state… (#102235)
[3.10] GH-102126: fix deadlock at shutdown when clearing thread states (GH-102222).
(cherry picked from commit 5f11478ce7)
2023-03-03 18:44:30 +05:30
Miss Islington (bot)
3d88b4e51a
gh-101754: Document that Windows converts keys in os.environ to uppercase (GH-101840)
(cherry picked from commit 4e7c0cbf59)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2023-03-03 02:58:30 -08:00
Alex Waygood
47cc6fac4b
[3.10] Fix typos in documentation and comments (GH-102374) (#102377)
Fix typos in documentation and comments (GH-102374)

Found some duplicate `to`s in the documentation and some code comments and fixed them.

[Misc/NEWS.d/3.12.0a1.rst](ed55c69ebd/Misc/NEWS.d/3.12.0a1.rst) also contains two duplicate `to`s, but I wasn't sure if it's ok to touch that file.  Looks auto generated.  I'm happy to amend the PR if requested. :)

Automerge-Triggered-By: GH:AlexWaygood

Co-authored-by: Michael K <michael-k@users.noreply.github.com>
2023-03-02 16:45:01 +00:00
Hugo van Kemenade
a8f9a82881
[3.10] gh-90744: Fix erroneous doc links in the sys module (GH-101319) (#102322)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Brad Wolfe <brad.wolfe@gmail.com>
Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Fix erroneous doc links in the sys module (#101319)
2023-03-02 07:43:50 +02:00
Miss Islington (bot)
2701a49df2
IDLE: Simplify DynOptionsMenu __init__code (GH-101371)
Refactor DynOptionMenu's initializer to not copy  kwargs dict and use subscripting;
improve its htest.

(cherry picked from commit c41af812c9)

Co-authored-by: JosephSBoyle <48555120+JosephSBoyle@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-02-27 22:36:34 -08:00
Miss Islington (bot)
ca1cc1484f
gh-102296 Document that inspect.Parameter kinds support ordering (GH-102297)
(cherry picked from commit 0db6f44259)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
Automerge-Triggered-By: GH:AlexWaygood
2023-02-27 07:22:07 -08:00