| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
(cherry picked from commit 91275207296c39e495fe118019a757c4ddefede8)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
|
|
|
|
|
|
|
| |
* Use Py_EnterRecursiveCall() in issubclass()
Reviewed-by: Gregory P. Smith <greg@krypto.org> [Google]
(cherry picked from commit 423fa1c1817abfa8c3d1bc308ddbbd8f28b69d68)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
|
|
|
|
|
|
| |
MAP_BOT_LENGTH was incorrectly used to compute MAP_TOP_MASK instead of
MAP_TOP_LENGTH. On 64-bit machines, the error causes the tree to hold
46-bits of virtual addresses, rather than the intended 48-bits.
(cherry picked from commit 311910b31a4bd94dc79298388b7cb65ca5546438)
|
|
|
|
|
|
|
|
|
|
|
| |
"raw-unicode-escape" codec (GH-28944) (GH-28952)
They support now splitting escape sequences between input chunks.
Add the third parameter "final" in codecs.raw_unicode_escape_decode().
It is True by default to match the former behavior.
(cherry picked from commit 39aa98346d5dd8ac591a7cafb467af21c53f1e5d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
"unicode-escape" codec (GH-28939) (GH-28943)
They support now splitting escape sequences between input chunks.
Add the third parameter "final" in codecs.unicode_escape_decode().
It is True by default to match the former behavior.
(cherry picked from commit c96d1546b11b4c282a7e21737cb1f5d16349656d)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 5f401f10400123afa9171548c432ea3fc37c0736)
Automerge-Triggered-By: GH:JulienPalard
|
| |
|
|
|
|
| |
(cherry picked from commit 252b7bcb236dc261f3af1275bc90f9a303d9648f)
|
|
|
|
|
|
| |
of the code unit (GH-28711). (GH-28718)
(cherry picked from commit 60b9e040c9cf40e69f42c0008e564458aa0379e8)
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 8f943ca25732d548cf9f0b0393ba8d582fb93e29)
Co-authored-by: Mohamad Mansour <66031317+mohamadmansourX@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
messages (GH-27144) (GH-28436)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit f4813388b4506b2fafb0089848c5b11cd503758c)
Co-authored-by: wyz23x2 <52805709+wyz23x2@users.noreply.github.com>
Co-authored-by: wyz23x2 <52805709+wyz23x2@users.noreply.github.com>
|
|
|
|
|
|
|
| |
non-descriptor classes (GH-28439)
(cherry picked from commit 94b462686b7dfabbd69cc9401037d736d71c4dc2)
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 5dce51a8875d9639786741e962b3cb208596b096)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
exception (GH-28119) (GH-28134)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
(cherry picked from commit b4b6342848ec0459182a992151099252434cc619)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* Use a private version of _PyType_GetQualName
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
|
|
|
|
|
|
|
| |
(GH-28199)
Fix PyAiter_Check to only check for the `__anext__` presense (not for
`__aiter__`). Rename `PyAiter_Check()` to `PyAIter_Check()`,
`PyObject_GetAiter()` -> `PyObject_GetAIter()`.
|
|
|
|
|
|
|
|
| |
(GH-27955)
Co-authored-by: Yury Selivanov <yury@edgedb.com>
(cherry picked from commit 533e725821b15e2df2cd4479a34597c1d8faf616)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
It happened with fast range iterator when the calculated stop = start + step * len
was out of the C long range.
(cherry picked from commit 936f6a16b9ef85bd56b18a247b962801e954c30e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 94a3d2a6329ab7941e93ad2f5bcbb8af2b8b80d2)
Co-authored-by: chilaxan <chilaxan@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 60b93d9e4922eeae25052bc15909d1f4152babde)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
|
|
|
|
|
|
| |
(GH-27772) (GH-27796)
(cherry picked from commit 4b9a2dcf19e5d13c3bc2afea2de1f65cd994c699)
Co-authored-by: Mark Dickinson <mdickinson@enthought.com>
|
|
|
|
|
|
|
| |
(GH-27678) (GH-27719)
(cherry picked from commit bfc2d5a5c4550ab3a2fadeb9459b4bd948ff61a2)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
| |
|
|
|
|
|
|
| |
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
(cherry picked from commit 8182c8329c709f42218a8a17d81639ece5b7b627)
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
|
|
|
|
|
|
|
| |
(GH-27292) (GH-27442)
(cherry picked from commit e5c8ddb1714fb51ab1defa24352c98e0f01205dc)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
| |
Revert "bpo-41103: Remove old buffer protocol support (GH-21117)"
This reverts commit 6f8a6ee59cb7f99f68df8ee9c3e8c8cf19af3eed.
(cherry picked from commit ce5e1a6809b714eb0383219190a076d9f883e008)
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
|
|
|
|
|
|
|
| |
(GH-27202)
(cherry picked from commit ddf8ae31a0f371eff2db14c7f7a45976b86d56ea)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
|
|
|
|
|
|
|
| |
parser (GH-27392)
(cherry picked from commit ecc3c8e4216958d85385bf2467441c975128f26c)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
|
|
|
|
|
|
|
| |
(#27366)
(cherry picked from commit 1d582bbc969e05896addf97844ddf17ce9830e5e)
Co-authored-by: T. Wouters <thomas@python.org>
|
|
|
|
|
|
|
| |
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 2b8ad9e6c5f0a66e9ca2d15f85336d8a3eefefb0)
Co-authored-by: Hasan <hasan.aleeyev@gmail.com>
|
|
|
|
|
|
|
| |
Remove also the _from_args() constructor.
(cherry picked from commit 435a0334d341e5f8faed594d9f015746bb7845db)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
(cherry picked from commit fe13f0b0f696464dd6f283576668dbf57cb11399)
Co-authored-by: Yurii Karabas <1998uriyyo@gmail.com>
|
|
|
|
|
|
|
| |
(GH-27316) (GH-27324)
(cherry picked from commit 5370f0a82aaa4ba617070d5c71d2b18236096ac0)
Co-authored-by: Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 a4760cc32d9e5dac7be262e9736eb30502cd7be3)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|
|
|
|
|
|
| |
(GH-27247) (#27296)
(cherry picked from commit 2e3744d50b6e30ea24351e55b4352dcc58fd469e)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(GH-27218) (GH-27224)
A TypeError is now raised instead of returning NotImplemented.
(cherry picked from commit 3ea5332a4365bdd771286b3e9692495116e9ceef)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
| |
(GH-27185) (GH-27190)
(cherry picked from commit 0cd2d51aadcd2a0c0739a5df0a6235d64f35619e)
Automerge-Triggered-By: GH:ambv
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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)
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
|
| |
types.GenericAlias … (GH-27016)
(cherry picked from commit d33943a6c368c2184e238019c63ac7a267da5594)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|