Commit Graph

5270 Commits

Author SHA1 Message Date
Avasam 12b9e48324 Update Ruff and enable F821 in stubs (#11771) 2024-04-17 09:50:58 -07:00
Nice Zombies 6e16a4ce23 Fix os.chmod default value (#11775) 2024-04-17 02:25:46 -07:00
Bruce Merry 9d234d9c3f Update asyncio.Stream.readuntil for Python 3.13 (#11755) 2024-04-14 14:11:44 +02:00
Avasam 1af2babc03 Allow bytes in winreg.SetValueEx (#11655)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-04-09 21:25:19 -04:00
bzoracler bc4b26fbcb Allow NewType.__supertype__ to also be a NewType (#11728) 2024-04-07 06:15:51 -04:00
Ryan McCampbell 5e2f741209 Remove Windows checks from curses (#11241)
Co-authored-by: Akuli <akuviljanen17@gmail.com>
2024-04-06 17:12:48 +03:00
Adam Dangoor 4a33b2f3a0 Add some types for xml.dom.minidom.Text (#11725) 2024-04-06 14:45:24 +02:00
layday a9d644b3ff Add get_verified_chain and get_unverified_chain for Python 3.13 (#11724)
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>
2024-04-05 19:29:11 +01:00
DetachHead 325577cb76 Update typing_extensions.deprecated decorator to use LiteralString (#11700) 2024-04-01 19:02:41 -07:00
Sebastian Rittau 630b49a291 Replace various Incompletes in stdlib (#11673)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-04-01 15:20:01 +01:00
Sebastian Rittau 027115e624 Remove bare incompletes (#11670) 2024-03-30 18:35:57 -07:00
Avasam 6cb57b5f26 traceback: Allow extracted_list params to be an Iterable containing tuples (#11675) 2024-03-30 18:32:27 -07:00
Eli Skeggs 9965725935 signal: mark sigtimedwait params as positional-only on all versions (#11658)
At least on Python 3.8.10 and 3.9.18 do not allow keyword arguments.
2024-03-25 22:03:36 -07:00
Alexandru Mărășteanu 4df0725b48 Use Any for field type in make_dataclass (#11657)
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
2024-03-25 23:05:14 +00:00
Shantanu 13265a9347 xml: update for security fix (#11648)
Fixes #11643
2024-03-22 13:07:05 -07:00
Jay Qi cc5f23ac14 Add init to NameError stub with name keyword argument (#11627)
Co-authored-by: Jay Qi <jayqi@users.noreply.github.com>

Closes #11626
2024-03-18 12:08:25 -06:00
Avasam ff7caa30e2 setuptools&distutils: setup returns a Distribution (#11617)
`setup` returns a `Distribution`
2024-03-16 12:06:37 +00:00
Sebastian Rittau 9841c255ee Replace Any in optparse (#11599)
Co-authored-by: Ali Hamdan <ali.hamdan.dev@gmail.com>
2024-03-15 22:33:52 +01:00
Ismail S a20f54663c Add taskName to LogRecord (#11609) 2024-03-15 15:34:13 +01:00
Patrick Rauscher 3d138380c2 Allow slices for SynchronizedArray (#11573) 2024-03-15 13:10:16 +01:00
Patrick Rauscher 6943dcd03f Fix typing of multiprocessing.Value and Array (#11576) 2024-03-15 12:50:48 +01:00
renovate[bot] 48106feed7 chore(deps): update pytype and pyright (#11595) 2024-03-14 09:28:09 +01:00
shawnbrown ea6dac40d4 sqlite3: handle return-type with factory argument. (#11571) 2024-03-13 09:14:08 +01:00
Sebastian Rittau 4c5c5760cf email.message: Allow any header value (#11574) 2024-03-11 17:47:00 -04:00
Jelle Zijlstra a6bdb25991 typing: Deprecate creating a NamedTuple with kwargs (#11567)
https://github.com/python/cpython/blob/c5fa796619a8cae5a1a8a4a043d05a99adec713d/Lib/typing.py#L2874
2024-03-10 16:20:35 -07:00
Avasam 1a942aa36d Replace Flake8 checks with Ruff (except for flake8-pyi) (#11496)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-03-10 14:35:45 +00:00
Shantanu 2d146e7da2 Use PEP 570 syntax in comments (#11552) 2024-03-09 15:06:25 -08:00
Shantanu 470a13ab09 Use PEP 570 syntax in stdlib (#11250) 2024-03-09 14:50:16 -08:00
Shantanu 4d8ae17776 Bump mypy to 1.9, add to json.encoder, small fixups (#11549)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-03-09 14:25:00 -08:00
Jelle Zijlstra 5b1fd121e0 asyncio: Fix type of add_child_handler callback (#11548) 2024-03-09 17:02:05 +01:00
layday ca1e47739e Fix type of concurrent.futures.wait for Python <= 3.8 (#11537)
Closes #11533.
2024-03-07 20:08:37 +01:00
Avasam 2116158891 Remove old type-ignore explanation comments not removed in #8280 (#11513) 2024-03-01 07:10:10 -08:00
Akuli 0ad004a776 tkinter: Simplify wm_iconphoto() (#11508) 2024-02-29 13:45:45 +02:00
Nikita Sobolev 675ab38ab7 Update pyright version to 1.1.350 (#11501)
If you're reading about this commit in an auto-generated changelog: this is an internal change that should have no impact on how these stubs are understood by static-analysis tools such as type checkers or IDEs
2024-02-29 10:14:39 +00:00
Nikita Sobolev 7b4c751abb Fix pos-only params in tkinter module (#11506) 2024-02-29 09:02:02 +00:00
Nikita Sobolev 217166b8a9 Fix pos-only params in os module (#11505) 2024-02-29 09:01:43 +00:00
Nikita Sobolev fa4ca40f5c Fix _operator.attrgetter pos-only params (#11504)
There cannot be any keywords:

```c
static PyObject *
attrgetter_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
{
    attrgetterobject *ag;
    PyObject *attr;
    Py_ssize_t nattrs, idx, char_idx;

    if (!_PyArg_NoKeywords("attrgetter", kwds))
        return NULL;

// ...
```
2024-02-29 11:03:36 +03:00
AN Long 555c1fe223 stdlib: Add Shutdown error and shutdown method to queue module (#11489)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2024-02-29 07:45:15 +00:00
Nikita Sobolev 19d1b686b6 str.count only takes positional args (#11503)
```
>>> ''.count(x='a')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: str.count() takes no keyword arguments
```
2024-02-29 10:37:12 +03:00
Thanos 2e2c6fca8b Update sqlite/dbapi2.pyi to include new autocommit parameters for 3.12+. (#11485) 2024-02-28 05:29:31 -08:00
Victorien 91f224a293 Add @deprecated to abstractclass/staticmethod/property (#11488) 2024-02-28 13:12:06 +00:00
Jelle Zijlstra 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 1e7e174b4f stdlib: fix ctypes errcheck type (#11467) 2024-02-26 14:47:46 +01:00
Amin Alaee 9916efae63 Update os. EX_NOTFOUND not available in Linux (#11461) 2024-02-26 09:36:33 +01:00
Kanishk Pachauri 49b1a1a96a stdlib: Use Literal in difflib.SequenceMatcher.get_opcodes (#11464) 2024-02-23 07:44:29 -08:00
Avasam 3c08a97656 Improve typing of sysconfig.get_config_var(s) (#11454) 2024-02-22 09:52:41 -08:00
Randolf Scholz 601587e71d changed overload order for date.__sub__ and datetime.__sub__ (#10999) 2024-02-19 13:11:29 +01:00
Sebastian Rittau df409a2fb5 Use a protocol for shlex.instream et al. (#11452) 2024-02-18 22:04:43 -08:00
Avasam bb6613f379 shlex.split: allow TextIO and deprecate None (#11451) 2024-02-19 06:10:01 +01:00
Jelle Zijlstra 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