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
Alex Waygood
8000fbd386
Bump various test dependencies ( #9646 )
2023-02-01 06:23:40 -08:00
Alex Waygood
8e7b78a8e8
Bump black to 23.1.0 ( #9647 )
2023-02-01 06:06:04 -08:00
Alex Waygood
7cd7ae46c0
Improve a few version-dependent tkinter functions ( #9637 )
2023-02-01 15:02:26 +02:00
Alex Waygood
2539649560
Add a default for ssl.SSLContext.__new__ on 3.10+ ( #9635 )
2023-01-31 17:30:00 -08:00
Alex Waygood
510bd460d2
Improve statistics.median_grouped on <=3.10 ( #9636 )
2023-01-31 17:29:01 -08:00
Alex Waygood
9e71de0421
Improve several stdlib setdefault methods ( #9612 )
2023-01-31 15:39:24 -08:00
Eclips4
3b4dbe36d4
ctypes._CData: Fix field name ( #9633 )
2023-01-31 09:16:39 +01:00
Alex Waygood
c54a1a9e16
urllib.parse: Fix issues with TypeVar usage and default values (#9629 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2023-01-31 02:21:50 +00:00
Alex Waygood
a6919227be
Add several version-dependent default values to parameters in the stdlib ( #9631 )
2023-01-31 01:21:39 +00:00
Alex Waygood
81463b9995
tempfile.SpooledTemporaryFile: fix overloads (#9627 )
2023-01-30 17:04:18 -08:00
Alex Waygood
8a098a8601
Various asyncio classes: remove the loop argument on 3.10 ( #9630 )
2023-01-30 16:55:08 -08:00
Alex Waygood
9099403d58
builtins.pow: Add default values to <py38 branches; remove incorrect = ...s for the 13th overload (#9610 )
2023-01-30 18:12:50 +01:00
Alex Waygood
b748a9a543
distutils.filelist overloads: Remove unnecessary = ...s (#9619 )
2023-01-30 18:02:57 +01:00
Alex Waygood
7958a7f934
RawConfigParser.__init__: fix overloads (#9613 )
2023-01-30 18:00:43 +01:00
Alex Waygood
b5a26d1ca2
email.message: Fix invalid TypeVar usage; add some default values (#9620 )
2023-01-30 17:56:29 +01:00
Alex Waygood
6011cac0cc
Stdlib: fix three trivial issues with parameter defaults ( #9618 )
2023-01-29 21:40:56 -08:00
Alex Waygood
dd3aedd133
Correct str.maketrans and collections.UserString.maketrans ( #9611 )
2023-01-29 11:45:08 -08:00
Alex Waygood
5dfee6aa66
Add some missing py311+ constants to sre_constants.pyi ( #9614 )
2023-01-29 11:33:37 -08:00
Alex Waygood
c9f17d80fa
_bisect: Remove incorrect = ...s for several overloads (#9609 )
2023-01-29 10:06:39 -08: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
Alex Waygood
b316dd947e
Bump flake8-pyi to 23.1.1 ( #9599 )
2023-01-28 07:39:30 -08:00
Alex Waygood
32ebe323f5
Use a TypeGuard for dataclasses.is_dataclass(); refine asdict(), astuple(), fields(), replace() ( #9362 )
2023-01-28 15:14:22 +00:00
Alex Waygood
7f986bdf85
Add more overloads to the re stubs to help out pyright ( #9592 )
2023-01-27 18:32:50 -08:00
Adam Orr
0fe3ef28fe
codecs: _buffer_encode returns (bytes, int) ( #9587 )
2023-01-25 20:39:21 +01:00
Alex Waygood
a9b4fa0a32
Fix some stubtest complaints before they happen ( #9585 )
...
Add missing objects to various stubs
2023-01-24 21:45:31 +00:00
Alex Waygood
307aadc632
Improve the signature of types.MappingProxyType.__eq__ ( #9581 )
2023-01-23 14:41:27 +01:00
Jukka Lehtosalo
d5b88c552c
Add __eq__ to types.MappingProxyType ( #9580 )
...
The type has a custom __eq__:
https://github.com/python/cpython/blob/v3.11.1/Objects/descrobject.c#L1906
This helps fix this mypy false positive when using `--strict-equality`:
```
from types import MappingProxyType
p = MappingProxyType({'x': 1})
d = {'x': 1}
print(p == d) # error: Non-overlapping equality check
```
The fragment prints `True` so the comparison is valid.
2023-01-23 09:55:25 +00:00
Seth Michael Larson
ebba92c986
Add SSLContext.security_level property for Python 3.10 ( #9577 )
2023-01-22 19:28:44 +01:00
gandalf3
b11e2e37c6
create_datagram_endpoint expects a str when family=AF_UNIX ( #9574 )
...
Since python 3.7, asyncio.loop.create_datagram_endpoint expects the
arguments `local_addr` and `remote_addr` to be `str` or `None` when the
argument family=`socket.AF_UNIX` and the argument `sock` is `None` or
also a unix socket.
2023-01-21 22:00:44 +01:00
Alex Waygood
d98d1674e7
Fix a few issues with parameter defaults ( #9572 )
2023-01-20 09:47:59 -08:00
Jelle Zijlstra
af2ce282d5
builtins: do the TODO on compile() ( #9567 )
2023-01-18 11:48:48 -08:00
Jelle Zijlstra
aa4d6d87ae
asyncio: fix default for subprocess_exec ( #9561 )
2023-01-18 15:03:22 +01:00
Jelle Zijlstra
ddfaca3200
stdlib: add argument default values ( #9501 )
2023-01-18 09:37:34 +01:00
Avasam
c70d303985
Audit stdlib object annotations ( #9519 )
2023-01-17 15:40:00 +00:00
Alex Waygood
597e1a0078
Bump various test dependencies ( #9549 )
2023-01-16 11:04:45 -08:00
Kalle Møller
6b23df3db6
Update _FilterType to retuning bool ( #9514 )
2023-01-16 16:12:40 +01:00
James Hilton-Balfe
62170653ce
Add itertools.batched ( #9515 )
2023-01-12 22:07:26 +00:00
Jelle Zijlstra
b43e1db47b
ssl, sysconfig: fix issues with defaults ( #9507 )
...
- ssl._create_unverified_context allows None since 3.10:
2875c603b2 (diff-f6439be9c66350dde4c35dbeea0352c96cc970ba12b0478f6ae36f10725bd8c5)
- sysconfig.is_python_build ignores its argument since 3.11:
067597522a
(was backported into 3.11)
2023-01-12 10:19:41 -08:00
Avasam
aad1a14890
Use the FileDescriptorOrPath alias consistently in the stdlib ( #9513 )
2023-01-12 18:14:48 +00:00
Jelle Zijlstra
f64807a468
socketserver: improve bytes handling ( #9096 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-01-12 16:46:20 +00:00
Jelle Zijlstra
b9eab637cb
subprocess: Improve bytes-related types ( #9100 )
2023-01-11 20:10:26 -08:00
Jelle Zijlstra
6a366c99a9
venv: add logger ( #9508 )
...
Not particularly useful but unreleased stubtest will require this:
https://github.com/python/typeshed/actions/runs/3898630022/jobs/6657546205
2023-01-11 19:33:16 -08:00
Jelle Zijlstra
1ce1c1ad17
subprocess: universal_newlines may be None ( #9509 )
...
All the way back to 3.7:
https://github.com/python/cpython/blob/3.7/Lib/subprocess.py#L684
It's treated like False
2023-01-11 19:15:40 -08:00
Jelle Zijlstra
d2829ecdf7
urllib.parse.urlencode: encoding and errors can be None ( #9506 )
...
The runtime defaults are None. Found in #9501 .
2023-01-11 18:55:38 -08:00
Shantanu
fa204f6bd4
Update compileall stripdir type ( #9404 )
...
See https://github.com/python/cpython/pull/19883
2023-01-08 22:26:33 -08:00
Avasam
41de5317b5
Add FileDescriptorOrPath and Unused type aliases ( #9475 )
2023-01-08 10:05:51 +00:00
Martin Fischer
554989e31f
stdlib: Fix types of semi-public Message methods ( #9456 )
2023-01-04 11:21:33 +01:00