Commit graph

110944 commits

Author SHA1 Message Date
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
Miss Islington (bot)
da8be157f4
bpo-46236: Fix PyFunction_GetAnnotations() returned tuple. (GH-30409)
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit 46e4c257e7)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2022-01-05 05:12:21 -08:00
Miss Islington (bot)
7e951f356e
bpo-46263: Don't use MULTIARCH on FreeBSD (GH-30410)
(cherry picked from commit cae55542d2)

Co-authored-by: Christian Heimes <christian@python.org>
2022-01-05 02:17:39 -08:00
Miss Islington (bot)
289a32baf7
Fix missing "," in the documentation of Executor Objects (GH-30404)
(cherry picked from commit f404e26d74)

Co-authored-by: Philipp Claßen <philipp.classen@posteo.de>

Co-authored-by: Philipp Claßen <philipp.classen@posteo.de>
2022-01-04 11:17:16 -08:00
Miss Islington (bot)
ba124672d7
bpo-20369: concurrent.futures.wait() now deduplicates futures given a… (GH-30168)
* bpo-20369: concurrent.futures.wait() now deduplicates futures given as arg.

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 7d7817cf0f)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-01-04 06:27:13 -08:00
Miss Islington (bot)
01b12942d0
bpo-33252: Document that ResourceWarning is ignored by default (GH-30358) (GH-30395)
`ResourceWarning` is ignored by default.

Document this behaviour, for consistency with others in this table such as `DeprecationWarning`.

Documentation PR can skip NEWS file.

Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit b949845b36)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-01-04 12:03:38 +00:00
Miss Islington (bot)
743394f281
bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs (GH-30341)
(cherry picked from commit e09d94a140)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-01-04 03:03:46 -08:00
Miss Islington (bot)
cf48a14819
bpo-46239: improve error message when importing asyncio.windows_events (GH-30353) (#30388)
(cherry picked from commit 5a2a65096c)

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

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2022-01-04 11:22:26 +02:00
Miss Islington (bot)
685b6285b9
Add doctest and improve readability for move_to_end() example. (GH-30370) (GH-30373) 2022-01-03 21:55:38 -08:00
Miss Islington (bot)
0b3c3cbbaf
bpo-34538: Remove Exception subclassing from tutorial (GH-30361)
Remove the bit about subclassing exceptions.

Documentation PR can skip the NEWS label.

Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit 2db5613063)

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2022-01-03 15:10:20 -08:00
Miss Islington (bot)
8184a613b9
bpo-34931: [doc] clarify behavior of os.path.splitext() on paths with multiple leading periods (GH-30347) (GH-30368)
(cherry picked from commit 51700bf08b)

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

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2022-01-03 20:36:41 +00:00
Miss Islington (bot)
b312794de0
bpo-40477: macOS Python Launcher app fixes for recent macOS releases (GH-30348) (GH-30349)
This change solves two problems encountered by users of the macOS Python Launcher app on recent macOS releases (10.14+):

- The launcher app was no longer able to launch the macOS Terminal.app to run a script.

- Even if Terminal.app was already launched, the launcher app was unable to send an Apple Event to Terminal.app to open and run Python with the desired .py file.
(cherry picked from commit 549e628272)

Co-authored-by: Ned Deily <nad@python.org>
2022-01-03 01:44:35 -05:00
Miss Islington (bot)
74af713538
argparse docs: prog default is the basename of argv[0] (GH-30298) (GH-30339) 2022-01-02 13:29:35 -08:00
Miss Islington (bot)
35955e4ade
[3.10] Update copyright year to 2022. (GH-30335) (GH-30336)
Automerge-Triggered-By: GH:benjaminp
(cherry picked from commit ba00f0d93a)


Co-authored-by: Benjamin Peterson <benjamin@python.org>
2022-01-02 13:13:04 -08:00
Miss Islington (bot)
e9783d6434
bpo-46095: Improve SeqIter documentation. (GH-30316) (GH-30330) 2022-01-01 11:12:43 -08:00
Miss Islington (bot)
2bd7354695
bpo-46079: Replace external link that is down for maintenance. (GH-30315) (GH-30328) 2022-01-01 10:12:59 -08:00
Miss Islington (bot)
1b37268ef1
bpo-46085: Fix iterator cache mechanism of OrderedDict. (GH-30290)
(cherry picked from commit fb44d05896)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
2021-12-29 21:29:03 -08:00
Miss Islington (bot)
9f0e40fae5
closes bpo-38522 docs: remove references to Py_USING_MEMORY_DEBUGGER (GH-30284) (GH-30295)
(cherry picked from commit 8e11237c5d)

Co-authored-by: Carlos Damazio <carlos.damazio@damazio.dev>

Co-authored-by: Carlos Damazio <carlos.damazio@damazio.dev>
2021-12-29 17:01:17 -06:00
Erlend Egeberg Aasland
c31fdef1e7
[3.10] bpo-46185: Fix wrong version ref. in macOS installer ReadMe (GH-30280) 2021-12-29 20:40:11 +01:00
Miss Islington (bot)
ed1671ced7
[3.10] bpo-46120: State that | is preferred over Union (GH-30222) (GH-30250)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
(cherry picked from commit 1b30660c3b)


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

Automerge-Triggered-By: GH:gpshead
2021-12-29 03:45:14 -08:00
Miss Islington (bot)
576e38f9db
bpo-42918: Improve built-in function compile() in mode 'single' (GH-29934) (GH-30040)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
(cherry picked from commit 28179aac79)

Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
2021-12-27 17:15:44 +01:00
Miss Islington (bot)
bb0b5c1241
bpo-45496: Allow flexibility in winfo_rgb tests (GH-30185)
(cherry picked from commit 2e3e0d23ad)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
2021-12-26 04:04:26 -08:00
Miss Islington (bot)
a55082085c
Fix typo in io.rst (GH-30218)
(cherry picked from commit f9a4352056)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
2021-12-26 03:52:46 -08:00
Miss Islington (bot)
cfdb2302f4
doc: fix a typo in unittest.mock.rst (GH-30227)
(cherry picked from commit 10bf0a9ac3)

Co-authored-by: Joe <nigelchiang@outlook.com>
2021-12-26 03:51:42 -08:00
Miss Islington (bot)
d968e422ef
docs: Fix typos and use anchor for internal link (GH-30236)
(cherry picked from commit c1d7a6bed9)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2021-12-26 03:29:58 -08:00
Miss Islington (bot)
2cb9ed2a6a
Doc: Fix link in multiprocessing.starmap pointing to builtin map. (GH-26560)
(cherry picked from commit 32096df0e0)

Co-authored-by: Julien Palard <julien@palard.fr>
2021-12-26 03:15:14 -08:00
Serhiy Storchaka
11909c12c7
[3.10] Remove a NEWS entry for bpo-45878 (GH-30258)
The docs linter complains about it, and in general news entries for such changes are not required.
2021-12-26 12:37:39 +02:00
Serhiy Storchaka
03c7449fbc
[3.10] bpo-46032: Check types in singledispatch's register() at declaration time (GH-30050) (GH-30254)
The registry() method of functools.singledispatch() functions checks now
the first argument or the first parameter annotation and raises a TypeError if it is
not supported. Previously unsupported "types" were ignored (e.g. typing.List[int])
or caused an error at calling time (e.g. list[int]).

(cherry picked from commit 078abb676c)
2021-12-25 16:12:32 +02:00
Miss Islington (bot)
a9e0b2b493
bpo-45878: convert try/except to self.assertRaises in Lib/ctypes/test/test_functions.py (GH-29721) (GH-29748)
(cherry picked from commit b48ac6fe38)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-12-24 11:28:57 +02:00
Miss Islington (bot)
8005e22c9c
bpo-46150: ensure fakeuser does not exist in PosixPathTest.test_expanduser (GH-30240)
Ensure `fakeuser` does not exist in `PosixPathTest.test_expanduser`
(cherry picked from commit b8de8b7039)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2021-12-24 00:31:13 -08:00
Miss Islington (bot)
1c77aa9fc3
Allow test_pathlib to pass on systems where fakeuser exists. (GH-30244)
(cherry picked from commit d8880677a7)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2021-12-24 00:07:24 -08:00
Ned Deily
cf96c279ac
bpo-46106: Update OpenSSL to 1.1.1m (GH-30211) (GH-30224)
Co-authored-by: Ned Deily <nad@python.org>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2021-12-21 23:24:03 -05:00
Miss Islington (bot)
989d2371c8
Update potentially confusing note for mean. (GH-30174) (GH-30220)
(cherry picked from commit e9a01e231a)
2021-12-21 14:15:39 +00:00
Pablo Galindo Salgado
dc73199a21
[3.10] bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser (GH-30177) (GH-30214)
Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>.
(cherry picked from commit e9898bf153)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-12-20 16:23:37 +00:00
Miss Islington (bot)
95948169d7
bpo-23819: Get rid of assert statements in test_asyncio (GH-30212) (GH-30213)
To keep checks even if run tests with optimized Python.

Either use special assertion methods like assertEqual() or
raise an AssertionError explicitly.
(cherry picked from commit 6ca78affc8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-12-20 14:50:45 +02:00
Miss Islington (bot)
0c0bd78ccf
[3.10] bpo-46104: Fix example broken by GH-30148 (GH-30203) (GH-30209)
See discussion in GH-30179.
(cherry picked from commit 7c5c3f7254)


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

Automerge-Triggered-By: GH:Fidget-Spinner
2021-12-19 22:01:51 -08:00
Miss Islington (bot)
d7537ac8e3
bpo-46076: Improve documentation for per-attribute docstrings with __slots__ (GH-30109) (GH-30206) 2021-12-19 15:11:12 -06:00
Andrew Svetlov
cdb4579607
[3.10] bpo-46129: Rewrite asyncio.locks tests with IsolatedAsyncioTestCase (GH-30198) (GH-30202)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>.
(cherry picked from commit 9c06fd8951)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
2021-12-19 17:17:40 +02:00
Miss Islington (bot)
9a28cf19b5
bpo-46130: [docs] Add anchor for whatsnew/3.10 type hint section (GH-30199)
This allows the title to be translated to other languages without linking problems.
(cherry picked from commit 3d3615f41f)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2021-12-19 06:32:49 -08:00
Miss Islington (bot)
bb286d45af
bpo-46113: Minor fixes in stdtypes documentation (GH-30167) (GH-30186)
* Fix-1 - isidentifier() function output

* Fix-2 Update the str.splitlines() function parameter

* Fix-3 Removed unwanted full stop for str and bytes types double quotes examples.

* Fix-4 Updated class dict from **kwarg to **kwargs
(cherry picked from commit 6f2df42951)

Co-authored-by: Vivek Vashist <vivekvashist@gmail.com>
2021-12-18 22:12:30 +08:00
Miss Islington (bot)
4f945ad7a5
bpo-46099: Fix pthread_getcpuclockid test on Solaris (GH-30140) (GH-30183)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 427a490c49)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
2021-12-18 15:49:01 +02:00
Miss Islington (bot)
a66be9185c
[3.10] bpo-46104: Reduce use of pre-PEP 526 syntax in typing docs (GH-30148) (GH-30179)
Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
(cherry picked from commit 6ada013df1)


Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2021-12-18 04:14:25 -08:00
Miss Islington (bot)
dbd1dc23f6
[3.10] bpo-46044: Annotate deprecated sdists formats (GH-30043) (#30154)
(cherry picked from commit ecdc0ccede)

Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Éric <merwok@netwok.org>
2021-12-17 15:32:02 -08:00
Miss Islington (bot)
251d2eadc7
bpo-46114: Fix OpenSSL version check for 3.0.1 (GH-30170)
(cherry picked from commit 2985feac4e)

Co-authored-by: Christian Heimes <christian@python.org>
2021-12-17 07:38:11 -08:00
Miss Islington (bot)
87539cc716
bpo-45755: [typing] Reveal class attributes of generic in generic aliases in dir() (GH-29962)
(cherry picked from commit d6e1374716)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-12-17 03:33:07 -08:00
Miss Islington (bot)
9fe8fb74a1
bpo-46111: Fix unittest tests in optimized mode (GH-30163)
(cherry picked from commit 95a922b3bb)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-12-17 01:29:54 -08:00
Miss Islington (bot)
cbb4d4a642
Fix a typo in the message from make_ssl_certs. (GH-30152) (GH-30161)
The file is utils.py not util.py.

Automerge-Triggered-By: GH:gpshead
(cherry picked from commit 69ef1b5998)

Co-authored-by: Yilei "Dolee" Yang <yileiyang9@gmail.com>
2021-12-16 21:51:11 -08:00
Miss Islington (bot)
09d7319bfe
bpo-46105: Honor spec when generating requirement specs with urls and extras. (GH-30151)
(cherry picked from commit 109d966021)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2021-12-16 13:19:14 -08:00