Avasam
6cb57b5f26
traceback: Allow extracted_list params to be an Iterable containing tuples (#11675 )
2024-03-30 18:32:27 -07:00
Shantanu
470a13ab09
Use PEP 570 syntax in stdlib ( #11250 )
2024-03-09 14:50:16 -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
Numerlor
b3eb4b95a2
Change format_exception_only to work with exception value on first/second arg
2023-07-20 14:44:00 +02:00
Alex Waygood
fbc092b4cd
Stdlib: add defaults for several functions that delegate kwargs to other functions at runtime ( #9791 )
2023-02-21 23:31:25 -08:00
Alex Waygood
9ed39d8796
Use typing_extensions.Self in the stdlib ( #9694 )
2023-02-09 09:12:13 +00:00
Alex Waygood
33a62ae42d
Add more defaults to the stdlib ( #9606 )
...
Continuing work towards #8988 .
The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are:
- Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine)
- Defaults in non-py311 branches
- Defaults for float parameters
- Defaults for overloads
2023-01-29 01:51:23 +00:00
Jelle Zijlstra
ddfaca3200
stdlib: add argument default values ( #9501 )
2023-01-18 09:37:34 +01:00
Nikita Sobolev
380022c650
Remove empty __init__ methods ( #8816 )
2022-09-30 13:08:41 +01:00
Jakub Kuczys
81f8a10e9b
Update traceback.clear_frames() to accept None ( #8695 )
...
`Exception.__traceback__` can potentially be None so for convenience
(and because the simplest way of implementing it will allow it anyway),
traceback.clear_frames() allows None.
2022-09-06 12:26:15 -07:00
Alan Isaac
a13e2339c4
traceback: Use _typeshed.SupportsWrite instead of typing.IO (#8442 )
2022-07-30 12:24:57 +01:00
Sebastián Ramírez
55a52a8b28
Fix type annotation for traceback.StackSummary.from_list() to include FrameSummary items ( #8244 )
2022-07-06 11:00:35 +01:00
Jelle Zijlstra
26fa57ab78
traceback: update for py311 ( #7886 )
2022-05-19 19:14:12 -07:00
Alex Waygood
97a74bc1aa
Import from collections.abc wherever possible ( #7635 )
2022-04-18 12:50:37 +02:00
Alex Waygood
740193a8fc
Use TypeAlias where possible for type aliases ( #7630 )
2022-04-15 18:01:00 -07:00
Jelle Zijlstra
b7d129f727
PEP 604: Remove some more uses of Union/Optional ( #7515 )
...
The following patterns still break mypy:
1. `type[]` at top level fails
2. `tuple[T1, T2]` at top level fails (but `tuple[T1, ...]` is fine)
3. `T1 | Callable[..., T2 | T3]` fails, but only <=3.9
This PR cleans up usage of `Union` and `Optional` outside these patterns.
2022-03-19 08:23:00 -07:00
Alex Waygood
f4ae363b56
stdlib: correct many pos-or-kw arg names in dunder methods ( #7451 )
2022-03-07 16:40:03 +01:00
Alex Waygood
6a743348ca
Add __all__ for most modules beginning with 't' ( #7373 )
2022-02-23 18:25:28 -08:00
Alex Waygood
fbc279e3f5
stdlib: Add many missing dunder overrides ( #7231 )
2022-02-16 06:25:47 -08:00
Alex Waygood
e976ee1988
Improve traceback.FrameSummary ( #7210 )
2022-02-15 06:43:11 -08:00
Alex Waygood
7ccbbdb30a
stdlib: Improve many __iter__ and constructor methods ( #7112 )
2022-02-02 19:14:57 +01:00
Shantanu
b88a6f19cd
Upgrade black version ( #7089 )
2022-01-30 16:27:06 -08:00
Alex Waygood
a40d79a4e6
Use lowercase type everywhere ( #6853 )
2022-01-08 16:09:29 +01:00
Alex Waygood
8d5d2520ac
Use PEP 585 syntax wherever possible ( #6717 )
2021-12-28 11:31:43 +01:00
Nikita Sobolev
0b3ee9808c
exc_traceback in TracebackException can be None (#6693 )
2021-12-26 12:11:11 +02:00
Akuli
bc912ea472
correct traceback.print_exception and traceback.format_exception on python 3.10 ( #6512 )
2021-12-06 15:43:32 +01:00
Erik Soma
da895e3944
Correct print_exception for 3.10. ( #6487 )
2021-12-03 19:32:21 -08:00
Alex Waygood
5c8e68f0eb
Use lowercase set, frozenset and deque where possible ( #6346 )
2021-11-19 15:05:45 -08:00
Akuli
994b69ef8f
Use lowercase tuple where possible ( #6170 )
2021-10-14 17:18:19 -07:00
Zac Hatfield-Dodds
7cc5eb2950
StackSummary.extract() takes an Iterable (#6084 )
2021-09-28 09:24:54 +02:00
Akuli
ce11072dbe
Big diff: use lower-case list and dict ( #5888 )
2021-08-08 09:26:35 -07:00
Akuli
ee487304d7
Big diff: Use new "|" union syntax ( #5872 )
2021-08-08 11:05:21 +02:00
Akuli
17dcea4a68
Akuli and srittau: Remove Python 2 branches from Python 3 stubs ( #5461 )
...
* run script and do some manual changes (Akuli)
* do the whole thing manually (srittau)
* merge changes (Akuli)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2021-05-15 15:33:39 +03:00
Shantanu
3950543bce
traceback: update for py310 ( #5316 )
...
I think technically you need to pass both of value and tb or neither, so
let me know if you think it's worth all the overloads
2021-05-02 18:54:47 -07:00
hatal175
c9d996fe55
Various stubtest exceptions ( #5227 )
2021-04-17 07:03:28 -07:00
Ivan Levkivskyi
16ae4c6120
Re-organize directory structure ( #4971 )
...
See discussion in #2491
Co-authored-by: Ivan Levkivskyi <ilevkivskyi@dropbox.com >
2021-01-27 12:00:39 +00:00