Commit Graph

5266 Commits

Author SHA1 Message Date
Alex Waygood
230a8f7c6c Fix stubtest for Python 3.12.0rc1 (#10541) 2023-08-07 12:41:31 -07:00
kasium
ab22048661 py312: Filter(er) might return a LogRecord (#10540)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-08-07 15:30:33 +01:00
Nikita Sobolev
161dd4b34f Update logging for 3.12 (#10538) 2023-08-07 12:02:44 +01:00
Nikita Sobolev
3968308e74 Update asyncio.constants module for python3.12 (#10535) 2023-08-06 15:30:55 +01:00
Nikita Sobolev
86218a52b7 Add get_context methods to asyncio in 3.12 (#10534) 2023-08-06 12:02:48 +01:00
Shane Smiskol
5e2fe131fa Add missing TCP_USER_TIMEOUT to socket module (#10530) 2023-08-04 21:11:14 +01:00
Nikita Sobolev
81d1362247 Fix asyncio.Task.__init__ signature (#10532) 2023-08-04 15:12:51 +02:00
Shantanu
75c71f324e importlib.metadata: add PathDistribution._path (#10528) 2023-08-01 19:43:51 -07:00
Diogo
852882b8bf nargs could be None in argparse.ArgumentParser.add_argument (#10509) 2023-07-26 18:46:40 +01:00
Eugene Toder
e86c61da86 More precise overloads for get/pop methods (#10501)
Fixes #10293

Co-authored-by: AlexWaygood <alex.waygood@gmail.com>
2023-07-26 16:37:32 +01:00
Sam Bull
b325815f44 Fix type of Future._exception (#10502) 2023-07-24 14:49:13 -07:00
Jelle Zijlstra
f577c4c133 Update typing_extensions for 4.7.* (#10344) 2023-07-22 12:51:22 +01:00
James Braza
464b71c810 Added url: str to http.client.HTTPResponse (#10497) 2023-07-22 01:58:13 +01:00
Numerlor
b3eb4b95a2 Change format_exception_only to work with exception value on first/second arg 2023-07-20 14:44:00 +02:00
Alex Waygood
79e092e133 Add some ruff autofixes to CI (#10458) 2023-07-20 14:41:52 +02:00
Nikita Sobolev
d5c137c0fc py312 updates for array (#10483) 2023-07-20 09:38:58 +01:00
Nikita Sobolev
032f9195f9 Add a more precise signature for AsyncMock.reset_mock() (#10481) 2023-07-19 13:25:20 +01:00
Jakob Stadler
7dbbdb0193 Fix namespace argument regression in argparse.parse_args (#10387) 2023-07-19 13:35:23 +02:00
Alex Waygood
1088ab3d93 Improve stubs for classmethod and staticmethod (#10421) 2023-07-19 13:32:04 +02:00
Jisuk Byun
60a95da159 Fix unsound return type hints in urllib module (#10470)
* Fix unsound return type hints in urllib module
Closes #10466

* Fix return type of ftplib.FTP.ntransfercmd
Related to #10466
2023-07-18 17:46:28 +01:00
Nikita Sobolev
95b268999c pdb: py312 updates (#10471) 2023-07-18 17:33:27 +01:00
Bruno Cabral
4088b8425f tkinter: Treeview identifiers can be int (#10468) 2023-07-17 23:45:59 +03:00
Alex Waygood
03b4bb9cce Stdlib: add many missing __hash__ and __eq__ methods (#10464) 2023-07-17 14:21:02 +02:00
Jisuk Byun
a04822051f Fix type hints in email module (#10450) 2023-07-17 14:14:28 +02:00
Nikita Sobolev
4a643318ea sqlite3 updates for py312 (#10469) 2023-07-17 12:44:49 +01:00
Nikita Sobolev
57c435cd7e Update pydoc for 3.12 (#10467) 2023-07-16 11:28:56 +01:00
Sebastian Rittau
7ea173c4ad Fix @patch when new is missing (#10459) 2023-07-14 12:53:13 +02:00
Bruno Cabral
1d7f0d087b tkinter: accept Iterable[int] for grid_columnconfigure, grid_rowconfigure (#10455)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2023-07-13 23:38:47 +01:00
Bruno Cabral
eba3a4903d Accept ints for tkinter.ttk.Treeview columns (#10456)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2023-07-14 01:29:06 +03:00
Nikita Sobolev
17c0421c29 Adds py3.12 constants to sqlite3 (#10453) 2023-07-13 16:49:34 +01:00
Hood Chatham
ad3648dd4e Fix type of linecache.cache (#10447)
An entry of linecache.cache is either a lazy entry or a full entry. The full entries
are typed correctly but the lazy entry is supposed to be a one-tuple consisting of a
function that takes zero arguments and returns either a string or None.
2023-07-13 11:15:15 +02:00
Alex Waygood
f2ee9e9368 Stubtest: fixes for py312beta4 (#10449)
* Revert "json: add AttrDict in py312 (#10212)"

This reverts commit 7994f165da.

* TaskGroup updates
2023-07-12 21:21:05 +01:00
Eugene Toder
cfc5425cb3 Add defaultdict.__(r)or__; improve ChainMap.__(r)or__ and UserDict.__(r)or__ (#10427)
Add __or__ to defaultdict

Also, add overloads with Self type to other __[r]or__ methods.
2023-07-11 19:39:12 +01:00
Sebastian Rittau
19992e6212 Mark some errnos as darwin- or solaris-only (#10440)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-11 17:09:40 +01:00
Jisuk Byun
d14ab09375 Fix and comment type mismatches in email library hints (#10437) 2023-07-11 00:07:04 -07:00
Alex Waygood
81b8211d0e Revert "Remove un-needed __hash__ methods from stdlib (#8465)" (#10426)
Reverts https://github.com/python/typeshed/pull/8465
Fixes https://github.com/python/typeshed/issues/10424
Closes https://github.com/python/typeshed/pull/10425

https://github.com/python/typeshed/pull/8465 caused regressions: see https://github.com/python/typeshed/issues/10424 and https://github.com/python/mypy/issues/13800. Since it didn't fix any known problems (just some stylistic nits that we had), let's just revert the PR.
2023-07-09 08:43:32 -07:00
Ali Hamdan
aed8c3fe1c Replace aliases by builtins.* in uuid (#10422)
These aliases were used because the class has properties called
`int` and `bytes`. I think it is better to use the shadowed types
from the builtins module. This should not change anything from the
type checking side but it improves the IDE experience[^1].

[^1]: I was using uuid recently and the aliases showed up in vscode,
I thought they were uuid special types and had to look in the stub to
know what they are.
2023-07-08 11:58:50 +01:00
Simão Afonso @ Powertools Tech
7646d38302 tkinter: Add missing "angle" argument to Canvas.create_text (#10404) 2023-07-04 22:00:48 +03:00
Nikita Sobolev
702226e1fd Add missing TCP_CONNECTION_INFO to socket module (#10402) 2023-07-04 12:32:38 +02:00
Nikita Sobolev
31dca1d660 Update inspect for Python3.12 (#10398) 2023-07-03 14:54:19 +02:00
Andrew Sansom
18d45d62aa Broaden collections.Counter __iadd__, __isubtract__, __iand__, and __ior__ to accept any mapping (#10397)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-03 08:27:17 +01:00
Nikita Sobolev
8162faa934 Fix signature of http.client.HTTPSConnection for Python 3.12 (#10392) 2023-07-01 18:31:47 +01:00
Nikita Sobolev
a8051fb2c4 Add _generate_next_value_ to StrEnum (#10390)
Fixes https://github.com/python/typeshed/issues/10384

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-07-01 18:28:09 +01:00
Alex Waygood
5ee46bd291 Bump various test dependencies (#10378) 2023-06-28 14:22:49 +01:00
Sam Bull
0869b430d6 asyncio: start_tls() can return None (#10346) 2023-06-28 11:40:19 +01:00
Alex Waygood
1b2e4091db Bump mypy to 1.4.1 (#10351) 2023-06-25 16:45:09 -07:00
Nikita Sobolev
d492efeaea email.utils.localtime: py312 updates (#10358) 2023-06-25 12:02:11 +01:00
Sujal Gupta
575dd0c448 Add _file attribute to SpooledTemporaryFile (#10327)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2023-06-24 17:09:51 +03:00
Anthony Sottile
c1df736a8c Add _is_text_encoding attribute of CodecInfo (3.4+) (#10354)
Introduced in https://bugs.python.org/issue19619. Was meant to be a temporary private API, but no public API has emerged in the years since.
2023-06-23 15:35:33 +01:00
Alex Waygood
4a692fc546 Fix stubtest for py312b3 (#10343) 2023-06-21 15:46:50 +01:00