| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
(GH-31769) (#91662)
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a573cb2fec664c645ab744658d7e941d72e1a398)
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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-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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
(cherry picked from commit bc3961485639cc73de7c4c7eed1b56f3c74939bf)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
| |
(cherry picked from commit 1097384ce964dd63686b1aac706cd0fa764c2dc9)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
|
|
|
|
|
| |
(GH-26852)
(cherry picked from commit adfa1ba398c74720b42f16f06fd3ec0353599fa5)
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in Union (GH-24059)
Previously this didn't raise an error. Now it will:
```python
from collections.abc import Callable
isinstance(int, list | Callable[..., str])
```
Also added tests in Union since there were previously none for stuff like ``isinstance(list, list | list[int])`` either.
Backport to 3.9 not required.
Automerge-Triggered-By: GH:gvanrossum
|
|
|
|
| |
typing (GH-23060)
|
|
|
|
| |
de-duplicating of GenericAlias (GH-23077)
|
|
|
| |
* Use Py_TYPE() rather than o->ob_type.
|
|
|
| |
It can silence arbitrary exceptions.
|
|
|
|
|
|
|
| |
Use Py_ssize_t type rather than int, to store lengths in
unionobject.c. Fix the warning:
Objects\unionobject.c(205,1): warning C4244: 'initializing':
conversion from 'Py_ssize_t' to 'int', possible loss of data
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use Py_ssize_t type rather than int, to store lengths in
unionobject.c. Fix warnings:
Objects\unionobject.c(189,71): warning C4244: '+=':
conversion from 'Py_ssize_t' to 'int', possible loss of data
Objects\unionobject.c(182,1): warning C4244: 'initializing':
conversion from 'Py_ssize_t' to 'int', possible loss of data
Objects\unionobject.c(205,1): warning C4244: 'initializing':
conversion from 'Py_ssize_t' to 'int', possible loss of data
Objects\unionobject.c(437,1): warning C4244: 'initializing':
conversion from 'Py_ssize_t' to 'int', possible loss of data
|
|
See https://www.python.org/dev/peps/pep-0604/ for more information.
Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
|