]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agogh-97616: list_resize() checks for integer overflow (GH-97617)
Miss Islington (bot) [Wed, 28 Sep 2022 23:03:39 +0000 (16:03 -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:32:59 +0000 (11:32 -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:44:04 +0000 (10:44 -0700)] 
fixup policy docs (GH-97618)

(cherry picked from commit 9a404b173e57ce171a867cfc3776cdf88d6c553f)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years ago[3.10] gh-65046: Add note about logging from async code. (GH-97602) (GH-97609)
Miss Islington (bot) [Wed, 28 Sep 2022 04:31:31 +0000 (21:31 -0700)] 
[3.10] gh-65046: Add note about logging from async code. (GH-97602) (GH-97609)

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:58 +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-73588: Fix generation of the default name of tkinter.Checkbutton. (GH-97547)
Miss Islington (bot) [Tue, 27 Sep 2022 11:39:31 +0000 (04:39 -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:23 +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 ago[3.10] gh-97567: Fixup cached_statements default value in sqlite3.connect docs (...
Jia Junjie [Tue, 27 Sep 2022 07:25:13 +0000 (15:25 +0800)] 
[3.10] gh-97567: Fixup cached_statements default value in sqlite3.connect docs (#97568)

This docs inconsistency was introduced by the 3.10 backport of gh-94629: gh-94646

3 years agogh-97545: Make Semaphore run faster. (GH-97549)
Miss Islington (bot) [Mon, 26 Sep 2022 23:57:52 +0000 (16:57 -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:37:38 +0000 (15:37 -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:46:04 +0000 (08:46 -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)
Miss Islington (bot) [Mon, 26 Sep 2022 04:13:04 +0000 (21:13 -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:04:59 +0000 (02:04 -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:58:50 +0000 (01:58 -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:21 +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:53 +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:01:45 +0000 (15:01 -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-77171: Document that wave only supports simple PCM files (GH-97510)
Miss Islington (bot) [Fri, 23 Sep 2022 13:04:46 +0000 (06:04 -0700)] 
gh-77171: Document that wave only supports simple PCM files (GH-97510)

(cherry picked from commit dc9065f8c2ddc483d387d977e0818d131fa67420)

Co-authored-by: Steve Dower <steve.dower@python.org>
3 years agogh-75608: Add Windows FAQ entry for missing UCRT (GH-92765)
Miss Islington (bot) [Fri, 23 Sep 2022 10:51:36 +0000 (03:51 -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-96397: Document that keywords in calls need not be identifiers (GH-96393)
Miss Islington (bot) [Thu, 22 Sep 2022 18:17:30 +0000 (11:17 -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:23:48 +0000 (10:23 -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-90155: Fix bug in asyncio.Semaphore and strengthen FIFO guarantee (GH-93222)
Miss Islington (bot) [Thu, 22 Sep 2022 17:01:14 +0000 (10:01 -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 agogh-97005: Update libexpat from 2.4.7 to 2.4.9 (gh-97006)
Miss Islington (bot) [Thu, 22 Sep 2022 13:01:08 +0000 (06:01 -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.10] gh-96954: Add tests for unicodedata.name/lookup (GH-96955) (GH-96992)
Łukasz Langa [Wed, 21 Sep 2022 13:51:33 +0000 (15:51 +0200)] 
[3.10] gh-96954: Add tests for unicodedata.name/lookup (GH-96955) (GH-96992)

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-96990)
Miss Islington (bot) [Wed, 21 Sep 2022 13:12:12 +0000 (06:12 -0700)] 
gh-81039: Add small example of f-string's "=}" to tutorial (gh-92291) (gh-96990)

(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 01:55:13 +0000 (18:55 -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 ago[3.10] GH-95921: Fix positions for some chained comparisons (GH-96968) (GH-96974)
Brandt Bucher [Tue, 20 Sep 2022 22:26:56 +0000 (15:26 -0700)] 
[3.10] GH-95921: Fix positions for some chained comparisons (GH-96968) (GH-96974)

(cherry picked from commit dfc73b57247aac575c83055d960c03bdc28b51fd)

Automerge-Triggered-By: GH:brandtbucher
3 years ago[3.10] GH-96864: Check for error between line and opcode events (GH-96969)
Brandt Bucher [Tue, 20 Sep 2022 18:42:06 +0000 (11:42 -0700)] 
[3.10] GH-96864: Check for error between line and opcode events (GH-96969)

(cherry picked from commit c10e33ac119d96c4d88d5ae8b59e65a76ae0ad3c)

3 years ago[3.10] gh-68966: Make mailcap refuse to match unsafe filenames/types/params (GH-91993...
Miss Islington (bot) [Tue, 20 Sep 2022 11:12:35 +0000 (04:12 -0700)] 
[3.10] gh-68966: Make mailcap refuse to match unsafe filenames/types/params (GH-91993) (GH-93543)

* gh-68966: Make mailcap refuse to match unsafe filenames/types/params (GH-91993)
(cherry picked from commit b9509ba7a9c668b984dab876c7926fe1dc5aa0ba)
* Add a What's New entry for 3.10.8.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years ago[3.10] gh-96917: link to typing.readthedocs.io from typing.rst (GH-96921) (GH-96937)
Shantanu [Tue, 20 Sep 2022 10:15:48 +0000 (03:15 -0700)] 
[3.10] gh-96917: link to typing.readthedocs.io from typing.rst (GH-96921) (GH-96937)

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 ago[3.10] gh-96727: Document restrictions on Handler.emit() with respect to locking...
Vinay Sajip [Tue, 20 Sep 2022 08:54:31 +0000 (09:54 +0100)] 
[3.10] gh-96727: Document restrictions on Handler.emit() with respect to locking. (GH-96948) (GH-96951)

(cherry picked from commit 6ad47b41a650a13b4a9214309c10239726331eb8)

3 years agogh-96387: take_gil() resets drop request before exit (GH-96869) (GH-96941)
Miss Islington (bot) [Tue, 20 Sep 2022 00:36:26 +0000 (17:36 -0700)] 
gh-96387: take_gil() resets drop request before exit (GH-96869) (GH-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)
(cherry picked from commit 6ff54716f1073a4bcfed8a1ec0b518c489c1af0d)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agogh-96821: Fix undefined behaviour in `_testcapimodule.c` (GH-96915) (GH-96926)
Miss Islington (bot) [Mon, 19 Sep 2022 10:20:23 +0000 (03:20 -0700)] 
gh-96821: Fix undefined behaviour in `_testcapimodule.c` (GH-96915) (GH-96926)

* 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 ago[3.10] gh-96861: Check for unset sys.executable during venv creation. (GH-96887)...
Miss Islington (bot) [Sun, 18 Sep 2022 20:53:04 +0000 (13:53 -0700)] 
[3.10] gh-96861: Check for unset sys.executable during venv creation. (GH-96887) (GH-96918)

(cherry picked from commit 2cd70ffb3fe22d778d0bb6ec220fdf67dccc1be6)

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
3 years agogh-87179: Fix more IDLE class headers (GH-96899)
Miss Islington (bot) [Sat, 17 Sep 2022 22:14:54 +0000 (15:14 -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 agogh-95778: Mention sys.set_int_max_str_digits() in error message (GH-96874)
Miss Islington (bot) [Fri, 16 Sep 2022 18:30:05 +0000 (11:30 -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:20:25 +0000 (14:20 -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-95778: Fix `sys.set_int_max_str_digits()` parameter name (GH-96798)
Miss Islington (bot) [Tue, 13 Sep 2022 16:45:18 +0000 (09:45 -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-96678: Fix UB of null pointer arithmetic (GH-96782)
Miss Islington (bot) [Tue, 13 Sep 2022 15:03:51 +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.10] gh-96702: Order methods before attrs in sqlite3.Connection docs (GH-96703...
Erlend E. Aasland [Tue, 13 Sep 2022 08:47:13 +0000 (10:47 +0200)] 
[3.10] gh-96702: Order methods before attrs in sqlite3.Connection docs (GH-96703). (#96789)

(cherry picked from commit 49cceeb5c998a51bb12b7dbde17b53647bb52113)

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) [Mon, 12 Sep 2022 14:46:26 +0000 (07:46 -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 agogh-94972: document that shield users need to keep a reference to their task (GH-96724)
Miss Islington (bot) [Sat, 10 Sep 2022 14:57:44 +0000 (07:57 -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-96710: Make the test timing more lenient for the int/str DoS regression test....
Miss Islington (bot) [Fri, 9 Sep 2022 20:13:45 +0000 (13:13 -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 agoGH-74116: Allow multiple drain waiters for asyncio.StreamWriter (GH-94705)
Miss Islington (bot) [Thu, 8 Sep 2022 15:42:08 +0000 (08:42 -0700)] 
GH-74116: Allow multiple drain waiters for asyncio.StreamWriter (GH-94705)

(cherry picked from commit e5b2453e61ba5376831093236d598ef5f9f1de61)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agogh-90467: StreamReaderProtocol - add strong reference to created task (GH-96323)
Miss Islington (bot) [Thu, 8 Sep 2022 15:39:20 +0000 (08:39 -0700)] 
gh-90467: StreamReaderProtocol - add strong reference to created task (GH-96323)

(cherry picked from commit e860e521ec0d84e175269aeb15cf24bd6053ad17)

Co-authored-by: Kirill <iam@python273.pw>
3 years agogh-96352: Set AttributeError context in _PyObject_GenericGetAttrWithDict (GH-96353)
Miss Islington (bot) [Thu, 8 Sep 2022 11:46:53 +0000 (04:46 -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-96652: Fix faulthandler chained signal without sigaction() (GH-96666)
Miss Islington (bot) [Thu, 8 Sep 2022 10:43:24 +0000 (03:43 -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.10] gh-88287: Add BufferingFormatter documentation. (GH-96608) (GH-96674)
Miss Islington (bot) [Thu, 8 Sep 2022 07:33:16 +0000 (00:33 -0700)] 
[3.10] gh-88287: Add BufferingFormatter documentation. (GH-96608) (GH-96674)

3 years agogh-96577: Fixes buffer overrun in _msi module (GH-96633)
Miss Islington (bot) [Wed, 7 Sep 2022 19:46:15 +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 ago[doc] Update example in traceback doc (GH-96600) (GH-96605)
Irit Katriel [Wed, 7 Sep 2022 11:56:25 +0000 (12:56 +0100)] 
[doc] Update example in traceback doc (GH-96600) (GH-96605)

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)

3 years agogh-96641: Do not expose `KeyWrapper` in `_functoolsmodule.c` (gh-96642)
Miss Islington (bot) [Wed, 7 Sep 2022 11:50:15 +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:36:03 +0000 (16:36 -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 agoMerge remote-tracking branch 'upstream/3.10' into 3.10
Pablo Galindo [Tue, 6 Sep 2022 09:18:57 +0000 (10:18 +0100)] 
Merge remote-tracking branch 'upstream/3.10' into 3.10

3 years agoPost 3.10.7
Pablo Galindo [Tue, 6 Sep 2022 09:18:34 +0000 (10:18 +0100)] 
Post 3.10.7

3 years agoAdd upstream openssl 1.1.1q patch for trivial build error on macOS (GH-96594)
Miss Islington (bot) [Mon, 5 Sep 2022 18:56:21 +0000 (11:56 -0700)] 
Add upstream openssl 1.1.1q patch for trivial build error on macOS (GH-96594)

(cherry picked from commit 991b3712a11a705efc6e45d22643bb2ccfb3eca5)

Co-authored-by: Ned Deily <nad@python.org>
3 years agogh-92986: Fix ast.unparse when ImportFrom.level is None (GH-92992)
Miss Islington (bot) [Mon, 5 Sep 2022 17:39:52 +0000 (10:39 -0700)] 
gh-92986: Fix ast.unparse when ImportFrom.level is None (GH-92992)

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>
3 years agoPython 3.10.7 v3.10.7
Pablo Galindo [Mon, 5 Sep 2022 12:02:13 +0000 (13:02 +0100)] 
Python 3.10.7

3 years ago[3.10] gh-84095: Fill documentation gap regarding user-defined objects. (GH-… (GH...
Vinay Sajip [Mon, 5 Sep 2022 07:21:22 +0000 (08:21 +0100)] 
[3.10] gh-84095: Fill documentation gap regarding user-defined objects. (GH-… (GH-96576)

3 years agoDocs: alphabetically order sqlite3.Cursor attrs (GH-96565)
Miss Islington (bot) [Sun, 4 Sep 2022 21:41:13 +0000 (14:41 -0700)] 
Docs: alphabetically order sqlite3.Cursor attrs (GH-96565)

(cherry picked from commit 9e5568578234f0ecd003247c8a2deaeb69976b4b)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years ago[3.10] gh-95778: Correctly pre-check for int-to-str conversion (GH-96537) (#96563)
Gregory P. Smith [Sun, 4 Sep 2022 16:54:56 +0000 (09:54 -0700)] 
[3.10] gh-95778: Correctly pre-check for int-to-str conversion (GH-96537) (#96563)

Converting a large enough `int` to a decimal string raises `ValueError` as expected. However, the raise comes _after_ the quadratic-time base-conversion algorithm has run to completion. For effective DOS prevention, we need some kind of check before entering the quadratic-time loop. Oops! =)

The quick fix: essentially we catch _most_ values that exceed the threshold up front. Those that slip through will still be on the small side (read: sufficiently fast), and will get caught by the existing check so that the limit remains exact.

The justification for the current check. The C code check is:
```c
max_str_digits / (3 * PyLong_SHIFT) <= (size_a - 11) / 10
```

In GitHub markdown math-speak, writing $M$ for `max_str_digits`, $L$ for `PyLong_SHIFT` and $s$ for `size_a`, that check is:
$$\left\lfloor\frac{M}{3L}\right\rfloor \le \left\lfloor\frac{s - 11}{10}\right\rfloor$$

From this it follows that
$$\frac{M}{3L} < \frac{s-1}{10}$$
hence that
$$\frac{L(s-1)}{M} > \frac{10}{3} > \log_2(10).$$
So
$$2^{L(s-1)} > 10^M.$$
But our input integer $a$ satisfies $|a| \ge 2^{L(s-1)}$, so $|a|$ is larger than $10^M$. This shows that we don't accidentally capture anything _below_ the intended limit in the check.

<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->

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

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
3 years agogh-68163: Correct conversion of Rational instances to float (GH-25619) (GH-96557)
Miss Islington (bot) [Sun, 4 Sep 2022 12:40:24 +0000 (05:40 -0700)] 
gh-68163: Correct conversion of Rational instances to float (GH-25619) (GH-96557)

* gh-68163: Correct conversion of Rational instances to float

Also document that numerator/denominator properties are instances of Integral.

Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
(cherry picked from commit 8464b754c4168586b99e2135ccd2567e025625a9)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
3 years agogh-95778: remove unneeded doc note on float.as_integer_ratio (GH-96553)
Miss Islington (bot) [Sun, 4 Sep 2022 07:12:34 +0000 (00:12 -0700)] 
gh-95778: remove unneeded doc note on float.as_integer_ratio (GH-96553)

Per mdickinson@'s comment on the main branch PR.
(cherry picked from commit 69bb83c2bf254f92491d527ccec1ff41897add56)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years agodoc typo: spell limitation (GH-96542)
Miss Islington (bot) [Sun, 4 Sep 2022 06:30:11 +0000 (23:30 -0700)] 
doc typo: spell limitation (GH-96542)

(cherry picked from commit af6359dd5c5e20adec12501aaa6074716c316e41)

Co-authored-by: Mehrdad Moradizadeh <mhrddmoradii@gmail.com>
3 years ago[3.10] gh-90195: Unset logger disabled flag when configuring it. (GH-96530) (GH-96533)
Vinay Sajip [Sat, 3 Sep 2022 14:10:04 +0000 (15:10 +0100)] 
[3.10] gh-90195: Unset logger disabled flag when configuring it. (GH-96530) (GH-96533)

3 years ago[3.10] gh-89087: Update logging.QueueHandler documentation to clarify record… (GH...
Miss Islington (bot) [Sat, 3 Sep 2022 12:17:07 +0000 (05:17 -0700)] 
[3.10] gh-89087: Update logging.QueueHandler documentation to clarify record… (GH-96527) (GH-96529)

3 years agogh-75500: Update idlelib/help.html (GH-96523)
Miss Islington (bot) [Sat, 3 Sep 2022 07:59:15 +0000 (00:59 -0700)] 
gh-75500: Update idlelib/help.html  (GH-96523)

(cherry picked from commit 837ce6460d6554e9d7a847951ca5108ac6926ee5)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
3 years agobpo-30419: DOC: Update missing information in bdb docs (GH-1687)
Miss Islington (bot) [Fri, 2 Sep 2022 17:49:23 +0000 (10:49 -0700)] 
bpo-30419: DOC: Update missing information in  bdb docs (GH-1687)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit ccce9b77e1f599e05425eadc0cc372d142fe05e0)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
3 years ago[3.10] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96501)
Gregory P. Smith [Fri, 2 Sep 2022 16:51:49 +0000 (09:51 -0700)] 
[3.10] gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96501)

Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds.

This PR comes fresh from a pile of work done in our private PSRT security response team repo.

This backports https://github.com/python/cpython/pull/96499 aka 511ca9452033ef95bc7d7fc404b8161068226002

Signed-off-by: Christian Heimes [Red Hat] <christian@python.org>
Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org>
Reviews via the private PSRT repo via many others (see the NEWS entry in the PR).

<!-- gh-issue-number: gh-95778 -->
* Issue: gh-95778
<!-- /gh-issue-number -->

I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#).

3 years agogh-96168: Improve sqlite3 dict_factory example (GH-96457)
Miss Islington (bot) [Thu, 1 Sep 2022 21:55:41 +0000 (14:55 -0700)] 
gh-96168: Improve sqlite3 dict_factory example (GH-96457)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit 91f40f3f78d6016a283989e32ec3d1fb61bcebca)

Co-authored-by: Erlend E. Aasland <erlend.aasland@innova.no>
3 years ago[3.10] gh-96414: Inline code examples in sqlite3 docs (GH-96442). (#96453)
Erlend E. Aasland [Wed, 31 Aug 2022 08:10:55 +0000 (10:10 +0200)] 
[3.10] gh-96414: Inline code examples in sqlite3 docs (GH-96442). (#96453)

* [3.10] gh-96414: Inline code examples in sqlite3 docs (GH-96442).
(cherry picked from commit f7e7bf161aaec5a5cffdcec7c97e1f09e445421b)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agoDocs: normalise sqlite3 placeholder how-to heading (GH-96413)
Miss Islington (bot) [Tue, 30 Aug 2022 20:56:02 +0000 (13:56 -0700)] 
Docs: normalise sqlite3 placeholder how-to heading (GH-96413)

(cherry picked from commit 7b01ce7953c0e24aa7aeaf207216fc9e7aefd18a)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agoDocs: Improve clarity for bytes.hex() (GH-95257)
Miss Islington (bot) [Tue, 30 Aug 2022 11:16:34 +0000 (04:16 -0700)] 
Docs: Improve clarity for bytes.hex() (GH-95257)

(cherry picked from commit 860fa351452de1502da12ec6f027d3f72dfc309f)

Co-authored-by: Tim Burke <tim.burke@gmail.com>
3 years ago[3.10] Clean up junk & fix typo in 3.10.6 release notes (#95997)
Marti Raudsepp [Tue, 30 Aug 2022 10:58:21 +0000 (13:58 +0300)] 
[3.10] Clean up junk & fix typo in 3.10.6 release notes (#95997)

3 years ago[3.10] gh-91305: Add a note about DatagramHandler and DNS latency. (GH-96380) (GH...
Miss Islington (bot) [Tue, 30 Aug 2022 08:58:14 +0000 (01:58 -0700)] 
[3.10] gh-91305: Add a note about DatagramHandler and DNS latency. (GH-96380) (GH-96400)

3 years agoDoc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)
Miss Islington (bot) [Tue, 30 Aug 2022 08:38:53 +0000 (01:38 -0700)] 
Doc: Update Py_TPFLAGS_HAVE_FINALIZE in docs (GH-96273)

It is now deprecated and the docs should reflect that.
(cherry picked from commit 9625de6fab4597bcd04ec390b680b053b0533816)

Co-authored-by: da-woods <dw-git@d-woods.co.uk>
3 years ago[3.10] Docs: normalize SQL style in sqlite3 docs (GH-96403). (#96409)
Erlend E. Aasland [Tue, 30 Aug 2022 08:35:21 +0000 (10:35 +0200)] 
[3.10] Docs: normalize SQL style in sqlite3 docs (GH-96403). (#96409)

(cherry picked from commit 6d403e264a7dcd1544a91708f139c6dd8612204d)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agogh-95231: Disable md5 & crypt modules if FIPS is enabled (GH-94742)
Miss Islington (bot) [Tue, 30 Aug 2022 07:59:56 +0000 (00:59 -0700)] 
gh-95231: Disable md5 & crypt modules if FIPS is enabled (GH-94742)

If kernel fips is enabled, we get permission error upon doing
`import crypt`. So, if kernel fips is enabled, disable the
unallowed hashing methods.

Python 3.9.1 (default, May 10 2022, 11:36:26)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import crypt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.9/crypt.py", line 117, in <module>
    _add_method('MD5', '1', 8, 34)
  File "/usr/lib/python3.9/crypt.py", line 94, in _add_method
    result = crypt('', salt)
  File "/usr/lib/python3.9/crypt.py", line 82, in crypt
    return _crypt.crypt(word, salt)
PermissionError: [Errno 1] Operation not permitted

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
(cherry picked from commit 2fa03b1b0708d5d74630c351ec9abd2aac7550da)

Co-authored-by: Shreenidhi Shedi <53473811+sshedi@users.noreply.github.com>
3 years ago[3.10] gh-94682: Build and test with OpenSSL 1.1.1q (gh-94683) (gh-96391)
Christian Heimes [Mon, 29 Aug 2022 18:02:00 +0000 (20:02 +0200)] 
[3.10] gh-94682: Build and test with OpenSSL 1.1.1q (gh-94683) (gh-96391)

Co-authored-by: Christian Heimes <christian@python.org>
3 years ago[3.10] gh-95432: Add doctests for the sqlite3 docs (GH-96225) (#96379)
Erlend E. Aasland [Mon, 29 Aug 2022 10:29:46 +0000 (12:29 +0200)] 
[3.10] gh-95432: Add doctests for the sqlite3 docs (GH-96225) (#96379)

As a consequence of the added test, this commit also includes
fixes for broken examples.

- Add separate namespace for trace tests bco. module level callback
- Move more backup and cursor examples under separate namespaces.
(cherry picked from commit bf9259776dff5348bc854983409ea68618c1f174)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
3 years agoGH-96359: Fix docs that claim int(0|1) doesn't match False (GH-96361)
Miss Islington (bot) [Mon, 29 Aug 2022 07:14:33 +0000 (00:14 -0700)] 
GH-96359: Fix docs that claim int(0|1) doesn't match False (GH-96361)

(cherry picked from commit 3d3a86ed40626471b2c9e7f1336b228eb0dd0879)

Co-authored-by: Jonathan Oberländer <github@l3vi.de>
3 years ago[3.10] gh-96191: Update the configure file to use GitHub issue (gh-96211) (gh-96376)
Dong-hee Na [Mon, 29 Aug 2022 06:50:36 +0000 (15:50 +0900)] 
[3.10] gh-96191: Update the configure file to use GitHub issue (gh-96211) (gh-96376)

3 years agogh-95950: Add a test for both `csv.Dialect` and `kwargs` (GH-95951)
Miss Islington (bot) [Mon, 29 Aug 2022 01:11:02 +0000 (18:11 -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 ago[3.10] gh-95994: Clarify escaped newlines. (GH-96066) (#96360)
Ezio Melotti [Sun, 28 Aug 2022 13:17:01 +0000 (15:17 +0200)] 
[3.10] gh-95994: Clarify escaped newlines. (GH-96066) (#96360)

* gh-95994: clarify escaped newlines.

* Rephrase ambiguous sentence.

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
* Use `<newline>` in escape sequences table.

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

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
3 years agogh-96021: Explicitly tear down the IsolatedAsyncioTestCase loop in tests (GH-96135...
Miss Islington (bot) [Sun, 28 Aug 2022 05:35:39 +0000 (22:35 -0700)] 
gh-96021: Explicitly tear down the IsolatedAsyncioTestCase loop in tests (GH-96135) (GH-96235)

Tests for IsolatedAsyncioTestCase.debug() rely on the runner be closed
in __del__. It makes tests depending on the GC an unreliable on other
implementations. It is better to tear down the loop explicitly even if
currently there is no a public API for this.
(cherry picked from commit 4de06e3cc0a58d73934f9a2759ad9cd2f6b031b0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years ago[3.10] gh-89047: Fix msecs computation so you never end up with 1000 msecs. (GH-96340...
Miss Islington (bot) [Sat, 27 Aug 2022 14:10:17 +0000 (07:10 -0700)] 
[3.10] gh-89047: Fix msecs computation so you never end up with 1000 msecs. (GH-96340) (GH-96342)

3 years ago[3.10] gh-92007: Handle elevation errors in NTEventLogHandler more grace… (GH-96322...
Miss Islington (bot) [Sat, 27 Aug 2022 11:37:55 +0000 (04:37 -0700)] 
[3.10] gh-92007: Handle elevation errors in NTEventLogHandler more grace… (GH-96322) (GH-96338)

3 years ago[3.10] gh-77116: Add SMTP buffering example to logging cookbook. (GH-96324) (GH-96325)
Miss Islington (bot) [Sat, 27 Aug 2022 11:15:23 +0000 (04:15 -0700)] 
[3.10] gh-77116: Add SMTP buffering example to logging cookbook. (GH-96324) (GH-96325)

3 years agofixes gh-96292: Fix Trivial Typo in cpython/Modules/atexitmodule.c (GH-96327)
Miss Islington (bot) [Sat, 27 Aug 2022 05:53:47 +0000 (22:53 -0700)] 
fixes gh-96292: Fix Trivial Typo in cpython/Modules/atexitmodule.c (GH-96327)

(cherry picked from commit 0ace820bec8892d621a4aadc1feb6c56e25560bf)

Co-authored-by: Ansab Gillani <56605828+ansabgillani@users.noreply.github.com>
3 years agofix threading.Event.isSet() docstring (GH-96297)
Miss Islington (bot) [Sat, 27 Aug 2022 05:30:41 +0000 (22:30 -0700)] 
fix threading.Event.isSet() docstring (GH-96297)

fixes gh-96296
(cherry picked from commit e53444051018af3351cc26c4bf1ed2d380292016)

Co-authored-by: Daniel Giger <danielg3432@gmail.com>
3 years agogh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242)
Miss Islington (bot) [Fri, 26 Aug 2022 02:13:04 +0000 (19:13 -0700)] 
gh-96197: Define the behavior of repr if sys.displayhook is lost (gh-96242)

(cherry picked from commit 0319cd6825f3c247a875c91493a38992fb33a5b3)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
3 years agogh-96197: Fix expression when :func:`sys.breakpointhook is missing (gh-96293)
Miss Islington (bot) [Fri, 26 Aug 2022 02:03:16 +0000 (19:03 -0700)] 
gh-96197: Fix expression when :func:`sys.breakpointhook is missing (gh-96293)

(cherry picked from commit 47d406ffc4946b023e38322c5235bec25f068481)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
3 years agobpo-46744: Support "-Win32" and make platform flags case insensitive in Windows build...
Steve Dower [Thu, 25 Aug 2022 20:16:15 +0000 (21:16 +0100)] 
bpo-46744: Support "-Win32" and make platform flags case insensitive in Windows build scripts. (GH-31803)

Co-authored-by: conioh <10606081+conioh@users.noreply.github.com>
3 years agoClarify API stability of PyTypeObject in relation to static types. (GH-96217)
Miss Islington (bot) [Thu, 25 Aug 2022 13:42:32 +0000 (06:42 -0700)] 
Clarify API stability of PyTypeObject in relation to static types. (GH-96217)

Fixes:
https://github.com/python/cpython/issues/95300

Related:
https://github.com/python/cpython/issues/91271
(cherry picked from commit caa2a9799a47294441e4206037620322eea9ed06)

Co-authored-by: ov2k <ov2k.github@gmail.com>
3 years ago[3.10] gh-91070: Add note about SysLogHandler on macOS 12.x (Monterey). (GH-94803...
Miss Islington (bot) [Thu, 25 Aug 2022 07:37:42 +0000 (00:37 -0700)] 
[3.10] gh-91070: Add note about SysLogHandler on macOS 12.x (Monterey). (GH-94803) (GH-96261)

3 years agogh-95243: Mitigate the race condition in testSockName (GH-96173)
Miss Islington (bot) [Thu, 25 Aug 2022 02:01:50 +0000 (19:01 -0700)] 
gh-95243: Mitigate the race condition in testSockName (GH-96173)

find_unused_port() has an inherent race condition, but we can't use
bind_port() as that uses .getsockname() which this test is exercising.

Try binding to unused ports a few times before failing.

Signed-off-by: Ross Burton <ross.burton@arm.com>
(cherry picked from commit df110126971d0271a977ce10779083b3e335b4da)

Co-authored-by: Ross Burton <ross.burton@arm.com>
3 years agoGH-96179: Fix misleading example on the bisect documentation (GH-96228)
Miss Islington (bot) [Wed, 24 Aug 2022 15:55:45 +0000 (08:55 -0700)] 
GH-96179: Fix misleading example on the bisect documentation (GH-96228)

The `movies[bisect(movies, 1960, key=by_year)]` will actually return only movies **after** 1960.
(cherry picked from commit 4317b25a2323ae4be04574e45de0e335c571c463)

Co-authored-by: prego <pedropregueiro@gmail.com>
3 years agogh-96197: Define the behavior of breakpoint if sys.breakpointhook is lost (gh-96231)
Miss Islington (bot) [Wed, 24 Aug 2022 14:20:38 +0000 (07:20 -0700)] 
gh-96197: Define the behavior of breakpoint if sys.breakpointhook is lost (gh-96231)

(cherry picked from commit 09563a764ebc54f98087c128419f46cf0822b4b7)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
3 years ago[3.10] gh-94635: Frame sqlite3 how-to headings as such & move default adapters to...
Erlend E. Aasland [Wed, 24 Aug 2022 07:52:16 +0000 (09:52 +0200)] 
[3.10] gh-94635: Frame sqlite3 how-to headings as such & move default adapters to reference (GH-96136) (#96227)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>.
(cherry picked from commit 6bda5b85b53443f3467865fbf85cbe72932e7cd6)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
3 years ago[3.10] GH-96071: add regression test for GH-96071 (GH-96137) (#96205)
Kumar Aditya [Tue, 23 Aug 2022 22:28:54 +0000 (03:58 +0530)] 
[3.10] GH-96071: add regression test for GH-96071 (GH-96137) (#96205)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
3 years agogh-96175: add missing self._localName assignment in `xml.dom.minidom.Attr` (GH-96176)
Miss Islington (bot) [Tue, 23 Aug 2022 16:42:10 +0000 (09:42 -0700)] 
gh-96175: add missing self._localName assignment in `xml.dom.minidom.Attr` (GH-96176)

X-Ref: https://github.com/python/typeshed/pull/8590GH-discussion_r951473977

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 58f6953d6d3fe20d972bfa2f6e982206adcf1353)

Co-authored-by: Kevin Kirsche <Kev.Kirsche+GitHub@gmail.com>