summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_genericalias.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-41559: Implement PEP 612 - Add ParamSpec and Concatenate to typing (#23702)kj2020-12-241-0/+21
|
* bpo-42195: Override _CallableGenericAlias's __getitem__ (GH-23915)kj2020-12-241-0/+6
| | | Added `__getitem__` for `_CallableGenericAlias` so that it returns a subclass (itself) of `types.GenericAlias` rather than the default behavior of returning a plain `types.GenericAlias`. This fixes `repr` issues occuring after `TypeVar` substitution arising from the previous behavior.
* bpo-42195: Ensure consistency of Callable's __args__ in collections.abc and ↵kj2020-12-131-1/+57
| | | | typing (GH-23060)
* bpo-42576: Raise TypeError when passing in keyword arguments to GenericAlias ↵kj2020-12-051-0/+5
| | | | | | | | | (GH-23656) Use `_PyArg_NoKeywords` instead of `_PyArg_NoKwnames` when checking the `kwds` tuple when creating `GenericAlias`. This fixes an interpreter crash when passing in keyword arguments to `GenericAlias`'s constructor. Needs backport to 3.9. Automerge-Triggered-By: GH:gvanrossum
* bpo-42332: Add weakref slot to types.GenericAlias (GH-23250)kj2020-11-161-38/+48
| | | Automerge-Triggered-By: GH:gvanrossum
* bpo-39481: Fix duplicate SimpleQueue type in test_genericalias.py (GH-22619)Saiyang Gou2020-10-091-2/+2
| | | | | There are two different `SimpleQueue` types imported (from `multiprocessing.queues` and `queue`) in `Lib/test/test_genericalias.py`, the second one shadowing the first one, making the first one not actually tested. Fix by using different names. Automerge-Triggered-By: @gvanrossum
* bpo-41780: Fix __dir__ of types.GenericAlias (GH-22262)Batuhan Taskaya2020-09-151-0/+5
| | | Automerge-Triggered-By: @gvanrossum
* bpo-41477: Make ctypes optional in test_genericalias (GH-21766)Victor Stinner2020-08-071-38/+42
|
* bpo-39481: remove generic classes from ipaddress/mmap (GH-20045)Batuhan Taskaya2020-05-121-4/+0
| | | These were added by mistake (see https://bugs.python.org/issue39481#msg366288).
* bpo-40408: Fix support of nested type variables in GenericAlias. (GH-19836)Serhiy Storchaka2020-05-041-7/+34
|
* bpo-39481: PEP 585 for dataclasses, mailbox, contextvars (GH-19425)Ethan Smith2020-04-141-1/+7
|
* bpo-39481: Make weakref and WeakSet generic (GH-19497)Ethan Smith2020-04-141-0/+2
|
* bpo-39481: Make functools.cached_property, partial, partialmethod generic ↵Ethan Smith2020-04-141-0/+2
| | | | (#19427)
* bpo-39481: fix test_genericalias on Android (GH-19469)Chih-Hsuan Yen2020-04-131-1/+7
| | | | | | | Android bionic does not implement shm_open/shm_unlink [1]. As a result _posixshmem extension does not exist and multiprocessing.shared_memory cannot be imported. [1] https://android.googlesource.com/platform/bionic/+/master/docs/status.md
* bpo-39481: PEP 585 for a variety of modules (GH-19423)Batuhan Taşkaya2020-04-101-0/+21
| | | | | | | | | | - concurrent.futures - ctypes - http.cookies - multiprocessing - queue - tempfile - unittest.case - urllib.parse
* bpo-39481: PEP 585 for difflib, filecmp, fileinput (#19422)Ethan Smith2020-04-101-0/+6
|
* bpo-39481: PEP 585 for enumerate, AsyncGeneratorType, mmap (GH-19421)Ethan Smith2020-04-101-4/+5
|
* bpo-39481: PEP 585 for ipaddress.py (GH-19418)Batuhan Taşkaya2020-04-101-0/+4
|
* Generic itertools.chain (GH-19417)Ethan Smith2020-04-101-1/+3
|
* bpo-39481: Make os.DirEntry generic (GH-19415)Batuhan Taşkaya2020-04-071-1/+2
|
* bpo-39481: Implementation for PEP 585 (#18239)Guido van Rossum2020-04-071-0/+214
This implements things like `list[int]`, which returns an object of type `types.GenericAlias`. This object mostly acts as a proxy for `list`, but has attributes `__origin__` and `__args__` that allow recovering the parts (with values `list` and `(int,)`. There is also an approximate notion of type variables; e.g. `list[T]` has a `__parameters__` attribute equal to `(T,)`. Type variables are objects of type `typing.TypeVar`.