Victorien and GitHub
91f224a293
Add @deprecated to abstractclass/staticmethod/property ( #11488 )
2024-02-28 13:12:06 +00:00
Jelle Zijlstra and GitHub
c62fedc190
tarfile: Remove @deprecated ( #11476 )
...
Fixes #11472 .
As noted in the issue, it is possible to set the filter on the class, but that will still cause type checkers to show deprecation warnings. Therefore, we unfortunately cannot enforce this deprecation in the type system.
2024-02-27 06:34:26 -08:00
Kanishk Pachauri and GitHub
1e7e174b4f
stdlib: fix ctypes errcheck type ( #11467 )
2024-02-26 14:47:46 +01:00
Amin Alaee and GitHub
9916efae63
Update os. EX_NOTFOUND not available in Linux ( #11461 )
2024-02-26 09:36:33 +01:00
Kanishk Pachauri and GitHub
49b1a1a96a
stdlib: Use Literal in difflib.SequenceMatcher.get_opcodes ( #11464 )
2024-02-23 07:44:29 -08:00
Avasam and GitHub
3c08a97656
Improve typing of sysconfig.get_config_var(s) ( #11454 )
2024-02-22 09:52:41 -08:00
Randolf Scholz and GitHub
601587e71d
changed overload order for date.__sub__ and datetime.__sub__ ( #10999 )
2024-02-19 13:11:29 +01:00
Sebastian Rittau and GitHub
df409a2fb5
Use a protocol for shlex.instream et al. ( #11452 )
2024-02-18 22:04:43 -08:00
Avasam and GitHub
bb6613f379
shlex.split: allow TextIO and deprecate None (#11451 )
2024-02-19 06:10:01 +01:00
84572bbfe6
importlib.metadata: Use the SimplePath protocol ( #11445 )
...
Closes #9217 . Followup from #11436 .
This mostly makes a simpler set of changes than #9217 ; in particular
it does not make PathDistribution generic. I think this is in line with
how the protocol is supposed to be used, though not always in line with
the runtime type annotations (which don't all make sense).
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2024-02-18 21:05:33 -08:00
Ali Hamdan and GitHub
6df52a7b39
Improve typing of start_new_thread when called without kwargs ( #11446 )
2024-02-19 05:39:18 +01:00
bba8cbd6f8
stdlib: more deprecations ( #11009 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2024-02-18 06:50:29 -08:00
Jelle Zijlstra and GitHub
705744af4c
Update for typing_extensions 4.10 ( #11438 )
2024-02-18 00:59:48 -08:00
e5d25a7605
importlib.metadata: Improve and test SimplePath protocol ( #11436 )
...
Co-authored-by: layday <layday@protonmail.com >
2024-02-18 00:36:01 -08:00
Nikita Sobolev and GitHub
e961db9492
Change the asyncio.Task constructor type ( #10228 )
2024-02-17 15:50:26 -08:00
863d22a239
Make return type of functools.cache_property covariant ( #10053 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2024-02-17 15:38:46 -08:00
Akuli and GitHub
d5ff34e049
Add types to tkinter.Canvas.scale() ( #11369 )
2024-02-16 21:10:14 -08:00
764532356a
add _lsprof module ( #11159 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2024-02-16 08:38:49 -08:00
winestone and GitHub
f3c7c48438
itertools: Improve precision of itertools.product types when called with 7 or more arguments ( #11163 )
2024-02-16 07:03:13 -08:00
plokmijnuhby and GitHub
c5c2c14db9
builtins: Fix typing of reversed ( #10655 )
2024-02-16 06:52:58 -08:00
Alex Waygood and GitHub
7c3cb9971d
Further improve return types in the numbers module ( #11375 )
2024-02-15 21:04:25 -08:00
Sebastian Rittau and GitHub
4664986cea
Turn TextIOWrapper(buffer) into a protocol ( #11420 )
2024-02-14 19:49:28 +01:00
Watal M. Iwasaki and GitHub
a3d356c04c
ftplib: Correct timeout option to float | None ( #11419 )
2024-02-14 10:25:48 +00:00
Akuli and GitHub
41245698e0
Delete a few simple type aliases in tkinter ( #11415 )
2024-02-13 11:37:32 +01:00
b44d22e81d
Use bool | Literal[0, 1] instead of int in some tkinter bool parameters ( #11412 )
...
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-02-13 02:06:00 +02:00
Riley Miļeško and GitHub
5382d24d1d
Fix return type of calendar.HTMLCalendar.formatyearpage ( #11413 )
2024-02-12 22:50:32 +00:00
4585c714d9
Add annotations and defaults for tkinter.ttk.OptionMenu ( #11404 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2024-02-12 21:33:42 +02:00
Marcell Perger and GitHub
13aed8a1c2
Add defaults for tkinter.ttk __init__ methods ( #11405 )
...
NOTE: I've ignored things marked as undocumented or where the type of the default didn't match the annotation.
2024-02-12 12:54:12 +02:00
Marcell Perger and GitHub
49d5827141
Add annotations for tkinter.ttk.LabeledScale ( #11402 )
2024-02-11 20:05:27 +02:00
Mike Zimin and GitHub
a773d3f6e7
unicodedata.pyi: Add normalization form literal ( #11390 )
2024-02-11 16:20:52 +01:00
Marcell Perger and GitHub
5eb040b1e6
Fix tkinter.ttk's compound argument ( #11393 )
...
Allow the empty string (`""`).
2024-02-10 20:55:08 +02:00
Marcell Perger and GitHub
187928d8ce
Add defaults for tkinter __init__ methods ( #11391 )
...
Add defaults for `tkinter`'s `__init__` methods, see #10947
Some notes about specific arguments:
- `variable` and `textvariable`: The default value (using `dict`) is consistently `""` but this doesn't match the annotated `Variable` type so I didn't fill these in
- `Message(padx, pady)`: The default value is `-1` which is not allowed according to the documentation so I didn't fill this in
- `Toplevel(use)`: The default value is always `""` but this doesn't match the annotated `int` type so I didn't fill this in
2024-02-10 20:51:27 +02:00
Alex Waygood and GitHub
15cdc20744
Fix stdlib stubtest for Python 3.11.8 and 3.12.2 ( #11384 )
...
Fix stubtest for Python 3.11.8 and 3.12.2
2024-02-09 02:28:03 -08:00
Ran Benita and GitHub
a4f81a67a0
sys: add last_exc on Python>=3.12 ( #11378 )
...
https://docs.python.org/3/library/sys.html#sys.last_exc
2024-02-07 20:37:48 +00:00
M Bussonnier and GitHub
edf41ae5e2
Update type of Formatter.convert_field (missing |None) ( #11377 )
...
From the source it expects that the second parameter (conversion), can
be None:
```python
def convert_field(self, value, conversion):
# do any conversion on the resulting object
if conversion is None:
return value
...
```
Since at least 17 years according to git blame, as None is refered as
early as 11529195cae2438a3ac003babcb1b11af67c4037
And still present in main branch:
https://github.com/python/cpython/blob/ef3ceab09d2d0959c343c662461123d5b0e0b64b/Lib/string.py
2024-02-07 19:24:21 +00:00
Akuli and GitHub
e6e2f22e6c
Annotate tkinter.Canvas.type() ( #11366 )
2024-02-06 07:31:59 +01:00
Takumasa N and GitHub
f11eb92bf4
subprocess: Use _CMD instead of str | bytes in getstatusoutput and getoutput (#11354 )
2024-02-05 05:36:55 -08:00
Marcell Perger and GitHub
2c29505765
Fix tkinter overrelief argument ( #11360 )
2024-02-05 14:40:22 +02:00
Alex Waygood and GitHub
a2a6aee892
Fix annotation for ast.alias.name ( #11364 )
...
This isn't necessarily always an identifier:
```pycon
>>> print(ast.dump(ast.parse('from typing import *'), indent=2))
Module(
body=[
ImportFrom(
module='typing',
names=[
alias(name='*')],
level=0)],
type_ignores=[])
>>> '*'.isidentifier()
False
```
2024-02-05 01:42:20 +00:00
Alex Waygood and GitHub
c49c84f319
A new shade of Black ( #11362 )
2024-02-04 16:38:55 -08:00
Alex Waygood and GitHub
4d8ee113fb
Add more return types to the numbers module ( #11353 )
2024-02-01 18:12:41 +00:00
Stephen Morton and GitHub
9877ed8092
Various ctypes improvements ( #11186 )
...
Mostly more attention paid to which classes are actually the same class
2024-01-30 22:18:00 -08:00
1ce82b8d3e
Generalise attribute __func__ of class MethodType from FunctionType to Callable ( #11201 )
...
Let property `__func__` of class `MethodType` return `Callable[..., Any]` instead of `_StaticFunctionType` and remove the latter.
Co-authored-by: Tyralla <tyralla@bce01.de >
2024-01-30 20:22:52 -08:00
Shantanu and GitHub
21f84d09c3
concurrent.futures: allow as_completed to act covariantly ( #11291 )
2024-01-30 20:14:29 -08:00
Sebastian Rittau and GitHub
8e872a022c
numbers: Remove Any annotations ( #11347 )
2024-01-30 15:17:06 +01:00
Shantanu and GitHub
9d445b0eef
Move resource.struct_rusage import ( #11343 )
2024-01-30 00:52:05 -08:00
Avasam and GitHub
81070c4dbc
posixpath.commonpath supports Iterable parameter (#11310 )
2024-01-29 13:13:34 +01:00
Andrew and GitHub
6d9f28a7ca
http.serverBaseHTTPRequestHandler.date_time_string: timestamp is a float ( #11322 )
2024-01-27 12:29:24 +01:00
Oleg A and GitHub
b4f60ac5bf
asyncio: Correct _waiters type ( #11315 )
2024-01-25 20:24:54 +01:00
shz42 and GitHub
2168ab5ff4
Add tuple key type for memoryview.__getitem__ and __setitem__ ( #11296 )
2024-01-21 05:14:34 +01:00