]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Tue, 11 Jul 2023 20:32:08 +0000 (13:32 -0700)]
[3.11] gh-96165: Clarify passing ":memory:" in sqlite3.connect() (GH-106451) (#106648)
cherry picked from commit
f520804b039df0d87fb9df6f1fed2a9bc9df8d61 )
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Miss Islington (bot) [Tue, 11 Jul 2023 20:30:52 +0000 (13:30 -0700)]
[3.11] gh-96165: Clarify omitting the FROM clause in SQLite queries (GH-106513) (#106646)
(cherry picked from commit
fc7ff1af457e27b7d9752600b3436641be90f598 )
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Miss Islington (bot) [Tue, 11 Jul 2023 18:28:28 +0000 (11:28 -0700)]
[3.11] gh-102541: Add test case for help() for non_existent_module (GH-106340) (#106640)
gh-102541: Add test case for help() for non_existent_module (GH-106340)
Test fix for when one enters, for instance, 'abd' at the 'help>' prompt.
---------
(cherry picked from commit
292ac4bfe92768140c2d383fd329cfa1949869b2 )
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Tue, 11 Jul 2023 17:40:17 +0000 (10:40 -0700)]
[3.11] gh-106625 : Add missing code to tutorial 4.6 example (GH-106623) (#106637)
(cherry picked from commit
d0b7e18262e69dd4b8252e804e4f98fc9533bcd6 )
Co-authored-by: RustyNail <takonoyawarakaage@yahoo.co.jp>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Tue, 11 Jul 2023 15:48:00 +0000 (08:48 -0700)]
[3.11] gh-106498: Revert incorrect colorsys.rgb_to_hls change (GH-106627) (#106633)
gh-106498: Revert incorrect colorsys.rgb_to_hls change (GH-106627)
gh-86618 assumed a-b-c = a-(b+c) = a-d where d = b+d.
For floats 2.0, 1.0, and 0.
9999999999999999 , this assumption
is false. The net change of 1.
1102230246251565e -16 to 0.0
results in division by 0. Revert the replacement. Add test.
(cherry picked from commit
a2d54d4e8ab12f967a220be88bde8ac8227c5ab3 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Tue, 11 Jul 2023 12:10:02 +0000 (05:10 -0700)]
[3.11] gh-105497: [Enum] Fix flag mask inversion when unnamed flags exist (GH-106468) (#106621)
gh-105497: [Enum] Fix flag mask inversion when unnamed flags exist (GH-106468)
For example:
class Flag(enum.Flag):
A = 0x01
B = 0x02
MASK = 0xff
~Flag.MASK is Flag(0)
(cherry picked from commit
95b7426f45edb570869a5513c142f29ed9f851a1 )
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Miss Islington (bot) [Mon, 10 Jul 2023 22:21:04 +0000 (15:21 -0700)]
[3.11] gh-94777: Fix deadlock in ProcessPoolExecutor (GH-94784) (#106607)
gh-94777: Fix deadlock in ProcessPoolExecutor (GH-94784)
Fixes a hang in multiprocessing process pool executor when a child process crashes and code could otherwise block on writing to the pipe. See GH-94777 for more details.
(cherry picked from commit
6782fc050281205734700a1c3e13b123961ed15b )
Co-authored-by: Louis Paulot <55740424+lpaulot@users.noreply.github.com>
Terry Jan Reedy [Mon, 10 Jul 2023 21:13:26 +0000 (17:13 -0400)]
[3.11] gh-103186: Fix or catch 'extra' stderr output from unittests (#103196) (#106606)
Reduce test noise by fixing or catching and testing stderr messages from individual tests.
test_cmd_line_script.test_script_as_dev_fd calls spawn_python and hence subprocess.Popen with incompatible arguments. On POSIX, pass_fds forces close_fds to be True (subprocess.py line 848). Correct the call.
test_uuid.test_cli_namespace_required_for_uuid3: when the namespace is omitted, uuid.main calls argparse.Argument_Parser.error, which prints to stderr before calling sys.exit, which raises SystemExit. Unittest assertRaises catches the exception but not the previous output. Catch the output and test it.
test_warnings.test_catchwarnings_with_simplefilter_error similarly prints before raising. Catch the output and test it.
---------
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
(cherry picked from commit
9d582250d8fde240b8e7299b74ba888c574f74a3 )
Miss Islington (bot) [Sun, 9 Jul 2023 21:22:46 +0000 (14:22 -0700)]
[3.11] gh-106461: typing: Consolidate docs on `Callable` (GH-106462) (#106575)
gh-106461: typing: Consolidate docs on `Callable` (GH-106462)
(cherry picked from commit
ca8b55c7f54b38e264056148075a8061a7082013 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Sun, 9 Jul 2023 12:23:27 +0000 (05:23 -0700)]
[3.11] Move implementation specific RE tests to separate class (GH-106563) (GH-106565)
(cherry picked from commit
8cb6f9761e3c1cff3210697e3670b57591bf2e7a )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Sat, 8 Jul 2023 12:15:22 +0000 (05:15 -0700)]
[3.11] gh-106510: Fix DEBUG output for atomic group (GH-106511) (GH-106549)
(cherry picked from commit
74ec02e9490d8aa086aa9ad9d1d34d2ad999b5af )
Miss Islington (bot) [Sat, 8 Jul 2023 08:53:00 +0000 (01:53 -0700)]
[3.11] gh-101880: add link to object.__hash__() in hash() builtin documentation (GH-101883) (#106547)
gh-101880: add link to object.__hash__() in hash() builtin documentation (GH-101883)
(cherry picked from commit
ec7180bd1b3c156d4484e8e6babc5ecb707420e3 )
Co-authored-by: Owain Davies <116417456+OTheDev@users.noreply.github.com>
Serhiy Storchaka [Sat, 8 Jul 2023 08:22:33 +0000 (11:22 +0300)]
[3.11] gh-106300: Improve `assertRaises(Exception)` usages in tests (GH-106302). (GH-106545)
(cherry picked from commit
6e6a4cd52332017b10c8d88fbbbfe015948093f4 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Thu, 6 Jul 2023 23:25:20 +0000 (16:25 -0700)]
[3.11] gh-90876: Restore the ability to import multiprocessing when `sys.executable` is `None` (GH-106464) (#106495)
gh-90876: Restore the ability to import multiprocessing when `sys.executable` is `None` (GH-106464)
Prevent `multiprocessing.spawn` from failing to *import* in environments
where `sys.executable` is `None`. This regressed in 3.11 with the addition
of support for path-like objects in multiprocessing.
Adds a test decorator to have tests only run when part of test_multiprocessing_spawn to `_test_multiprocessing.py` so we can start to avoid re-running the same not-global-state specific test in all 3 modes when there is no need.
(cherry picked from commit
c60df361ce2d734148d503f4a711e67c110fe223 )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Thu, 6 Jul 2023 06:05:04 +0000 (23:05 -0700)]
[3.11] Doc: Add missing ref labels to exception groups/notes sections (GH-106465) (#106474)
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Miss Islington (bot) [Wed, 5 Jul 2023 18:16:56 +0000 (11:16 -0700)]
[3.11] Clarify state of CancelledError in doc (GH-106453) (#106456)
Clarify state of CancelledError in doc (GH-106453)
This change makes it explicit that asyncio.CancelledError is not a subclass of Exception.
(cherry picked from commit
12a98138083589314d3da14bc97f2d8517947437 )
Co-authored-by: Kristján Valur Jónsson <sweskman@gmail.com>
Miss Islington (bot) [Wed, 5 Jul 2023 11:59:18 +0000 (04:59 -0700)]
[3.11] gh-105497: [Enum] Fix Flag inversion when alias/mask members exist. (GH-105542) (#105571)
When inverting a Flag member (or boundary STRICT), only consider other canonical flags; when inverting an IntFlag member (or boundary KEEP), also consider aliases.
(cherry picked from commit
59f009e5898a006cdc8f5249be589de6edfe5cd0 )
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Miss Islington (bot) [Wed, 5 Jul 2023 11:21:45 +0000 (04:21 -0700)]
[3.11] Document PYTHONSAFEPATH along side -P (GH-106122) (#106353)
(cherry picked from commit
0355625d94a50f4b816770bad946420d005900b8 )
Co-authored-by: Jeremy Paige <ucodery@gmail.com>
Miss Islington (bot) [Wed, 5 Jul 2023 11:02:36 +0000 (04:02 -0700)]
[3.11] GH-104554: Add RTSPS support to `urllib/parse.py` (GH-104605) (#105760)
RTSPS is the permanent scheme defined in
https://www.iana.org/assignments/uri-schemes/uri-schemes.xhtml
alongside RTSP and RTSPU schemes.
---------
(cherry picked from commit
f3266c05b6186ab6d1db0799c06b8f76aefe7cf1 )
Co-authored-by: zentarim <33746047+zentarim@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Miss Islington (bot) [Wed, 5 Jul 2023 11:00:56 +0000 (04:00 -0700)]
[3.11] gh-89392: Make test_decimal discoverable (GH-106209) (#106229)
(cherry picked from commit
0e24499129f3917b199a6d46fa33eeedd2c447fc )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Jeffery To [Wed, 5 Jul 2023 10:51:26 +0000 (18:51 +0800)]
[3.11] gh-104692: Include commoninstall as a prerequisite for bininstall (GH-104693) (#105429)
This ensures that `commoninstall` is completed before `bininstall` is
started when parallel builds are used (`make -j install`), and so the
`python3` symlink is only installed after all standard library modules
are installed.
.
(cherry picked from commit
990cb3676c2edb7e5787372d6cbe360a73367f4c )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Wed, 5 Jul 2023 09:03:25 +0000 (02:03 -0700)]
[3.11] gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (GH-106443) (#106445)
gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (GH-106443)
(cherry picked from commit
a941bd6c53ac4646926292557a7bb2a86f8025c3 )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Miss Islington (bot) [Tue, 4 Jul 2023 12:17:26 +0000 (05:17 -0700)]
[3.11] gh-106368: Add tests for permutation helpers in Argument Clinic (GH-106407) (#106410)
Added new test class PermutationTests()
(cherry picked from commit
8f6df5e9cbc3a1689601714192aa6ecbb23e1927 )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Miss Islington (bot) [Tue, 4 Jul 2023 00:22:32 +0000 (17:22 -0700)]
[3.11] gh-106368: Increase Argument Clinic test coverage (GH-106389) (#106391)
Add:
- test_disallowed_gropuing__no_matching_bracket
- test_double_slash
(cherry picked from commit
3406f8cce542ea4edf4153c0fac5216df283a9b1 )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Miss Islington (bot) [Mon, 3 Jul 2023 23:35:42 +0000 (16:35 -0700)]
[3.11] gh-106368: Harden Argument Clinic parser tests (GH-106384) (#106388)
(cherry picked from commit
648688c137744a623a71dc2413d2879b80c99eae )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Erlend E. Aasland [Mon, 3 Jul 2023 22:33:45 +0000 (00:33 +0200)]
[3.11] gh-106368: Clean up Argument Clinic tests (#106373) (#106381)
(cherry picked from commit
3ee8dac7a1b3882aa3aac7703bdae2de7b6402ad )
Erlend E. Aasland [Mon, 3 Jul 2023 22:07:05 +0000 (00:07 +0200)]
[3.11] gh-106368: Increase Argument Clinic test coverage (#106369) (#106374)
Add tests for 'self' and 'defining_class' converter requirements.
(cherry picked from commit
7f4c8121db62a9f72f00f2d9f73381e82f289581 )
Miss Islington (bot) [Mon, 3 Jul 2023 03:25:12 +0000 (20:25 -0700)]
[3.11] Replace the esoteric term 'datum' when describing dict comprehensions (GH-106119) (#106349)
Replace the esoteric term 'datum' when describing dict comprehensions (GH-106119)
(cherry picked from commit
987b712b4aeeece336eed24fcc87a950a756c3e2 )
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Miss Islington (bot) [Sat, 1 Jul 2023 23:15:44 +0000 (16:15 -0700)]
[3.11] gh-102541: Fix Helper.help("mod") for non-existent mod (GH-105934) (#106323)
gh-102541: Fix Helper.help("mod") for non-existent mod (GH-105934)
If the output arg to Helper() is a stream rather than the default None, which means 'page to stdout', the ImportError from pydoc.resolve is currently not caught in pydoc.doc. The same error is caught when output is None.
---------
(cherry picked from commit
0530f4f64629ff97f3feb7524da0833b9535e8b6 )
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Fri, 30 Jun 2023 14:40:13 +0000 (07:40 -0700)]
[3.11] gh-101100: Docs: Fix references to several numeric dunders (GH-106278) (#106282)
gh-101100: Docs: Fix references to several numeric dunders (GH-106278)
(cherry picked from commit
a8ae73965b02302b7661ea07a6e4f955a961aca9 )
Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Thu, 29 Jun 2023 18:41:18 +0000 (11:41 -0700)]
[3.11] Fix possible refleak in CodeType.replace() (GH-106243) (GH-106245)
Fix possible refleak in CodeType.replace() (GH-106243)
A reference to c_code was leaked if PySys_Audit() failed.
(cherry picked from commit
3c70d467c148875f2ce17bacab8909ecc3e9fc1d )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 29 Jun 2023 11:29:22 +0000 (04:29 -0700)]
[3.11] gh-100408: Fix a traceback in multiprocessing example (GH-100409) (GH-106231)
(cherry picked from commit
a28d4edb23b7150942f1eceb9e97c6f53aa4de42 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 29 Jun 2023 10:47:30 +0000 (03:47 -0700)]
[3.11] gh-101006: Improve error handling when read marshal data (GH-101007) (GH-106227)
* EOFError no longer overrides other errors such as MemoryError or OSError at
the start of the object.
* Raise more relevant error when the NULL object occurs as a code object
component.
* Minimize an overhead of calling PyErr_Occurred().
(cherry picked from commit
8bf6904b229583033035d91a3800da5604dcaad4 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 28 Jun 2023 12:41:18 +0000 (05:41 -0700)]
[3.11] gh-101100: Fix reference to `parse_args` in `optparse.rst` (GH-105265) (#106205)
Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
Miss Islington (bot) [Wed, 28 Jun 2023 11:06:25 +0000 (04:06 -0700)]
[3.11] gh-105993: Add possible `None` return type to `asyncio.EventLoop.start_tls` docs (GH-105995) (#106189)
gh-105993: Add possible `None` return type to `asyncio.EventLoop.start_tls` docs (GH-105995)
(cherry picked from commit
6b52a581c151914e59c8c367a03bc7309713a73b )
Co-authored-by: Sam Bull <git@sambull.org>
Miss Islington (bot) [Wed, 28 Jun 2023 11:05:51 +0000 (04:05 -0700)]
[3.11] gh-101100: Fix reference to asynchronous methods (GH-106172) (#106192)
gh-101100: Fix reference to asynchronous methods (GH-106172)
(cherry picked from commit
bbf722dcd39c66418e45991dcf1cdf140c2ce20e )
Co-authored-by: F3eQnxN3RriK <drsuaimqjgar@gmail.com>
Miss Islington (bot) [Wed, 28 Jun 2023 07:27:59 +0000 (00:27 -0700)]
[3.11] gh-100340: Allows -Wno-int-conversion for wasm (GH-100341) (#106066)
(cherry picked from commit
75c8133efec035ec1083ebd8e7d43ef340c2e581 )
Co-authored-by: Kushal Das <mail@kushaldas.in>
Miss Islington (bot) [Wed, 28 Jun 2023 05:38:26 +0000 (22:38 -0700)]
[3.11] Refer to `TimeoutError` instead of `asyncio.TimeoutError` in `asyncio-task.rst` (GH-106136) (#106180)
Co-authored-by: lightdrk <108566237+lightdrk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Wed, 28 Jun 2023 03:17:31 +0000 (20:17 -0700)]
[3.11] Fix c-analyzer for GCC: ignore LANG env var (GH-106173) (#106177)
Fix c-analyzer for GCC: ignore LANG env var (GH-106173)
The c-analyzer doesn't support GCC localized messages, so just unset
the LANG environment variable.
(cherry picked from commit
1f74b9e933d546a015e8497e3b8728357196acc8 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Victor Stinner [Wed, 28 Jun 2023 02:58:34 +0000 (04:58 +0200)]
[3.11] gh-101634: regrtest reports decoding error as failed test (#106169) (#106175)
gh-101634: regrtest reports decoding error as failed test (#106169)
When running the Python test suite with -jN option, if a worker stdout
cannot be decoded from the locale encoding report a failed testn so the
exitcode is non-zero.
(cherry picked from commit
2ac3eec103cf450aaaebeb932e51155d2e7fb37b )
Miss Islington (bot) [Tue, 27 Jun 2023 17:37:20 +0000 (10:37 -0700)]
[3.11] IDLE: Condense run.main threading.Thread start. (GH-106125) (#106153)
IDLE: Condense run.main threading.Thread start. (GH-106125)
Use daemon argument added in 3.3 and directly call .start.
Remove now unused 'sockthread' name.
(cherry picked from commit
eaa1eae55ea66d74c5303924320185dac74d4eb1 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Tue, 27 Jun 2023 13:44:32 +0000 (06:44 -0700)]
[3.11] gh-92788: Add docs for `ast.Module`, `ast.Expression`, and others (GH-101055) (#106138)
gh-92788: Add docs for `ast.Module`, `ast.Expression`, and others (GH-101055)
(cherry picked from commit
33608fd67df8b1033519f808441ee00289e2dac0 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Tue, 27 Jun 2023 04:32:43 +0000 (21:32 -0700)]
[3.11] GH-105774: Clarify operation of normalize() (GH-106093) (GH-106129)
Miss Islington (bot) [Mon, 26 Jun 2023 18:12:40 +0000 (11:12 -0700)]
[3.11] gh-106107: document correct error that's raised when a mutable default value for a field is detected (gh-106109) (gh-106116)
gh-106107: document correct error that's raised when a mutable default value for a field is detected (gh-106109)
(cherry picked from commit
512f299e557f4ab60768d36cee9968bd92116367 )
Co-authored-by: Roderich Schupp <roderich.schupp@gmail.com>
Kumar Aditya [Mon, 26 Jun 2023 09:00:51 +0000 (14:30 +0530)]
[3.11] gh-105979: Fix exception handling in unmarshal_frozen_code (`Python/import.c`) (GH-105980). (#106100)
* [3.11] gh-105979: Fix exception handling in `unmarshal_frozen_code` (`Python/import.c`) (GH-105980).
(cherry picked from commit
cd5280367a3a7065d13b8f7234474f7a2e9a18fd )
Co-authored-by: chgnrdv <52372310+chgnrdv@users.noreply.github.com>
Miss Islington (bot) [Mon, 26 Jun 2023 08:43:41 +0000 (01:43 -0700)]
[3.11] Improve typing docs on the type of class objects (GH-106081) (#106097)
Improve typing docs on the type of class objects (GH-106081)
(cherry picked from commit
3eeb8c89063d5ac22c0b1d26e4ae2fd12c149650 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Sun, 25 Jun 2023 08:16:30 +0000 (01:16 -0700)]
[3.11] Docs: add links to 'callable' term in sqlite3 docs (GH-106072) (#106074)
(cherry picked from commit
bef1c8761e3b0dfc5708747bb646ad8b669cbd67 )
Co-authored-by: Erlend E. Aasland <erlend@python.org>
Serhiy Storchaka [Sat, 24 Jun 2023 23:41:02 +0000 (02:41 +0300)]
[3.11] gh-106033: Get rid of new occurrences of PyDict_GetItem and Py… (#106040)
[3.11] gh-106033: Get rid of new occurrences of PyDict_GetItem and PyObject_HasAttr (GH-106034)
These functions are broken by design because they discard any exceptions raised
inside, including MemoryError and KeyboardInterrupt. They should not be
used in new code..
(cherry picked from commit
1d33d5378058671bfabb6f4d4b5bfd4726973ff9 )
Miss Islington (bot) [Sat, 24 Jun 2023 23:30:09 +0000 (16:30 -0700)]
[3.11] gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047) (#106071)
gh-106033: [docs] Improve C API GetItem & HasAttr notes. (GH-106047)
Use a note:: tag so that these dict and object API deficiencies show up clearly.
A caution:: tag was considered, but our current python docs rendering doesn't do much with that (no box or color change). warning:: seemed too extreme. note looks good.
(cherry picked from commit
19d6511b0b8f3f74e668ae32ccef89bcbf1a8a62 )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Fri, 23 Jun 2023 20:35:16 +0000 (13:35 -0700)]
[3.11] Typing docs: fix typo in annotating tuples comment (GH-106048) (#106050)
Typing docs: fix typo in annotating tuples comment (GH-106048)
(cherry picked from commit
8ef0ee4ebc84ee68f16cea85ffdb949ecccb4ba5 )
Co-authored-by: Eamon Tracey <66919574+EamonTracey@users.noreply.github.com>
Serhiy Storchaka [Fri, 23 Jun 2023 18:13:07 +0000 (21:13 +0300)]
[3.11] gh-106030: Miscellaneous fixes in Python/suggestions.c (GH-106… (GH-106039)
* PyUnicode_CompareWithASCIIString() only works if the second argument
is ASCII string.
* Refleak in get_suggestions_for_name_error.
* Add some missing error checks.
(cherry picked from commit
c8c162ef5294cddb7ac75fe93ab918e5661c68ee )
Miss Islington (bot) [Fri, 23 Jun 2023 14:53:14 +0000 (07:53 -0700)]
[3.11] Typing docs: improve the guidance on annotating tuples (GH-106021) (#106029)
Typing docs: improve the guidance on annotating tuples (GH-106021)
(cherry picked from commit
968435ddb1c1af9333befb26f7970cded8a5c710 )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Miss Islington (bot) [Fri, 23 Jun 2023 08:14:25 +0000 (01:14 -0700)]
[3.11] Docs: Avoid a DeprecationWarning in `pyspecific.py` when running with Sphinx >=6.1 (GH-105886) (#106011)
Docs: Avoid a DeprecationWarning in `pyspecific.py` when running with Sphinx >=6.1 (GH-105886)
(cherry picked from commit
a72683ba8e0337650cc490dbe593a5e46aba60cb )
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Wed, 21 Jun 2023 14:40:46 +0000 (07:40 -0700)]
[3.11] stdtypes.rst: remove a period (GH-105959) (#105969)
stdtypes.rst: remove a period (GH-105959)
(cherry picked from commit
c5a722be5f7979c73e2451e537a8fc58bf9af12e )
Co-authored-by: Mathieu Dupuy <deronnax@gmail.com>
Alex Waygood [Mon, 19 Jun 2023 00:17:06 +0000 (01:17 +0100)]
[3.11] typing docs: Improve the intro to each section (#105901) (#105903)
typing docs: Improve the intro to each section (#105901)
Miss Islington (bot) [Sun, 18 Jun 2023 17:56:13 +0000 (10:56 -0700)]
[3.11] gh-105844: Use devguide terminology to denote versions (GH-105882) (#105893)
(cherry picked from commit
dba72175116373c1d15e25d84c88b516daf9f5c4 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Fri, 16 Jun 2023 19:26:56 +0000 (12:26 -0700)]
[3.11] CI: Bump macOS build to use OpenSSL v3.0 (GH-105538) (#105868)
(cherry picked from commit
34e93d3998bab8acd651c50724eb1977f4860a08 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Fri, 16 Jun 2023 18:30:22 +0000 (11:30 -0700)]
[3.11] GH-105840: Fix assertion failures when specializing calls with too many __defaults__ (GH-105864)
GH-105840: Fix assertion failures when specializing calls with too many __defaults__ (GH-105847)
(cherry picked from commit
2beab5bdef5fa2a00a59371e6137f769586b7404 )
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
Carl Meyer [Fri, 16 Jun 2023 17:17:58 +0000 (12:17 -0500)]
[3.11] bpo-44530: Document the change in MAKE_FUNCTION behavior (GH-93189) (#105842)
* bpo-44530: Document the change in MAKE_FUNCTION behavior
Fixes dis module documentation for MAKE_FUNCTION due to https://github.com/python/cpython/commit/
2f180ce2cb6e6a7e3c517495e0f4873d6aaf5f2f (bpo-44530, released as part of 3.11) removes the qualified name at TOS.
(cherry picked from commit
486b52a3158e0f64fc54efdfa34ed5437b3619f2 )
Co-authored-by: Alex Doe <alexdoesh@gmail.com>
Alex Waygood [Fri, 16 Jun 2023 16:39:12 +0000 (17:39 +0100)]
[3.11] gh-105834: Backport new tests for `typing.Protocol` (#105835) (#105860)
Miss Islington (bot) [Fri, 16 Jun 2023 11:29:35 +0000 (04:29 -0700)]
[3.11] CI: Remove docs build from Azure Pipelines (GH-105823) (#105855)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Miss Islington (bot) [Fri, 16 Jun 2023 08:56:58 +0000 (01:56 -0700)]
[3.11] gh-105844: Consistently use 'minor version' for X.Y versions (GH-105851) (#105852)
(cherry picked from commit
0bffe1acd78069ea21f6b1347bec9cc9747342cb )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Fri, 16 Jun 2023 05:43:30 +0000 (22:43 -0700)]
[3.11] tarfile: Fix positional-only syntax in docs (GH-105770) (#105772)
The syntax used in the current docs (a / before any args) is invalid.
I think the right approach is for the arguments to arbitrary
filter functions to be treated as positional-only, meaning that users
can supply filter functions with any names for the argument. tarfile.py
only calls the filter function with positional arguments.
(cherry picked from commit
5cdd5ba49db10f05e204e7a49ce184222a93dce8 )
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Miss Islington (bot) [Thu, 15 Jun 2023 23:13:51 +0000 (16:13 -0700)]
[3.11] GH-105588: Add missing error checks to some obj2ast_* converters (GH-105839)
GH-105588: Add missing error checks to some obj2ast_* converters (GH-105589)
(cherry picked from commit
a4056c8f9c2d9970d39e3cb6bffb255cd4b8a42c )
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
Dong-hee Na [Thu, 15 Jun 2023 15:29:00 +0000 (00:29 +0900)]
[3.11] gh-102541: Hide traceback in help prompt (gh-102614). (gh-105830)
(cherry picked from commit
ba516e70c6d156dc59dede35b6fc3db0151780a5 )
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Alex Waygood [Thu, 15 Jun 2023 09:05:50 +0000 (10:05 +0100)]
[3.11] More reorganisation of the typing docs (#105787) (#105816)
Alex Waygood [Thu, 15 Jun 2023 08:56:14 +0000 (09:56 +0100)]
[3.11] Improve docs for `typing.dataclass_transform` (#105792) (#105815)
(cherry-picked from commit
006a4532058f1fadba93283c0f45b0d82735b364 )
Irit Katriel [Thu, 15 Jun 2023 03:34:37 +0000 (04:34 +0100)]
[3.11] gh-105196: Fix indentations of section headings in C API docs (#105672) (#105786)
gh-105196: Fix indentations of section headings in C API docs (#105672)
Co-authored-by: TATHAGATA ROY <royzen9495@gmail.com>
Alex Waygood [Wed, 14 Jun 2023 14:40:02 +0000 (15:40 +0100)]
[3.11] Typing docs: move the deprecated stuff below the non-deprecated stuff (#105781) (#105785)
Miss Islington (bot) [Tue, 13 Jun 2023 23:39:56 +0000 (16:39 -0700)]
[3.11] gh-105436: Ignore unrelated errors when checking empty env (GH-105742) (#105757)
gh-105436: Ignore unrelated errors when checking empty env (GH-105742)
(cherry picked from commit
4cefe3cf10f498c0927ae4fdba4880d5a64826e4 )
Co-authored-by: Steve Dower <steve.dower@python.org>
Erlend E. Aasland [Tue, 13 Jun 2023 09:07:20 +0000 (11:07 +0200)]
[3.11] gh-105375: Improve error handling in _Unpickler_SetInputStream() (#105667) (#105721)
Prevent exceptions from possibly being overwritten in case of multiple
failures.
(cherry picked from commit
217589d4f3246d67c6ef0eb0be2b1c33987cf260 )
Erlend E. Aasland [Tue, 13 Jun 2023 06:50:00 +0000 (08:50 +0200)]
[3.11] gh-105375: Explicitly initialise all {Pickler,Unpickler}Object fields (#105686) (#105711)
* [3.11] gh-105375: Explicitly initialise all {Pickler,Unpickler}Object fields (#105686)
All fields must be explicitly initialised to prevent manipulation of
uninitialised fields in dealloc.
Align initialisation order with the layout of the object structs.
(cherry picked from commit
ca3cc4b95d66f7527ebe0ba4cdb1907082d9bfc8 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Mon, 12 Jun 2023 16:49:57 +0000 (09:49 -0700)]
[3.11] gh-105436: The environment block should end with two null wchar_t values (GH-105495) (#105701)
gh-105436: The environment block should end with two null wchar_t values (GH-105495)
(cherry picked from commit
4f7d3b602d47d61137e82145f601dccfe6f6cd3c )
Co-authored-by: Dora203 <66343334+sku2000@users.noreply.github.com>
Miss Islington (bot) [Mon, 12 Jun 2023 16:02:39 +0000 (09:02 -0700)]
[3.11] ARM64 clamping bug also exists in MSVC 14.35 (GH-105679) (#105696)
ARM64 clamping bug also exists in MSVC 14.35 (GH-105679)
(cherry picked from commit
58f0bda34126ed790000451874b96140737f40ed )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Mon, 12 Jun 2023 09:13:03 +0000 (02:13 -0700)]
[3.11] gh-105673: Fix uninitialized warning in sysmodule.c (GH-105674) (#105676)
In sys_add_xoption(), 'value' may be uninitialized for some error paths.
(cherry picked from commit
a8d69fe92c65d636fc454cfb1825c357eb2e6325 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Erlend E. Aasland [Sun, 11 Jun 2023 21:28:12 +0000 (23:28 +0200)]
[3.11] gh-105375: Harden pyexpat initialisation (#105606) (#105668)
(cherry picked from commit
20a56d8becba1a5a958b167fdb43b1a1b9228095 )
Add proper error handling to add_errors_module() to prevent exceptions
from possibly being overwritten.
Erlend E. Aasland [Sun, 11 Jun 2023 21:08:40 +0000 (23:08 +0200)]
[3.11] gh-105375: Improve error handling in the sys extension module (#105611) (#105666)
(cherry picked from commit
41cddc2e93a285b81fa30ac542b088bd9d0112e9 )
In _PySys_AddXOptionWithError() and sys_add_xoption(),
bail on first error to prevent exceptions from possibly being
overwritten.
Miss Islington (bot) [Sun, 11 Jun 2023 20:30:47 +0000 (13:30 -0700)]
[3.11] gh-105375: Improve error handling in _ctypes (GH-105593) (#105664)
Prevent repeated PyLong_FromVoidPtr() from possibly overwriting the
current exception.
(cherry picked from commit
e8998e46a7ce8ad336e0941a6da6e50cb88d1e47 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Sun, 11 Jun 2023 20:01:52 +0000 (13:01 -0700)]
[3.11] gh-105375: Improve error handling in PyUnicode_BuildEncodingMap() (GH-105491) (#105662)
Bail on first error to prevent exceptions from possibly being overwritten.
(cherry picked from commit
555be81026fe1205d16c02f6321221381174cd07 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Sun, 11 Jun 2023 19:46:02 +0000 (12:46 -0700)]
[3.11] gh-105375: Improve PyErr_WarnExplicit() error handling (GH-105610) (#105660)
Bail on first error to prevent exceptions from possibly being
overwritten.
(cherry picked from commit
567d6ae8e77579173510fc948ac06b2ababf3d40 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Erlend E. Aasland [Sun, 11 Jun 2023 19:25:36 +0000 (21:25 +0200)]
[3.11] gh-105375: Harden _ssl initialisation (#105599) (#105651)
(cherry picked from commit
01f4230460454d4a849a5ba93320142c1a0c93a8 )
Add proper error handling to prevent reference leaks and overwritten
exceptions.
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Alex Waygood [Sun, 11 Jun 2023 16:10:49 +0000 (17:10 +0100)]
[3.11] Remove stray reference to PEP-695 in the typing docs (#105655)
Miss Islington (bot) [Sun, 11 Jun 2023 14:33:50 +0000 (07:33 -0700)]
[3.11] Fix typo in configparser module docstring (GH-105652) (#105654)
Fix typo in configparser module docstring (GH-105652)
"zc.buildbot" -> "zc.buildout"
(cherry picked from commit
845e593c4ec97dd9f73b50536c1e1e7ed10ceecd )
Co-authored-by: litlighilit <97860435+litlighilit@users.noreply.github.com>
Miss Islington (bot) [Sun, 11 Jun 2023 11:13:45 +0000 (04:13 -0700)]
[3.11] gh-105375: Improve error handling in the builtins extension module (GH-105585) (#105650)
(cherry picked from commit
d4fa52934a282df51cff800eee5caeb94a229547 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Sun, 11 Jun 2023 10:58:56 +0000 (03:58 -0700)]
[3.11] gh-105375: Improve _decimal error handling (GH-105605) (#105648)
Fix a bug where an exception could end up being overwritten.
(cherry picked from commit
c932f7284977ebf813313157c52d716ba225a7ac )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Sun, 11 Jun 2023 10:41:37 +0000 (03:41 -0700)]
[3.11] gh-105375: Harden _datetime initialisation (GH-105604) (#105646)
Improve error handling so init bails on the first exception.
(cherry picked from commit
16d49680b56e00c53c00683b949138e584669fd3 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Sun, 11 Jun 2023 10:22:31 +0000 (03:22 -0700)]
[3.11] gh-105375: Improve array.array exception handling (GH-105594) (#105643)
Fix a bug where 'tp_richcompare' could end up overwriting an exception.
(cherry picked from commit
35cff545db7c7912046c0ce5627db2e4d2b60f57 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Sat, 10 Jun 2023 18:50:27 +0000 (11:50 -0700)]
[3.11] Cleanup and clarify our hashlib docs. (GH-105624) (#105633)
Cleanup and clarify our hashlib docs. (GH-105624)
Clarify and improve our hashlib docs. Now with 50% less mess!
(cherry picked from commit
0d1d6ab966ff4e4d651d0dee0ec9a2f868ef42da )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Fri, 9 Jun 2023 22:54:00 +0000 (15:54 -0700)]
[3.11] gh-105375: Improve error handling in `zoneinfo` module (GH-105586) (#105613)
Fix bugs where exceptions could end up being overwritten
because of deferred error handling.
(cherry picked from commit
33c92c4f15539806c8aff8574ff30a8b307e3e4d )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Alex Waygood [Fri, 9 Jun 2023 21:41:22 +0000 (22:41 +0100)]
[3.11] Miscellaneous improvements to the typing docs (#105529) (#105568)
Miscellaneous improvements to the typing docs (#105529)
Mostly, these are changes so that we use shorter sentences and shorter paragraphs. In particular, I've tried to make the first sentence introducing each object in the typing API short and declarative.
Miss Islington (bot) [Fri, 9 Jun 2023 21:19:59 +0000 (14:19 -0700)]
[3.11] gh-105375: Improve error handling in _elementtree (GH-105591) (#105601)
Fix bugs where exceptions could end up being overwritten.
(cherry picked from commit
00b599ab5a76023fa0083d7cc5d3c569342a5191 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Fri, 9 Jun 2023 20:55:34 +0000 (13:55 -0700)]
[3.11] gh-105375: Improve posix error handling (GH-105592) (#105597)
Fix a bug where an IndexError could end up being overwritten.
(cherry picked from commit
f668f73bc88cce0112b304d87aa998fb28013c71 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Erlend E. Aasland [Fri, 9 Jun 2023 20:35:30 +0000 (22:35 +0200)]
[3.11] gh-105375: Improve errnomodule error handling (#105590) (#105595)
(cherry picked from commit
eede1d2f48b4fe7f7918952d9ebeb744b58668c1 )
Bail immediately if an exception is set, to prevent exceptions from
being overwritten.
Erlend E. Aasland [Fri, 9 Jun 2023 17:56:02 +0000 (19:56 +0200)]
[3.11] gh-105375: Improve _pickle error handling (#105475) (#105583)
(cherry picked from commit
89aac6f6b7b3af046ec137121c90732289e79efc )
Error handling was deferred in some cases, which could potentially lead
to exceptions being overwritten.
Erlend E. Aasland [Fri, 9 Jun 2023 17:36:06 +0000 (19:36 +0200)]
[3.11] gh-105375: Improve error handling in compiler_enter_scope() (#105494) (#105582)
(cherry picked from commit
6c832ddcf28187f86100c790afb16a0223d945d0 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Fri, 9 Jun 2023 16:00:53 +0000 (09:00 -0700)]
[3.11] Clarify the supported cases in the tokenize module (GH-105569) (#105574)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Fri, 9 Jun 2023 14:02:15 +0000 (07:02 -0700)]
[3.11] gh-105557: Remove duplicate sqlite3 test method (GH-105558) (#105562)
test_func_return_too_large_int() was defined twice.
Keep only the redefined method, as that also checks the tracebacks.
(cherry picked from commit
b8fa7bda4f286503447dc12327b789bbfc836458 )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Alex Waygood [Fri, 9 Jun 2023 13:14:47 +0000 (14:14 +0100)]
[3.11] Fix two errors in the typing docs (#105559)
Miss Islington (bot) [Fri, 9 Jun 2023 01:02:12 +0000 (18:02 -0700)]
[3.11] gh-105332: [Enum] Fix unpickling flags in edge-cases (GH-105348) (GH-105519)
* revert enum pickling from by-name to by-value
(cherry picked from commit
4ff5690e591b7d11cf11e34bf61004e2ea58ab3c )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Miss Islington (bot) [Thu, 8 Jun 2023 22:57:01 +0000 (15:57 -0700)]
[3.11] CI: Configure macOS build as per updated devguide recommendations (GH-105533) (#105537)
(cherry picked from commit
a5f23d411062f9f29f8a7d7ddefe60d5d8e17d2e )
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>