Sam Bull
493e35b15e
Make asyncio.Task covariant ( #8781 )
2022-10-03 14:44:59 -07:00
Alex Waygood
78ca9c7390
Bump mypy to 0.982 ( #8831 )
2022-10-03 10:34:44 -07:00
Nikita Sobolev
380022c650
Remove empty __init__ methods ( #8816 )
2022-09-30 13:08:41 +01:00
Alex Waygood
deff426b6f
Fix multiprocessing.DictProxy.values() ( #8815 )
...
Fixes #8814
2022-09-30 13:37:53 +02:00
Akuli
11a14f58a3
Delete builtins._StandardError ( #8806 )
2022-09-29 09:32:11 +01:00
Nikita Sobolev
133e2d860d
Use Mapping instead of dict in inspect.py ( #8803 )
2022-09-28 08:39:21 -07:00
Klas Eskilson
26ea6b8b4d
Add __init__ definition for AttributeError ( #8801 )
...
Since Python 3.10, AttributeError supports keyword arguments for name
and obj.
2022-09-28 13:22:10 +01:00
layday
40223373db
Update importlib.resources types ( #8658 )
...
* Replace `Str[OrBytes]Path` with `str`
A filesystem path is not valid as an abstract resource.
`TraversableResources` cannot only accept strings if `ResourceReader`
accepts both bytes and strings. `importlib.resources` does not work
with bytes in any case and `ResourceReader` is typed as taking
a `typing.Text` object in `importlib.resources`' source code.
* Update `joinpath` signature from Python 3.11
2022-09-27 20:31:33 +01:00
Alex Waygood
48e76e8a56
Bump mypy to 0.981 ( #8796 )
2022-09-26 17:14:33 -07:00
Shantanu
2969922b68
Fix intransitive subtyping issue with SupportsGetItem ( #8785 )
...
See https://github.com/python/mypy/issues/13713 for details
2022-09-23 13:25:15 -07:00
Shane Harvey
1a2914adc5
Use Callable[..., Any] instead of Callable[..., object] in unittest ( #8399 )
2022-09-21 13:46:38 +01:00
François Conzelmann
7eb277e451
Add type to some asyncio.transports methods ( #8756 )
...
`WriteTransport.write`, `WriteTransport.writelines` and `DatagramTransport.sendto` methods only accept `bytes` trying an other type raises an exception
`BaseTransport._extra` is a dictionary with string as key
2022-09-20 19:14:59 -07:00
Chris Cotter
1a3ae3efc7
socket: sendmsg can accept None for the address (#8771 )
...
Per the Python docs and socketmodule.c source, the address argument can
be None.
https://docs.python.org/3/library/socket.html#socket.socket.sendmsg
2022-09-20 14:15:47 +01:00
Alex Waygood
20bc8fa4e3
Fix stubtest errors on macOS / Python 3.11 ( #8743 )
2022-09-15 15:27:42 -07:00
Alex Waygood
8e718d4891
pstats: delete outdated comment (#8738 )
...
The annotation in CPython was fixed thanks to @ruancomelli in https://github.com/python/cpython/pull/96741 !
2022-09-15 11:24:30 +01:00
Alex Waygood
a6c174cc7b
Add new sys functions introduced to combat CVE-2020-10735 ( #8733 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2022-09-13 16:01:26 +01:00
shawnbrown
266aa3b6ca
sqlite3: allow passing None for the func parameter of create_function ( #8728 )
2022-09-12 12:47:54 +03:00
Nikita Sobolev
4905074919
tarfile.TarFile: mark OPEN_METH as a ClassVar (#8725 )
2022-09-11 14:32:52 +01:00
Nikita Sobolev
d987f92e55
string.Template: Make several attributes ClassVars (#8724 )
2022-09-11 14:29:31 +01:00
Ruan Comelli
04a88d5740
pstats.FunctionProfile.ncalls should be str (#8712 )
...
Correctly annotate `pstats.FunctionProfile.ncalls` as `str` instead of `int`.
Since this change introduces a difference between typeshed and CPython, add a comment pointing that out and linking to this PR.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-09-10 21:11:45 +01:00
Jukka Lehtosalo
e4d0d3d9d7
Make the return type of multiprocessing.connection.Pipe more precise ( #8706 )
...
The precise return type depends on the platform. Link to implementation:
68fb03249f/Lib/multiprocessing/connection.py (L518)
Now users no longer need to use the internal-looking class
`_ConnectionBase` in annotations, at least in code that doesn't
need to be cross-platform.
2022-09-08 13:24:49 +01:00
J. Sebastian Paez
cc7d2567f2
Add _ExtendAction to argparse ( #8701 )
...
_ExtendAction was added to argparse since python 3.8.
Reference of the addition to the standard library:
python/cpython@aa32a7e
2022-09-07 21:53:35 +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
Nikita Sobolev
d5d4bbbe7c
Use ClassVar for class-level attributes in calendar ( #8691 )
...
Source: f177f6f29b/Lib/calendar.py (L418-L436)
2022-09-06 10:14:56 +01:00
James Hilton-Balfe
61831c0164
Add some undocumented constants to gzip.pyi ( #8675 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-09-03 12:04:48 +01:00
James Hilton-Balfe
1195bbaf33
Make Struct.size and format read-only properties ( #8670 )
...
attribute 'size' of '_struct.Struct' objects is not writable
2022-09-02 14:50:47 +01:00
Pierre Riandey
70d76ecf8f
Add types for unittest.loader.TestLoader._match_path ( #8669 )
2022-09-02 09:55:24 +02:00
Alex Waygood
3e5808a990
Bump flake8-pyi and pytype test dependencies ( #8656 )
2022-08-31 12:20:11 +01:00
Alex Waygood
601700d1a5
Improve some tkinter unions ( #8655 )
2022-08-31 13:05:51 +03:00
Anh71me
1dd533acc0
stdlib/_ast.pyi: Fix ast.ImportFrom arg module _identifier to str ( #8648 )
2022-08-30 12:18:28 +02:00
junkmd
1c6eb33c23
add and migrate constants from ctypes/__init__.pyi to _ctypes.pyi ( #8643 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2022-08-29 15:33:47 +01:00
Kevin Kirsche
2c7ac0990f
Remove ssl.SSLContext.__init__ ( #8640 )
...
Fixes : #8632
2022-08-29 13:07:59 +01:00
Nikita Sobolev
6e985ef3de
stdlib mapping classes: Use better names for various pos-only parameters ( #8637 )
2022-08-28 23:29:00 +01:00
Nikita Sobolev
6d5fd0e290
Allow passing tuples to ipaddress.ip_network ( #8634 )
2022-08-27 18:38:26 +01:00
Jason Heiss
d1d9b98aff
imaplib.Time2Internaldate also takes datetimes and 9-element tuples (#8630 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-08-27 16:11:26 +01:00
MapleCCC
dece0b1fff
assertRaises / assertRaisesRegex / assertWarns / assertWarnsRegex: msg argument is keyword-only (#8631 )
2022-08-27 15:55:14 +01:00
GrozniyToaster
b6b8894964
Accept anything with __getitem__ in str.translate ( #8629 )
...
translate table protocol
2022-08-26 20:24:21 +03:00
Nikita Sobolev
0259068ad6
Remove duplicate definitions in sub-classes ( #8594 )
2022-08-26 17:10:55 +02:00
Shantanu
93ee41bcd9
typing: add _type_repr ( #8624 )
2022-08-26 12:15:11 +02:00
Arnav Singh
712b265a16
Fix os.{,p}{read,write}v to take Sequence of ReadableBuffer / WriteableBuffer ( #8617 )
...
Fixes #8615
Fixes #8616
2022-08-25 21:50:01 -07:00
junkmd
179228370a
Add win32-specific constants to _ctypes ( #8614 )
2022-08-25 16:22:06 +01:00
Alex Waygood
0f1d1f16b4
isort: don't skip stdlib/venv ( #8607 )
2022-08-24 15:48:27 -07:00
Aron Bierbaum
ef6bacab92
Update ForwardRef._evaluate for Python 3.11 ( #8600 )
...
recursive_guard argument was added in https://github.com/python/cpython/pull/21553
2022-08-23 18:05:55 -07:00
Nikita Sobolev
fed419b8f1
Add CTYPES_MAX_ARGCOUNT to _ctypes ( #8601 )
2022-08-23 14:52:16 -07:00
junkmd
2066b9533c
_ctypes: add stubs ( #8582 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
Co-authored-by: hauntsaninja <hauntsaninja@gmail.com >
2022-08-23 12:22:12 -07:00
Ganden Schaffner
9469c1c7ea
Make AsyncExitStack.push_async_exit support __aexit__s returning Awaitable[None] ( #8596 )
...
Make push_async_exit support __aexit__'s returning Awaitable[None]
2022-08-23 14:28:37 +01:00
Akuli
5ea1b1e6de
Add types to tkinter.colorchooser.askcolor ( #8588 )
2022-08-22 18:15:37 +02:00
Alex Waygood
976fdae300
xml stubs: Any -> Incomplete (#8576 )
2022-08-22 16:42:37 +01:00
Kevin Kirsche
269c07589a
Add more annotations to xml.dom.minidom and xml.sax.handler ( #8590 )
2022-08-22 16:20:34 +01:00
Alex Waygood
c2966bc5ed
multiprocessing.reduction: Any -> Incomplete (#8585 )
2022-08-21 17:43:55 -07:00