Commit Graph

5085 Commits

Author SHA1 Message Date
Alex Waygood
e816acffdd Avoid unnecessary forward refs in class definitions (#10124) 2023-05-01 07:50:50 -07:00
Alex Waygood
277532219f Remove unnecessary F821 noqas (#10123) 2023-05-01 07:50:00 -07:00
Jun Komoda
295a5c3e7a Move Structure and Union from ctypes/__init__.pyi to _ctypes.pyi (#10125) 2023-05-01 13:01:41 +01:00
Jun Komoda
ae0c9f9dad Move _SimpleCData and Array from ctypes/__init__.pyi to _ctypes.pyi (#10118) 2023-04-30 21:22:46 +01:00
Alex Waygood
2c3449694b Run mypy and pyright on our py312 stubs in CI (#10119) 2023-04-30 15:31:08 +01:00
Jelle Zijlstra
40975222b4 multiprocessing: Queue does not inherit from queues.Queue (#10104)
Fixes #3404
2023-04-29 15:39:11 +01:00
Avasam
fb4bf034f3 Add fixers to lib2to3 (#10003) 2023-04-27 21:56:56 -07:00
Tomas R
a7748a9dd1 Add missing stubs for logging.config (#10055)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-04-27 07:57:46 -07:00
Christian Bundy
b4ad214754 Add object.__getstate__() in Python 3.11+ (#10091) 2023-04-27 05:05:54 -07:00
Nikita Sobolev
1d9f35369d functools: Add cache_parameters method to _lru_cache_wrapper (#10076)
The docs says that `cache_parameters()` function was added in 3.9: https://docs.python.org/3/library/functools.html#functools.lru_cache
Source: af53046995/Lib/functools.py (L512)
But, `typeshed` does not have it.
2023-04-24 07:29:54 -07:00
Nikita Sobolev
cd3f52ac14 Simplify logging.config type imports (#10077) 2023-04-24 14:41:10 +03:00
James Hilton-Balfe
acfde4e40b Add stubs for types.get_original_bases (#10073)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-04-23 22:13:43 +01:00
Wesley Collin Wright
cedf3b5684 stdlib/xml: fix return types for toxml/toprettyxml methods (#10061) 2023-04-22 16:36:57 -06:00
Akuli
03b8c60a02 Support dict(foo.split() for foo in bar) with bytes (#10072) 2023-04-22 18:28:34 +03:00
Lucina
41b8981368 unittest.mock.__version__ was removed in 3.9 (#10056)
See the first entry in https://docs.python.org/3/whatsnew/3.9.html#removed
2023-04-17 11:51:34 -06:00
Victor Westerhuis
8db375c3a9 Fix target argument of pathlib.Path.{sym,hard}link_to (#10019) 2023-04-13 13:42:26 +02:00
Sebastian Rittau
be0ef21167 [zipfile] Move protocol behind version gate (#10036)
This protocol is only used for our Python 3.8 stubs. Therefore it's best to limit its availability as much as
possible.
2023-04-12 15:07:49 +01:00
Grigoriev Semyon
731205772a zipfile.Path.open() signature fix (#10033) 2023-04-12 14:23:11 +02:00
Tomas R
cc674b5dce Add a stub for sys.thread_info (#10016) 2023-04-07 11:31:57 +03:00
Nikita Sobolev
30fd9b4ffa dataclasses.make_dataclass has a new parameter in 3.12 (#10006)
Source 810d365b5e/Lib/dataclasses.py (L1403)
2023-04-04 04:50:19 +03:00
Akuli
f20cb4ed45 Accept int in tkinter.Canvas dash arguments (#10004) 2023-04-03 20:58:27 +02:00
Victor Westerhuis
6a242fd1ee Fix return types for asyncio recvfrom, recvfrom_into, and sendto (#10000)
Closes #9999
2023-04-03 11:58:12 +02:00
Alex Waygood
88a9e900b6 Improve urlunsplit and urlunparse (#9991) 2023-04-02 11:52:09 +01:00
Ali Hamdan
6bb40e95ac xml: NodeList.length is read-only (#9994)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-31 23:55:46 +01:00
Nikita Sobolev
972958a406 functools.cached_property.__get__ returns Self (#9992)
Source code: 21e9de3bf0/Lib/functools.py (L979-L980)
2023-03-30 17:37:15 +01:00
Nikita Sobolev
619125b722 Remove useless overloads from sys.getsizeof (#9987) 2023-03-30 13:23:56 +01:00
Alex Waygood
ed915c5cde Remove unnecessary = ...s; bump pyright test dependency to 1.1.301 (#9972) 2023-03-29 13:52:43 +02:00
Sebastian Rittau
027460f11a Remove unnecessary ellipsis expressions (#9976)
Ignore flake8 F821 warnings in stub files
2023-03-29 13:28:06 +02:00
Akuli
87c1b949cd Delete some unnecessary type aliases in tkinter (#9970) 2023-03-28 20:37:29 +03:00
Andrew Svetlov
3ce1d0203d Reflect the latest reprlib updates (#9948) 2023-03-27 12:15:02 +01:00
Shantanu
1537a598d0 email.message: fix return type of get_charsets (#9944)
Fixes #9885
2023-03-26 00:42:45 +00:00
Kevin Schoedel
ffe4a6d8bc stdlib: Fix some shlex types (#9941)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2023-03-25 18:32:43 +02:00
Nikita Sobolev
bacb8f7f40 uuid.uuid{3,5} accept bytes in 3.12 (#9936) 2023-03-24 13:03:41 +01:00
Sebastian Rittau
f6f1fa3df4 [minidom] Annotate getElement* methods correctly (#9919) 2023-03-22 15:17:36 +00:00
Francesc Elies
d13bcbb76e [minidom] add missing return types (#9917) 2023-03-22 12:21:05 +01:00
Nikita Sobolev
130ba2ea60 Support SupportsIndex in constructors for all datetime objects (#9915)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-03-21 19:56:31 +03:00
Amin Alaee
b6564d976b logging.LogRecord: improve annotation for msg (#9914)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-21 15:40:37 +00:00
Alex Waygood
dd2818a41d Stdlib: add container default values (#9909) 2023-03-21 09:12:34 +01:00
Alex Waygood
f3fc792620 Bump flake8-pyi test dependency to 23.3.1 (#9906) 2023-03-20 19:19:01 +01:00
Henry Schreiner
2d990ee2f7 Fill out more annotations for distutils & setuptools dist (#9895)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-03-17 18:48:24 +00:00
James Hilton-Balfe
a7c7667f7e Add better types for predicate parameter to inspect.getx functions (#9891)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-17 14:41:18 +00:00
Henry Schreiner
3a82796d1e [distutils] Add generated methods to Distribution (#9896) 2023-03-17 12:14:36 +01:00
Henry Schreiner
bcff9cd51f distutils.command.build_ext: add more annotations to get_ext_* methods (#9894)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-03-16 20:29:11 +00:00
Henry Schreiner
ed1fd8fc35 Add missing distribution attribute to distutils.cmd.Command (#9893)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2023-03-16 20:21:23 +00:00
Alex Waygood
21d7f7153b [alt] typing: accept buffers in IO.write (#9861)
Co-authored-by: JelleZijlstra <jelle.zijlstra@gmail.com>
2023-03-15 00:42:10 -07:00
Alex Waygood
28dd6c1a2e Use ParamSpec for classmethod and staticmethod (#9771) 2023-03-14 09:59:17 +00:00
Anton Grübel
53e1b534c7 add signal.SIGSTKFLT on py311+ (#9870) 2023-03-12 14:18:23 +00:00
Károly Szabó
133b9a04cf [pydoc] safeimport can return None (#9856) 2023-03-08 19:48:16 +00:00
Oleg Höfling
c661ac3ad6 importlib.abc: align input data types in InspectLoader.source_to_code builtin.compile inputs (#9852)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
2023-03-08 13:43:05 +00:00
Alex Waygood
75ecd7e229 importlib.resources is a package on 3.11+ (#9822) 2023-03-08 08:36:18 +00:00