Commit graph

117445 commits

Author SHA1 Message Date
Miss Islington (bot)
e903c16a6c
[3.12] gh-101538: Add experimental wasi-threads build (GH-101537) (#106834)
(cherry picked from commit d8f87cdf94)

Co-authored-by: YAMAMOTO Takashi <yamamoto@midokura.com>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2023-07-18 00:31:17 +02:00
Miss Islington (bot)
941ac1e19d
[3.12] gh-106368: Increase Argument Clinic test coverage for cpp.Monitor (GH-106833) (#106838)
(cherry picked from commit 22379c60ab)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-17 21:20:59 +00:00
Miss Islington (bot)
2eef81e05e
[3.12] gh-106831: Fix NULL check of d2i_SSL_SESSION() result in _ssl.c (GH-106832) (#106835)
gh-106831: Fix NULL check of d2i_SSL_SESSION() result in _ssl.c (GH-106832)
(cherry picked from commit ebf2c56b33)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-17 20:40:15 +00:00
Miss Islington (bot)
497bfd5047
[3.12] gh-106687: _ssl: use uint64_t for SSL options (GH-106700) (#106827)
gh-106687: _ssl: use uint64_t for SSL options (GH-106700)

SSL_CTX_get_options() uses uint64_t for options:
https://www.openssl.org/docs/man3.1/man3/SSL_CTX_get_options.html

Fix this compiler warning on Windows with MSC:

    conversion from 'uint64_t' to 'long', possible loss of data
(cherry picked from commit ad95c7253a)

Co-authored-by: Victor Stinner <vstinner@python.org>
2023-07-17 16:32:17 +00:00
Miss Islington (bot)
11b3d38310
[3.12] gh-106780: Add __match_args__ to tutorial example (GH-106784) (#106819)
Add Point definition with this attribute before example
that needs it.
(cherry picked from commit 7aa89e505d)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-17 04:15:35 -04:00
Miss Islington (bot)
9c00dc02cf
[3.12] Add more recipe tests. Make the factor recipe a bit faster and clearer. (GH-106817) (GH-106818) 2023-07-16 21:47:58 -05:00
Inada Naoki
0afd530505
Doc: fix section levels of devmode doc (GH-106801)
(cherry picked from commit e58960160f)
2023-07-16 21:25:35 +09:00
Miss Islington (bot)
30c8915a19
[3.12] Docs search: Replace jQuery with vanilla JavaScript (GH-106743) (#106802)
Docs search: Replace jQuery with vanilla JavaScript (GH-106743)

* Replace jQuery with vanilla JavaScript
* Switch 'var' to 'const' or 'let'
(cherry picked from commit c02ee45031)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-16 11:38:08 +03:00
Miss Islington (bot)
e4658bf44e
Doc: devmode: add -Xdev option to example (GH-106253)
Doc: devmode: add -Xdev option to example (GH-106253)
(cherry picked from commit 83bd568d2b)

Co-authored-by: Simone Rubino <daemo00@gmail.com>
2023-07-16 16:32:26 +09:00
Miss Islington (bot)
f0df92a9ce
wasm: do not use inline comment in .editorconfig (GH-106610)
It is no longer valid since 0.15.0
https://github.com/editorconfig/specification/blob/v0.15/index.rstGH-no-inline-comments
(cherry picked from commit 64c0890b69)

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2023-07-16 16:10:39 +09:00
Miss Islington (bot)
30c127fcec
[3.12] Docs: Normalize Argument Clinic How-To section capitalization (GH-106788) (#106791)
(cherry picked from commit 8c17729489)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-15 22:43:46 +00:00
Miss Islington (bot)
18d98bacb6
[3.12] Add more examples to the recipe docs (GH-106782) (GH-106783) 2023-07-15 15:09:20 -05:00
Miss Islington (bot)
060f58d877
[3.12] gh-106752: Sync with zipp 3.16.2 (GH-106757) (#106777)
gh-106752: Sync with zipp 3.16.2 (GH-106757)

* gh-106752: Sync with zipp 3.16.2

* Add blurb
(cherry picked from commit 22980dc7c9)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2023-07-15 10:15:24 -04:00
Alex Waygood
e99b69c5ae
[3.12] gh-106745: typing docs: Clarify that removal of PEP-585 aliases is not currently planned (#106748) (#106772) 2023-07-15 11:31:12 +01:00
Miss Islington (bot)
1fe841254e
[3.12] gh-106368: Increase Argument Clinic BlockParser test coverage (GH-106759) (#106769)
(cherry picked from commit 2d7d1aa4bc)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-15 09:55:25 +00:00
Miss Islington (bot)
4f3edd6b53
[3.12] gh-105235: Prevent reading outside buffer during mmap.find() (GH-105252) (#106708)
gh-105235: Prevent reading outside buffer during mmap.find() (GH-105252)

* Add a special case for s[-m:] == p in _PyBytes_Find

* Add tests for _PyBytes_Find

* Make sure that start <= end in mmap.find
(cherry picked from commit ab86426a34)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2023-07-14 22:15:14 -04:00
Jason R. Coombs
30f62748e9
[3.12] gh-106752: Move zipfile._path into its own package (GH-106753) (#106755)
* gh-106752: Move zipfile._path into its own package so it may have supplementary behavior.

* Add blurb.
(cherry picked from commit 03185f0c15)
2023-07-14 21:11:13 +00:00
Miss Islington (bot)
dfdded6beb
[3.12] gh-106634: Corrected minor asyncio doc issues (GH-106671) (#106712)
gh-106634: Corrected minor asyncio doc issues (GH-106671)
(cherry picked from commit 4b4a5b70aa)

Co-authored-by: Chris Brett <chrisbrett665@gmail.com>
2023-07-14 15:10:32 +05:30
Miss Islington (bot)
00eb4355e3
[3.12] gh-106446: Fix failed doctest in stdtypes (GH-106447) (#106741)
(cherry picked from commit 89867d2491)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-14 04:01:35 -04:00
Miss Islington (bot)
e68b280671
[3.12] gh-105626: Change the default return value of HTTPConnection.get_proxy_response_headers (GH-105628) (#106738)
gh-105626: Change the default return value of `HTTPConnection.get_proxy_response_headers` (GH-105628)
(cherry picked from commit 490295d651)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-14 07:21:02 +00:00
Miss Islington (bot)
6a1a660158
[3.12] gh-106368: Increase Argument Clinic test coverage (GH-106728) (#106730)
- improve output_parameter() coverage
- improve coverage for Function.kind
(cherry picked from commit ec45c513d3)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
2023-07-13 22:52:21 +00:00
Miss Islington (bot)
77d9fdf23b
[3.12] gh-106602: [Enum] Add __copy__ and __deepcopy__ (GH-106695)
gh-106602: [Enum] Add __copy__ and __deepcopy__ (GH-106666)
(cherry picked from commit 357e9e9da3)

Co-authored-by: Prince Roshan <princekrroshan01@gmail.com>
2023-07-12 15:47:53 -07:00
Yonatan Bitton
ec7b05a0be
[3.12] gh-96747: Mention the PyPI passlib package in the crypt deprecation doc (GH-106660) (#106660)
* Added mention to passlib package as alternative to the deprecated crypt module.
2023-07-12 14:58:51 -07:00
Miss Islington (bot)
6de9cffcd3
[3.12] gh-99079: Update Windows build to use OpenSSL 3.0.9 (GH-106649) (#106680)
gh-99079: Update Windows build to use OpenSSL 3.0.9 (GH-106649)
(cherry picked from commit e2d7366fb3)

Co-authored-by: Steve Dower <steve.dower@python.org>
2023-07-12 16:30:52 +02:00
Miss Islington (bot)
af06a8ad4d
[3.12] gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directory (GH-103213) (#106667)
gh-103186: In test_tools.freeze, fetch CONFIG_ARGS from original source directory (GH-103213)

Fetch CONFIG_ARGS from the original source directory, instead of from
the copied source tree. When "make clean" is executed in the copied
source tree, the build directory is cleared and the configure argument
lookup fails. However, the original source directory still contains this
information.
(cherry picked from commit de827322ca)

Co-authored-by: Ijtaba Hussain <ijtabahussain@live.com>
2023-07-12 07:32:51 +00:00
Miss Islington (bot)
ae31599143
[3.12] Add Plausible for docs metrics (GH-106644) (#106661)
Add Plausible for docs metrics (GH-106644)
(cherry picked from commit e8ab0096a5)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2023-07-12 05:46:12 +03:00
Miss Islington (bot)
e248ba7b72
[3.12] gh-96165: Clarify passing ":memory:" in sqlite3.connect() (GH-106451) (#106647)
(cherry picked from commit f520804b03)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-07-11 22:31:48 +02:00
Miss Islington (bot)
bf7e92583d
[3.12] gh-96165: Clarify omitting the FROM clause in SQLite queries (GH-106513) (#106645)
(cherry picked from commit fc7ff1af45)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2023-07-11 22:31:16 +02:00
Miss Islington (bot)
46a21f5c5e
[3.12] gh-102541: Add test case for help() for non_existent_module (GH-106340) (#106639)
gh-102541: Add test case for help() for non_existent_module (GH-106340)

Test fix for when one enters, for instance, 'abd' at the 'help>' prompt.
---------

(cherry picked from commit 292ac4bfe9)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-11 18:35:13 +00:00
Miss Islington (bot)
139e7ac7c2
[3.12] gh-106625 : Add missing code to tutorial 4.6 example (GH-106623) (#106636)
(cherry picked from commit d0b7e18262)

Co-authored-by: RustyNail <takonoyawarakaage@yahoo.co.jp>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-11 13:40:59 -04:00
Miss Islington (bot)
58f9c8889d
[3.12] gh-106403: Restore weakref support for TypeVar and friends (GH-106418) (#106635)
gh-106403: Restore weakref support for TypeVar and friends (GH-106418)
(cherry picked from commit 945d3cbf2e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-07-11 16:15:30 +00:00
Thomas Wouters
60150590c7 Merge branch '3.12' of https://github.com/python/cpython into 3.12 2023-07-11 18:05:57 +02:00
Thomas Wouters
1336bb667b Post 3.12.0b4 2023-07-11 18:05:38 +02:00
Miss Islington (bot)
c594e25cd7
[3.12] gh-106498: Revert incorrect colorsys.rgb_to_hls change (GH-106627) (#106632)
gh-106498: Revert incorrect colorsys.rgb_to_hls change (GH-106627)

gh-86618 assumed a-b-c = a-(b+c) = a-d where d = b+d.
For floats 2.0, 1.0, and 0.9999999999999999, this assumption
is false.  The net change of 1.1102230246251565e-16 to 0.0
results in division by 0.  Revert the replacement.  Add test.
(cherry picked from commit a2d54d4e8a)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2023-07-11 15:47:15 +00:00
Thomas Wouters
97a6a41816 Python 3.12.0b4 2023-07-11 14:23:30 +02:00
Miss Islington (bot)
6968f9e4d3
[3.12] gh-105497: [Enum] Fix flag mask inversion when unnamed flags exist (GH-106468) (#106620)
gh-105497: [Enum] Fix flag mask inversion when unnamed flags exist (GH-106468)

For example:

    class Flag(enum.Flag):
        A = 0x01
        B = 0x02
        MASK = 0xff

    ~Flag.MASK is Flag(0)
(cherry picked from commit 95b7426f45)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2023-07-11 14:09:41 +02:00
Miss Islington (bot)
2eb9fe92b4
[3.12] gh-103968: What's New: Add porting hints for PyType_From with metaclasses (GH-105698) (GH-106619)
gh-103968: What's New: Add porting hints for PyType_From with metaclasses (GH-105698)
(cherry picked from commit af5cf1e751)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-07-11 13:53:40 +02:00
Miss Islington (bot)
30870c834c
[3.12] gh-102988: Detect email address parsing errors and return empty tuple to indicate the parsing error (old API) (GH-105127) (#106612)
gh-102988: Detect email address parsing errors and return empty tuple to indicate the parsing error (old API) (GH-105127)

Detect email address parsing errors and return empty tuple to indicate the parsing error (old API). This fixes or at least ameliorates CVE-2023-27043.

---------

(cherry picked from commit 18dfbd0357)

Co-authored-by: Thomas Dwyer <github@tomd.tel>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
2023-07-10 23:38:42 +00:00
Miss Islington (bot)
90ea3be6fb
[3.12] gh-94777: Fix deadlock in ProcessPoolExecutor (GH-94784) (#106609)
gh-94777: Fix deadlock in ProcessPoolExecutor (GH-94784)

Fixes a hang in multiprocessing process pool executor when a child process crashes and code could otherwise block on writing to the pipe.  See GH-94777 for more details.
(cherry picked from commit 6782fc0502)

Co-authored-by: Louis Paulot <55740424+lpaulot@users.noreply.github.com>
2023-07-10 22:49:07 +00:00
Miss Islington (bot)
68ca19061d
[3.12] gh-103186: Fix or catch 'extra' stderr output from unittests (GH-103196) (#106605)
gh-103186: Fix or catch 'extra' stderr output from unittests (GH-103196)

Reduce test noise by fixing or catching and testing stderr messages from individual tests.

test_cmd_line_script.test_script_as_dev_fd calls spawn_python and hence subprocess.Popen with incompatible arguments. On POSIX, pass_fds forces close_fds to be True (subprocess.py line 848). Correct the call.

test_uuid.test_cli_namespace_required_for_uuid3: when the namespace is omitted, uuid.main calls argparse.Argument_Parser.error, which prints to stderr before calling sys.exit, which raises SystemExit. Unittest assertRaises catches the exception but not the previous output. Catch the output and test it.

test_warnings.test_catchwarnings_with_simplefilter_error similarly prints before raising. Catch the output and test it.
---------

(cherry picked from commit 9d582250d8)

Co-authored-by: Ijtaba Hussain <ijtabahussain@live.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2023-07-10 21:03:32 +00:00
Serhiy Storchaka
2da967ea14
[3.12] gh-99593: Add tests for Unicode C API (part 3) (GH-104728) (GH-106595)
Add tests for codecs.
(cherry picked from commit 51ea664d18)
2023-07-10 20:58:58 +03:00
Miss Islington (bot)
41057b2ffe
[3.12] gh-105227: Add PyType_GetDict() (GH-105747) (#106600)
gh-105227: Add PyType_GetDict() (GH-105747)

This compensates for static builtin types having `tp_dict` set to `NULL`.

(cherry picked from commit a840806d33)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2023-07-10 17:12:15 +00:00
Miss Islington (bot)
0481b805d6
[3.12] Clarify how topics.py gets created. (GH-106121) (#106579)
Clarify how topics.py gets created. (GH-106121)

When changing docs, it was easy to find text in topics.py, and I
wondered whether I was supposed to edit it.  Thankfully, the top of the
file says it's auto-generated, so I knew I didn't have to edit it. But I
didn't know what started the auto-generation process.

It's part of the release process, so I'll leave a note here for future
editors.
(cherry picked from commit dac1e36490)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
2023-07-09 20:42:22 -07:00
Miss Islington (bot)
128a962482
[3.12] gh-106461: typing: Consolidate docs on Callable (GH-106462) (#106574)
gh-106461: typing: Consolidate docs on `Callable` (GH-106462)
(cherry picked from commit ca8b55c7f5)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-09 22:21:54 +01:00
Miss Islington (bot)
559267fcd3
[3.12] Move implementation specific RE tests to separate class (GH-106563) (#106564)
Move implementation specific RE tests to separate class (GH-106563)
(cherry picked from commit 8cb6f9761e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-09 10:14:39 +00:00
Miss Islington (bot)
60ade0cb29
[3.12] gh-106510: Fix DEBUG output for atomic group (GH-106511) (GH-106548)
(cherry picked from commit 74ec02e949)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2023-07-08 15:15:54 +03:00
Miss Islington (bot)
48f58e0243
[3.12] gh-101880: add link to object.__hash__() in hash() builtin documentation (GH-101883) (#106546)
gh-101880: add link to object.__hash__() in hash() builtin documentation (GH-101883)
(cherry picked from commit ec7180bd1b)

Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
2023-07-08 14:22:50 +05:30
Miss Islington (bot)
8fdb058793
[3.12] gh-106524: Fix a crash in _sre.template() (GH-106525) (GH-106544)
Some items remained uninitialized if _sre.template() was called with invalid
indices. Then attempt to clear them in the destructor led to dereferencing
of uninitialized pointer.
(cherry picked from commit 2ef1dc37f0)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
2023-07-08 08:12:33 +00:00
Miss Islington (bot)
2ade2fc148
[3.12] gh-106300: Improve assertRaises(Exception) usages in tests (GH-106302) (GH-106534)
gh-106300: Improve `assertRaises(Exception)` usages in tests (GH-106302)
(cherry picked from commit 6e6a4cd523)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2023-07-07 14:25:24 -07:00
Miss Islington (bot)
7e883d76c0
[3.12] gh-106503: asyncio._SelectorSocketTransport: fix cyclic reference on close(). (GH-106504) (#106514)
gh-106503: asyncio._SelectorSocketTransport: fix cyclic reference on close(). (GH-106504)
(cherry picked from commit 3e5ce7968f)

Co-authored-by: Andrew Geng <pteromys@gmail.com>
2023-07-07 12:08:22 +00:00