]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agogh-94526: getpath_dirname() no longer encodes the path (GH-97645)
Miss Islington (bot) [Fri, 30 Sep 2022 13:38:41 +0000 (06:38 -0700)] 
gh-94526: getpath_dirname() no longer encodes the path (GH-97645)

Fix the Python path configuration used to initialized sys.path at
Python startup. Paths are no longer encoded to UTF-8/strict to avoid
encoding errors if it contains surrogate characters (bytes paths are
decoded with the surrogateescape error handler).

getpath_basename() and getpath_dirname() functions no longer encode
the path to UTF-8/strict, but work directly on Unicode strings. These
functions now use PyUnicode_FindChar() and PyUnicode_Substring() on
the Unicode path, rather than strrchr() on the encoded bytes string.
(cherry picked from commit 9f2f1dd131b912e224cd0269adde8879799686c4)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agogh-90989: Clarify some installer text (GH-97668)
Steve Dower [Fri, 30 Sep 2022 12:48:19 +0000 (13:48 +0100)] 
gh-90989: Clarify some installer text (GH-97668)

3 years ago[3.11] Use SyntaxError invalid range in tutorial introduction example (GH-93031)...
Miss Islington (bot) [Fri, 30 Sep 2022 09:12:22 +0000 (02:12 -0700)] 
[3.11] Use SyntaxError invalid range in tutorial introduction example (GH-93031) (GH-97666)

Use SyntaxError invalid range in tutorial introduction example (GH-93031)

Use output from a 3.10+ REPL, showing invalid range, for the
SyntaxError examples in the tutorial introduction page.

Co-authored-by: Eddie Hebert <eddie@eddiehebert.com>
3 years agogh-96397: Document that attributes need not be identifiers (GH-96454)
Miss Islington (bot) [Thu, 29 Sep 2022 23:25:10 +0000 (16:25 -0700)] 
gh-96397: Document that attributes need not be identifiers (GH-96454)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit 9a11ed8e50492d327e4de0a8f3a473e788b14a6f)

Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
3 years agocloses gh-97650: correct sphinx executable (gh-97651)
Miss Islington (bot) [Thu, 29 Sep 2022 23:00:33 +0000 (16:00 -0700)] 
closes gh-97650: correct sphinx executable (gh-97651)

(cherry picked from commit 0179a82caa05a322d1dbab05155be6f919c281ff)

Co-authored-by: NoSuck <NoSuck@users.noreply.github.com>
3 years agogh-52597: Add position-only markers for os functions (GH-94735)
Miss Islington (bot) [Thu, 29 Sep 2022 13:51:39 +0000 (06:51 -0700)] 
gh-52597: Add position-only markers for os functions (GH-94735)

(cherry picked from commit c759944f16ed9887a77d5ebd738f17f3892c2476)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
3 years agogh-91212: Fixed flickering when the tracer is turned off (GH-95129)
Miss Islington (bot) [Thu, 29 Sep 2022 07:07:07 +0000 (00:07 -0700)] 
gh-91212: Fixed flickering when the tracer is turned off (GH-95129)

Fixed flickering when the tracer is turned off.
(cherry picked from commit 4652093e1b816b78e9a585d671a807ce66427417)

Co-authored-by: Shin-myoung-serp <relent95@naver.com>
3 years ago[3.11] gh-96357: Improve `typing.get_overloads` coverage (GH-96358) (#96371)
Miss Islington (bot) [Thu, 29 Sep 2022 01:06:21 +0000 (18:06 -0700)] 
[3.11] gh-96357: Improve `typing.get_overloads` coverage (GH-96358) (#96371)

gh-96357: Improve `typing.get_overloads` coverage (GH-96358)
(cherry picked from commit 675e3470ccf3804a36a9cd451b813e9bd655aeb3)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agogh-97612: Fix shell injection in get-remote-certificate.py (GH-97613)
Miss Islington (bot) [Wed, 28 Sep 2022 23:46:11 +0000 (16:46 -0700)] 
gh-97612: Fix shell injection in get-remote-certificate.py (GH-97613)

Fix a shell code injection vulnerability in the
get-remote-certificate.py example script. The script no longer uses a
shell to run "openssl" commands. Issue reported and initial fix by
Caleb Shortt.

Remove the Windows code path to send "quit" on stdin to the "openssl
s_client" command: use DEVNULL on all platforms instead.

Co-authored-by: Caleb Shortt <caleb@rgauge.com>
(cherry picked from commit 83a0f44ffd8b398673ae56c310cf5768d359c341)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agogh-97616: list_resize() checks for integer overflow (GH-97617)
Miss Islington (bot) [Wed, 28 Sep 2022 22:28:38 +0000 (15:28 -0700)] 
gh-97616: list_resize() checks for integer overflow (GH-97617)

Fix multiplying a list by an integer (list *= int): detect the
integer overflow when the new allocated length is close to the
maximum size.  Issue reported by Jordan Limor.

list_resize() now checks for integer overflow before multiplying the
new allocated length by the list item size (sizeof(PyObject*)).
(cherry picked from commit a5f092f3c469b674b8d9ccbd4e4377230c9ac7cf)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agoFix typo in error message in plistlib (GH-97540)
Miss Islington (bot) [Wed, 28 Sep 2022 18:23:56 +0000 (11:23 -0700)] 
Fix typo in error message in plistlib (GH-97540)

(cherry picked from commit 81b9d9ddc20837ecd19f41b764e3f33d8ae805d5)

Co-authored-by: Jakob Weigert <jakobjw@users.noreply.github.com>
3 years agofixup policy docs (GH-97618)
Miss Islington (bot) [Wed, 28 Sep 2022 17:42:28 +0000 (10:42 -0700)] 
fixup policy docs (GH-97618)

(cherry picked from commit 9a404b173e57ce171a867cfc3776cdf88d6c553f)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agoFix docs on conditional expression grouping (GH-96447) (GH-97606)
Miss Islington (bot) [Wed, 28 Sep 2022 13:45:48 +0000 (06:45 -0700)] 
Fix docs on conditional expression grouping (GH-96447) (GH-97606)

3 years ago[3.11] gh-65046: Add note about logging from async code. (GH-97602) (GH-97608)
Miss Islington (bot) [Wed, 28 Sep 2022 04:32:01 +0000 (21:32 -0700)] 
[3.11] gh-65046: Add note about logging from async code. (GH-97602) (GH-97608)

3 years agogh-96377: Update asyncio policy doc intro paras to be clear and accurate (GH-97603)
Miss Islington (bot) [Wed, 28 Sep 2022 00:33:32 +0000 (17:33 -0700)] 
gh-96377: Update asyncio policy doc intro paras to be clear and accurate (GH-97603)

Also fix up some cross-references in the asyncio docs.
(cherry picked from commit cc0f3a10f0ee507d9044ef9036cf3e711c5338a9)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-96478: Fix new test when run in refleak mode (GH-96615)
Miss Islington (bot) [Tue, 27 Sep 2022 14:50:36 +0000 (07:50 -0700)] 
gh-96478: Fix new test when run in refleak mode (GH-96615)

./python.exe -m test -R : test.test_typing would fail, apparently
because the dictionary used in the @patch decorator was modified.
(cherry picked from commit f0d9136c69b4ed32bfb3096f926da098623a7072)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547)
Miss Islington (bot) [Tue, 27 Sep 2022 11:34:24 +0000 (04:34 -0700)] 
gh-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547)

Previously, checkbuttons in different parent widgets could have the same
short name and share the same state if arguments "name" and "variable" are
not specified. Now they are globally unique.
(cherry picked from commit adbed2d542a815b8175db965742211856b19b52f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-96959: Update more HTTP links (GH-97536)
Miss Islington (bot) [Tue, 27 Sep 2022 11:16:37 +0000 (04:16 -0700)] 
gh-96959: Update more HTTP links (GH-97536)

Use HTTPS for documents which are available by both HTTP and HTTPS
links, but there is no redirection from HTTP to HTTPS or vice versa.
(cherry picked from commit dd53b79de0ea98af6a11481217a961daef4e9774)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-97545: Make Semaphore run faster. (GH-97549)
Miss Islington (bot) [Tue, 27 Sep 2022 00:00:53 +0000 (17:00 -0700)] 
gh-97545: Make Semaphore run faster. (GH-97549)

(cherry picked from commit 68c46ae68b6e0c36a12e37285fff9ce0782ed01e)

Co-authored-by: Cyker Way <cykerway@gmail.com>
3 years agoGH-65046: Fix docs about logging in `asyncio` (GH-97559)
Miss Islington (bot) [Mon, 26 Sep 2022 22:45:58 +0000 (15:45 -0700)] 
GH-65046: Fix docs about logging in `asyncio` (GH-97559)

Explain that logging should not use network I/O.
(cherry picked from commit d68c37c0d08542a346a13b150a204208bb0408f5)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agogh-96848: Fix -X int_max_str_digits option parsing (GH-96988)
Miss Islington (bot) [Mon, 26 Sep 2022 15:43:26 +0000 (08:43 -0700)] 
gh-96848: Fix -X int_max_str_digits option parsing (GH-96988)

Fix command line parsing: reject "-X int_max_str_digits" option with
no value (invalid) when the PYTHONINTMAXSTRDIGITS environment
variable is set to a valid limit.
(cherry picked from commit 41351662bcd21672d8ccfa62fe44d72027e6bcf8)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agogh-82530: Create blank function instead of invalid import for email example (GH-97529) 97564/head
Miss Islington (bot) [Mon, 26 Sep 2022 04:15:52 +0000 (21:15 -0700)] 
gh-82530: Create blank function instead of invalid import for email example (GH-97529)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 2b428a1faed88f148ede131e3b86ab6227c6c3f0)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
3 years agogh-97519: Synchronize links in other copies of HISTORY OF THE SOFTWARE (GH-97520)
Miss Islington (bot) [Sun, 25 Sep 2022 09:02:09 +0000 (02:02 -0700)] 
gh-97519: Synchronize links in other copies of HISTORY OF THE SOFTWARE (GH-97520)

HTTP links in the "HISTORY OF THE SOFTWARE" section of Doc/license.rst
were converted to HTTPS in f62ff97f31a775cc7956adeae32c14e7c85bdc15.
But there were other copies of these links, which were left HTTP links.
(cherry picked from commit ea4be278fa6123d1f78c1fd556d79b311cd59f96)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-94808: Coverage: Test uppercase string literal prefixes (GH-95925)
Miss Islington (bot) [Sun, 25 Sep 2022 08:21:58 +0000 (01:21 -0700)] 
gh-94808: Coverage: Test uppercase string literal prefixes (GH-95925)

(cherry picked from commit f00383ec9bb9452fd9d5f5003f123e68fc4a71d8)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
3 years agogh-96052: codeop: fix handling compiler warnings in incomplete input (GH-96132)
Miss Islington (bot) [Sun, 25 Sep 2022 08:21:00 +0000 (01:21 -0700)] 
gh-96052: codeop: fix handling compiler warnings in incomplete input (GH-96132)

Previously codeop.compile_command() emitted compiler warnings (SyntaxWarning or
DeprecationWarning) and raised a SyntaxError for incomplete input containing
a potentially incorrect code. Now it always returns None for incomplete input
without emitting any warnings.
(cherry picked from commit 426d72e7ddb0af5cf851914ac75127186dd1ff04)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-96959: Update HTTP links which are redirected to HTTPS (GH-96961)
Miss Islington (bot) [Sun, 25 Sep 2022 08:20:45 +0000 (01:20 -0700)] 
gh-96959: Update HTTP links which are redirected to HTTPS (GH-96961)

(cherry picked from commit db39050396a104c73d0da473a2f00a62f9dfdfaa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-97527: IDLE: protect macosx Tk() call when no GUI (GH-97530)
Miss Islington (bot) [Sat, 24 Sep 2022 22:09:08 +0000 (15:09 -0700)] 
gh-97527: IDLE: protect macosx Tk() call when no GUI (GH-97530)

Only call tkinter.tk and its follow-up code in _init_tk_type when requires('gui')
does not raise.  This function can be called as an unintended side-effect of
calling other idlelib code as part of tests on macOS without a GUI enabled.
(cherry picked from commit 9704f8da333a51da32318f16106d45abb20fab76)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agogh-96965: Update Windows release to libffi 3.4.3 (GH-97512)
Miss Islington (bot) [Fri, 23 Sep 2022 15:31:53 +0000 (08:31 -0700)] 
gh-96965: Update Windows release to libffi 3.4.3 (GH-97512)

(cherry picked from commit f1cca801f50a92c0affede6bc22c3c1ec211358d)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years agogh-94781: Fix Windows projects not cleaning intermediate and output files for frozen...
Miss Islington (bot) [Fri, 23 Sep 2022 15:23:41 +0000 (08:23 -0700)] 
gh-94781: Fix Windows projects not cleaning intermediate and output files for frozen modules (GH-96423)

(cherry picked from commit 3e26de3c1f24bf0810eaaf7d75a4332775870e78)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
3 years agogh-77171: Document that wave only supports simple PCM files (GH-97510)
Steve Dower [Fri, 23 Sep 2022 12:55:06 +0000 (13:55 +0100)] 
gh-77171: Document that wave only supports simple PCM files (GH-97510)

3 years agogh-75608: Add Windows FAQ entry for missing UCRT (GH-92765)
Miss Islington (bot) [Fri, 23 Sep 2022 10:54:53 +0000 (03:54 -0700)] 
gh-75608: Add Windows FAQ entry for missing UCRT (GH-92765)

(cherry picked from commit 80bc7d7c0a3f777da244ec79429baf382523b8da)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
3 years agogh-96761: Fix build process of the clang compiler for _bootstrap_python (gh-96945)
Miss Islington (bot) [Fri, 23 Sep 2022 03:20:50 +0000 (20:20 -0700)] 
gh-96761: Fix build process of the clang compiler for _bootstrap_python (gh-96945)

Co-authored-by: Matthias Goergens <matthias.goergens@gmail.com>
(cherry picked from commit 83d84e67cd203cc75687152e57572895f56245fa)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
3 years agogh-96397: Document that keywords in calls need not be identifiers (GH-96393)
Miss Islington (bot) [Thu, 22 Sep 2022 18:18:02 +0000 (11:18 -0700)] 
gh-96397: Document that keywords in calls need not be identifiers (GH-96393)

This represents the official SC stance, see
https://github.com/python/steering-council/issues/142GH-issuecomment-1252172695
(cherry picked from commit 9d432b4a181cd42017699de4354e7b36c5b87d88)

Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
3 years agoGH-85760: Fix race in calling process_exited callback too early (GH-97009)
Miss Islington (bot) [Thu, 22 Sep 2022 17:24:54 +0000 (10:24 -0700)] 
GH-85760: Fix race in calling process_exited callback too early (GH-97009)

(cherry picked from commit 282edd7b2a74c4dfe1bfe3c5b1d30f9c21d554d6)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agoGH-96975: Skip incomplete frames in PyEval_GetFrame (GH-97018)
Miss Islington (bot) [Thu, 22 Sep 2022 17:17:53 +0000 (10:17 -0700)] 
GH-96975: Skip incomplete frames in PyEval_GetFrame (GH-97018)

(cherry picked from commit 8fd2c3b75b90c4ee391894aa5094615bbdb6242f)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
3 years agogh-90155: Fix bug in asyncio.Semaphore and strengthen FIFO guarantee (GH-93222)
Miss Islington (bot) [Thu, 22 Sep 2022 16:58:35 +0000 (09:58 -0700)] 
gh-90155: Fix bug in asyncio.Semaphore and strengthen FIFO guarantee (GH-93222)

The main problem was that an unluckily timed task cancellation could cause
the semaphore to be stuck. There were also doubts about strict FIFO ordering
of tasks allowed to pass.

The Semaphore implementation was rewritten to be more similar to Lock.
Many tests for edge cases (including cancellation) were added.
(cherry picked from commit 24e03796248ab8c7f62d715c28156abe2f1c0d20)

Co-authored-by: Cyker Way <cykerway@gmail.com>
3 years agoRemove a stray DISPATCH() (GH-97004)
Brandt Bucher [Thu, 22 Sep 2022 16:18:37 +0000 (09:18 -0700)] 
Remove a stray DISPATCH() (GH-97004)

3 years agogh-97005: Update libexpat from 2.4.7 to 2.4.9 (gh-97006)
Miss Islington (bot) [Thu, 22 Sep 2022 13:00:52 +0000 (06:00 -0700)] 
gh-97005: Update libexpat from 2.4.7 to 2.4.9 (gh-97006)

Co-authored-by: Gregory P. Smith [Google] <greg@krypto.org>
(cherry picked from commit 10e3d398c31cc1695752fc52bc6ca2ce9ef6237e)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
3 years ago[3.11] gh-96954: Add tests for unicodedata.name/lookup (GH-96955) (GH-96991)
Łukasz Langa [Wed, 21 Sep 2022 14:07:07 +0000 (16:07 +0200)] 
[3.11] gh-96954: Add tests for unicodedata.name/lookup (GH-96955) (GH-96991)

They were undertested, and since GH-96954 might involve a
rewrite of this part of the code we want to ensure that
there won't be any behavioral change.

Co-authored-by: Carl Friedrich Bolz-Tereick <cfbolz@gmx.de>
(cherry picked from commit 5a32eeced2c537c13613dd4ff5b2767a37037294)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
3 years agogh-81039: Add small example of f-string's "=}" to tutorial (gh-92291) (gh-96989)
Miss Islington (bot) [Wed, 21 Sep 2022 13:11:48 +0000 (06:11 -0700)] 
gh-81039: Add small example of f-string's "=}" to tutorial (gh-92291) (gh-96989)

(cherry picked from commit 4b81139aac3fa11779f6eedb6e621bde29e64b30)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
3 years agogh-90808: add more examples to `test_sched.test_priority` (GH-31144)
Miss Islington (bot) [Wed, 21 Sep 2022 02:03:13 +0000 (19:03 -0700)] 
gh-90808: add more examples to `test_sched.test_priority` (GH-31144)

(cherry picked from commit 57463d43dc4277a1f4d33bd003567e947c937cf5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agogh-95950: Add a test for both `csv.Dialect` and `kwargs` (GH-95951)
Miss Islington (bot) [Wed, 21 Sep 2022 01:37:10 +0000 (18:37 -0700)] 
gh-95950: Add a test for both `csv.Dialect` and `kwargs` (GH-95951)

(cherry picked from commit 1c01bd28a0ec7e46e570a07d970c590b1809f8f1)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agogh-96478: Test `@overload` on C functions (GH-96479)
Miss Islington (bot) [Wed, 21 Sep 2022 01:36:23 +0000 (18:36 -0700)] 
gh-96478: Test `@overload` on C functions (GH-96479)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit f177f6f29b069f522a0b3ba44eaae19852b6d2b0)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[Enum] fix typos (GH-96285)
Miss Islington (bot) [Tue, 20 Sep 2022 23:55:52 +0000 (16:55 -0700)] 
[Enum] fix typos (GH-96285)

(cherry picked from commit 58882640d631b0be0d81156928de97c2b3556f45)

Co-authored-by: wim glenn <wim.glenn@gmail.com>
3 years agogh-95591: [Enum] use `_FlagTests` base class (GH-96475)
Miss Islington (bot) [Tue, 20 Sep 2022 23:34:14 +0000 (16:34 -0700)] 
gh-95591: [Enum] use `_FlagTests` base class (GH-96475)

(cherry picked from commit 9b58eaf98c0a47235c8822e208c938a36b66ff7b)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years ago[3.11] GH-95921: Fix positions for some chained comparisons (GH-96968) (GH-96973)
Brandt Bucher [Tue, 20 Sep 2022 21:56:38 +0000 (14:56 -0700)] 
[3.11] GH-95921: Fix positions for some chained comparisons (GH-96968) (GH-96973)

(cherry picked from commit dfc73b57247aac575c83055d960c03bdc28b51fd)

Automerge-Triggered-By: GH:brandtbucher
3 years agoGH-96864: Check for error between line and opcode events (GH-96880)
Miss Islington (bot) [Tue, 20 Sep 2022 17:49:01 +0000 (10:49 -0700)] 
GH-96864: Check for error between line and opcode events (GH-96880)

(cherry picked from commit c10e33ac119d96c4d88d5ae8b59e65a76ae0ad3c)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
3 years ago[3.11] gh-96727: Document restrictions on Handler.emit() with respect to locking...
Miss Islington (bot) [Tue, 20 Sep 2022 08:52:09 +0000 (01:52 -0700)] 
[3.11] gh-96727: Document restrictions on Handler.emit() with respect to locking. (GH-96948) (GH-96950)

(cherry picked from commit 6ad47b41a650a13b4a9214309c10239726331eb8)

3 years agogh-96387: take_gil() resets drop request before exit (#96869) (#96941)
Victor Stinner [Tue, 20 Sep 2022 00:12:09 +0000 (02:12 +0200)] 
gh-96387: take_gil() resets drop request before exit (#96869) (#96941)

At Python exit, sometimes a thread holding the GIL can wait forever
for a thread (usually a daemon thread) which requested to drop the
GIL, whereas the thread already exited. To fix the race condition,
the thread which requested the GIL drop now resets its request before
exiting.

take_gil() now calls RESET_GIL_DROP_REQUEST() before
PyThread_exit_thread() if it called SET_GIL_DROP_REQUEST to fix a
race condition with drop_gil().

Issue discovered and analyzed by Mingliang ZHAO.

(cherry picked from commit 04f4977f508583954ad7b9cb09076ee1e57461f8)

3 years agogh-96917: link to typing.readthedocs.io from typing.rst (GH-96921)
Miss Islington (bot) [Mon, 19 Sep 2022 19:19:18 +0000 (12:19 -0700)] 
gh-96917: link to typing.readthedocs.io from typing.rst (GH-96921)

See the discussion at https://github.com/python/cpython/issues/91533
(cherry picked from commit 5b3a2569f4b4dfb58a8f90a241f9dac1a7ea4bf6)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
3 years agogh-95913: Copyedit, link & format Typing Features section in 3.11 What's New (GH...
Miss Islington (bot) [Mon, 19 Sep 2022 13:51:08 +0000 (06:51 -0700)] 
gh-95913: Copyedit, link & format Typing Features section in 3.11 What's New (GH-96097)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 558768ff22e47582ae95ad7c3f8955407934916e)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-95913: Fix and copyedit New Features section of 3.11 What's New (GH-95915)
Miss Islington (bot) [Mon, 19 Sep 2022 13:45:35 +0000 (06:45 -0700)] 
gh-95913: Fix and copyedit New Features section of 3.11 What's New (GH-95915)

(cherry picked from commit 8ee27e33182e6d9040e79f6ccc9219afa049d40e)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years agogh-96821: Fix undefined behaviour in `_testcapimodule.c` (GH-96915) (GH-96927)
Miss Islington (bot) [Mon, 19 Sep 2022 11:48:58 +0000 (04:48 -0700)] 
gh-96821: Fix undefined behaviour in `_testcapimodule.c` (GH-96915) (GH-96927)

* gh-96821: Assert for demonstrating undefined behaviour

* Fix UB

(cherry picked from commit cbdeda8ce7a3543cb3376d70e4cd46fcf24f42a7)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Matthias Görgens <matthias.goergens@gmail.com>
3 years agoGH-96851: Add link to FAQ entry for caching method calls. (GH-96902)
Miss Islington (bot) [Sun, 18 Sep 2022 22:53:31 +0000 (15:53 -0700)] 
GH-96851: Add link to FAQ entry for caching method calls. (GH-96902)

(cherry picked from commit bbc24b2bd569108b957ed24c5a95ffeaf8cde0db)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
3 years ago[3.11] gh-96861: Check for unset sys.executable during venv creation. (GH-96887)...
Miss Islington (bot) [Sun, 18 Sep 2022 20:58:46 +0000 (13:58 -0700)] 
[3.11] gh-96861: Check for unset sys.executable during venv creation. (GH-96887) (GH-96919)

(cherry picked from commit 2cd70ffb3fe22d778d0bb6ec220fdf67dccc1be6)

3 years agoSimplify sieve() recipe. Add edge case tests. (GH-96892)
Miss Islington (bot) [Sun, 18 Sep 2022 03:11:29 +0000 (20:11 -0700)] 
Simplify sieve() recipe. Add edge case tests. (GH-96892)

(cherry picked from commit 78359b1d45608439f8e03b8e86174fe7b04d3e08)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
3 years agoClarify that the expression is regular math notation, not Python. (GH-96903) (GH...
Miss Islington (bot) [Sun, 18 Sep 2022 03:01:12 +0000 (20:01 -0700)] 
Clarify that the expression is regular math notation, not Python. (GH-96903) (GH-96908)

3 years agogh-87179: Fix more IDLE class headers (GH-96899)
Miss Islington (bot) [Sat, 17 Sep 2022 22:15:23 +0000 (15:15 -0700)] 
gh-87179: Fix more IDLE class headers (GH-96899)

Remove unneeded '(object)' and '()'.
(cherry picked from commit aa671b48d62a00c5ab87fb102be15dd5eeac84dd)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years ago[3.11] gh-96883: browser: include concurrent.futures (GH-96886) (GH-96888)
Christian Heimes [Sat, 17 Sep 2022 14:40:24 +0000 (16:40 +0200)] 
[3.11] gh-96883: browser: include concurrent.futures (GH-96886) (GH-96888)

3 years agoFix ResourceWarning in test.test_frame (GH-96831)
Miss Islington (bot) [Sat, 17 Sep 2022 00:03:57 +0000 (17:03 -0700)] 
Fix ResourceWarning in test.test_frame (GH-96831)

(cherry picked from commit 303bd880475b510481d86a8c48b62d21d0e3bb53)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
3 years agogh-95778: Mention sys.set_int_max_str_digits() in error message (GH-96874)
Miss Islington (bot) [Fri, 16 Sep 2022 18:33:27 +0000 (11:33 -0700)] 
gh-95778: Mention sys.set_int_max_str_digits() in error message (GH-96874)

When ValueError is raised if an integer is larger than the limit,
mention sys.set_int_max_str_digits() in the error message.
(cherry picked from commit e841ffc915e82e5ea6e3b473205417d63494808d)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agogh-96810: Clarify for which statements sqlite3 implicitly opens transactions (GH...
Miss Islington (bot) [Thu, 15 Sep 2022 21:21:08 +0000 (14:21 -0700)] 
gh-96810: Clarify for which statements sqlite3 implicitly opens transactions (GH-96832)

(cherry picked from commit 16c33a9676e2f3ef330d09f2ab515c56636fa09f)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agogh-96702: Order methods before attrs in sqlite3.Connection docs (GH-96703) (#96788)
Miss Islington (bot) [Wed, 14 Sep 2022 19:56:14 +0000 (12:56 -0700)] 
gh-96702: Order methods before attrs in sqlite3.Connection docs (GH-96703) (#96788)

(cherry picked from commit 49cceeb5c998a51bb12b7dbde17b53647bb52113)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agogh-96729: Ensure installers built with Tools/msi/buildrelease.bat have matching UUIDs...
Miss Islington (bot) [Wed, 14 Sep 2022 15:59:34 +0000 (08:59 -0700)] 
gh-96729: Ensure installers built with Tools/msi/buildrelease.bat have matching UUIDs with official releases (GH-96755)

(cherry picked from commit 662782e95f97d26bd57b3edc6aaf674e30899f44)

Co-authored-by: adang1345 <adang1345@gmail.com>
3 years agoItertools sieve() recipe (GH-96813) (GH-96814)
Miss Islington (bot) [Wed, 14 Sep 2022 02:23:30 +0000 (19:23 -0700)] 
Itertools sieve() recipe (GH-96813) (GH-96814)

3 years agoAdd dataclass field default change to 3.11 what's new (GH-96790)
Miss Islington (bot) [Tue, 13 Sep 2022 20:53:11 +0000 (13:53 -0700)] 
Add dataclass field default change to 3.11 what's new (GH-96790)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
(cherry picked from commit 4995f5f9a07921c5b90066a22285a538551b36d8)

Co-authored-by: Laurie O <laurie_opperman@hotmail.com>
3 years agogh-95778: Fix `sys.set_int_max_str_digits()` parameter name (GH-96798)
Miss Islington (bot) [Tue, 13 Sep 2022 16:44:56 +0000 (09:44 -0700)] 
gh-95778: Fix `sys.set_int_max_str_digits()` parameter name (GH-96798)

Discovered in https://github.com/python/typeshed/pull/8733
(cherry picked from commit bf5fd492524f1b630a60c98eff8fe5fa66603b54)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
3 years agogh-96706: [doc] Don't recomment deprecated use of get_event_loop() in examples (GH...
Miss Islington (bot) [Tue, 13 Sep 2022 15:57:02 +0000 (08:57 -0700)] 
gh-96706: [doc] Don't recomment deprecated use of get_event_loop() in examples (GH-96707)

(cherry picked from commit 53a54b781d1f05f2d0b40ce88b3da92d5d23e9d2)

Co-authored-by: zhanpon <pon.zhan@gmail.com>
3 years agogh-96678: Avoid undefined behaviour in test (GH-96672) (#96795)
Miss Islington (bot) [Tue, 13 Sep 2022 15:04:00 +0000 (08:04 -0700)] 
gh-96678: Avoid undefined behaviour in test (GH-96672) (#96795)

(cherry picked from commit 6ba686d97fd6d2a2169696c6629f7de9482f52db)

Co-authored-by: Matthias Görgens <matthias.goergens@gmail.com>
Co-authored-by: Matthias Görgens <matthias.goergens@gmail.com>
3 years agogh-96678: Fix UB of null pointer arithmetic (GH-96782)
Miss Islington (bot) [Tue, 13 Sep 2022 15:03:40 +0000 (08:03 -0700)] 
gh-96678: Fix UB of null pointer arithmetic (GH-96782)

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 81e36f350b75d2ed2668825f7df6e059b57f859c)

Co-authored-by: Matthias Görgens <matthias.goergens@gmail.com>
3 years ago[3.11] gh-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006) (GH-96034) (GH-96038)
Christian Heimes [Tue, 13 Sep 2022 11:00:45 +0000 (13:00 +0200)] 
[3.11] gh-96005: Handle WASI ENOTCAPABLE in getpath (GH-96006) (GH-96034) (GH-96038)

- On WASI `ENOTCAPABLE` is now mapped to `PermissionError`.
- The `errno` modules exposes the new error number.
- `getpath.py` now ignores `PermissionError` when it cannot open landmark
  files `pybuilddir.txt` and `pyenv.cfg`.

3 years agoGH-96754: Check whether the interpreter frame is complete before creating frame objec...
Miss Islington (bot) [Tue, 13 Sep 2022 10:56:27 +0000 (03:56 -0700)] 
GH-96754: Check whether the interpreter frame is complete before creating frame object. (GH-96776) (#96787)

(cherry picked from commit 12c5f328d2479ac3432df5e266adc4e59adeabfe)

Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Mark Shannon <mark@hotpy.org>
3 years agogh-84461: Omit resource mod and getresuid funcs on Emscripten (GH-96303)
Miss Islington (bot) [Tue, 13 Sep 2022 10:08:12 +0000 (03:08 -0700)] 
gh-84461: Omit resource mod and getresuid funcs on Emscripten (GH-96303)

(cherry picked from commit a36235d5c7863a85fa323b2048d3d254116a958e)

Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.11] gh-95853: Add script to automate WASM build (GH-95828, GH-95985, GH-96045...
Christian Heimes [Tue, 13 Sep 2022 10:06:39 +0000 (12:06 +0200)] 
[3.11] gh-95853: Add script to automate WASM build (GH-95828, GH-95985, GH-96045, GH-96389, GH-96744) (GH-96749)

Automate WASM build with a new Python script. The script provides
several build profiles with configure flags for Emscripten flavors
and WASI. The script can detect and use Emscripten SDK and WASI SDK from
default locations or env vars.

``configure`` now detects Node arguments and creates HOSTRUNNER
arguments for Node 16. It also sets correct arguments for
``wasm64-emscripten``.

3 years ago[3.11] gh-96320: WASI socket fixes (GH-96388) (GH-#96748)
Miss Islington (bot) [Tue, 13 Sep 2022 10:05:25 +0000 (03:05 -0700)] 
[3.11] gh-96320: WASI socket fixes (GH-96388) (GH-#96748)

- ignore missing functions in ``socket.__repr__``
- bundle network files with assets

3 years agoPost 3.11.0rc2
Pablo Galindo [Mon, 12 Sep 2022 10:54:49 +0000 (11:54 +0100)] 
Post 3.11.0rc2

3 years agoPython 3.11.0rc2 v3.11.0rc2
Pablo Galindo [Sun, 11 Sep 2022 19:21:50 +0000 (20:21 +0100)] 
Python 3.11.0rc2

3 years agogh-94972: document that shield users need to keep a reference to their task (GH-96724)
Miss Islington (bot) [Sat, 10 Sep 2022 15:03:35 +0000 (08:03 -0700)] 
gh-94972: document that shield users need to keep a reference to their task (GH-96724)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
(cherry picked from commit 6281affee6423296893b509cd78dc563ca58b196)

Co-authored-by: Hendrik Makait <hendrik.makait@gmail.com>
3 years agoGH-96678: Fix undefined behavior in ceval.c (GH-96708)
Miss Islington (bot) [Sat, 10 Sep 2022 13:58:45 +0000 (06:58 -0700)] 
GH-96678: Fix undefined behavior in ceval.c (GH-96708)

(cherry picked from commit 50a70a083d34305a52fac4f5901bff2ead152d68)

Co-authored-by: Mark Shannon <mark@hotpy.org>
3 years agoFix possible NULL pointer dereference in _PyThread_CurrentFrames (GH-96584)
Miss Islington (bot) [Sat, 10 Sep 2022 11:12:46 +0000 (04:12 -0700)] 
Fix possible NULL pointer dereference in _PyThread_CurrentFrames (GH-96584)

(cherry picked from commit 88a7f661ca02c0eb76b8f19234b8293b70f171e2)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agogh-96710: Make the test timing more lenient for the int/str DoS regression test....
Miss Islington (bot) [Fri, 9 Sep 2022 20:17:04 +0000 (13:17 -0700)] 
gh-96710: Make the test timing more lenient for the int/str DoS regression test. (GH-96717)

A regression would still absolutely fail and even a flaky pass isn't
harmful as it'd fail most of the time across our N system test runs.

Windows has a low resolution timer and CI systems are prone to odd
timing so this just gives more leeway to avoid flakiness.
(cherry picked from commit 11e3548fd1d3445ccde971d613633b58d73c3016)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years ago[3.11] GH-96636: Remove all uses of NOTRACE_DISPATCH (GH-96643) (#96688)
Mark Shannon [Fri, 9 Sep 2022 16:24:44 +0000 (17:24 +0100)] 
[3.11] GH-96636: Remove all uses of NOTRACE_DISPATCH (GH-96643) (#96688)

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
(cherry picked from commit aa3b4cf779b3dddb84e094879b91703354910d8c)

3 years ago[3.11] io: Add missing f (#96701)
Jelle Zijlstra [Fri, 9 Sep 2022 09:28:26 +0000 (02:28 -0700)] 
[3.11] io: Add missing f (#96701)

3 years agogh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict (GH-96353)
Miss Islington (bot) [Thu, 8 Sep 2022 11:43:52 +0000 (04:43 -0700)] 
gh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict (GH-96353)

(cherry picked from commit b9634ac776c24bc4d4a57859d884a94cdfe16043)

Co-authored-by: philg314 <110174000+philg314@users.noreply.github.com>
3 years agoGH-94808: Test __build_class__ inside non-dict __builtins__ (GH-95932) (#96004)
Miss Islington (bot) [Thu, 8 Sep 2022 11:17:18 +0000 (04:17 -0700)] 
GH-94808: Test __build_class__ inside non-dict __builtins__ (GH-95932) (#96004)

(cherry picked from commit 3adb4d864bb18a51334c922a732e5e3602799ba1)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
3 years agogh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11' (GH-95937)
Miss Islington (bot) [Thu, 8 Sep 2022 11:16:52 +0000 (04:16 -0700)] 
gh-95914: Add paragraph about PEP 654 in main body of 'What's New in 3.11' (GH-95937)

(cherry picked from commit 1402d2ceca8ccef8c3538906b3f547365891d391)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
3 years ago[3.11] gh-68163: Correct conversion of Rational instances to float (GH-25619) (#96556)
Miss Islington (bot) [Thu, 8 Sep 2022 11:03:53 +0000 (04:03 -0700)] 
[3.11] gh-68163: Correct conversion of Rational instances to float (GH-25619) (#96556)

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
3 years ago[3.11] GH-96569: Avoid undefined behavior (#96616)
Mark Shannon [Thu, 8 Sep 2022 11:00:04 +0000 (12:00 +0100)] 
[3.11] GH-96569: Avoid undefined behavior (#96616)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
3 years agogh-96652: Fix faulthandler chained signal without sigaction() (GH-96666)
Miss Islington (bot) [Thu, 8 Sep 2022 10:47:07 +0000 (03:47 -0700)] 
gh-96652: Fix faulthandler chained signal without sigaction() (GH-96666)

Fix the faulthandler implementation of faulthandler.register(signal,
chain=True) if the sigaction() function is not available: don't call
the previous signal handler if it's NULL.
(cherry picked from commit c580a81af91af4b9df85e466f8b48c3c9c86c3df)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years ago[3.11] gh-88287: Add BufferingFormatter documentation. (GH-96608) (GH-96675)
Miss Islington (bot) [Thu, 8 Sep 2022 07:30:48 +0000 (00:30 -0700)] 
[3.11] gh-88287: Add BufferingFormatter documentation. (GH-96608) (GH-96675)

3 years agogh-96268: Fix loading invalid UTF-8 (GH-96270)
Miss Islington (bot) [Wed, 7 Sep 2022 21:49:17 +0000 (14:49 -0700)] 
gh-96268: Fix loading invalid UTF-8 (GH-96270)

This makes tokenizer.c:valid_utf8 match stringlib/codecs.h:decode_utf8.

It also fixes an off-by-one error introduced in 3.10 for the line number when the tokenizer reports bad UTF8.
(cherry picked from commit 8bc356a7dd50cbdb46d10b8c7e457832431f5d9e)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
3 years agogh-96577: Fixes buffer overrun in _msi module (GH-96633)
Miss Islington (bot) [Wed, 7 Sep 2022 19:46:09 +0000 (12:46 -0700)] 
gh-96577: Fixes buffer overrun in _msi module (GH-96633)

(cherry picked from commit 4114bcc9ef7595a07196bcecf9c7d6d39f57f64d)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years agogh-94808: Improve coverage of _PyBytes_FormatEx (GH-95895)
Miss Islington (bot) [Wed, 7 Sep 2022 12:18:33 +0000 (05:18 -0700)] 
gh-94808: Improve coverage of _PyBytes_FormatEx (GH-95895)

There were two specific areas not covered:

- %(name) syntax
- %*s syntax

Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit dde15f5879c3576db42ee4366fb684747c31459f)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
3 years agogh-96641: Do not expose `KeyWrapper` in `_functoolsmodule.c` (gh-96642)
Miss Islington (bot) [Wed, 7 Sep 2022 11:50:00 +0000 (04:50 -0700)] 
gh-96641: Do not expose `KeyWrapper` in `_functoolsmodule.c` (gh-96642)

(cherry picked from commit 2fd7246e97c8cc09b4e3f22933693f9d68f08163)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
3 years agogh-96611: Fix error message for invalid UTF-8 in mid-multiline string (GH-96623)
Miss Islington (bot) [Tue, 6 Sep 2022 23:40:17 +0000 (16:40 -0700)] 
gh-96611: Fix error message for invalid UTF-8 in mid-multiline string (GH-96623)

(cherry picked from commit 05692c67c51b78a5a5a7bb61d646519025e38015)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
3 years agoGH-96572: fix use after free in trace refs build mode (GH-96618)
Miss Islington (bot) [Tue, 6 Sep 2022 18:28:18 +0000 (11:28 -0700)] 
GH-96572: fix use after free in trace refs build mode (GH-96618)

(cherry picked from commit 67444902a0f10419a557d0a2d3b8675c31b075a9)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years ago[3.11] GH-96612: Skip incomplete frames in tracemalloc traces. (GH-96613) (#96617)
Mark Shannon [Tue, 6 Sep 2022 17:42:41 +0000 (18:42 +0100)] 
[3.11] GH-96612: Skip incomplete frames in tracemalloc traces. (GH-96613) (#96617)

(cherry picked from commit 95e271b2266b8f2e7b60ede86ccf3ede4a7f83eb)

Co-authored-by: Mark Shannon <mark@hotpy.org>
3 years ago[3.11] gh-92986: Fix ast.unparse when ImportFrom.level is None (GH-92992) (GH-96593)
Batuhan Taskaya [Tue, 6 Sep 2022 10:23:26 +0000 (13:23 +0300)] 
[3.11] gh-92986: Fix ast.unparse when ImportFrom.level is None (GH-92992) (GH-96593)

This doesn't happen naturally, but is allowed by the ASDL and compiler.
We don't want to change ASDL for backward compatibility reasons
(GH-57645, GH-92987)
(cherry picked from commit 200c9a8da0e2b892c476807e986009c01327e781)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
3 years agogh-96559: Fixes Windows launcher handling of defaults using old-style tags, and adds...
Miss Islington (bot) [Mon, 5 Sep 2022 22:13:24 +0000 (15:13 -0700)] 
gh-96559: Fixes Windows launcher handling of defaults using old-style tags, and adds What's New section (GH-96595)

(cherry picked from commit 80a9bd2e94b1759a7669fa811ed3526eb137c92d)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years ago[3.11] [doc] Update example in traceback doc (GH-96600) (GH-96603)
Irit Katriel [Mon, 5 Sep 2022 21:43:27 +0000 (22:43 +0100)] 
[3.11] [doc] Update example in traceback doc (GH-96600) (GH-96603)

This Monty Python reference is of-its-time. It could seem inappropriate in the context of today's sensibilities around mental health.

Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit c4999f261fb0cb28ef713b48ef2e81ca5a3eb1e1)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>