| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
(GH-27196) (GH-27219)
(cherry picked from commit 0fd27375cabd12e68a2f12cfeca11a2d5043429e)
|
|
|
|
|
|
|
|
|
|
|
| |
(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 c45fa1a5d9b419cf13ad4b5a7cb453956495b83e)
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
|
|
|
|
| |
(#27212)
(cherry picked from commit 311ee83adb40a9b549af8e0b546a787e8eb01f5d)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
|
|
|
| |
This fixes TypedDict to work with get_type_hints and postponed evaluation of annotations across modules.
This is done by adding the module name to ForwardRef at the time the object is created and using that to resolve the globals during the evaluation.
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 889036f7ef7290ef15b6c3373023f6a35387af0c)
Co-authored-by: Germán Méndez Bravo <german.mb@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
| |
missing one (GH-27197) (GH-27198)
(cherry picked from commit 6714dec5e104bdee4a0ed4d9966de27d1bfa1e3d)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
| |
(GH-27167)" (GH-27194) (#27195)
This reverts commit 000e70ad5246732fcbd27cf59268185cbd5ad734.
(cherry picked from commit c90c591e5158ab7b531dcd6e2a5f00bc70ba7637)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
(#27191)
(cherry picked from commit 7915c96ffd7ddc5cb6d54015ee4c31255a416892)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
| |
(GH-27185) (GH-27190)
(cherry picked from commit 0cd2d51aadcd2a0c0739a5df0a6235d64f35619e)
Automerge-Triggered-By: GH:ambv
|
|
|
|
|
|
|
|
| |
`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>
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
blocks without line numbers (GH-27138) (GH-27182)
(cherry picked from commit a86f7dae0acf918d54086cb85e5a0b0bedeedce7)
|
|
|
|
|
|
|
| |
(GH-27167) (GH-27183)
(cherry picked from commit 000e70ad5246732fcbd27cf59268185cbd5ad734)
Co-authored-by: Mark Shannon <mark@hotpy.org>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
(GH-27160) (GH-27163)
(cherry picked from commit f333ab0f2edec26a769ed558263ac662e5475451)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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)
|
|
|
|
|
| |
(cherry picked from commit 28544609cb2a79d8d7ea5a54714d723669ef2adb)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
(GH-27136). (GH-27142)
(cherry picked from commit b81cac05606c84958b52ada09f690463a3c7e949)
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
(cherry picked from commit d59d7374a364c4e5c2b9a83d8e4543ee494285b8)
Co-authored-by: Shane Harvey <shnhrv@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
| |
(GH-27152)
(cherry picked from commit 2b47af63982e4ccc09ae14c7c66ba115804bbbf6)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
| |
artificial (GH-27109) (GH-27135)
(cherry picked from commit e5862f79c16e28f1ec51d179698739a9b2d8c1d2)
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
erroneous STDIN consumption (GH-27092) (GH-27124)
(cherry picked from commit 0ee0a740e12ec8568aafa033aa6bb08b265afe26)
Co-authored-by: Konstantin-Glukhov <glukhov.k@gmail.com>
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 3b5b99da4b256a31933112f4a2385386149c19e1)
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
| |
(GH-26830)
(cherry picked from commit 06cda808f149fae9b4c688f752b6eccd0d455ba4)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
| |
(GH-23026) (#27097)
(cherry picked from commit da2e673c53974641a0e13941950e7976bbda64d5)
Co-authored-by: David Sanders <shang.xiao.sanders@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 66c5853406bbcccecf35372795078c0641a5f385)
Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
IsADirectoryError (GH-27049)
Fixes the misleading IsADirectoryError to be FileNotFoundError.
(cherry picked from commit 248173cc0483a9ad9261353302f1234cf9eb2ebe)
Co-authored-by: andrei kulakov <andrei.avk@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
(GH-26555) (GH-27079)
(cherry picked from commit f24777c2b329974b69d2a3bf5cfc37e0fcace36c)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 8dcb7d98086888230db94a1eb07bae1b5db82bc9)
Co-authored-by: Batuhan Taskaya <batuhan@python.org>
|
|
|
|
|
| |
(cherry picked from commit 15f0fc571c1fbc84b6b74dfeb373ca3d35e4c5d7)
Co-authored-by: Julien Palard <julien@palard.fr>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
| |
(GH-27059)
(cherry picked from commit bbf2fb6c7ae78f40483606f467739a58cd747270)
Co-authored-by: Steve Dower <steve.dower@python.org>
|
|
|
|
|
| |
(cherry picked from commit af4a2dcc40321de49bffec80bf6c6b5a7d43b134)
Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
|