Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | bpo-44353: Correct docstring for `NewType` (#29785) | Alex Waygood | 2021-11-26 | 1 | -1/+1 |
| | | | The docstring for `typing.NewType` is no longer strictly accurate, now that `NewType` is a class, rather than a function | ||||
* | bpo-45679: Fix caching of multi-value typing.Literal (GH-29334) | Serhiy Storchaka | 2021-10-31 | 1 | -6/+5 |
| | | | Literal[True, 2] is no longer equal to Literal[1, 2]. | ||||
* | bpo-45489: Update ForwardRef to support | operator. (GH-28991) | Dong-hee Na | 2021-10-16 | 1 | -0/+6 |
| | |||||
* | bpo-45166: fixes `get_type_hints` failure on `Final` (GH-28279) | Nikita Sobolev | 2021-09-25 | 1 | -9/+20 |
| | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> | ||||
* | bpo-45121: Fix RecursionError when calling Protocol.__init__ from a ↵ | Yurii Karabas | 2021-09-08 | 1 | -0/+5 |
| | | | | subclass' __init__ (GH-28206) | ||||
* | bpo-45081: Fix __init__ method generation when inheriting from Protocol ↵ | Yurii Karabas | 2021-09-02 | 1 | -12/+24 |
| | | | | | (GH-28121) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> | ||||
* | bpo-44524: Don't modify MRO when inheriting from typing.Annotated (GH-27841) | Ken Jin | 2021-08-25 | 1 | -1/+6 |
| | |||||
* | bpo-44524: Do not set _name of _SpecialForm without need (GH-27861) | Serhiy Storchaka | 2021-08-21 | 1 | -11/+8 |
| | | | | | Because setting non-empty _name affects behavior of other code. In most cases __name__ can be derived from __origin__.__name__. | ||||
* | bpo-44524: Fix cryptic TypeError message when trying to subclass special ↵ | Yurii Karabas | 2021-08-18 | 1 | -0/+3 |
| | | | | | forms in `typing` (GH-27710) This was a Python 3.9 regression. | ||||
* | bpo-44524: Fix an issue wherein `_GenericAlias._name` was not properly set ↵ | Bas van Beek | 2021-08-06 | 1 | -7/+16 |
| | | | | | | for specialforms (GH-27614) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Łukasz Langa <lukasz@langa.pl> | ||||
* | bpo-44801: Check arguments in substitution of ParamSpec in Callable (GH-27585) | Serhiy Storchaka | 2021-08-04 | 1 | -8/+18 |
| | |||||
* | bpo-44806: Fix __init__ in subclasses of protocols (GH-27545) | Serhiy Storchaka | 2021-08-02 | 1 | -2/+10 |
| | | | | Non-protocol subclasses of protocol ignore now the __init__ method inherited from protocol base classes. | ||||
* | bpo-44793: Fix checking the number of arguments when subscribe a generic ↵ | Serhiy Storchaka | 2021-08-02 | 1 | -6/+9 |
| | | | | | | | | type with ParamSpec parameter. (GH-27515) For example Callable[P, T][[int], str, float] will now raise an error. Use also term "arguments" instead of "parameters" in error message for too few/many arguments. | ||||
* | bpo-44747: Refactor usage of sys._getframe at typing module (#27387) | Yurii Karabas | 2021-07-30 | 1 | -21/+7 |
| | | | Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> | ||||
* | bpo-44761: Change default value of NewType __module__ attr (GH-27406) | Yurii Karabas | 2021-07-30 | 1 | -4/+6 |
| | |||||
* | bpo-44732: Rename types.Union to types.UnionType (#27342) | Hasan | 2021-07-26 | 1 | -11/+11 |
| | | | | Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> | ||||
* | bpo-44676: Serialize the union type using only public API (GH-27323) | Serhiy Storchaka | 2021-07-24 | 1 | -2/+2 |
| | | | | Remove also the _from_args() constructor. | ||||
* | bpo-44731: Simplify the union type implementation (GH-27318) | Serhiy Storchaka | 2021-07-24 | 1 | -0/+6 |
| | | | 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. | ||||
* | bpo-44353: Expand NewType tests for complex __qualname__. (#27311) | Serhiy Storchaka | 2021-07-24 | 1 | -1/+6 |
| | | | Make NewType pickleable by name. | ||||
* | bpo-44676: Add ability to serialize types.Union (GH-27244) | Yurii Karabas | 2021-07-23 | 1 | -2/+2 |
| | |||||
* | bpo-44353: Implement typing.NewType __call__ method in C (#27262) | Yurii Karabas | 2021-07-22 | 1 | -3/+9 |
| | | | | Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Denis Laxalde <denis@laxalde.org> | ||||
* | bpo-44353: Refactor typing.NewType into callable class (GH-27250) | Yurii Karabas | 2021-07-20 | 1 | -5/+22 |
| | |||||
* | bpo-44524: Add missed __name__ and __qualname__ to typing module objects ↵ | Yurii Karabas | 2021-07-19 | 1 | -0/+9 |
| | | | | | (#27237) Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> | ||||
* | bpo-44654: Refactor and clean up the union type implementation (GH-27196) | Serhiy Storchaka | 2021-07-17 | 1 | -1/+1 |
| | |||||
* | bpo-41249: Fix postponed annotations for TypedDict (GH-27017) | Germán Méndez Bravo | 2021-07-17 | 1 | -7/+13 |
| | | | | | | | | This fixes TypedDict to work with get_type_hints and postponed evaluation of annotations across modules. This is done by adding the module name to ForwardRef at the time the object is created and using that to resolve the globals during the evaluation. Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> | ||||
* | bpo-44490: Improve typing module compatibility with types.Union (GH-27048) | Yurii Karabas | 2021-07-17 | 1 | -5/+13 |
| | |||||
* | bpo-44652: Preserve natural order of args in the union type. (GH-27185) | Serhiy Storchaka | 2021-07-16 | 1 | -4/+4 |
| | |||||
* | bpo-38291: Fix a spurious warning when using help(object) (#27039) | Sebastian Rittau | 2021-07-06 | 1 | -1/+1 |
| | | | | | | | help(object) via pydoc.TextDoc.docclass(object) iterates over the subclasses of object, which includes typing.io and typing.re if typing is imported. It tries to access cls.__module__ for each of those sub-classes. This change suppresses warnings when accessing cls.__module__. | ||||
* | bpo-44468: Never skip base classes in `typing.get_type_hints()`, even with ↵ | will-ca | 2021-06-26 | 1 | -4/+1 |
| | | | | invalid `.__module__`. (GH-26862) | ||||
* | bpo-38291: DeprecationWarning when importing typing.{io,re} (#26719) | Sebastian Rittau | 2021-06-19 | 1 | -2/+16 |
| | |||||
* | bpo-44098: Drop ParamSpec from most ``__parameters__`` in typing generics ↵ | Ken Jin | 2021-05-13 | 1 | -14/+29 |
| | | | | | | | | | (GH-26013) Added two new attributes to ``_GenericAlias``: * ``_typevar_types``, a single type or tuple of types indicating what types are treated as a ``TypeVar``. Used for ``isinstance`` checks. * ``_paramspec_tvars ``, a boolean flag which guards special behavior for dealing with ``ParamSpec``. Setting it to ``True`` means this class deals with ``ParamSpec``. Automerge-Triggered-By: GH:gvanrossum | ||||
* | bpo-38908: Fix issue when non runtime_protocol failed to raise TypeError ↵ | Yurii Karabas | 2021-05-12 | 1 | -2/+10 |
| | | | | (#26067) | ||||
* | typing: format patch with make patchcheck (GH-25919) | Dong-hee Na | 2021-05-05 | 1 | -1/+1 |
| | |||||
* | bpo-38352: Add to typing.__all__ (#25821) | Jelle Zijlstra | 2021-05-04 | 1 | -0/+7 |
| | | | | | | This adds IO, TextIO, BinaryIO, Match, and Pattern. Co-authored-by: Łukasz Langa <lukasz@langa.pl> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> | ||||
* | bpo-43901: Lazy-create an empty annotations dict in all unannotated user ↵ | larryhastings | 2021-04-30 | 1 | -0/+2 |
| | | | | | classes and modules (#25623) Change class and module objects to lazy-create empty annotations dicts on demand. The annotations dicts are stored in the object's `__dict__` for backwards compatibility. | ||||
* | bpo-43766: Implement PEP 647 (User-Defined Type Guards) in typing.py (#25282) | Ken Jin | 2021-04-27 | 1 | -0/+49 |
| | |||||
* | bpo-42904: Change search order of typing.get_type_hints eval (#25632) | Ken Jin | 2021-04-26 | 1 | -1/+10 |
| | | | While surprising (searching globals before locals in one specific case), this is needed for backwards compatibility. | ||||
* | bpo-38605: Revert making 'from __future__ import annotations' the default ↵ | Pablo Galindo | 2021-04-21 | 1 | -7/+0 |
| | | | | | | (GH-25490) This reverts commits 044a1048ca93d466965afc027b91a5a9eb9ce23c and 1be456ae9d53bb1cba2b24fc86175c282d1c2169, adapting the code to changes that happened after it. | ||||
* | bpo-40443: Remove unused imports (GH-25429) | Victor Stinner | 2021-04-16 | 1 | -1/+0 |
| | | | | | | * pyclbr no longer uses copy * typing no longer uses ast Issue discovered by pyflakes. | ||||
* | bpo-41515: Fix KeyError raised in get_type_hints (GH-25352) | Karthikeyan Singaravelan | 2021-04-12 | 1 | -1/+4 |
| | | | | | Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: efahl <36704995+efahl@users.noreply.github.com> | ||||
* | bpo-42904: Fix get_type_hints for class local namespaces (GH-24201) | Ken Jin | 2021-04-12 | 1 | -1/+2 |
| | |||||
* | bpo-43772: Fix TypeVar.__ror__ (GH-25339) | Jelle Zijlstra | 2021-04-11 | 1 | -2/+2 |
| | |||||
* | bpo-43783: Add ParamSpecArgs/Kwargs (GH-25298) | Jelle Zijlstra | 2021-04-11 | 1 | -3/+50 |
| | |||||
* | Fix various ParamSpec errors in typing (GH-24176) | Ken Jin | 2021-01-11 | 1 | -1/+1 |
| | | | | | 1. ParamSpec -> TypeVar for ``typing.Concatenate`` 2. ParamSpec's call signature should align with its documentation. Noticed in GH-24169 | ||||
* | bpo-41559: Documentation for PEP 612 (GH-24000) | Ken Jin | 2021-01-02 | 1 | -7/+8 |
| | |||||
* | bpo-41781: Fix typo in internal function name in typing (GH-23957) | Ross | 2020-12-29 | 1 | -3/+3 |
| | |||||
* | bpo-42740: Support PEP 604, 612 for typing.py get_args and get_origin (GH-23942) | Ken Jin | 2020-12-29 | 1 | -1/+7 |
| | |||||
* | bpo-42740: Fix get_args for PEP 585 collections.abc.Callable (GH-23963) | Ken Jin | 2020-12-28 | 1 | -3/+1 |
| | | | PR 1/2. Needs backport to 3.9. | ||||
* | bpo-41559: Implement PEP 612 - Add ParamSpec and Concatenate to typing (#23702) | kj | 2020-12-24 | 1 | -41/+168 |
| | |||||
* | bpo-42195: Ensure consistency of Callable's __args__ in collections.abc and ↵ | kj | 2020-12-13 | 1 | -12/+20 |
| | | | | typing (GH-23060) |