Commit graph

111001 commits

Author SHA1 Message Date
Miss Islington (bot)
d4a9e34401
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:34:29 -08:00
Miss Islington (bot)
46e6aad129
bpo-46445: Cover multiple inheritance of TypedDict in test_typing (GH-30719)
(cherry picked from commit 65b88d5e01)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-21 14:37:52 -08:00
Miss Islington (bot)
d548c87171
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:11:47 -08:00
Miss Islington (bot)
05063fa15c
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 11:32:43 -08:00
Miss Islington (bot)
a1015c6478
bpo-46426: Improve tests for the dir_fd argument (GH-30668) (GH-30739)
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-21 19:31:25 +02:00
Miss Islington (bot)
68a31dba97
no-issue: Fix documentation typos. (GH-30576)
(cherry picked from commit d05a66339b)

Co-authored-by: Piotr Fusik <piotr@fusik.info>
2022-01-21 04:45:42 -08:00
Tal Einat
f6e5972fa9
[3.10] 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:02:25 +02:00
Miss Islington (bot)
1d11fdd3ee
bpo-21987: Fix TarFile.getmember getting a dir with a trailing slash (GH-30283)
(cherry picked from commit cfadcc31ea)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2022-01-21 00:05:57 -08:00
Miss Islington (bot)
e5edc8d737
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:13:17 -08:00
Erlend Egeberg Aasland
876ade1ae3
[3.10] Mark all clinic headers as generated (GH-30679). (GH-30726)
(cherry picked from commit 71734d0b9c)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-01-20 13:06:47 -08:00
Miss Islington (bot)
1fb1f5d8bd
[3.10] bpo-46339: Fix crash in the parser when computing error text for multi-line f-strings (GH-30529) (GH-30542)
* bpo-46339: Fix crash in the parser when computing error text for multi-line f-strings (GH-30529)

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

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

* Fix interactive mode

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-01-20 13:05:10 +00:00
Nikita Sobolev
a6a0885480
[3.10] bpo-46425: Fix direct invocation of multiple test modules (GH-30666) (GH-30699) 2022-01-20 10:44:21 +09:00
Miss Islington (bot)
07b12fdf55
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:30:07 -08:00
Miss Islington (bot)
ee07750088
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 13:58:13 -08:00
Miss Islington (bot)
d2b7e08d86
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:09 -08:00
Miss Islington (bot)
c4fe0aa670
Update documentation in datetime module strftime-and-strptime-behavior fix typo in '%W' format code description (GH-30232)
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>
2022-01-19 10:02:07 -08:00
Miss Islington (bot)
39374c44d9
[3.10] bpo-46413: properly test __{r}or__ code paths in _SpecialGenericAlias (GH-30640) (GH-30694)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 0a49148e87)


Co-authored-by: Nikita Sobolev <mail@sobolevn.me>

Automerge-Triggered-By: GH:Fidget-Spinner
2022-01-19 08:11:12 -08:00
Miss Islington (bot)
baf26d07a6
bpo-46424: [typing] cover Annotation[arg] invalid usage in tests (GH-30663)
(cherry picked from commit 32398294fb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-19 07:54:07 -08:00
Miss Islington (bot)
24d0b331e8
[3.10] bpo-45680: Clarify documentation on `GenericAlias` objects (GH-29335) (GH-30688)
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]().

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

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 0eae9a2a2d)


Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

Automerge-Triggered-By: GH:Fidget-Spinner
2022-01-19 07:24:14 -08:00
Miss Islington (bot)
0861a50bd4
bpo-22039: [doc] clarify that there are no plans to disable deleting an attribute via PyObject_SetAttr (GH-30639) (GH-30684)
(cherry picked from commit 3bf6315c4c)

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

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-01-19 12:34:17 +00:00
Erlend Egeberg Aasland
01e6cbefd3
[3.10] bpo-46402: Promote SQLite URI tricks in sqlite3 docs (GH-30660) (GH-30671)
* 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:57:33 -05:00
Miss Islington (bot)
4449a1694a
bpo-45554: Document multiprocessing.Process.exitcode values (GH-30142)
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.

Automerge-Triggered-By: GH:pitrou
(cherry picked from commit 3852269b91)

Co-authored-by: John Marshall <jmarshall@hey.com>
2022-01-18 13:51:30 -08:00
Miss Islington (bot)
9238a52cbc
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:16:54 -08:00
Miss Islington (bot)
42038d00ea
bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)
(cherry picked from commit a287b31bcb)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-01-17 23:33:00 -08:00
Miss Islington (bot)
7a822c9278
bpo-46383: Fix signature of zoneinfo module_free function (GH-30607) (GH-30610)
(cherry picked from commit cfbde65df3)

Co-authored-by: Christian Heimes <christian@python.org>

Co-authored-by: Christian Heimes <christian@python.org>
2022-01-17 14:47:51 +01:00
Miss Islington (bot)
1345b460f5
bpo-13886: Skip PTY non-ASCII tests if readline is loaded (GH-30631)
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>
2022-01-17 05:35:07 -08:00
Miss Islington (bot)
93dc1654dc
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:20 -08:00
Pablo Galindo
30300f4113
Merge remote-tracking branch 'upstream/3.10' into 3.10 2022-01-14 21:14:09 +00:00
Pablo Galindo
d5c4ccfe0d
Post 3.10.2 2022-01-14 21:11:47 +00:00
Miss Islington (bot)
26039d1e0a
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:47:51 -08:00
Miss Islington (bot)
86d18019e9
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:32:40 -08:00
Miss Islington (bot)
47422a852d
[3.10] bpo-40479: Fix typo, flag must be set for OpenSSL < 3.0.0 (GH-30584) (GH-30585)
(cherry picked from commit 276c234ce0)


Co-authored-by: Christian Heimes <christian@python.org>

Automerge-Triggered-By: GH:tiran
2022-01-13 13:08:47 -08:00
Pablo Galindo
a58ebcc701
Python 3.10.2 2022-01-13 18:52:14 +00:00
Miss Islington (bot)
e6bb17fe29
bpo-46070: _PyGC_Fini() untracks objects (GH-30577)
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)

Co-authored-by: Victor Stinner <vstinner@python.org>
2022-01-13 10:50:09 -08:00
Miss Islington (bot)
3ce6945f5f
Define Py_BUILD_CORE_MODULE 2022-01-13 01:42:47 -08:00
Miss Islington (bot)
a468866a67
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:45:49 -08:00
Yury Selivanov
6f9ca53a6a
bpo-46347: Fix PyEval_EvalCodeEx to correctly cleanup in error paths (#30553) 2022-01-11 16:17:42 -08:00
Miss Islington (bot)
b1a94f1fab
bpo-46347: Fix memory leak in PyEval_EvalCodeEx. (GH-30546)
First introduced in 0332e569c1
(cherry picked from commit 607d8a838f)

Co-authored-by: Yury Selivanov <yury@edgedb.com>
2022-01-11 15:09:22 -08:00
Miss Islington (bot)
6f035c07e0
[doc] Add license_url for python-docs-theme 2022.1. (GH-30527) (GH-30540)
(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:33 +01:00
Miss Islington (bot)
19a85501ce
bpo-46237: Fix the line number of tokenizer errors inside f-strings (GH-30463)
(cherry picked from commit 6fa8b2ceee)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-01-11 08:33:08 -08:00
Miss Islington (bot)
4cfb10979d
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:53:08 -08:00
Miss Islington (bot)
da8c0759d2
Remove unused Any from Concatenate example in typing docs (GH-30516)
(cherry picked from commit 73decdf021)

Co-authored-by: Michael Oliver <michaeloliver__@outlook.com>
2022-01-11 06:21:40 -08:00
Miss Islington (bot)
e0ec08dc49
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:29:31 -08:00
Miss Islington (bot)
2e6798f352
bpo-46270: Describe the in and not in operators as membership tests. (GH-30504) (GH-30509) 2022-01-09 18:31:51 -08:00
Miss Islington (bot)
b962544594
bpo-34602: Fix unportable test(1) operator in configure script (GH-30490) (GH-30491)
(cherry picked from commit 3d11c1b8b4)

Co-authored-by: Thomas Klausner <tk@giga.or.at>
2022-01-08 20:08:20 -05:00
Miss Islington (bot)
987fba102e
bpo-46261: Update sqlite3.Cursor.lastrowid docs (GH-30407) 2022-01-08 22:05:43 +02:00
Miss Islington (bot)
8bef658668
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:40 -08:00
Miss Islington (bot)
d2245cf190
bpo-46299: improve test_descr.py with stricter error handling (GH-30471)
(cherry picked from commit e63066cfed)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-07 21:26:01 -08:00
Miss Islington (bot)
bea3f42bb7
bpo-46289: Make conversion of FormattedValue not optional on ASDL (GH-30467)
Automerge-Triggered-By: GH:isidentical
(cherry picked from commit d382f7ee0b)

Co-authored-by: Batuhan Taskaya <batuhan@python.org>
2022-01-07 14:30:18 -08:00
Miss Islington (bot)
e35430bec5
[3.10] bpo-42378: fixed log truncation on logging shutdown (GH-27310) (GH-30468)
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2022-01-07 22:15:25 +00:00