]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Sat, 17 Jul 2021 00:01:53 +0000 (17:01 -0700)]
bpo-44655: Include the name of the type in unset __slots__ attribute errors (GH-27199) (GH-27201)
(cherry picked from commit
f783428a2313a729ca8b539c5a86ff114b9ff375 )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Fri, 16 Jul 2021 21:16:08 +0000 (14:16 -0700)]
bpo-44655: Don't include suggestions for attributes that are the same as the missing one (GH-27197) (GH-27198)
(cherry picked from commit
6714dec5e104bdee4a0ed4d9966de27d1bfa1e3d )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Fri, 16 Jul 2021 17:29:32 +0000 (10:29 -0700)]
Revert "bpo-44645: Check for interrupts on any potentially backwards edge. (GH-27167)" (GH-27194) (#27195)
This reverts commit
000e70ad5246732fcbd27cf59268185cbd5ad734 .
(cherry picked from commit
c90c591e5158ab7b531dcd6e2a5f00bc70ba7637 )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Fri, 16 Jul 2021 13:55:26 +0000 (06:55 -0700)]
bpo-44647: Add a permanent Unicode-valued env var to regrtest (GH-27187) (#27191)
(cherry picked from commit
7915c96ffd7ddc5cb6d54015ee4c31255a416892 )
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Serhiy Storchaka [Fri, 16 Jul 2021 13:42:04 +0000 (16:42 +0300)]
[3.10] bpo-44652: Preserve natural order of args in the union type. (GH-27185) (GH-27190)
(cherry picked from commit
0cd2d51aadcd2a0c0739a5df0a6235d64f35619e )
Automerge-Triggered-By: GH:ambv
Miss Islington (bot) [Fri, 16 Jul 2021 13:25:57 +0000 (06:25 -0700)]
bpo-40897:Give priority to using the current class constructor in `inspect.signature` (GH-27177) (#27189)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit
6aab5f9bf303a8e4cd8377fabcdcb499e0541f9a )
Co-authored-by: Weipeng Hong <hongweichen8888@sina.com>
Serhiy Storchaka [Fri, 16 Jul 2021 11:48:20 +0000 (14:48 +0300)]
[3.10] bpo-44636: Collapse union of equal types (GH-27178) (GH-27181)
The result of `int | int` is now `int`.
Fix comparison of the union type with non-hashable objects.
`int | str == {}` no longer raises a TypeError.
(cherry picked from commit
d9f923280f204204f8703756aef4f655b579b4b8 )
Mark Shannon [Fri, 16 Jul 2021 10:49:10 +0000 (11:49 +0100)]
bpo-44626: Merge basic blocks earlier to enable better handling of exit blocks without line numbers (GH-27138) (GH-27182)
(cherry picked from commit
a86f7dae0acf918d54086cb85e5a0b0bedeedce7 )
Mark Shannon [Fri, 16 Jul 2021 10:48:46 +0000 (11:48 +0100)]
[3.10] bpo-44645: Check for interrupts on any potentially backwards edge. (GH-27167) (GH-27183)
(cherry picked from commit
000e70ad5246732fcbd27cf59268185cbd5ad734 )
Co-authored-by: Mark Shannon <mark@hotpy.org>
Miss Islington (bot) [Fri, 16 Jul 2021 09:02:59 +0000 (02:02 -0700)]
bpo-44646: Fix the hash of the union type. (GH-27179) (#27180)
It no longer depends on the order of arguments.
hash(int | str) == hash(str | int)
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
(cherry picked from commit
aeaa553d650786afc6e68df1f4813ae1a5b71d05 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Thu, 15 Jul 2021 23:18:16 +0000 (16:18 -0700)]
bpo-44184: Apply GH-26274 to the non-GC-type branch of subtype_dealloc (GH-27165) (GH-27174)
The non-GC-type branch of subtype_dealloc is using the type of an object after freeing in the same unsafe way as GH-26274 fixes. (I believe the old news entry covers this change well enough.)
https://bugs.python.org/issue44184
(cherry picked from commit
074e7659f208051b6b973f7fdb654dd22b93aaa2 )
Co-authored-by: T. Wouters <thomas@python.org>
Miss Islington (bot) [Thu, 15 Jul 2021 20:09:26 +0000 (13:09 -0700)]
bpo-44647: Fix test_httpservers failing on Unicode characters in os.environ on Windows (GH-27161) (#27169)
GH-23638 introduced a new test for Accept: headers in CGI HTTP servers. This test serializes all of os.environ on the server side. For non-UTF8 locales this can fail for some Unicode characters found in environment variables. This change fixes the HTTP_ACCEPT test.
(cherry picked from commit
82b218f36ce6ef910bda5af227a9fd5be613c94f )
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Mark Shannon [Thu, 15 Jul 2021 14:54:38 +0000 (15:54 +0100)]
bpo-44622: Set line number of END_ASYNC_FOR to match that of iterator. (GH-27160) (GH-27163)
(cherry picked from commit
f333ab0f2edec26a769ed558263ac662e5475451 )
Miss Islington (bot) [Thu, 15 Jul 2021 13:42:11 +0000 (06:42 -0700)]
bpo-42073: allow classmethod to wrap other classmethod-like descriptors (GH-27115) (GH-27162)
Patch by Erik Welch.
bpo-19072 (GH-8405) allows `classmethod` to wrap other descriptors, but this does
not work when the wrapped descriptor mimics classmethod. The current PR fixes
this.
In Python 3.8 and before, one could create a callable descriptor such that this
works as expected (see Lib/test/test_decorators.py for examples):
```python
class A:
@myclassmethod
def f1(cls):
return cls
@classmethod
@myclassmethod
def f2(cls):
return cls
```
In Python 3.8 and before, `A.f2()` return `A`. Currently in Python 3.9, it
returns `type(A)`. This PR make `A.f2()` return `A` again.
As of GH-8405, classmethod calls `obj.__get__(type)` if `obj` has `__get__`.
This allows one to chain `@classmethod` and `@property` together. When
using classmethod-like descriptors, it's the second argument to `__get__`--the
owner or the type--that is important, but this argument is currently missing.
Since it is None, the "owner" argument is assumed to be the type of the first
argument, which, in this case, is wrong (we want `A`, not `type(A)`).
This PR updates classmethod to call `obj.__get__(type, type)` if `obj` has
`__get__`.
Co-authored-by: Erik Welch <erik.n.welch@gmail.com>
(cherry picked from commit
b83861f0265e07207a6ae2c49c40fa8f447893f2 )
Miss Islington (bot) [Thu, 15 Jul 2021 10:10:57 +0000 (03:10 -0700)]
Fix osx_framework_user include to match distutils (GH-27093) (GH-27159)
(cherry picked from commit
28544609cb2a79d8d7ea5a54714d723669ef2adb )
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Miss Islington (bot) [Thu, 15 Jul 2021 07:25:22 +0000 (00:25 -0700)]
bpo-44632: Fix support of TypeVar in the union type (GH-27139) (GH-27143)
int | TypeVar('T') returns now an instance of types.Union
instead of typing.Union.
(cherry picked from commit
a158b20019b50e3ece6e4743ec4e6ae8d818b690 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Serhiy Storchaka [Thu, 15 Jul 2021 07:15:14 +0000 (10:15 +0300)]
[3.10] bpo-44635: Convert None to NoneType in the union type constructor (GH-27136). (GH-27142)
(cherry picked from commit
b81cac05606c84958b52ada09f690463a3c7e949 )
Miss Islington (bot) [Thu, 15 Jul 2021 01:00:35 +0000 (18:00 -0700)]
[3.10] bpo-44589: raise a SyntaxError when mapping patterns have duplicate literal keys (GH-27131) (GH-27157)
(cherry picked from commit
2693132292b2acf381ac6fa729bf3acf41d9d72b )
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
Automerge-Triggered-By: GH:brandtbucher
Miss Islington (bot) [Wed, 14 Jul 2021 23:15:31 +0000 (16:15 -0700)]
bpo-34932: Add socket.TCP_KEEPALIVE for macOS (GH-25079)
(cherry picked from commit
d59d7374a364c4e5c2b9a83d8e4543ee494285b8 )
Co-authored-by: Shane Harvey <shnhrv@gmail.com>
Erlend Egeberg Aasland [Wed, 14 Jul 2021 23:02:01 +0000 (01:02 +0200)]
[3.10] Fix docstring typo in sqlite3.Connection.executescript/sqlite3.Cursor.executescript (GH-27147) (GH-27151)
Both `executescript` methods contain the same docstring typo:
_"Executes a multiple SQL statements at once."_ => _"Executes multiple SQL statements at once."_
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Miss Islington (bot) [Wed, 14 Jul 2021 22:22:50 +0000 (15:22 -0700)]
bpo-44639: fix typo in sqlite.rst (transation => transaction) (GH-27145) (GH-27148)
To my understanding, this is supposed to say "transaction".
See the relevant source:
https://github.com/python/cpython/blob/
a158b20019b50e3ece6e4743ec4e6ae8d818b690 /Modules/_sqlite/connection.cGH-L1434-L1467
(cherry picked from commit
1ca27f264730abaaa48b3c5e7c6eafb45017b824 )
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
Pablo Galindo Salgado [Wed, 14 Jul 2021 22:22:12 +0000 (23:22 +0100)]
[3.10] Add release highlights for the 3.10 what's new document (GH-27150) (GH-27152)
(cherry picked from commit
2b47af63982e4ccc09ae14c7c66ba115804bbbf6 )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Mark Shannon [Wed, 14 Jul 2021 10:43:56 +0000 (11:43 +0100)]
bpo-44616: Mark all clean up instructions at end of named exception block as artificial (GH-27109) (GH-27135)
(cherry picked from commit
e5862f79c16e28f1ec51d179698739a9b2d8c1d2 )
Miss Islington (bot) [Wed, 14 Jul 2021 05:40:10 +0000 (22:40 -0700)]
bpo-44608: Fix memory leak in _tkinter._flatten() (GH-27107)
if it is called with a sequence or set, but not list or tuple.
(cherry picked from commit
f572cbf1faab33d9afbbe3e95738ed6fbe6e48e6 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 14 Jul 2021 04:55:45 +0000 (21:55 -0700)]
bpo-44606: Fix __instancecheck__ and __subclasscheck__ for the union type. (GH-27120)
* Fix issubclass() for None.
E.g. issubclass(type(None), int | None) returns now True.
* Fix issubclass() for virtual subclasses.
E.g. issubclass(dict, int | collections.abc.Mapping) returns now True.
* Fix crash in isinstance() if the check for one of items raises exception.
(cherry picked from commit
81989058de381108dfd0a4255b93d4fb34417002 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 13 Jul 2021 23:18:28 +0000 (16:18 -0700)]
[3.10] bpo-44630: Fix assertion errors in csv module (GH-27127) (GH-27129)
Fix incorrect handling of exceptions when interpreting dialect objects in
the csv module. Not clearing exceptions between calls to
PyObject_GetAttrString() causes assertion failures in pydebug mode (or with
assertions enabled).
Add a minimal test that would've caught this (passing None as dialect, or
any object that isn't a csv.Dialect subclass, which the csv module allows
and caters to, even though it is not documented.) In pydebug mode, the test
triggers the assertion failure in the old code.
Contributed-By: T. Wouters [Google]
(cherry picked from commit
0093876328afa330224c9d887c18dee0b3117852 )
Co-authored-by: T. Wouters <thomas@python.org>
Automerge-Triggered-By: GH:gpshead
Miss Islington (bot) [Tue, 13 Jul 2021 19:48:23 +0000 (12:48 -0700)]
bpo-44572: On Windows, disconnect STDIN in platform._syscmd_ver() to prevent erroneous STDIN consumption (GH-27092) (GH-27124)
(cherry picked from commit
0ee0a740e12ec8568aafa033aa6bb08b265afe26 )
Co-authored-by: Konstantin-Glukhov <glukhov.k@gmail.com>
Miss Islington (bot) [Tue, 13 Jul 2021 14:41:12 +0000 (07:41 -0700)]
bpo-43126: Expand docs on io.IOBase.readlines() method (GH-27061) (GH-27113)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit
3b5b99da4b256a31933112f4a2385386149c19e1 )
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Miss Islington (bot) [Tue, 13 Jul 2021 14:35:30 +0000 (07:35 -0700)]
bpo-38741: Definition of multiple ']' in header configparser (GH-17129) (#27110)
Co-authored-by: Jason Killen <jason.killen@windsorcircle.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit
2924bb1a566977efd45f335d6a94cd84d8047edf )
Co-authored-by: jsnklln <jsnklln@gmail.com>
Miss Islington (bot) [Tue, 13 Jul 2021 14:34:10 +0000 (07:34 -0700)]
bpo-44514: Add doctest testcleanup for configparser and bz2 (GH-26909) (GH-27112)
Add testcleanup section to configparser and bz2 documentation which
removes temporary files created in the filesystem when 'make doctest'
is run.
(cherry picked from commit
48a5aa7f128caf5a46e4326c1fd285cd5fc8e59d )
Co-authored-by: Kevin Follstad <kfollstad@gmail.com>
Miss Islington (bot) [Tue, 13 Jul 2021 08:43:26 +0000 (01:43 -0700)]
bpo-44472: Fix ltrace functionality when exceptions are raised (GH-26822) (GH-26830)
(cherry picked from commit
06cda808f149fae9b4c688f752b6eccd0d455ba4 )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Tue, 13 Jul 2021 00:40:51 +0000 (17:40 -0700)]
bpo-44613: Make importlib.metadata non-provisional (GH-27101) (#27106)
* importlib.metadata is no longer provisional as of 3.10
* Add NEWS entry
(cherry picked from commit
f6954cdfc50060a54318fb2aea4d80408381243a )
Co-authored-by: Barry Warsaw <barry@python.org>
Co-authored-by: Barry Warsaw <barry@python.org>
Ethan Furman [Mon, 12 Jul 2021 18:07:03 +0000 (11:07 -0700)]
[Enum] add news entry for enum module reversion (GH-27099)
Miss Islington (bot) [Mon, 12 Jul 2021 15:43:16 +0000 (08:43 -0700)]
bpo-42194: Add "New in version: 3.9" to argparse.BooleanOptionalAction (GH-23026) (#27097)
(cherry picked from commit
da2e673c53974641a0e13941950e7976bbda64d5 )
Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
Miss Islington (bot) [Mon, 12 Jul 2021 15:07:46 +0000 (08:07 -0700)]
bpo-26329: update os.path.normpath documentation (GH-20138) (GH-27094)
(cherry picked from commit
66c5853406bbcccecf35372795078c0641a5f385 )
Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Miss Islington (bot) [Sun, 11 Jul 2021 17:47:06 +0000 (10:47 -0700)]
bpo-29753: revert
0d7ad9f (GH-19850) (GH-27085)
This reverts commit
0d7ad9fb38c041c46094087b0cf2c8ce44916b11 as it has a regression.
See https://github.com/python/cpython/pull/19850GH-issuecomment-
869410686
(cherry picked from commit
e14d5ae5447ae28fc4828a9cee8e9007f9c30700 )
Co-authored-by: Filipe Laíns <lains@archlinux.org>
Miss Islington (bot) [Sat, 10 Jul 2021 04:07:35 +0000 (21:07 -0700)]
bpo-43219: shutil.copyfile, raise a less confusing exception instead of IsADirectoryError (GH-27049)
Fixes the misleading IsADirectoryError to be FileNotFoundError.
(cherry picked from commit
248173cc0483a9ad9261353302f1234cf9eb2ebe )
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Pablo Galindo [Sat, 10 Jul 2021 01:27:16 +0000 (02:27 +0100)]
Post 3.10.0b4
Pablo Galindo [Sat, 10 Jul 2021 00:49:40 +0000 (01:49 +0100)]
Python 3.10.0b4
Miss Islington (bot) [Sat, 10 Jul 2021 00:47:33 +0000 (17:47 -0700)]
bpo-44317: Improve tokenizer errors with more informative locations (GH-26555) (GH-27079)
(cherry picked from commit
f24777c2b329974b69d2a3bf5cfc37e0fcace36c )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Batuhan Taskaya [Sat, 10 Jul 2021 00:16:15 +0000 (03:16 +0300)]
[3.10] bpo-43897: ast validation for pattern matching nodes (GH-27074)
(cherry picked from commit
8dcb7d98086888230db94a1eb07bae1b5db82bc9 )
Co-authored-by: Batuhan Taskaya <batuhan@python.org>
Miss Islington (bot) [Fri, 9 Jul 2021 04:51:26 +0000 (21:51 -0700)]
Doc: Fix wrong exception used in example. (GH-26572)
(cherry picked from commit
15f0fc571c1fbc84b6b74dfeb373ca3d35e4c5d7 )
Co-authored-by: Julien Palard <julien@palard.fr>
Mark Shannon [Thu, 8 Jul 2021 18:21:22 +0000 (19:21 +0100)]
bpo-44570: Fix line tracing for forward jumps to duplicated tails (GH-27067)
Pablo Galindo [Thu, 8 Jul 2021 16:47:12 +0000 (17:47 +0100)]
[3.10] bpo-44446: support lineno being None in traceback.FrameSummary (GH-26781) (GH-27072)
As of
088a15c49d99ecb4c3bef93f8f40dd513c6cae3b , lineno is None instead
of -1 if there is no line number.
Signed-off-by: Filipe Laíns <lains@riseup.net>.
(cherry picked from commit
91a8f8c16ca9a7e2466a8241d9b41769ef97d094 )
Co-authored-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Filipe Laíns <lains@riseup.net>
Miss Islington (bot) [Thu, 8 Jul 2021 16:13:06 +0000 (09:13 -0700)]
bpo-44582: Accelerate mimetypes.init on Windows with a native accelerator (GH-27059)
(cherry picked from commit
bbf2fb6c7ae78f40483606f467739a58cd747270 )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Thu, 8 Jul 2021 15:27:57 +0000 (08:27 -0700)]
docs: add the word 'official' (GH-26849)
(cherry picked from commit
af4a2dcc40321de49bffec80bf6c6b5a7d43b134 )
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
Steve Dower [Wed, 7 Jul 2021 18:35:51 +0000 (19:35 +0100)]
bpo-44479: Simplified LICENSE.txt regeneration in Windows build (GH-27056)
Miss Islington (bot) [Wed, 7 Jul 2021 13:50:41 +0000 (06:50 -0700)]
bpo-44558: Match countOf `is`/`==` treatment to c (GH-27007)
(cherry picked from commit
6bd3ecfc272b122b55a6adec50dd7a7c868f262f )
Co-authored-by: Rupert Tombs <rupert.tombs@gmail.com>
Miss Islington (bot) [Mon, 5 Jul 2021 22:34:53 +0000 (15:34 -0700)]
bpo-44563: Fix error handling in tee.fromiterable() (GH-27020) (GH-27041)
In debug build failed tee.fromiterable() corrupted the linked list of all GC objects.
(cherry picked from commit
f64de53ff01e734d48d1d42195443d7d1646f220 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 5 Jul 2021 20:46:02 +0000 (13:46 -0700)]
bpo-43453: Update and re-add example to typing runtime_checkable (GH-27013)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit
17f94e28882e1e2b331ace93f42e8615383dee59 )
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Steve Dower [Mon, 5 Jul 2021 16:28:00 +0000 (17:28 +0100)]
bpo-44479: Regenerate test_frozenmain.h and frozen_hello.h during build on Windows (GH-26984)
Miss Islington (bot) [Mon, 5 Jul 2021 11:33:53 +0000 (04:33 -0700)]
bpo-44562: Use PyType_GenericAlloc in Py_GenericAlias (GH-27021)
* bpo-44562: Use PyType_GenericAlloc in Py_GenericAlias
* Update Objects/genericaliasobject.c
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit
b324c4c5f763c5116a97db8591e6dcb94456570a )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Mon, 5 Jul 2021 09:51:46 +0000 (02:51 -0700)]
bpo-44558: Make the implementation consistency of operator.indexOf (GH-27012)
(cherry picked from commit
09302405d22e86884d6058226790c0cdf5b72f14 )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Miss Islington (bot) [Mon, 5 Jul 2021 01:32:56 +0000 (18:32 -0700)]
bpo-41486: zlib uses an UINT32_MAX sliding window for the output buffer (GH-26143)
* zlib uses an UINT32_MAX sliding window for the output buffer
These funtions have an initial output buffer size parameter:
- zlib.decompress(data, /, wbits=MAX_WBITS, bufsize=DEF_BUF_SIZE)
- zlib.Decompress.flush([length])
If the initial size > UINT32_MAX, use an UINT32_MAX sliding window, instead of clamping to UINT32_MAX.
Speed up when (the initial size == the actual size).
This fixes a memory consumption and copying performance regression in earlier 3.10 beta releases if someone used an output buffer larger than 4GiB with zlib.decompress.
Reviewed-by: Gregory P. Smith
(cherry picked from commit
a9a69bb3ea1e6cf54513717212aaeae0d61b24ee )
Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
Miss Islington (bot) [Sun, 4 Jul 2021 17:55:35 +0000 (10:55 -0700)]
bpo-44562: Remove invalid PyObject_GC_Del from error path of types.GenericAlias … (GH-27016)
(cherry picked from commit
d33943a6c368c2184e238019c63ac7a267da5594 )
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Ethan Furman [Sun, 4 Jul 2021 04:08:42 +0000 (21:08 -0700)]
[3.10] bpo-44559: [Enum] revert enum module to 3.9 (GH-27010)
* [Enum] revert enum module to 3.9
Miss Islington (bot) [Sat, 3 Jul 2021 20:51:10 +0000 (13:51 -0700)]
bpo-44553: Correct failure in tp_new for the union object (GH-27008) (GH-27009)
(cherry picked from commit
bc3961485639cc73de7c4c7eed1b56f3c74939bf )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Sat, 3 Jul 2021 18:15:49 +0000 (11:15 -0700)]
Fix a small typo in the docs (GH-26991) (GH-27003)
(cherry picked from commit
a79e2b6497f7d31017c01a41a290a9b3349398fe )
Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
Irit Katriel [Sat, 3 Jul 2021 16:28:46 +0000 (17:28 +0100)]
[3.10] bpo-34266: [pdb] handle ValueError from shlex.split() (GH-26656) (GH-27006)
(cherry picked from commit
d968a638fcbf9030c999cfacd4c9bf0656e779c4 )
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Miss Islington (bot) [Sat, 3 Jul 2021 13:33:16 +0000 (06:33 -0700)]
bpo-44553 : Implement GC methods for types.Union (GH-26993)
(cherry picked from commit
1097384ce964dd63686b1aac706cd0fa764c2dc9 )
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Irit Katriel [Fri, 2 Jul 2021 17:39:52 +0000 (18:39 +0100)]
[3.10] bpo-30256: [doc] Fix formatting error in news (GH-26994) (GH-26998)
Miss Islington (bot) [Fri, 2 Jul 2021 10:07:50 +0000 (03:07 -0700)]
bpo-34798: [doc] clearer presentation of pprint.PrettyPrinter constru… (GH-26967) (GH-26990)
(cherry picked from commit
943e77d42d3f84b581f32c05f1fc8c05366b8ed3 )
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Miss Islington (bot) [Fri, 2 Jul 2021 04:15:47 +0000 (21:15 -0700)]
bpo-30256: Add manager_owned keyword arg to AutoProxy (GH-16341) (#26987)
Co-authored-by: Jordan Speicher <jordan@jspeicher.com>
(cherry picked from commit
85b920498b42c69185540ecc2f5c4907fd38d877 )
Co-authored-by: finefoot <33361833+finefoot@users.noreply.github.com>
Miss Islington (bot) [Fri, 2 Jul 2021 02:05:11 +0000 (19:05 -0700)]
bpo-43425: Update setup.py not to use distutils.log (GH-26969)
(cherry picked from commit
a7e251b07aa5f1a858a3e791a30dea78e93ab728 )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Miss Islington (bot) [Thu, 1 Jul 2021 01:20:24 +0000 (18:20 -0700)]
bpo-43425: Update _osx_support not to use distutils.log (GH-26968)
(cherry picked from commit
c8979f780e4b7d6db5693cb26a2956cc785abb48 )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Miss Islington (bot) [Wed, 30 Jun 2021 19:24:42 +0000 (12:24 -0700)]
bpo-44535: Enable building with Visual Studio 2022 on Windows (GH-26962)
(cherry picked from commit
d3a95c1b6eacbbbd92c294744e7ed41932f3f63e )
Co-authored-by: Steve Dower <steve.dower@python.org>
Steve Dower [Wed, 30 Jun 2021 17:52:25 +0000 (18:52 +0100)]
bpo-41180: Replace marshal code.__new__ audit event with marshal.load[s] and marshal.dumps (GH-26970)
Miss Islington (bot) [Tue, 29 Jun 2021 23:19:06 +0000 (16:19 -0700)]
bpo-44523: Remove the pass-through for hash() in weakref proxy objects (GH-26950)
(cherry picked from commit
e2fea101fd5517f33371b04432842b971021c3bf )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Tue, 29 Jun 2021 17:52:27 +0000 (10:52 -0700)]
bpo-38062: [doc] clarify that atexit uses equality comparisons internally. (GH-26935) (GH-26956)
(cherry picked from commit
12803c59d54ff1a45a5b08cef82652ef199b3b07 )
Co-authored-by: Jack DeVries <58614260+jdevries3133@users.noreply.github.com>
Miss Islington (bot) [Tue, 29 Jun 2021 11:14:52 +0000 (04:14 -0700)]
bpo-42588: Update the docs for the TopologicalSorter.static_order() method (GH-26834)
(cherry picked from commit
0d7f7975d55eff7e3dfcebd14e765fc6cd7d3e40 )
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
Miss Islington (bot) [Tue, 29 Jun 2021 11:12:23 +0000 (04:12 -0700)]
[doc] Fix typo in what's new in 3.10 (GH-26911) (GH-26940)
The `try` statement was missing a colon and therefore was not exemplifying the correct `SyntaxError`.
(cherry picked from commit
dcb1caef5bd8e90e1ecb4c07d7114e51b49fe37a )
Co-authored-by: Rodrigo Girão Serrão <rodrigogiraoserrao@gmail.com>
Miss Islington (bot) [Mon, 28 Jun 2021 09:35:52 +0000 (02:35 -0700)]
bpo-40939: Remove documentation for `PyParser_*` & add porting notes (GH-26855) (GH-26898)
I tried to be relatively thorough and give lots of links.
One reason is that this wasn't deprecated very long; also it seems people running into this tend to not be familiar with similar APIs.
(cherry picked from commit
29987f72650b7cccee4df216c8297e8484a44e6a )
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Sun, 27 Jun 2021 22:19:24 +0000 (15:19 -0700)]
bpo-44464: Remove special exclusion for flake8 in the deprecation warnings. (GH-26807) (GH-26929)
Sync with importlib_metadata 4.6.
(cherry picked from commit
efe7d08d178a7c09bcca994f2068b019c8633d83 )
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Miss Islington (bot) [Sun, 27 Jun 2021 19:51:16 +0000 (12:51 -0700)]
bpo-40620: Clarify tutorial controlflow.rst ``range`` examples (GH-26919) (GH-26927)
(cherry picked from commit
2f49c9debc2efe010c757be3bdbd6493f1ebc5f6 )
Co-authored-by: jdevries3133 <58614260+jdevries3133@users.noreply.github.com>
Miss Islington (bot) [Sun, 27 Jun 2021 18:50:38 +0000 (11:50 -0700)]
Clarify the order of a stacked `abstractmethod` (GH-26892)
Co-authored-by: Tal Einat <532281+taleinat@users.noreply.github.com>
(cherry picked from commit
74d60eab558bffdf5ca8ea2f5305e19b36bdb9a8 )
Co-authored-by: Ram Rachum <ram@rachum.com>
Miss Islington (bot) [Sun, 27 Jun 2021 08:02:02 +0000 (01:02 -0700)]
bpo-44404: tkinter `after` support callable classes (GH-26812)
(cherry picked from commit
e9c8f784fa13ea3a51df3b72a498a3896ec9e768 )
Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
Miss Islington (bot) [Sat, 26 Jun 2021 23:52:28 +0000 (16:52 -0700)]
[3.10] bpo-44468: Never skip base classes in `typing.get_type_hints()`, even with invalid `.__module__`. (GH-26862) (GH-26920)
(cherry picked from commit
7569c0fe91dfcf562dee8c29798ecda74d738aa8 )
Co-authored-by: will-ca <willchencontact@gmail.com>
Automerge-Triggered-By: GH:gvanrossum
Stéphane Bidoul [Sat, 26 Jun 2021 19:58:39 +0000 (21:58 +0200)]
[3.10] Update vendored pip to 21.1.3 (GH-26912) (gh-26917)
Miss Islington (bot) [Fri, 25 Jun 2021 15:46:23 +0000 (08:46 -0700)]
bpo-43977: Properly update the tp_flags of existing subclasses when their parents are registered (GH-26864)
(cherry picked from commit
ca2009d72a52a98bf43aafa9ad270a4fcfabfc89 )
Co-authored-by: Brandt Bucher <brandt@python.org>
Miss Islington (bot) [Thu, 24 Jun 2021 23:38:01 +0000 (16:38 -0700)]
bpo-44498: suppress DeprecationWarnings for asynchat, asyncore and smtpd in tests (GH-26905) (GH-26907)
(cherry picked from commit
22e7effad571f8e524d2f71ff55bbf2a25306753 )
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Miss Islington (bot) [Thu, 24 Jun 2021 19:57:55 +0000 (12:57 -0700)]
[3.10] bpo-44498: Issue a deprecation warning on asynchat, asyncore and smtpd import (GH-26882) (GH-26904)
* Issue a deprecation warning on smtpd import
* Also issue DeprecationWarnings for asynchat and asyncore
* Fix some tests
* test___all__ requires the word 'module' or 'package' in the deprecation
warning text, so add those to smtpd, asynchat, and asyncore.
* In test_support, use pprint now instead of asyncore as the landmark.
* Add What's New
* Use ..deprecated::
* Use ..deprecated::
* Update Lib/smtpd.py
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* Update Doc/library/smtpd.rst
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* Import async{hat,ore} after the DeprecationWarning for this module
Co-authored-by: Miro Hrončok <miro@hroncok.cz>
(cherry picked from commit
8488b85c6397fe58f17fc00e047044c959ac0b04 )
Co-authored-by: Barry Warsaw <barry@python.org>
Automerge-Triggered-By: GH:warsaw
Miss Islington (bot) [Thu, 24 Jun 2021 15:34:28 +0000 (08:34 -0700)]
bpo-44456: Improve the syntax error when mixing keyword and positional patterns (GH-26793)
(cherry picked from commit
0acc258fe6f0ec200ca2f6f9294adbf52a244802 )
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Miss Islington (bot) [Thu, 24 Jun 2021 12:27:35 +0000 (05:27 -0700)]
bpo-44229: Ignore spurious EPROTOTYPE on macOS in test_ssl (GH-26893)
(cherry picked from commit
b5a52eef67997246b4235b5407e52a01e822ce56 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Miss Islington (bot) [Thu, 24 Jun 2021 12:12:11 +0000 (05:12 -0700)]
bpo-43916: Use test.support.check_disallow_instantiation() in test_tcl (GH-26412) (GH-26888)
(cherry picked from commit
e90e0422182f4ca7faefd19c629f84aebb34e2ee )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Mark Shannon [Thu, 24 Jun 2021 12:09:14 +0000 (13:09 +0100)]
bpo-44297: Add a regression test for line numbers in with statements (GH-26891)
Erlend Egeberg Aasland [Wed, 23 Jun 2021 23:46:25 +0000 (01:46 +0200)]
[3.10] bpo-43988: Add test.support.check_disallow_instantiation() (GH-25757) (GH-26885)
(cherry picked from commit
4f725261c6cf23d259e8fdc205e12b76ef4d2d31 ,
fbff5387c3e1f3904420fa5a27738c6c5881305b , and
8cec740820fc875117bfa7b6bdb10202ebeb8fd5 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Automerge-Triggered-By: GH:vstinner
Victor Stinner [Wed, 23 Jun 2021 15:47:38 +0000 (17:47 +0200)]
bpo-44441: _PyImport_Fini2() resets PyImport_Inittab (GH-26874) (GH-26877)
Py_RunMain() now resets PyImport_Inittab to its initial value at
exit. It must be possible to call PyImport_AppendInittab() or
PyImport_ExtendInittab() at each Python initialization.
(cherry picked from commit
489699ca05bed5cfd10e847d8580840812b476cd )
Miss Islington (bot) [Wed, 23 Jun 2021 14:58:20 +0000 (07:58 -0700)]
bpo-41621: Document defaultdict's default_factory parameter (GH-21945)
It defaults to None and is positional only.
(cherry picked from commit
d1ae57027fc39ff60dcfc1b63881400e5ca3ce56 )
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
Miss Islington (bot) [Wed, 23 Jun 2021 10:28:08 +0000 (03:28 -0700)]
bpo-44482: Fix very unlikely resource leak in glob in non-CPython implementations (GH-26843) (GH-26872)
(cherry picked from commit
5c7940257e1f611e7284fd504887bd29a63d0a94 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 23 Jun 2021 10:02:40 +0000 (03:02 -0700)]
bpo-28395: Remove unnecessary semicolons in tests (GH-26868)
(cherry picked from commit
5a3108044d2e5b694da2d1f4176c9bbaef15c142 )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Miss Islington (bot) [Wed, 23 Jun 2021 09:38:49 +0000 (02:38 -0700)]
bpo-44483: Fix crash in union object with bad ``__module__`` (GH-26848) (GH-26852)
(cherry picked from commit
adfa1ba398c74720b42f16f06fd3ec0353599fa5 )
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Miss Islington (bot) [Tue, 22 Jun 2021 17:10:22 +0000 (10:10 -0700)]
[doc] Improve punctuation atexit doc (GH-25629) (GH-26856)
(cherry picked from commit
a6b47de07a304eaa37a1c5554ed00a3ec91f8407 )
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Miss Islington (bot) [Tue, 22 Jun 2021 13:59:53 +0000 (06:59 -0700)]
bpo-44439: BZ2File.write() / LZMAFile.write() handle buffer protocol correctly (GH-26764) (GH-26845)
No longer use len() to get the length of the input data. For some buffer protocol objects,
the length obtained by using len() is wrong.
(cherry picked from commit
bc6c12c72a9536acc96e7b9355fd69d1083a43c1 )
Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
Miss Islington (bot) [Tue, 22 Jun 2021 07:10:23 +0000 (00:10 -0700)]
bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated. (GH-26808) (GH-26844)
* bpo-44458: Ensure BUFFER_BLOCK_SIZE symbol is statically allocated.
(cherry picked from commit
92c2e91580521ba5c85aa3205a0211df5b48689b )
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Miss Islington (bot) [Tue, 22 Jun 2021 00:22:02 +0000 (17:22 -0700)]
bpo-44287: asyncio test_popen() uses longer timeout (GH-26832)
Fix asyncio test_popen() of test_windows_utils by using a longer
timeout. Use military grade battle-tested test.support.SHORT_TIMEOUT
timeout rather than a hardcoded timeout of 10 seconds: it's 30
seconds by default, but it is made longer on slow buildbots.
WaitForMultipleObjects() timeout argument is in milliseconds.
(cherry picked from commit
be1cb3214d09d4bf0288bc45f3c1f167f67e4514 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Miss Islington (bot) [Mon, 21 Jun 2021 22:02:43 +0000 (15:02 -0700)]
bpo-13814: Explain why generators are not context managers (GH-26835)
Put entry in Design FAQ after a question about a context manager for assignment.
Original patch by Aidan Lowe.
(cherry picked from commit
51f45d085dad3b708f6fe166af517aba69e7e9f7 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Mon, 21 Jun 2021 14:27:26 +0000 (07:27 -0700)]
bpo-44395: Fix MIMEPart.as_string to pass unixfrom properly (GH-26685)
(cherry picked from commit
30f7a77f359a0fc6e37988b0f317a77a15d66b7b )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Miss Islington (bot) [Mon, 21 Jun 2021 12:29:17 +0000 (05:29 -0700)]
bpo-44434: Don't call PyThread_exit_thread() explicitly (GH-26758) (GH-26824)
_thread.start_new_thread() no longer calls PyThread_exit_thread()
explicitly at the thread exit, the call was redundant.
On Linux with the glibc, pthread_cancel() loads dynamically the
libgcc_s.so.1 library. dlopen() can fail if there is no more
available file descriptor to open the file. In this case, the process
aborts with the error message:
"libgcc_s.so.1 must be installed for pthread_cancel to work"
pthread_cancel() unwinds back to the thread's wrapping function that
calls the thread entry point.
The unwind function is dynamically loaded from the libgcc_s library
since it is tightly coupled to the C compiler (GCC). The unwinder
depends on DWARF, the compiler generates DWARF, so the unwinder
belongs to the compiler.
Thanks Florian Weimer and Carlos O'Donell for their help on
investigating this issue.
(cherry picked from commit
45a78f906d2d5fe5381d78466b11763fc56d57ba )
Co-authored-by: Victor Stinner <vstinner@python.org>
Victor Stinner [Mon, 21 Jun 2021 12:23:13 +0000 (14:23 +0200)]
bpo-44466: Faulthandler now detects the GC (GH-26823) (GH-26826)
The faulthandler module now detects if a fatal error occurs during a
garbage collector collection (only if all_threads is true).
(cherry picked from commit
d19163912bfc790283724f05328bd31e4e65003d )
Mark Shannon [Mon, 21 Jun 2021 10:47:16 +0000 (11:47 +0100)]
bpo-44297: Fix missing line number in generator expressions (GH-26821)
* Make sure that line number is set when entering comprehension scope in compiler.
(cherry picked from commit
82e5c28af7049c4f5343c808f172cbe2e145f49b )