Alex Waygood
b0dc6a3405
Add defaults to logging.LoggerAdapter methods ( #9797 )
2023-02-22 11:50:11 +01: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
fea57ad095
hmac.HMAC: digestmod defaults to None on py37 (#9790 )
2023-02-21 18:24:34 +00:00
Alex Waygood
f2ae3542d3
Stdlib: Deduplicate some multiprocessing type aliases ( #9788 )
2023-02-21 13:30:41 +01:00
Alex Waygood
c407a44489
Add defaults to csv stubs ( #9774 )
2023-02-21 11:33:38 +01:00
Avasam
a6c6bc1b8e
Fix stdlib/disutils testing ( #9734 )
2023-02-21 08:06:20 +00:00
Alex Waygood
bc847a9b07
Use generic NamedTuples to clean up urllib.parse ( #9773 )
2023-02-20 16:41:49 -08:00
Alex Waygood
4d99b33f84
Fix an unnecessary allowlist entry in ssl.pyi ( #9776 )
2023-02-20 16:35:38 -08:00
Alex Waygood
3786ab295e
Fix an unnecessary socketserver allowlist entry ( #9777 )
2023-02-20 11:14:20 -08:00
Alex Waygood
0878173943
textwrap.{wrap, fill}: max_lines defaults to None (#9775 )
...
All keyword arguments are delegated to `TextWrapper.__init__`: 59e86caca8/Lib/textwrap.py (L373-L396)
2023-02-20 10:39:48 -08:00
Alex Waygood
14ab089bd5
Use a generic NamedTuple for concurrent.futures.DoneAndNotDoneFutures ( #9772 )
2023-02-20 08:54:21 -08:00
Alex Waygood
4273a83bb7
unittest: Use a recursive type alias for assertIsInstance (#9770 )
2023-02-20 15:35:50 +00:00
Alex Waygood
5e6b172e17
stdlib/_decimal.pyi: correct many parameter names (#9769 )
2023-02-20 15:57:54 +01:00
Thomas M Kehrenberg
40d853cbe2
Add __set__ to functools.cached_property ( #9762 )
2023-02-20 12:36:45 +00:00
Alex Waygood
c5b5dd4bf4
Various stdlib dunders: correct parameter names; improve types; add defaults ( #9761 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2023-02-19 22:44:20 +00:00
Avasam
3fc2f27990
Add missing types in xml.dom.minidom ( #9731 )
2023-02-19 21:49:00 +00:00
Andrew Svetlov
39fcd396ce
lru_cache.cache_info().maxsize can be None for infinite cache size ( #9763 )
2023-02-19 16:50:19 +00:00
Alex Waygood
4ca0c48425
Improve the first overload of is_dataclass ( #9758 )
2023-02-19 06:26:11 -08:00
Nikita Sobolev
1387a9efa9
Mark threading.(R)Lock as final ( #9753 )
...
These are actually factory functions: 128379b8cd/Lib/threading.py (L108)
The pure-Python version of `RLock` is, strictly-speaking, subclassable. But you're not *meant* to subclass `RLock`, even if you *can* with the pure-Python version: https://discuss.python.org/t/make-threading-lock-rlock-factory-functions-subclassable/24008/2
2023-02-19 12:21:55 +00:00
Shantanu
da9366d016
Add frozen_default to dataclass_transform ( #9756 )
2023-02-18 15:25:29 -08:00
Spencer Brown
f5b761d465
Add types for PIL.ImageTk ( #9733 )
2023-02-18 21:50:28 +02:00
Max Murin
5ebf892d07
Allow urlparse and urlsplit of bytes URLs ( #9746 )
2023-02-17 21:52:49 +01:00
Max Murin
75cd302215
dataclass: switch order of decorator overloads ( #9743 )
2023-02-16 16:22:56 -08:00
Shantanu
5c54e52e23
Fix default value of input, remove now unused allowlist entry for epoll ( #9742 )
2023-02-17 01:55:31 +02:00
Shantanu
58edfea33f
email.parser: narrow io types ( #9737 )
2023-02-15 10:43:39 +01:00
Avasam
140bba3425
Add comments when subclassing Any ( #9732 )
2023-02-14 14:11:56 +01:00
Will Frey
48ef9eace8
Update xml.sax.parse to accept StrPath ( #9708 )
2023-02-13 17:51:47 +01:00
Avasam
a768744d51
Type and mark as final module-level dunders not meant to be overwritten in stdlib/ ( #9709 )
2023-02-12 16:15:20 +00:00
PythonCoderAS
52cf716831
Make datetime classmethods return correct type ( #9706 )
2023-02-10 15:53:17 +00:00
Alex Waygood
9ed39d8796
Use typing_extensions.Self in the stdlib ( #9694 )
2023-02-09 09:12:13 +00:00
Alex Waygood
32c575d980
subprocess.check_call: executable defaults to None (#9689 )
...
This argument is forwarded on to `Popen.__init__`, like most of the other arguments. It can be `None`, just like the `executable` parameter for all the other `subprocess` functions:
```pycon
>>> import subprocess
>>> subprocess.check_call(["python", "-c", "1/1"], executable=None)
0
>>> subprocess.check_call(["python", "-c", "1/0"], executable=None)
Traceback (most recent call last):
File "<string>", line 1, in <module>
ZeroDivisionError: division by zero
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\alexw\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', '-c', '1/0']' returned non-zero exit status 1.
```
2023-02-07 12:33:12 +00:00
Alex Waygood
53747b264e
Stdlib: add 'obvious' default values ( #9688 )
2023-02-07 13:00:40 +01:00
Alex Waygood
0ef9c3f8e8
Enable flake8-pyi's Y037 ( #9686 )
2023-02-06 19:01:02 -08:00
Alex Waygood
c4c4bee8aa
Remove a no-longer-needed # noqa ( #9685 )
2023-02-07 00:43:53 +00:00
Alex Waygood
efee70abfa
Bump mypy to 1.0 ( #9684 )
2023-02-06 15:57:17 -08:00
Nikita Sobolev
f7cb7f33b2
Use OSError instead of IOError ( #9683 )
2023-02-06 18:56:32 +00:00
Nikita Sobolev
c96079f0df
urllib.HTTPError.headers is a settable property (#9682 )
2023-02-06 18:56:08 +00:00
Alex Waygood
5157ff86da
unicodedata: overload many functions and methods (#9656 )
2023-02-06 07:04:26 -08:00
Alex Waygood
ccb250940a
Improve collections stubs ( #9674 )
2023-02-06 13:54:15 +01:00
Eclips4
cd5f976968
keyword: mark kwlist and softkwlist as Final (#9680 )
2023-02-05 13:44:59 +00:00
Marc Mueller
88a761ed4e
Export DataclassInstance protocol from _typeshed ( #9676 )
2023-02-04 15:58:11 +00:00
Alex Waygood
b9270da7b0
Improve readability of stdlib/_winapi.pyi ( #9673 )
2023-02-04 06:55:47 -08:00
Alex Waygood
1e3d762a12
stdlib: use bool for annotations where the default is False ( #9672 )
2023-02-04 11:58:18 +00:00
Akuli
37a180ef7b
Use octal for mode defaults ( #9670 )
2023-02-03 19:12:53 +00:00
Jelle Zijlstra
5b24c7bb41
stdlib: Run stubdefaulter on Linux for 3.9 ( #9663 )
2023-02-03 00:39:22 +00:00
Alex Waygood
100cd62373
stdlib: Add bytes defaults ( #9660 )
2023-02-02 16:01:54 -08:00
Jelle Zijlstra
0fc3a567fc
stdlib: add defaults for modules accessible on MacOS ( #9659 )
...
Ran stubdefaulter with standard options on a Mac.
2023-02-01 22:46:55 +00:00
Jelle Zijlstra
bc463a0677
Remove default for size parameter to multiprocessing.heap.Heap ( #9658 )
...
It's system-dependent. stubdefaulter told me `multiprocessing.heap.Heap: parameter size: stub default 4096 != runtime default 16384`, which presumably means it's 4096 on @AlexWaygood's system and 16384 on mine. I looked in the code and the default is set to `mmap.PAGESIZE`, which in turn is set from some system call at import time.
2023-02-01 22:43:50 +00:00
Alex Waygood
1d7dda7fa1
stdlib: Add defaults for positional-only parameters ( #9655 )
2023-02-01 21:44:08 +00:00
Alex Waygood
35172c7aab
Stdlib: add some very large integer defaults ( #9651 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2023-02-01 20:10:28 +00:00