Commit graph

110991 commits

Author SHA1 Message Date
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
Miss Islington (bot)
ed2656a7d3
bpo-28546: [doc] Clarify setting pdb breakpoints (GH-30360)
Co-authored-by: Ian Kelling <ian@iankelling.org>
(cherry picked from commit 6d07a9fb7c)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-01-07 12:03:36 -08:00
Miss Islington (bot)
75a1865d1c
[3.10] bpo-24650: Use full term "generator function" in yield expressions docs (GH-24663) (GH-30461)
(cherry picked from commit 273cb8e757)


Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>

Automerge-Triggered-By: GH:iritkatriel
2022-01-07 11:01:33 -08:00
Miss Islington (bot)
6630952cf0
bpo-46216: remove spurious link to os.system() from os.time() documentation (GH-30326)
Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit 9b7aa6a9d6)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-01-07 10:50:09 -08:00
Miss Islington (bot)
9d18045804
bpo-46070: Fix asyncio initialisation guard (GH-30423)
If init flag is set, exit successfully immediately.
If not, only set the flag after successful initialization.
(cherry picked from commit b127e70a8a)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-01-07 06:35:15 -08:00
Miss Islington (bot)
db60ed1170
[3.10] bpo-46251: Add 'Security Considerations' section to logging configura… (GH-30411) (GH-30447) 2022-01-06 23:18:41 +00:00
Miss Islington (bot)
3cb64ede57
bpo-46263: Fix second location that needs MALLOC_CONF on FreeBSD (GH-30440)
Automerge-Triggered-By: GH:tiran
(cherry picked from commit c9137d4b63)

Co-authored-by: Christian Heimes <christian@python.org>
2022-01-06 12:12:04 -08:00
Miss Islington (bot)
b951dec441
bpo-46263: FreeBSD 14.0 jemalloc workaround for junk bytes of freed memory (GH-30434)
Automerge-Triggered-By: GH:tiran
(cherry picked from commit a4aa52dc28)

Co-authored-by: Christian Heimes <christian@python.org>
2022-01-06 07:36:47 -08:00
Victor Stinner
72c260cf0c
[3.10] bpo-46006: Revert "bpo-40521: Per-interpreter interned strings (GH-20085)" (GH-30422) (GH-30425)
This reverts commit ea251806b8.

Keep "assert(interned == NULL);" in _PyUnicode_Fini(), but only for
the main interpreter.

Keep _PyUnicode_ClearInterned() changes avoiding the creation of a
temporary Python list object.

Leave the PyInterpreterState structure unchanged to keep the ABI
backward compatibility with Python 3.10.0: rename the "interned"
member to "unused_interned".

(cherry picked from commit 35d6540c90)
2022-01-06 16:12:28 +01:00
Miss Islington (bot)
861a9aaf0f
bpo-46278: fix typo introduced in GH-30427 (GH-30430) (GH-30431)
Automerge-Triggered-By: GH:asvetlov
(cherry picked from commit b50e5e916a)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-01-06 16:44:22 +02:00
Miss Islington (bot)
8670fbe4d2
Reflect 'context' arg in 'AbstractEventLoop.call_*()' methods (GH-30427) (GH-30428)
(cherry picked from commit 3e43fac250)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2022-01-06 15:04:05 +02:00