| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Ideally if we stick a ForwardRef in a dictionary we would like to reliably be able to get it out again.
https://bugs.python.org/issue37953
(cherry picked from commit e082e7c)
Co-authored-by: plokmijnuhby <39633434+plokmijnuhby@users.noreply.github.com>
|
| |
|
|
|
|
|
|
| |
(GH-17126)
https://bugs.python.org/issue37838
(cherry picked from commit 0aca3a3a1e68b4ca2d334ab5255dfc267719096e)
Co-authored-by: benedwards14 <53377856+benedwards14@users.noreply.github.com>
|
| |
|
|
|
|
| |
(GH-16641). (GH-16674)
(cherry picked from commit 13abda41003daf599587991d8291f0dacf6e9519)
|
| |
|
|
|
|
|
| |
(GH-16239)
This includes such names as "cls", "self", "typename" and "fields".
(cherry picked from commit 2bf31ccab3d17f3f35b42dca97f99576dfe2fc7d)
|
| |
|
|
|
|
| |
This test "works" if things are run in the right order, so it's better to use @skip than @expectedFailure here.
(cherry picked from commit 910b3fcb01c29f18ffd53086e36cd2cb9e5fae55)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
|
| |
|
|
|
|
|
| |
(GH-13456) (GH-13662)
https://bugs.python.org/issue36983
Fixes issue 36983
|
| |
|
|
|
| |
(cherry picked from commit 68b56d02ef20479b87c65e523cf3dec1b7b77d40)
Co-authored-by: Ismo Toijala <ismo.toijala@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 961360923e7997a04833652623ea549b0dc02262)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit f65e31fee3b55dfb6ed5398179d5c5d6b502dee5)
Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit 2d2d3b170bdebc085900bfa2a3bc81b5d132d0a8)
Co-authored-by: Nina Zakharenko <nzakharenko@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit b551e9f0ff25018a5606465003e2c51c04f693a3)
Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
|
| |
|
|
|
|
| |
This also fixes https://bugs.python.org/issue33420
(cherry picked from commit 43d12a6bd82bd09ac189069fe1eb40cdbc10a58c)
Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
|
| |
|
|
|
|
|
| |
This removes a hack and replaces it with a proper
mapping {'list': 'List', 'dict': 'Dict', ...}.
(cherry picked from commit 2a363d2930e29ec6d8a774973ed5a4965f881f5f)
Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
|
| |
|
|
|
| |
(cherry picked from commit ee566fe526f3d069aa313578ee81ca6cbc25ff52)
Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
copy and pickle (GH-6216)
This also fixes python/typingGH-512
This also fixes python/typingGH-511
As was discussed in both issues, some typing forms deserve to be treated
as immutable by copy and pickle modules, so that:
* copy(X) is X
* deepcopy(X) is X
* loads(dumps(X)) is X GH- pickled by reference
This PR adds such behaviour to:
* Type variables
* Special forms like Union, Any, ClassVar
* Unsubscripted generic aliases to containers like List, Mapping, Iterable
This not only resolves inconsistencies mentioned in the issues, but also
improves backwards compatibility with previous versions of Python
(including 3.6).
Note that this requires some dances with __module__ for type variables
(similar to NamedTuple) because the class TypeVar itself is define in typing,
while type variables should get module where they were defined.
https://bugs.python.org/issue32873
(cherry picked from commit 834940375ae88bc95794226dd8eff1f25fba1cf9)
Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
|
| |
|
|
| |
This adds C versions of methods used by ABCMeta that
improve performance of various ABC operations.
|
| |
|
|
| |
This PR re-designs the internal typing API using the new PEP 560 features.
However, there are only few minor changes in the public API.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#3582)
This makes the default behavior (without specifying `globalns` manually) more
predictable for users, finds the right globalns automatically.
Implementation for classes assumes has a `__module__` attribute and that module
is present in `sys.modules`. It does this recursively for all bases in the
MRO. For modules, the implementation just uses their `__dict__` directly.
This is backwards compatible, will just raise fewer exceptions in naive user
code.
Originally implemented and reviewed at https://github.com/python/typing/pull/470.
|
| |
|
|
| |
* Copy changes to typing from upstream repo
* Add NEWS entry
|
| |
|
|
|
|
|
| |
This PR contains two updates to typing module:
- Support ContextManager on all versions (original PR by Jelle Zijlstra).
- Add generic AsyncContextManager.
|
| |
|
|
|
| |
- Add NoReturn type
- Use WrapperDescriptorType (original PR by Jim Fasarakis-Hilliard)
- Minor bug-fixes
|
| |
|
|
| |
collections. (#1263)
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
various updates from upstream python/typing repo:
- Added typing.Counter and typing.ChainMap generics
- More flexible typing.NamedTuple
- Improved generic ABC caching
- More tests
- Bugfixes
- Other updates
* Add Misc/NEWS entry
* Add issue number
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
#349, #350)
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
(upstream #321)
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
(https://github.com/python/typing)
|
| |
|
|
| |
Ivan Levkivskyi (3.5 version)
|
| | |
|
| |
|
|
|
|
|
|
|
| |
(Upstream is https://github.com/python/typing)
- Add TYPE_CHECKING (false at runtime, true in type checkers) (upstream #230).
- Avoid error on Union[xml.etree.cElementTree.Element, str] (upstream #229).
- Repr of Tuple[()] should be 'Tuple[()]' (upstream #231).
- Add NewType() (upstream #189).
|