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
David Robertson
836d680f16
cgi.FieldStorage: headers can be email.message.Message (#8584 )
2022-08-21 17:04:54 +01:00
Alex Waygood
9f05e9ff58
Improve classes returned from OrderedDict.{keys(), items(), values()} ( #8552 )
2022-08-20 22:21:39 +01:00
Kevin Kirsche
fb62ccabf5
Add missing annotations for xml.dom.minidom.DOMImplementation ( #8556 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-08-20 20:33:40 +01:00
Kevin Kirsche
b26c31a23c
Update sys.exit and SystemExit.code to have the same types ( #8554 )
2022-08-20 10:59:38 +01:00
Ethan Smith
5435ed76ef
sysconfig.get_config_var should return Any ( #8572 )
...
This can return str, int, None... and maybe more. In the interest of being defensive, have it return Any.
2022-08-19 21:29:47 -07:00
Alex Waygood
8a326dc9ec
Remove NoReturn overloads from pow() ( #8568 )
2022-08-19 11:15:07 -07:00
David Robertson
0428069fab
argparse: type subparser helper's add_parser ( #8558 )
2022-08-19 19:51:19 +03:00
Kevin Kirsche
308291033f
xml: add missing xml.dom.minidom.*.nodeType type ( #8557 )
2022-08-18 19:56:55 -07:00
Kevin Kirsche
a8c8178127
Add missing NETLINK re-exports of linux socket constants ( #8555 )
2022-08-18 20:24:58 +01:00
Alex Waygood
2c052651e9
Normalise use of Never vs NoReturn ( #8549 )
2022-08-17 21:53:40 +01:00
Alex Waygood
5b47f13a99
Add _threading_local.local.__delattr__ back to the stub ( #8526 )
2022-08-15 11:56:31 +02:00
Peter Law
3623f923a6
Fix UDPServer to correctly inherit from TCPServer ( #8542 )
2022-08-13 19:03:59 +02:00
Alex Waygood
cf0b3a2596
Improve .keys(), .values(), .items() methods for TypedDicts ( #8532 )
2022-08-12 20:02:43 -07:00