Commit graph

110264 commits

Author SHA1 Message Date
Pablo Galindo Salgado
b977f8510e
[3.10] bpo-34013: Generalize the invalid legacy statement error message (GH-27389). (GH-27391)
(cherry picked from commit 6948964ecf)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-07-27 18:52:32 +01:00
Miss Islington (bot)
be2415487a
bpo-44740: Make minor edits to lowercasing "internet" and "web". (GH-27385) (#27386)
Follow up to 11749e2dc2
(cherry picked from commit 2e41df4d60)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-27 11:20:11 +02:00
Miss Islington (bot)
1557cff025
[doc] Fix typo in asyncio Event Loop (GH-27377)
First Pull Request to cpython, so forgive me for any mistakes

Automerge-Triggered-By: GH:Mariatta
(cherry picked from commit 6fa4060b86)

Co-authored-by: Vinicius Gubiani Ferreira <vini.g.fer@gmail.com>
2021-07-26 21:07:30 -07:00
Miss Islington (bot)
b631d8d932
Add windows build.bat counterpart for 'make regen-all' in error message (GH-26770)
(cherry picked from commit d61b69f02d)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-07-26 20:27:48 -07:00
Miss Islington (bot)
6fc1efa454
bpo-44740: Lowercase "internet" and "web" where appropriate. (GH-27378) (GH-27380)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 11749e2dc2)

Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-07-27 00:34:32 +02:00
Miss Islington (bot)
0ea5e0d792
bpo-44515: handle non-refcounted GC in contextlib tests (GH-26910) (GH-27379)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit a2c45e5bcf)

Co-authored-by: Nick Coghlan <ncoghlan@gmail.com>
2021-07-26 23:21:36 +02:00
Miss Islington (bot)
3dc88ff845
docs: replace "Mac OS X" -> "macOS" (GH-27364) (GH-27374)
"Mac OS X" has been rebranded as macOS

https://www.apple.com/macos
(cherry picked from commit 5fdd2a14ce)

Co-authored-by: partev <petrosyan@gmail.com>
2021-07-26 16:22:26 -04:00
Miss Islington (bot)
5151826ee4
The current documentation says it returns None if the name is not found, but (GH-26785) (GH-27371)
the implementation uses [] and will raise KeyError instead.

Noticed by @srittau in python/typeshed@5659.
(cherry picked from commit f22737abfa)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2021-07-26 21:35:33 +02:00
Miss Islington (bot)
563e05743c
bpo-43443: Clarify difference between shelve objects and dicts (GH-27004) (GH-27369)
(cherry picked from commit c97c2a050c)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-07-26 21:32:36 +02:00
Miss Islington (bot)
4a5457d5d4
bpo-44490: Add 'Whats New' docs regarding types.Union changes (GH-27215) (GH-27368)
(cherry picked from commit 6c1b57d958)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
2021-07-26 21:32:05 +02:00
Miss Islington (bot)
256d97c8a3
bpo-44698: Fix undefined behaviour in complex exponentiation. (GH-27278) (#27366)
(cherry picked from commit 1d582bbc96)

Co-authored-by: T. Wouters <thomas@python.org>
2021-07-26 21:29:52 +02:00
Miss Islington (bot)
8a37e8cf45
bpo-44732: Rename types.Union to types.UnionType (GH-27342)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 2b8ad9e6c5)

Co-authored-by: Hasan <hasan.aleeyev@gmail.com>
2021-07-26 12:02:58 -07:00
Miss Islington (bot)
16a174f7ba
bpo-44734: Fix precision in turtle tests (GH-27343) (GH-27361)
(cherry picked from commit 3f135c073a)

Co-authored-by: Logan Jones <loganasherjones@gmail.com>
2021-07-26 17:55:50 +02:00
Miss Islington (bot)
642d873d67
bpo-44693: Update __future__ entry in Doc/glossary.rst (GH-27349) (GH-27357)
Replace sentence with confusing "pseudo-module" with two sentences
separating future statements and the __future__ module.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 0363a4014d)

Co-authored-by: Steven Hsu <hsuhaochun@gmail.com>

Co-authored-by: Steven Hsu <hsuhaochun@gmail.com>
2021-07-25 21:40:08 -04:00
Miss Islington (bot)
01601aa736
[3.10] bpo-44600: Fix line numbers for pattern matching cleanup code (GH-27346) (GH-27356)
(cherry picked from commit 4214f470f0)


Co-authored-by: Charles Burkland <charles.aburkland@gmail.com>

Automerge-Triggered-By: GH:brandtbucher
2021-07-25 17:04:06 -07:00
Miss Islington (bot)
628baf6fef
[3.10] bpo-44399: Update logging cookbook to document patterns to be avoided. (GH-27348) (GH-27352)
(cherry picked from commit 9751f85914)
2021-07-25 20:31:54 +01:00
Miss Islington (bot)
59058a65a2
[3.10] bpo-43184: Add information about added attribute and method. (GH-27347) (GH-27355)
(cherry picked from commit 50b72768ff)
2021-07-25 20:30:50 +01:00
Miss Islington (bot)
0aea99e444
bpo-44676: Serialize the union type using only public API (GH-27323) (GH-27340)
Remove also the _from_args() constructor.
(cherry picked from commit 435a0334d3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-07-24 22:35:33 +03:00
Ken Jin
ca5a4cf826
bpo-44731: Simplify the union type implementation (GH-27318) (GH-27334)
Remove direct support of typing types in the C code because they are already supported by defining methods __or__ and __ror__ in the Python code.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-07-24 15:49:25 +01:00
Pablo Galindo Salgado
9356d1e47d
[3.10] bpo-44676: Add ability to serialize types.Union (GH-27244) (GH-27333)
(cherry picked from commit fe13f0b0f6)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
2021-07-24 15:08:53 +01:00
Miss Islington (bot)
e8c01749c0
bpo-44353: Improve tests covering typing.NewType pickling (GH-27302) (GH-27328)
(cherry picked from commit a22b05da87)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
2021-07-24 12:29:19 +02:00
Łukasz Langa
05f5d8e48c
[3.10] bpo-44353: Expand NewType tests for complex __qualname__ (GH-27311) (GH-27326)
Make NewType pickleable by name.
(cherry picked from commit e89ef0ad2a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-07-24 12:07:56 +02:00
Miss Islington (bot)
45caee2715
bpo-44713: [doc fix]: typo in subprocess.rst (GH-27297) (GH-27298)
This fixes a small typo. The code fragment should not be quoted. Thank you
@merwok for the feedback.
(cherry picked from commit 7d25254cf0)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-07-24 11:59:22 +02:00
Miss Islington (bot)
659030c7d5
bpo-44720: Don't crash when calling weakref.proxy(not_an_iterator).__next__ (GH-27316) (GH-27324)
(cherry picked from commit 5370f0a82a)

Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
2021-07-24 11:45:13 +02:00
Miss Islington (bot)
d15949a845
bpo-44353: Document that typing.NewType is now a class (GH-27319) (GH-27321)
(cherry picked from commit 7aac3f6236)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-07-24 11:31:33 +02:00
Miss Islington (bot)
5ec275758d
bpo-42854: Correctly use size_t for _ssl._SSLSocket.read and _ssl._SSLSocket.write (GH-27271) (GH-27308)
(cherry picked from commit 83d1430ee5)

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

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2021-07-23 16:25:54 +01:00
Miss Islington (bot)
632e8a6959
bpo-42747: Remove Py_TPFLAGS_HAVE_AM_SEND and make Py_TPFLAGS_HAVE_VERSION_TAG no-op (GH-27260) (GH-27306)
* Remove code that checks Py_TPFLAGS_HAVE_VERSION_TAG

    The field is always present in the type struct, as explained
    in the added comment.

* Remove Py_TPFLAGS_HAVE_AM_SEND

    The flag is not needed, and since it was added in 3.10 it can be removed now.
(cherry picked from commit a4760cc32d)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2021-07-23 16:56:53 +02:00
Miss Islington (bot)
c589992e09
bpo-29298: Fix crash with required subparsers without dest (GH-3680) (GH-27303)
(cherry picked from commit 17575f73ce)

Co-authored-by: Anthony Sottile <asottile@umich.edu>
2021-07-23 15:27:05 +02:00
Miss Islington (bot)
21db59fc75
bpo-44653: Support typing types in parameter substitution in the union type. (GH-27247) (#27296)
(cherry picked from commit 2e3744d50b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-07-23 00:18:49 +02:00
Miss Islington (bot)
9608719e12
bpo-44708: Only re-run test methods that match names of previously failing test methods (GH-27287) (GH-27290)
* Move to a static argparse.Namespace subclass
* Roughly annotate runtest.py
* Refactor libregrtest to use lossless test result objects
* Only re-run test methods that match names of previously failing test methods
* Adopt tests to cover test method name matching

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
(cherry picked from commit f1afef5e0d)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2021-07-22 22:30:44 +02:00
Miss Islington (bot)
d0c6175303
bpo-14879: [doc] clarify how to check for errors from subprocess.Popen(..., shell=True) (GH-26755) (GH-27288)
(cherry picked from commit 50ffbe3daf)

Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
2021-07-22 19:25:57 +01:00
Miss Islington (bot)
0fb4b75f7a
Fix typo in collections.rst (GH-27270) (#27285) 2021-07-22 10:38:22 +02:00
Miss Islington (bot)
4194f1465f
bpo-44704: Make Set._hash consistent with frozenset.__hash__ (GH-27281) (GH-27282) 2021-07-21 19:23:21 -05:00
Miss Islington (bot)
d17449f31d
bpo-30511: Add note on thread safety to shutil.make_archive() (GH-26933) (GH-27274)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 64f54b7ccd)

Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
2021-07-21 10:55:22 +02:00
Miss Islington (bot)
68b4690b01
bpo-44566: resolve differences between asynccontextmanager and contextmanager (GH-27024) (#27266)
(cherry picked from commit 7f1c330da3)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2021-07-20 21:12:47 +02:00
Miss Islington (bot)
574da4633b
[3.10] bpo-43219: skip Solaris in the test as well (GH-27257) (GH-27268)
(cherry picked from commit 6564656495)


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

Automerge-Triggered-By: GH:gpshead
2021-07-20 11:53:31 -07:00
Miss Islington (bot)
416f418a11
Update macOS build-installer script comments for 3.10 and remove unused pre-10.5 vestiges. (GH-27253)
(cherry picked from commit 42205ee512)

Co-authored-by: Ned Deily <nad@python.org>
2021-07-20 10:30:29 -07:00
Miss Islington (bot)
9ae5ba7dbf
bpo-44353: Add test to cover __or__ of two NewType (GH-27259) (#27261)
(cherry picked from commit 4868b94c60)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
2021-07-20 18:06:38 +02:00
Miss Islington (bot)
c2f33dfc83
bpo-44353: Refactor typing.NewType into callable class (GH-27250) (#27258)
(cherry picked from commit 965dd76e90)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
2021-07-20 17:24:57 +02:00
Miss Islington (bot)
c895f2bc4f
bpo-44524: Add missed __name__ and __qualname__ to typing module objects (GH-27237) (#27246)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit bce1418541)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
2021-07-19 19:57:27 +02:00
Miss Islington (bot)
8c43bf1a92
bpo-27513: email.utils.getaddresses() now handles Header objects (GH-13797) (GH-27242)
getaddresses() should be able to handle a Header object if passed
one.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 89f4c34797)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2021-07-19 18:54:45 +02:00
Miss Islington (bot)
2d0492091e
Clean up comma usage in Doc/library/functions.rst (GH-27083) (#27243)
(cherry picked from commit 1e651c6ada)

Co-authored-by: α∂мιηιχтяαтσя <sadiqherritage@gmail.com>
2021-07-19 18:38:56 +02:00
Ken Jin
a272164959
bpo-44490: Improve typing module compatibility with types.Union (GH-27048) (#27222)
(cherry picked from commit bf89ff96e6)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
2021-07-19 07:22:59 -07:00
Miss Islington (bot)
37bdd2221c
bpo-44645: Check for interrupts on any potentially backwards edge (GH-27216) (GH-27235)
(cherry picked from commit d09c134178)

Co-authored-by: Mark Shannon <mark@hotpy.org>
2021-07-19 12:15:58 +01:00
Miss Islington (bot)
bce2847169
[3.10] bpo-44561: Update hyperlinks in Doc/distributing/index.rst (GH-27032) (GH-27234)
* Update hyperlinks in Doc/distributing/index.rst

Update three expired hyperlinks.

Closes [bpo-44561]().
(cherry picked from commit b494685b25)


Co-authored-by: Steven Hsu <hsuhaochun@gmail.com>

Automerge-Triggered-By: GH:ncoghlan
2021-07-18 17:34:44 -07:00
Pablo Galindo Salgado
af9a352b60
Correct the order of check-abidump (GH-27229)
The check was backwards so we were not correctly detecting removals.
2021-07-18 16:56:45 +01:00
Serhiy Storchaka
a6670cdf77
[3.10] bpo-44654: Do not export the union type related symbols (GH-27223). (GH-27225)
(cherry picked from commit 8f50f44592)
2021-07-18 18:37:41 +03:00
Miss Islington (bot)
85b58292cf
bpo-44633: Fix parameter substitution of the union type with wrong types. (GH-27218) (GH-27224)
A TypeError is now raised instead of returning NotImplemented.
(cherry picked from commit 3ea5332a43)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2021-07-18 14:59:25 +03:00
Miss Islington (bot)
03aad3049d
[3.10] bpo-44654: Refactor and clean up the union type implementation (GH-27196) (GH-27219)
(cherry picked from commit 0fd27375ca)
2021-07-18 00:10:21 +03:00
Serhiy Storchaka
2d055ce132
[3.10] bpo-44490: Add __parameters__ and __getitem__ to types.Union (GH-26980) (GH-27207)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>.
(cherry picked from commit c45fa1a5d9)

Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
2021-07-17 22:14:57 +03:00