summaryrefslogtreecommitdiffstats
path: root/Lib/typing.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-36320: Switch typing.NamedTuple from OrderedDict to regular dict (GH-12396)Raymond Hettinger2019-03-181-9/+7
| | | | | | Also, deprecate the *_field_types* attributes which duplicated the information in *\__annotations__*. https://bugs.python.org/issue36320
* bpo-35341: Add generic version of OrderedDict to typing (GH-10850)Ismo Toijala2018-12-021-0/+1
|
* bpo-35202: Remove unused imports in Lib directory. (GH-10445)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-11-101-1/+0
|
* bpo-34921: Allow escaped NoReturn in get_type_hints (GH-9750)Noah Wood2018-10-081-1/+1
|
* Fix typo in typing.py module docstring (#9014)Tim McNamara2018-09-011-1/+1
| | | "explicitelly" → "explicitly"
* Fix typo in TypeVar docstring (#8142)João D. Ferreira2018-07-071-1/+1
| | | "can be used do declare" → "can be used to declare"
* bpo-33652: Remove __getstate__ and __setstate__ methods in typing. (GH-7144)Serhiy Storchaka2018-05-281-21/+0
|
* bpo-33652: Improve pickle support in the typing module. (GH-7123)Serhiy Storchaka2018-05-261-8/+19
| | | | Pickles of type variables and subscripted generics are now future-proof and compatible with older Python versions.
* Reverse the meaning of is_argument when used for type check (GH-7039)Nina Zakharenko2018-05-231-4/+4
|
* bpo-28556: Don't simplify unions at runtime (GH-6841)Ivan Levkivskyi2018-05-181-29/+3
|
* Fix ClassVar as string fails when getting type hints (GH-6824)Nina Zakharenko2018-05-161-6/+13
|
* Fix a bug in Generic.__new__ (GH-6758)Ivan Levkivskyi2018-05-111-1/+1
|
* bpo-28556: Minor fixes for typing module (GH-6732)Ivan Levkivskyi2018-05-091-2/+8
| | | | This also fixes https://bugs.python.org/issue33420
* Spelling fixes to docs, docstrings, and comments (GH-6374)Ville Skyttä2018-04-201-1/+1
|
* bpo-32873: Remove a name hack for generic aliases in typing module (GH-6376)Ivan Levkivskyi2018-04-051-1/+14
| | | | This removes a hack and replaces it with a proper mapping {'list': 'List', 'dict': 'Dict', ...}.
* Call super in Generic.__init_subclass__ (#6356)Ivan Levkivskyi2018-04-041-0/+1
|
* bpo-32873: Treat type variables and special typing forms as immutable by ↵Ivan Levkivskyi2018-03-261-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | copy and pickle (GH-6216) This also fixes python/typing#512 This also fixes python/typing#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 # 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
* bpo-33061: Add missing 'NoReturn' to __all__ in typing.py (GH-6127)aetracht2018-03-191-0/+1
|
* bpo-32226: PEP 560: improve typing module (#4906)Ivan Levkivskyi2018-01-201-1471/+664
| | | | 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.
* [bpo-28556] Minor fixes for typing module (#4710)Ivan Levkivskyi2017-12-051-8/+4
|
* bpo-28556: typing.get_type_hints: better globalns for classes and modules ↵Łukasz Langa2017-09-141-9/+18
| | | | | | | | | | | | | | | (#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.
* bpo-28556: Minor updates to typing module (#3550)Ivan Levkivskyi2017-09-131-50/+29
| | | | * Copy changes to typing from upstream repo * Add NEWS entry
* bpo-28556: Updates to typing module (#2076)Ivan Levkivskyi2017-06-101-2/+59
| | | | | | | This PR contains two updates to typing module: - Support ContextManager on all versions (original PR by Jelle Zijlstra). - Add generic AsyncContextManager.
* bpo-28556: Routine updates to typing (#1366)Ivan Levkivskyi2017-05-021-4/+31
| | | | | - Add NoReturn type - Use WrapperDescriptorType (original PR by Jim Fasarakis-Hilliard) - Minor bug-fixes
* bpo-28556: Fix regression that sneaked into recent typing updates (GH-270)Ivan Levkivskyi2017-02-241-1/+4
|
* Update to typing: treat subscripted generics as proxies (#265)Ivan Levkivskyi2017-02-241-0/+7
|
* bpo-28556: Various updates to typing (#28)Ivan Levkivskyi2017-02-131-33/+105
| | | | | | | | | | | | | | | 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
* Issue #28556: Allow defining methods in NamedTuple class syntax (#362)Guido van Rossum2017-01-231-0/+4
|
* Issue #28556: various style fixes for typing.pyGuido van Rossum2017-01-231-26/+47
|
* Issue #29198: add AsyncGenerator (Jelle Zijlstra)Guido van Rossum2017-01-181-1/+9
|
* Issue #28556: allow default values in class form of NamedTuple -- Jelle ZijlstraGuido van Rossum2017-01-181-1/+16
|
* Issue #28556: merge 5 more typing changes from upstream (#340, #344, #348, ↵Guido van Rossum2017-01-181-8/+43
| | | | #349, #350)
* Issue #29011: Fix an important omission by adding Deque to the typing module.Raymond Hettinger2017-01-171-0/+10
|
* Issue #28790: Fix error when using Generic and __slots__ (Ivan L)Guido van Rossum2016-11-291-3/+15
|
* Issue #28556: upstream improvements to docstrings and error messages by Ivan ↵Guido van Rossum2016-11-211-40/+44
| | | | Levkivskyi (#331)
* Issue #28556: two more small upstream changes by Ivan Levkivskyi (#329, #330)Guido van Rossum2016-11-191-0/+2
|
* Issue #28556: Allow keyword syntax for NamedTuple (Ivan Levkivskyi) ↵Guido van Rossum2016-11-151-37/+39
| | | | (upstream #321)
* Issue #28649: fix second issue with _ForwardRef (#328)Guido van Rossum2016-11-101-1/+1
|
* Issue #28649: fix first issue with _ForwardRef (#327)Guido van Rossum2016-11-101-10/+3
|
* Issue #28649: typing-clear-caches.patchGuido van Rossum2016-11-091-0/+4
|
* Issue #28556: More typing.py updates from upstream.Guido van Rossum2016-11-091-134/+72
|
* Issue #28556: updates to typing.py (add Coroutine, prohibit Generic[T]())Guido van Rossum2016-10-291-8/+23
|
* Issue #28556: updates to typing.py (fix copy, deepcopy, pickle)Guido van Rossum2016-10-291-0/+8
|
* Issue #28556: updates to typing.pyGuido van Rossum2016-10-291-334/+404
|
* Two minor typing.py fixes (upstream #305)Guido van Rossum2016-10-221-5/+1
|
* Fix indentGuido van Rossum2016-10-211-3/+3
|
* Sync typing.py from upstreamGuido van Rossum2016-10-211-28/+79
|
* Issue #28339: Remove ByteString.register(memoryview(...)) from typing.py.Guido van Rossum2016-10-091-3/+0
|
* Merge further typing.py changes from upstream.Guido van Rossum2016-10-091-1/+4
|
* More updates from upstream typing.pyGuido van Rossum2016-10-031-35/+70
|