Stephen Morton and GitHub
695d67cd7b
Add deprecation classes in importlib.metadata ( #11118 )
2023-12-10 21:06:22 +01:00
be55326873
Replace overload hack in operator.itemgetter with PEP 646 Unpack ( #11136 )
...
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-12-10 16:25:48 +00:00
Stephen Morton and GitHub
d373050dbb
Fix importlib.abc.Finder base class, method availability ( #11134 )
2023-12-10 12:01:44 +01:00
Paul Ganssle and GitHub
336c062489
Remove write modes from importlib.resources.abc.Traversable ( #11124 )
2023-12-09 20:38:40 -08:00
Stephen Morton and GitHub
45b1db9f8e
use _LoopBoundMixin in asyncio when appropriate ( #11127 )
...
related to https://github.com/python/typeshed/issues/3968
2023-12-09 20:36:34 -08:00
Stephen Morton and GitHub
6b9f82d2e1
make pointer types in ctypes.wintypes subclasses instead of aliases ( #11126 )
...
related to https://github.com/python/typeshed/issues/3968
2023-12-09 20:34:22 -08:00
Ali Hamdan and GitHub
9c5479ffda
stdlib: Use PEP646 tuple unpack for precise os.execl(p)e typing ( #11133 )
2023-12-09 20:34:00 -08:00
Akuli and GitHub
51ec2f0900
tkinter: Use a TypeVarTuple in .after() and .after_idle() methods ( #11014 )
2023-12-08 23:00:13 +00:00
Alex Waygood and GitHub
a08d2d5d66
Use PEP-646 in stubs for asyncio ( #11015 )
2023-12-08 22:59:42 +00:00
acfdebfeb8
fix xxlimited inheritance ( #11119 )
...
related to https://github.com/python/typeshed/issues/3968
Co-authored-by: Stephen Morton <git@tungol.org >
2023-12-07 12:04:41 -08:00
Stephen Morton and GitHub
e915cb28be
email.feedparser.BytesFeedParser is a subclass of FeedParser ( #11110 )
2023-12-07 11:28:26 +01:00
tungol and GitHub
1b6691067a
fix superclass for UnixDatagramServer and UnixStreamServer ( #11115 )
2023-12-07 08:05:46 +01:00
Avasam and GitHub
c8a81997ab
Bump pyright to 1.1.339 ( #11084 )
2023-12-06 22:40:06 +00:00
db3024d2e7
Use builtin TimeoutError in asyncio and concurrent.futures ( #11109 )
...
related to https://github.com/python/typeshed/issues/3968
Co-authored-by: Stephen Morton <git@tungol.org >
2023-12-06 00:22:26 -08:00
Alex Waygood and GitHub
9eb099ed6b
Stubtest fixes for the latest patch release of py311 ( #11107 )
2023-12-06 00:55:46 +00:00
tungol and GitHub
fd7ff19577
Use StrEnum as base class, when available ( #11100 )
2023-12-05 13:27:10 +01:00
Simon Lanzmich and GitHub
fe48f37bf7
stdlib: Annotate type.__prepare__ to return a mutable object ( #11093 )
...
During class creation, the namespace returned by `__prepare__` is
populated when the class body is executed. Therefore, it must be
mutable.
2023-12-03 22:46:33 +00:00
Alex Waygood and GitHub
77ff987b57
Add some missing attribute annotations to trace.pyi ( #11091 )
2023-12-03 22:14:15 +00:00
Sebastian Rittau and GitHub
3a036b64fc
logging: Remove hack obsoleted by PEP 655 (#11078 )
2023-11-30 21:48:54 +00:00
Rayan Sóstenes and GitHub
9fbf2e1c0c
Fix: functools.reduce does not accept keyword arguments ( #11090 )
2023-11-30 13:44:52 +00:00
Alex Waygood and GitHub
0b36e65877
Remove redundant sys.version_info condition ( #11087 )
...
We're already inside an `if sys.version_info >= (3, 12)` block here; no need to check if `sys.version_info >= (3, 10)`
2023-11-29 19:10:48 +00:00
Alex Waygood and GitHub
ef346aba0d
Fixes to typing and typing_extensions stubs ( #11086 )
2023-11-29 19:00:58 +00:00
Paul J. Dorn and GitHub
1d3a18c6da
asyncio: create_subprocess_exec is the same as create_subprocess_shell, except where it isn't ( #11076 )
...
asyncio.subprocess: duplicate _shell args to _exec
Fixes: 38dfb57adf
Expanding the keywords used True arguments for shell in both _exec and _shell. The _exec one is for shell=False. With the text argument, its the other way around: both demand Falsy here, so match those lines.
2023-11-29 16:11:03 +00:00
Alex Waygood and GitHub
09668963a1
Make itertools.starmap covariant ( #11037 )
2023-11-29 11:10:26 +00:00
Jit Kanetkar and GitHub
e2a393897c
shutil.pyi: update chown stubs to support file descriptor ( #11082 )
...
Per the python docs, `os.chown`, which is directly called by `shutil.chown`, supports "specifying a file descriptor". Currently, this below code works but fails in mypy:
```python
import shutil
import tempfile
with tempfile.TemporaryFile() as file:
shutil.chown(file.fileno(), group="my_group")
```
2023-11-28 22:22:33 +00:00
Alex Waygood and GitHub
9bbfa3362a
Add importlib.machinery.NamespaceLoader ( #11074 )
2023-11-28 20:02:24 +00:00
Anthony Sottile and GitHub
53592e421a
set root for logging dict config to be non-None ( #11077 )
2023-11-28 20:21:19 +01:00
Serious-senpai and GitHub
b1d5f2f8d5
Provide precise type hints for combinations_with_replacement ( #11068 )
2023-11-24 17:46:39 +00:00
Alex Waygood and GitHub
01432805d9
Fix typos in docs and comments ( #11064 )
2023-11-23 14:55:58 +00:00
Alex Waygood and GitHub
10febc4fe0
stdlib: remove unused type: ignore comments ( #11061 )
2023-11-23 14:00:07 +01:00
Jelle Zijlstra and GitHub
c2c8d7cf5d
stdlib: Apply some simple deprecations ( #11044 )
2023-11-23 09:03:01 +01:00
Allison Karlitskaya and GitHub
53d5ee5a78
stdlib: HTTPSConnection(port=) is int|None ( #11058 )
...
Fix an apparent typo in the type of this field.
Closes #11057
2023-11-22 17:20:33 +00:00
Nikita Sobolev and GitHub
06d0151b25
Enable redundant-self mypy error code ( #11056 )
2023-11-22 10:13:17 +00:00
Alex Waygood and GitHub
83964a4dc5
stdlib: add many missing __del__ methods ( #11042 )
2023-11-18 11:32:12 -08:00
Xuehai Pan and GitHub
aa15fafc33
stdlib: builtins.type.__base__ can be None ( #11040 )
2023-11-18 14:03:56 +00:00
Nikita Sobolev and GitHub
62ccb32b22
Mark deprecated methods as deprecated in wave module ( #11001 )
2023-11-17 07:31:00 -08:00
Alex Waygood and GitHub
4982061ab3
Make itertools.groupby covariant ( #11032 )
2023-11-17 12:33:14 +01:00
Jens Tröger and GitHub
590f89b594
logging: Add a _FilterProtocol type to Filterer.addFilter() filter argument. ( #11018 )
2023-11-14 11:14:19 +02:00
Serious-senpai and GitHub
676446569d
Provide more precise type hints for itertools.permutations ( #11019 )
2023-11-11 14:23:11 +00:00
Alex Waygood and GitHub
eebc28740e
Revert "Use Callable[..., Any] instead of Callable[..., object] in unittest" ( #8779 )
2023-11-10 19:53:33 +01:00
Akuli and GitHub
cad0c04ec0
tkinter: Require passing in a callback function to .after() ( #11013 )
2023-11-10 20:18:25 +02:00
Rob Percival and GitHub
cc0b41a994
Fix type hints for unittest.util.unorderable_list_difference() ( #11012 )
...
Fix type hints for unorderable_list_difference()
It claimed that the arguments were `Sequence` types (immutable), but the function removes elements from them, so they must be `MutableSequence` types. Specifically, it calls `pop()` on the first argument and `remove()` on the second argument.
See the function implementation for details:
https://github.com/python/cpython/blame/0b06d2482d77e02c5d40e221f6046c9c355458b2/Lib/unittest/util.py#L98-L113
2023-11-10 17:53:03 +00:00
Akuli and GitHub
99563a2e6e
Use @deprecated in tkinter.Variable tracing methods ( #11011 )
2023-11-10 19:38:20 +02:00
Jelle Zijlstra and GitHub
4deef7550f
stdlib: Fix more signatures with unrepresentable defaults ( #11007 )
2023-11-09 18:20:09 -08:00
d9311f946e
stdlib: fix signatures for some functions with unrepresentable defaults ( #11000 )
...
Found with python/mypy#16433
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-11-09 08:14:36 -08:00
Jakob Stadler and GitHub
d6403b14aa
stdlib: Fix os.startfile ( #10996 )
...
Fixes #10991
2023-11-08 15:44:14 -08:00
Jelle Zijlstra and GitHub
17f8a82376
ast: mark ast.Num etc. as deprecated ( #10994 )
2023-11-08 19:40:22 +01:00
Alex Waygood and GitHub
516f665505
Bump flake8-pyi to 23.11.0 ( #10997 )
2023-11-08 16:01:24 +00:00
Jelle Zijlstra and GitHub
b36f3c5229
asyncio: remove overly specific protocols ( #10984 )
...
The _warn parameter to these methods is just there to work around
some finalization issues and should never be used by users. In
addition, these protocols are out of date (the "stacklevel" argument
is not used by current CPython main). I don't think we gain anything
by trying to maintain these protocol definitions.
2023-11-07 19:26:25 -08:00
Thomas M Kehrenberg and GitHub
359d4c095d
Fix return type of dbm.whichdb ( #10989 )
...
It is `None` if the given file doesn't exist or isn't a database.
2023-11-07 12:49:39 +01:00