Commit Graph

114165 Commits

Author SHA1 Message Date
Miss Islington (bot) dbde686a49
gh-97591: In `Exception.__setstate__()` acquire strong references before calling `tp_hash` slot (GH-97700)
(cherry picked from commit d639438609)

Co-authored-by: Ofey Chan <ofey206@gmail.com>
2022-10-01 21:19:57 -07:00
Miss Islington (bot) 9189cd6b05
gh-95588: Drop the safety claim from `ast.literal_eval` docs. (GH-95919)
It was never really safe and this claim conflicts directly with the big warning in the docs about it being able to crash the interpreter.
(cherry picked from commit 8baef8ae36)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-10-01 18:21:15 -07:00
Miss Islington (bot) 35a394c556
Fix capitalization of Unix in documentation (GH-96913)
(cherry picked from commit bd7d0e875e)

Co-authored-by: Will Hawkins <8715530+hawkinsw@users.noreply.github.com>
2022-10-01 16:51:34 -07:00
Miss Islington (bot) 3614bbb8eb
gh-90908: Document asyncio.Task.cancelling() and asyncio.Task.uncancel() (GH-95253)
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
(cherry picked from commit f00645d5db)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2022-10-01 11:10:04 -07:00
Miss Islington (bot) 95609525de
GH-96827: Don't touch closed loops from executor threads (GH-96837)
* When chaining futures, skip callback if loop closed.
* When shutting down an executor, don't wake a closed loop.
(cherry picked from commit e9d63760fe)

Co-authored-by: Guido van Rossum <guido@python.org>
2022-09-30 13:23:33 -07:00
Miss Islington (bot) 3124618fd5
GH-97592: Fix crash in C remove_done_callback due to evil code (GH-97660)
Evil code could cause fut_callbacks to be cleared when PyObject_RichCompareBool is called.
(cherry picked from commit 63780f4599)

Co-authored-by: Guido van Rossum <guido@python.org>
2022-09-30 13:22:48 -07:00
Miss Islington (bot) cdc01eaed9
gh-87597: Document TimeoutExpired.stdout & .stderr types (GH-97685)
This documents the behavior that has always been the case since timeout
support was introduced in Python 3.3.
(cherry picked from commit b05dd79649)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2022-09-30 10:54:12 -07:00
Miss Islington (bot) ab2f1a6152
bpo-35675: IDLE - separate config_key window and frame (GH-11427)
bpo-35598: IDLE: Refactor window and frame class

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

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2022-09-30 10:08:36 -07:00
Miss Islington (bot) 6537bc9a49
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 9f2f1dd131)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-09-30 06:38:41 -07:00
Steve Dower 0fbee30f71
gh-90989: Clarify some installer text (GH-97668) 2022-09-30 13:48:19 +01:00
Miss Islington (bot) 1a620c579d
[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>
2022-09-30 10:12:22 +01:00
Miss Islington (bot) 27891e0d7b
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 9a11ed8e50)

Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
2022-09-29 16:25:10 -07:00
Miss Islington (bot) bad137bd93
closes gh-97650: correct sphinx executable (gh-97651)
(cherry picked from commit 0179a82caa)

Co-authored-by: NoSuck <NoSuck@users.noreply.github.com>
2022-09-29 16:00:33 -07:00
Miss Islington (bot) 11b66717fe
gh-52597: Add position-only markers for os functions (GH-94735)
(cherry picked from commit c759944f16)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-09-29 06:51:39 -07:00
Miss Islington (bot) 9cf41f4a7a
gh-91212: Fixed flickering when the tracer is turned off (GH-95129)
Fixed flickering when the tracer is turned off.
(cherry picked from commit 4652093e1b)

Co-authored-by: Shin-myoung-serp <relent95@naver.com>
2022-09-29 00:07:07 -07:00
Miss Islington (bot) f418842a5c
[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 675e3470cc)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-09-28 18:06:21 -07:00
Miss Islington (bot) 94582bb643
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 83a0f44ffd)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-09-28 16:46:11 -07:00
Miss Islington (bot) 7d60d10b63
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 a5f092f3c4)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-09-28 15:28:38 -07:00
Miss Islington (bot) 744087474b
Fix typo in error message in plistlib (GH-97540)
(cherry picked from commit 81b9d9ddc2)

Co-authored-by: Jakob Weigert <jakobjw@users.noreply.github.com>
2022-09-28 11:23:56 -07:00
Miss Islington (bot) b8bc11e501
fixup policy docs (GH-97618)
(cherry picked from commit 9a404b173e)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-09-28 10:42:28 -07:00
Miss Islington (bot) 88ab19e47e
Fix docs on conditional expression grouping (GH-96447) (GH-97606) 2022-09-28 08:45:48 -05:00
Miss Islington (bot) 73557d5bd2
[3.11] gh-65046: Add note about logging from async code. (GH-97602) (GH-97608) 2022-09-28 05:32:01 +01:00
Miss Islington (bot) c2ec6da74f
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 cc0f3a10f0)

Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-09-27 17:33:32 -07:00
Miss Islington (bot) f391b3c6ab
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 f0d9136c69)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-09-27 07:50:36 -07:00
Miss Islington (bot) 04aa15f5e7
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 adbed2d542)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-09-27 04:34:24 -07:00
Miss Islington (bot) dfe23ee20f
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 dd53b79de0)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-09-27 04:16:37 -07:00
Miss Islington (bot) 9a9bf88898
gh-97545: Make Semaphore run faster. (GH-97549)
(cherry picked from commit 68c46ae68b)

Co-authored-by: Cyker Way <cykerway@gmail.com>
2022-09-26 17:00:53 -07:00
Miss Islington (bot) 82932b3ec9
GH-65046: Fix docs about logging in `asyncio` (GH-97559)
Explain that logging should not use network I/O.
(cherry picked from commit d68c37c0d0)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-09-26 15:45:58 -07:00
Miss Islington (bot) a4ff0eaaf0
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 41351662bc)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-09-26 08:43:26 -07:00
Miss Islington (bot) cf61fa278e
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 2b428a1fae)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-09-25 21:15:52 -07:00
Miss Islington (bot) 54bb8f9af4
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 f62ff97f31.
But there were other copies of these links, which were left HTTP links.
(cherry picked from commit ea4be278fa)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-09-25 02:02:09 -07:00
Miss Islington (bot) 6daff06fc2
gh-94808: Coverage: Test uppercase string literal prefixes (GH-95925)
(cherry picked from commit f00383ec9b)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
2022-09-25 01:21:58 -07:00
Miss Islington (bot) a386d1341c
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 426d72e7dd)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-09-25 01:21:00 -07:00
Miss Islington (bot) 4d1de87042
gh-96959: Update HTTP links which are redirected to HTTPS (GH-96961)
(cherry picked from commit db39050396)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-09-25 01:20:45 -07:00
Miss Islington (bot) fe8db634d4
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 9704f8da33)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-09-24 15:09:08 -07:00
Miss Islington (bot) c2916d2f0e
gh-96965: Update Windows release to libffi 3.4.3 (GH-97512)
(cherry picked from commit f1cca801f5)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-09-23 08:31:53 -07:00
Miss Islington (bot) 512b305856
gh-94781: Fix Windows projects not cleaning intermediate and output files for frozen modules (GH-96423)
(cherry picked from commit 3e26de3c1f)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
2022-09-23 16:23:41 +01:00
Steve Dower dc9065f8c2
gh-77171: Document that wave only supports simple PCM files (GH-97510) 2022-09-23 13:55:06 +01:00
Miss Islington (bot) c29d9b599f
gh-75608: Add Windows FAQ entry for missing UCRT (GH-92765)
(cherry picked from commit 80bc7d7c0a)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-09-23 03:54:53 -07:00
Miss Islington (bot) 29f17a4ad8
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 83d84e67cd)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-09-22 20:20:50 -07:00
Miss Islington (bot) 9eb1e6c692
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 9d432b4a18)

Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
2022-09-22 11:18:02 -07:00
Miss Islington (bot) 6642d8a0f9
GH-85760: Fix race in calling process_exited callback too early (GH-97009)
(cherry picked from commit 282edd7b2a)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-09-22 10:24:54 -07:00
Miss Islington (bot) 6a646dd1ff
GH-96975: Skip incomplete frames in PyEval_GetFrame (GH-97018)
(cherry picked from commit 8fd2c3b75b)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2022-09-22 10:17:53 -07:00
Miss Islington (bot) 773dbb9e3a
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 24e0379624)

Co-authored-by: Cyker Way <cykerway@gmail.com>
2022-09-22 09:58:35 -07:00
Brandt Bucher fb87aaafba
Remove a stray DISPATCH() (GH-97004) 2022-09-22 09:18:37 -07:00
Miss Islington (bot) 6d9905fd71
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 10e3d398c3)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2022-09-22 06:00:52 -07:00
Łukasz Langa d35b9d0a60
[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 5a32eeced2)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2022-09-21 16:07:07 +02:00
Miss Islington (bot) ad49555d51
gh-81039: Add small example of f-string's "=}" to tutorial (gh-92291) (gh-96989)
(cherry picked from commit 4b81139aac)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2022-09-21 09:11:48 -04:00
Miss Islington (bot) 46f791d263
gh-90808: add more examples to `test_sched.test_priority` (GH-31144)
(cherry picked from commit 57463d43dc)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-09-20 19:03:13 -07:00
Miss Islington (bot) e066c6a56b
gh-95950: Add a test for both `csv.Dialect` and `kwargs` (GH-95951)
(cherry picked from commit 1c01bd28a0)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-09-20 18:37:10 -07:00