Commit graph

109169 commits

Author SHA1 Message Date
Terry Jan Reedy
3178efbf06
[3.9] bpo-46496: Update IDLE News to 2021 Jan 24 (GH-30877)
Cherry picked from b1a3446f07
2022-01-25 03:28:53 -05:00
Terry Jan Reedy
98cabce599
bpo-41841: update idlelib News up to 3.10.0 (GH-30871) 2022-01-25 02:01:25 -05:00
Miss Islington (bot)
c314e3e829
bpo-46503: Prevent an assert from firing when parsing some invalid \N sequences in f-strings. (GH-30865) (30867)
* bpo-46503: Prevent an assert from firing.  Also fix one nearby tiny PEP-7 nit.

* Added blurb.
(cherry picked from commit 0daf72194b)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2022-01-24 22:08:42 -05:00
Serhiy Storchaka
3f1ea163ea
[3.9] bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30757)
Ensure that directory file descriptors refer to directories different
from the current directory, and that src_dir_fd and dst_dir_fd refer
to different directories.

Add context manager open_dir_fd() in test.support.os_helper.
(cherry picked from commit 54610bb448)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-01-24 12:14:42 +02:00
Irit Katriel
1398dca838
bpo-41403: Improve error message for invalid mock target (GH-30833) (GH-30835)
(cherry picked from commit f7955a82e3)
2022-01-23 19:35:15 +00:00
Miss Islington (bot)
94d6434ba7
[3.9] bpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283) (GH-30738)
(cherry picked from commit cfadcc31ea)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2022-01-23 19:54:13 +02:00
Jason R. Coombs
1514d1252f
[3.9] bpo-46474: Avoid REDoS in EntryPoint.pattern (sync with importlib_metadata 4.10.1) (GH-30803). (GH-30828)
(cherry picked from commit 51c3e28c8a)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2022-01-23 10:17:41 -05:00
Miss Islington (bot)
d0852c447a
Update documentation in datetime module strftime-and-strptime-behavior fix typo in '%W' format code description (GH-30232) (GH-30703)
A small change to the documentation of datetime module , in the format codes section of stftime and strptime. Changed the description of format code '%W' from 'as a decimal number' to 'a zero padded   decimal number' so it's in line with the example having leading zeros.  Similar to the format code '%U' above.

Automerge-Triggered-By: GH:pganssle
(cherry picked from commit d45cd2d207)

Co-authored-by: Evan <binary-signal@users.noreply.github.com>

Co-authored-by: Evan <binary-signal@users.noreply.github.com>
2022-01-23 01:59:41 +01:00
Miss Islington (bot)
d807bf2ee9
Document optional 'task'/'asyncgen' fields in call_exception_handler (GH-21735) (GH-30727)
(cherry picked from commit a1652da2c8)

Co-authored-by: Shane Harvey <shnhrv@gmail.com>

Co-authored-by: Shane Harvey <shnhrv@gmail.com>
2022-01-23 01:59:23 +01:00
Miss Islington (bot)
ba932d9024
bpo-41682: Skip unstable test_asyncio sendfile test on Windows (GH-30801)
(cherry picked from commit 1ded8ed8e8)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-22 16:20:49 -08:00
Miss Islington (bot)
b4088801db
bpo-46468: document that "-m http.server" defaults to port 8000 (GH-30776) (#30786)
Code link:
70c16468de/Lib/http/server.pyGH-L1270

It's been this way since at least 3.4.

Also improved some wording in the same section.
(cherry picked from commit c8a536624e)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-01-22 17:31:40 +02:00
Miss Islington (bot)
f1796f2947
bpo-46417: Fix race condition on setting type __bases__ (GH-30788) (GH-30790)
Fix a race condition on setting a type __bases__ attribute: the
internal function add_subclass() now gets the
PyTypeObject.tp_subclasses member after calling PyWeakref_NewRef()
which can trigger a garbage collection which can indirectly modify
PyTypeObject.tp_subclasses.
(cherry picked from commit f1c6ae3270)

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-01-22 15:28:42 +01:00
Kumar Aditya
6ed874f8c5
[3.9] bpo-46469: Make asyncio generic classes return GenericAlias (GH-30777) (GH-30785)
Automerge-Triggered-By: GH:asvetlov
2022-01-22 04:52:24 -08:00
Miss Islington (bot)
3c4a3745b9
bpo-46425: fix direct invocation of asyncio tests (GH-30725)
(cherry picked from commit 5a5340044c)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-22 03:54:07 -08:00
Kumar Aditya
3e7d06a1fa
[3.9] bpo-46383: Fix signature of zoneinfo module_free function (GH-3… (GH-30611)
…0607)
2022-01-22 03:05:55 -08:00
Miss Islington (bot)
e064af564c
bpo-46442: improve and rename testExceptionCleanupNames (GH-30758)
The test tested that explicitly deleting the local variable bound to the exception
did not cause problems, but it did not test what it actually claimed to test, i.e.
that the variable is deleted automatically.
(cherry picked from commit 82c53229e1)

Co-authored-by: Yellow Dusk <yellow.dusk1590@fastmail.com>
2022-01-21 23:37:32 -08:00
Miss Islington (bot)
b37f3e993a
bpo-46463: Fixes escape4chm.py script used when building the CHM documentation file (GH-30768)
(cherry picked from commit 57d1855682)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-01-21 14:15:44 -08:00
Miss Islington (bot)
9e3ff821da
bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285)
(cherry picked from commit 881a763cfe)

Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
2022-01-21 14:06:35 -08:00
Miss Islington (bot)
c3ad850b57
bpo-46434: Handle missing docstrings in pdb help (GH-30705)
(cherry picked from commit 60705cff70)

Co-authored-by: Tom Sparrow <793763+sparrowt@users.noreply.github.com>
2022-01-21 09:33:25 -08:00
Tal Einat
656971e495
[3.9] bpo-41857: mention timeout argument units in select.poll() and select.depoll() doc-strings (GH-22406)
(cherry picked from commit 27df7566bc)

Co-authored-by: Zane Bitter <zbitter@redhat.com>
2022-01-21 11:37:39 +02:00
Miss Islington (bot)
c6691a7ccb
bpo-46080: fix argparse help generation exception in edge case (GH-30111)
Fix an uncaught exception during help text generation when
argparse.BooleanOptionalAction is used with default=argparse.SUPPRESS
and help is specified.
(cherry picked from commit 9e87c0e03f)

Co-authored-by: Felix Fontein <felix@fontein.de>
2022-01-20 15:22:50 -08:00
Erlend Egeberg Aasland
e8e71c481a
[3.9] Mark all clinic headers as generated (GH-30679). (GH-30728)
(cherry picked from commit 71734d0b9c)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-01-20 13:07:19 -08:00
Nikita Sobolev
8105dd2411
[3.9] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30700) 2022-01-20 10:43:49 +09:00
Miss Islington (bot)
3b51926ee9
bpo-46437: remove useless hasattr from test_typing (GH-30704)
(cherry picked from commit 263c0dd160)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-19 14:12:25 -08:00
Miss Islington (bot)
981c1dc8b6
doc: Clarify os.urandom return type (GH-30282)
Other descriptions in the same file also use 'bytestring' to refer to bytes objects
(cherry picked from commit 4b99803b86)

Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-01-19 14:07:47 -08:00
Miss Islington (bot)
54feddae88
docs: correct outdated MappingProxyType docstrings (GH-30281)
The docstrings for MappingProxyType's keys(), values(), and items()
methods were never updated to reflect the changes that Python 3 brought
to these APIs, namely returning views rather than lists.
(cherry picked from commit 2d10fa9bc4)

Co-authored-by: Joshua Bronson <jabronson@gmail.com>
2022-01-19 13:57:30 -08:00
Ken Jin
00645166b6
[3.9] bpo-45680: Clarify documentation on `GenericAlias` objects (GH-29335) (GH-30689)
The documentation on ``GenericAlias`` objects implies at multiple points that
only container classes can define ``__class_getitem__``. This is misleading.
This PR proposes a rewrite of the documentation to clarify that non-container
classes can define ``__class_getitem__``, and to clarify what it means when a
non-container class is parameterized.

See also: initial discussion of issues with this piece of documentation in
GH-29308, and previous BPO issue [42280](https://bugs.python.org/issue42280).

Also improved references in glossary and typing docs. Fixed some links.

(cherry picked from commit 0eae9a2a2d)

Co-Authored-By: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-Authored-By: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-Authored-By: Alex Waygood <Alex.Waygood@Gmail.com>
2022-01-20 00:01:30 +08:00
Miss Islington (bot)
331378dffc
[3.9] bpo-46424: [typing] cover Annotation[arg] invalid usage in tests (GH-30663) (GH-30692)
(cherry picked from commit 32398294fb)


Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-19 07:59:46 -08:00
Miss Islington (bot)
353674f289
bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs (GH-30341) (GH-30392)
(cherry picked from commit e09d94a140)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-01-19 14:45:50 +00:00
Miss Islington (bot)
7b694b816f
[3.9] bpo-22039: [doc] clarify that there are no plans to disable deleting an attribute via PyObject_SetAttr (GH-30639) (GH-30685)
(cherry picked from commit 3bf6315c4c)


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

Automerge-Triggered-By: GH:iritkatriel
2022-01-19 04:29:52 -08:00
Miss Islington (bot)
0be4760d85
[3.9] bpo-45554: Document multiprocessing.Process.exitcode values (GH-30142) (GH-30675)
This addresses [[bpo-45554]()]() by expanding the `exitcode` documentation to also describe what `exitcode` will be in cases of normal termination, `sys.exit()` called, and on uncaught exceptions.


(cherry picked from commit 3852269b91)


Co-authored-by: John Marshall <jmarshall@hey.com>
2022-01-18 14:03:22 -08:00
Erlend Egeberg Aasland
0ae2257760
[3.9] bpo-46402: Promote SQLite URI tricks in sqlite3 docs (GH-30660) (#30672)
* bpo-46402: Promote SQLite URI tricks in `sqlite3` docs (GH-30660)

Provide some examples of URI parameters in sqlite connect().

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
(cherry picked from commit bdf2ab1887)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>

* Update suspicious rules
2022-01-18 16:58:47 -05:00
Miss Islington (bot)
8527f7a722
bpo-20823: Clarify copyreg.pickle() documentation (GH-30230)
(cherry picked from commit 65940fa5c1)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-01-18 12:17:06 -08:00
Miss Islington (bot)
1d6530dd05
[3.9] bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638) (GH-30658)
(cherry picked from commit a287b31bcb)


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

Automerge-Triggered-By: GH:iritkatriel
2022-01-17 23:29:02 -08:00
Miss Islington (bot)
0fbb9afbdd
bpo-13886: Skip PTY non-ASCII tests if readline is loaded (GH-30631) (GH-30635)
Skip test_builtin PTY tests on non-ASCII characters if the readline
module is loaded. The readline module changes input() behavior, but
test_builtin is not intented to test the readline module.

When the readline module is loaded, PyOS_Readline() uses the readline
implementation. In some cases, the Python readline callback
rlhandler() is called by readline with a string without non-ASCII
characters.
(cherry picked from commit ad6e640f91)

Co-authored-by: Victor Stinner <vstinner@python.org>

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-01-17 14:47:21 +01:00
Miss Islington (bot)
f869b56fe4
bpo-20281, bpo-29964: update datetime docs to refer %z and %Z to a pre-existing footnote (GH-30354)
(cherry picked from commit 305588c67c)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-01-14 15:59:56 -08:00
Łukasz Langa
4de57db294
Post 3.9.10 2022-01-14 22:49:33 +01:00
Łukasz Langa
40a11db168 Python 3.9.10
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEE4/8oOcBIslwITevpsmmV4xAlBWgFAmHgmDIACgkQsmmV4xAl
 BWgNRQ//RmFq7tYYCcaCfj1A62dQ0FC2KNGPS6G6SsCNye/7XOsvr8TTg+SXPX0l
 J3DzRL+BuB794XHuxNssnmJ/K9WOrFNqJG2x9GeavRbObfQF2cai1xXb/+/0SJV8
 3NNycgxGVfROlqeSJw1sWgVqs1wpKSetPGr2LqRntHBGidQDK8XwLWYZbZW676VM
 05CC3figaK+NGobPlbnog6xOVRr8bstWfY/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cXkCJJLrwggLlv7hoFoGBCx4krcMS2gmszapSSoH2t
 4tQKAG209uLnO7Vobttz+bbvTXaYUCw7s0PhUVVREoR0cMNuZVtd/Znuy2iqhsrS
 1Qbywn4S3y9+f5d7xmjYcsJakE6jxam7SA5zbxIOq7VnISRAevsksKjEGQUYjOjt
 DxS+mtWOIW0Db9MlMZJqYFOutwr/ecCPGS/BaApR+ft/xOqiIwFGJcaupGtyoQRo
 bfF29BUYRQ==
 =ALHv
 -----END PGP SIGNATURE-----

Merge tag 'v3.9.10' into 3.9

Python 3.9.10
2022-01-14 22:49:13 +01:00
Miss Islington (bot)
9badf6895a
bpo-23183: Document the timeit output (GH-30359)
Co-authored-by: Robert Collins <robertc@robertcollins.net>
(cherry picked from commit 73140de97c)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-01-14 09:53:38 -08:00
Miss Islington (bot)
ae6e255cb3
bpo-46280: Fix tracemalloc_copy_domain() (GH-30591)
Test if tracemalloc_copy_traces() failed to allocated memory in
tracemalloc_copy_domain().
(cherry picked from commit 7c770d3350)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-01-13 20:35:21 -08:00
Łukasz Langa
f2f3f53782
Python 3.9.10 2022-01-13 22:21:23 +01:00
Miss Islington (bot)
537f16adfa
bpo-40479: Fix typo, flag must be set for OpenSSL < 3.0.0 (GH-30584)
(cherry picked from commit 276c234ce0)

Co-authored-by: Christian Heimes <christian@python.org>
2022-01-13 13:19:50 -08:00
Victor Stinner
52937c26ad
bpo-46070: _PyGC_Fini() untracks objects (GH-30577) (GH-30580)
Py_EndInterpreter() now explicitly untracks all objects currently
tracked by the GC. Previously, if an object was used later by another
interpreter, calling PyObject_GC_UnTrack() on the object crashed if
the previous or the next object of the PyGC_Head structure became a
dangling pointer.

(cherry picked from commit 1a4d1c1c9b)
2022-01-13 20:12:50 +01:00
Christian Heimes
4ddd5da269
[3.9] bpo-40479: Fix hashlib's usedforsecurity for OpenSSL 3.0.0 (GH-30455) (GH-30574)
Co-authored-by: Christian Heimes <christian@python.org>
2022-01-13 11:20:45 +01:00
Miss Islington (bot)
d9101c4e49
bpo-46345: Add a test case for implicit Optional class attribute (GH-30535)
(cherry picked from commit 1de60155d5)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-12 17:46:35 -08:00
Miss Islington (bot)
12cf91c3b1
[doc] Add license_url for python-docs-theme 2022.1. (GH-30527) (GH-30541)
(cherry picked from commit 6f05e1ec19)

Co-authored-by: Julien Palard <julien@palard.fr>

Co-authored-by: Julien Palard <julien@palard.fr>
2022-01-11 21:18:45 +01:00
Miss Islington (bot)
238a36b753
closes bpo-46253: Change Py_UNICODE to Py_UCS4 in the C API docs to match the current source code (GH-30387)
(cherry picked from commit 43c5c1369c)

Co-authored-by: Julian Gilbey <julian-git@d-and-j.net>
2022-01-11 06:59:26 -08:00
Miss Islington (bot)
690ed889c5
bpo-46205: exit if no workers are alive in runtest_mp (GH-30470)
(cherry picked from commit e13cdca0f5)

Co-authored-by: Sam Gross <colesbury@gmail.com>
2022-01-10 19:32:15 -08:00
Miss Islington (bot)
b29aa71090
[3.9] bpo-46261: Update sqlite3.Cursor.lastrowid docs (GH-30407) 2022-01-08 22:06:14 +02:00
Miss Islington (bot)
cd95033d9c
bpo-46290: Fix parameter names in dataclasses docs (GH-30450)
(cherry picked from commit ef5376e69e)

Co-authored-by: Zsolt Dollenstein <zsol.zsol@gmail.com>
2022-01-08 07:09:58 -08:00