Brian Schubert
2b36c453e8
[types] Make UnionType.__getitem__ parameter positional-only ( #15458 )
2026-02-23 18:06:19 +01:00
Ilya Egorov
934b047ee8
[types] fix *_frame type (may be None) ( #15219 )
2026-01-06 17:35:01 +01:00
Randolf Scholz
7fde97036f
Move NotImplementedType to types.pyi ( #14966 )
2025-11-02 15:00:52 +01:00
Joren Hammudoglu
3542650a05
Covariant key type for MappingProxyType ( #13940 )
2025-10-08 13:43:54 +02:00
Shamil
284acd45d3
types.CoroutineType.cr_frame may be None on 3.12+ (#14802 )
2025-09-30 13:12:48 +03:00
Alex Waygood
c7d0fd95f3
Make (Async)GeneratorType type parameters consistent with (Async)Generator type parameters ( #14789 )
...
Currently `Generator` is generic over three type variables that have defaults, but `GeneratorType` is generic over three type variables that do not have defaults. It seems like it probably makes more sense for them to be consistent? The vast majority of real-world `Generator`s are instances of `GeneratorType`
2025-09-27 08:48:19 -07:00
KotlinIsland
cef41544d0
fix UnionType.__or__ and add UnionType.__getitem__ ( #14687 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2025-09-24 13:01:33 +01:00
Jelle Zijlstra
e8ba06f710
Add @disjoint_base decorator in the stdlib ( #14599 )
...
And fix some other new stubtest finds.
2025-08-24 07:27:14 -07:00
Semyon Moroz
5e0d6ee95e
[stdlib] Copy-edit deprecation messages ( #14614 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2025-08-21 12:12:00 +01:00
Neil Mitchell
dbd3ad356e
Make Mapping.get(default) more constrained ( #14360 )
2025-07-02 11:24:32 +01:00
bzoracler
14337eba53
fix: gi_yieldfrom can be any iterator type being yielded from ( #14334 )
2025-06-24 14:18:34 +02:00
Joren Hammudoglu
a92ecca054
add types.MethodType.__get__ on py313+ ( #14190 )
2025-05-30 18:10:55 +02:00
sobolevn
8cbb7167c6
Update types.py for 3.14 ( #14146 )
2025-05-26 11:14:49 +02:00
sobolevn
23d144773f
Correct co_lnotab deprecation message ( #14145 )
2025-05-26 10:45:43 +02:00
Jelle Zijlstra
5ff32f377c
3.14: add annotationlib, update typing and inspect ( #13985 )
2025-05-10 14:25:06 -07:00
Alex Waygood
30c4307ce6
remove outdated comment from types.pyi ( #13788 )
2025-04-03 12:12:12 +01:00
Alex Waygood
d92a6449c2
Remove more Python 3.8 cruft ( #13787 )
2025-04-03 11:56:38 +01:00
Joren Hammudoglu
f6503fd9ab
Drop Python 3.8 support in typing[_extensions] and types ( #13763 )
2025-04-02 08:56:56 +02:00
Joren Hammudoglu
5ba2e4989e
Add types.UnionType.__parameters__ ( #13628 )
...
annotate the `types.UnionType.__parameters__` property
2025-03-15 17:51:36 +00:00
Dan Pascu
d04d532337
Fix return type for GenericAlias.__origin__ for type aliases parameterised with a type ( #13619 )
2025-03-11 17:11:19 +01:00
Stephen Morton
56fa438a27
Decouple types.DynamicClassAttribute from property ( #13276 )
2025-03-07 19:08:27 +01:00
Stephen Morton
578af27510
add types.GenericAlias.__mro_entries__ ( #13284 )
2025-01-15 15:36:02 +01:00
James Hilton-Balfe
ab75b691c2
Make collections.abcs more consistent with runtime implementation ( #10816 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2024-12-27 21:31:59 -08:00
Stephen Morton
17408ee538
fix the __init__ of several C-classes ( #13211 )
2024-12-23 10:55:51 -08:00
Alex Waygood
01e7e80bc7
Add types.ModuleType.__doc__ ( #12918 )
2024-10-29 07:09:47 -07:00
Oleh Prypin
b2f68ec2fe
Use MaybeNone (alias to Any) when applicable ( #12855 )
2024-10-18 14:07:52 -07:00
Avasam
1f4031cc96
Add __code__ to types.MethodType ( #12749 )
2024-10-08 10:30:49 +02:00
sobolevn
6f248dfa37
Bump mypy to 1.11.1 ( #12463 )
2024-08-04 23:19:28 -07:00
Max Muoto
240e3d8004
Correct MappingProxyType for 3.8+ ( #12369 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
2024-07-20 13:37:30 -07:00
Max Muoto
23fd30f563
Update types.SimpleNamespace for 3.13 ( #12297 )
2024-07-09 21:22:57 +02:00
Max Muoto
0d2b9dfe12
Add missing replace dunders ( #12265 )
2024-07-03 20:30:22 -07:00
Thanos
0b1259ca0c
Make FunctionType.__kwdefaults__ optional. ( #12113 )
2024-06-07 16:57:41 -06:00
Max Muoto
4da3572827
Add GenericAlias.__(r)or__ ( #12105 )
2024-06-06 21:57:45 +01:00
Alex Waygood
0152a6c134
Add __class_getitem__ methods new in py313 ( #12029 )
2024-05-24 12:11:22 -07:00
Shantanu
d9cf43c4c3
Mark pos-only __class_getitem__ args ( #11970 )
2024-05-18 23:27:51 +02:00
Alex Waygood
5b0816e784
Fix stdlib stubtest after latest typing-extensions release ( #11923 )
2024-05-16 16:53:19 -04:00
Sebastian Rittau
ef0a5c2d12
Replace types._Cell with types.CellType ( #11904 )
...
Closes #11901
2024-05-12 06:38:38 -07:00
Anderson Bravalheri
b42e3b2e89
Use protocols instead of importlib.abc.Loader/MetaPathFinder/PathEntryFinder ( #11890 )
2024-05-12 11:58:33 +02:00
Shantanu
470a13ab09
Use PEP 570 syntax in stdlib ( #11250 )
2024-03-09 14:50:16 -08:00
Jelle Zijlstra
bba8cbd6f8
stdlib: more deprecations ( #11009 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-02-18 06:50:29 -08:00
Christoph Tyralla
1ce82b8d3e
Generalise attribute __func__ of class MethodType from FunctionType to Callable ( #11201 )
...
Let property `__func__` of class `MethodType` return `Callable[..., Any]` instead of `_StaticFunctionType` and remove the latter.
Co-authored-by: Tyralla <tyralla@bce01.de >
2024-01-30 20:22:52 -08:00
Sebastian Rittau
53a8193d64
Update typing_extensions imports in stdlib ( #11244 )
...
Co-authored-by: AlexWaygood <alex.waygood@gmail.com >
2024-01-05 08:15:19 -08:00
Sebastian Rittau
23604858a6
Remove Python 3.7 branches ( #11238 )
2024-01-05 11:39:39 +01:00
Shantanu
6fcd37456d
Move ellipsis definition to types ( #11223 )
2024-01-02 16:14:53 -08:00
Alex Waygood
10febc4fe0
stdlib: remove unused type: ignore comments ( #11061 )
2023-11-23 14:00:07 +01:00
Jelle Zijlstra
5030b7419b
stdlib: Use pos-only parameters for many Protocols ( #10985 )
2023-11-06 18:09:04 +01:00
Alex Waygood
a08d4c8d2e
Remove many redundant inheritances from Generic[] ( #10933 )
2023-10-26 20:07:20 +02:00
plokmijnuhby
cec86eb22e
Replace __init__ with __new__ in builtins and types ( #10761 )
2023-09-25 14:12:23 +02:00
Alex Waygood
03b4bb9cce
Stdlib: add many missing __hash__ and __eq__ methods ( #10464 )
2023-07-17 14:21:02 +02:00
James Hilton-Balfe
4cfc49882e
Rename Generator-like type params to be more obvious ( #10330 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-06-21 13:50:33 +01:00