Commit Graph
100 Commits
Author SHA1 Message Date
Jelle Zijlstra bf484ab320 Add @disjoint_base to builtins.tuple (#14683) 2025-09-07 00:36:57 +01:00
Jelle Zijlstra 7aa7cc914f daily stubtest: also pin to updated commit (#14645) 2025-08-26 07:31:07 +01:00
Jelle Zijlstra e8ba06f710 Add @disjoint_base decorator in the stdlib (#14599)
And fix some other new stubtest finds.
2025-08-24 07:27:14 -07:00
Jelle Zijlstra 92eab7b773 Fix __new__ issues in 3.14 (#14626) 2025-08-23 10:01:10 -07:00
Jelle Zijlstra b6e21d05ae Add some defaults and __slots__ for 3.14 (#14622) 2025-08-22 18:51:00 +02:00
Jelle Zijlstra 94b1880444 Fix some incorrect parameter defaults in the stdlib (#14620) 2025-08-22 09:11:52 -07:00
Jelle Zijlstra ca44e4c45d Add __slots__ to third-party packages using stubdefaulter (#14619) 2025-08-21 15:38:13 -07:00
Jelle Zijlstra 573b57d8da Add missing defaults to third-party stubs (#14617) 2025-08-21 13:36:29 -07:00
Jelle ZijlstraandAlex Waygood 82926783a4 stdlib: add a few more defaults (#14618)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-08-21 21:13:06 +01:00
Jelle Zijlstra f32d9f08bd stdlib: add __slots__ (#14611) 2025-08-21 07:24:59 -07:00
Jelle Zijlstra 02a4b07b54 stdlib: add some parameter defaults (#14610) 2025-08-21 09:17:33 +02:00
Jelle Zijlstra e0f16117b8 Upgrade to mypy 1.17.1 (#14598) 2025-08-20 15:43:04 -07:00
Jelle Zijlstra ecb0742e7f Add Brian Schubert to maintainers (#14498) 2025-07-30 12:12:11 -04:00
Jelle Zijlstra 1511911f46 croniter: fix typo (#14337)
Had to stare at this stub for a while to notice the bug...
2025-06-25 17:18:10 -07:00
Jelle Zijlstra c7e29eccd9 ast: Precise type for ast.Constant.value (#14159) 2025-05-27 09:59:02 +02:00
Jelle Zijlstra 9430260770 builtins: improve builtins.function (#14094)
Remove two differences from types.FunctionType that should be
safe to clean up.
2025-05-17 19:43:22 +02:00
Jelle Zijlstra 30b7b679f5 Give up on AnnotationForm in typing.pyi (#13999)
From #13985
2025-05-11 15:39:50 -07:00
Jelle Zijlstra 58367a50d5 [click-web] Fixes after click 8.2.0 release (#14001) 2025-05-11 01:39:55 +02:00
Jelle Zijlstra 5ff32f377c 3.14: add annotationlib, update typing and inspect (#13985) 2025-05-10 14:25:06 -07:00
Jelle Zijlstra 17794ccb5d netifaces: apply stright pyright settings (#12874)
Fixes AlexWaygood/typeshed-stats#274.
2024-10-22 06:09:30 -07:00
Jelle Zijlstra a2ee32ba5d unittest: make protocol parameter positional-only (#12834) 2024-10-17 16:55:50 +02:00
Jelle Zijlstra 2370b8b9d1 memoryview: re-add inheritance from Sequence, set index and count to None (#12800)
This reverts commit f625e92ae5.
2024-10-16 07:27:56 -07:00
Jelle Zijlstra 213ca9eb81 Update vobject (#12721) 2024-10-02 08:27:21 +01:00
Jelle Zijlstra d482d4e83c More precise type for TypeAliasType.__getitem__ (#12354)
At runtime, this always returns a GenericAlias; see typealias_subscript
in Objects/typevarobject.c. See microsoft/pyright#8444.
2024-07-17 06:37:31 -07:00
Jelle Zijlstra 1209816e48 Add .closed property to NamedTemporaryFile (#12349)
This is necessary for a NamedTemporaryFile to be compatible with io.TextIOWrapper.
2024-07-16 13:03:54 +02:00
Jelle Zijlstra 64d07ae128 abc: Shorten @deprecated messages (#12271)
Noticed this in primer output from python/mypy#17476.
2024-07-04 07:35:33 +01:00
Jelle Zijlstra eeea0ac614 asyncio: fix task factory types (#11993) 2024-05-21 11:18:38 +02:00
Jelle Zijlstra 3cb7451c99 dis: Update for Python 3.13 (#11985) 2024-05-20 13:02:52 +02:00
Jelle Zijlstra 38569b6bb4 stubtest: fix path (#11884) 2024-05-10 10:44:42 +02:00
Jelle Zijlstra 9c8c9c769c Add stubs for unidiff (#11860) 2024-05-04 17:33:09 +02:00
Jelle Zijlstra 1dff589dd4 Use TypeIs for various stdlib functions (#11823) 2024-04-26 16:43:19 -07:00
Jelle Zijlstra f40076c0da Upgrade to mypy 1.10.0 (#11829) 2024-04-24 07:48:40 -07:00
1a275547b4 CONTRIBUTING.md: Add PR closing policy (#11596)
Closes #11583

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
Co-authored-by: Avasam <samuel.06@hotmail.com>
2024-03-14 22:06:26 -07: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
Jelle Zijlstra f94bbfbcc4 Update the README (#11553)
Read through the README and changed anything that no longer made sense. In particular, the documentation of our stub versioning scheme was outdated.
2024-03-09 15:59:15 -08:00
Jelle Zijlstra 5b1fd121e0 asyncio: Fix type of add_child_handler callback (#11548) 2024-03-09 17:02:05 +01:00
Jelle Zijlstra 6d20ea636c html5lib: Fix type alias (#11480)
Pretty sure this is what I meant to write in the first place.

Fixes #11478
2024-02-27 11:55:29 -08: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
Jelle Zijlstra 78b7dc6167 html5lib: Add various types (#11429)
I started out investigating comments in #11411 and ended up adding a few other
types that were reasonably obvious from the source code. For reference:
https://github.com/html5lib/html5lib-python/tree/master/html5lib
2024-02-20 00:18:17 -08:00
Jelle ZijlstraandSebastian Rittau 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
Jelle Zijlstra e8c029fbd3 openpyxl: Add stubtest allowlist entry (#11449)
Fixes #11448
2024-02-19 05:37:54 +01:00
Jelle ZijlstraandAlex Waygood bba8cbd6f8 stdlib: more deprecations (#11009)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2024-02-18 06:50:29 -08:00
Jelle Zijlstra 705744af4c Update for typing_extensions 4.10 (#11438) 2024-02-18 00:59:48 -08:00
Jelle Zijlstraandlayday e5d25a7605 importlib.metadata: Improve and test SimplePath protocol (#11436)
Co-authored-by: layday <layday@protonmail.com>
2024-02-18 00:36:01 -08:00
Jelle Zijlstra 504cbd40fe deps: upgrade pytype (#11434) 2024-02-16 22:06:25 -08:00
Jelle Zijlstra c2c8d7cf5d stdlib: Apply some simple deprecations (#11044) 2023-11-23 09:03:01 +01:00
Jelle Zijlstra 42875bcbf1 ibm-db: Add SQL_ATTR_TXN_ISOLATION (#11060) 2023-11-23 09:00:33 +01:00
Jelle Zijlstra 5fd2e9bf61 CONTRIBUTING: Add @deprecated, other updates (#11005)
Fixes #11004.

I started out just documenting conventions with `@deprecated`, but
found some other things in need of updates.

- PEP 585 and 612 are now fully supported
- Add several other PEPs that we fully support
- Use updated links to PEPs
- Split off a few sections from the long "Conventions" section
- PEP 688 was accepted
2023-11-18 12:55:18 -08:00
Jelle Zijlstra 0c7bdffa90 third-party: make some protocol params pos-only (#11006) 2023-11-10 07:40:10 +01:00
Jelle Zijlstra 4deef7550f stdlib: Fix more signatures with unrepresentable defaults (#11007) 2023-11-09 18:20:09 -08:00
Jelle ZijlstraandAlex Waygood 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
Jelle Zijlstra 17f8a82376 ast: mark ast.Num etc. as deprecated (#10994) 2023-11-08 19:40:22 +01:00
Jelle Zijlstra 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
Jelle Zijlstra 3229b36644 stdlib: More pos-only parameters to Protocols (#10987) 2023-11-06 23:45:12 +01:00
Jelle Zijlstra 5030b7419b stdlib: Use pos-only parameters for many Protocols (#10985) 2023-11-06 18:09:04 +01:00
Jelle Zijlstra 9fb52127ab jsonschema: move addionalItems (#10955)
https://github.com/python-jsonschema/jsonschema/commit/daa40b3eaf55f72f6154f9a48e557d895617b24a

Fixes #10953
2023-10-30 17:40:28 -07:00
Jelle ZijlstraandAlex Waygood 9d345b4df4 Add stubs for portpicker (#10944)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-29 01:13:25 +01:00
f9f30cc0f2 Update mypy-protobuf (#10914)
Co-authored-by: Avasam <samuel.06@hotmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-10-22 16:31:02 -07:00
Jelle Zijlstra cb688d2577 psutil: updates (#10894) 2023-10-15 18:22:11 -07:00
Jelle Zijlstra cc38a75587 aws-xray-sdk: update and remove spurious re-exports (#10874)
Fixes #10873

Remove some obsolete compatibility functions that are no longer in the latest
release, and stop re-exporting symbols that clearly weren't meant to be re-exported.
2023-10-12 18:20:47 -07:00
Jelle Zijlstra 31495e53bd typing.pyi: IO.name may be bytes (#10738) 2023-09-20 08:24:22 +02:00
Jelle Zijlstra f577c4c133 Update typing_extensions for 4.7.* (#10344) 2023-07-22 12:51:22 +01:00
Jelle ZijlstraandSebastian Rittau 5beddbe883 Add PEP 706 filters to tarfile (#10316)
Fixes #10315

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2023-06-14 15:08:32 +01:00
Jelle Zijlstra 628c88d995 Update ast for 3.12 (#10201) 2023-06-02 17:11:13 -07:00
Jelle Zijlstra 7bc4be08d8 Update some dependencies (#10243) 2023-06-02 16:54:52 -07:00
Jelle Zijlstra 0d0cbb6b97 Allowlist requests.compat.bytes.__buffer__ (#10231) 2023-05-28 21:23:00 -07:00
Jelle ZijlstraandAlex Waygood c0a0c34020 Use PEP 688 (#10225)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-27 19:55:30 -07:00
Jelle Zijlstra 2f65ca5cd4 Update pyscreeze stubs (#10223) 2023-05-26 15:11:56 +02:00
Jelle Zijlstra 4817408103 Update pyautogui (#10209)
Fixes #10207
2023-05-25 00:44:23 -07:00
Jelle Zijlstra 185adf01a9 Clean up stubtest allowlist for typing (#10205) 2023-05-24 20:33:46 +01:00
Jelle ZijlstraandAlex Waygood e4dcfccbd5 Update typing-extensions; some 3.12 updates (#10200)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-05-24 11:06:55 -07:00
Jelle Zijlstra 8e24885da7 paramiko: Improve various bytes-related types (#10109) 2023-05-03 15:53:54 +02:00
Jelle Zijlstra 0f270e61bf docutils: Input can take bytearray (#10108)
Part of #9006
2023-04-29 16:09:14 +01:00
Jelle Zijlstra b9e9540db4 chardet: UniversalDetector.feed accepts bytearray (#10107)
Technically it accepts any buffer, but the inline type annotations
now say bytes | bytearray, so let's stick to that.

Part of #9006
2023-04-29 16:08:37 +01:00
Jelle Zijlstra 4e52cf1b71 bs4: NavigableString accepts ReadableBuffer (#10106)
It delegates to str.__new__.
2023-04-29 15:54:09 +01:00
Jelle Zijlstra 17edf76275 aiofiles: use ReadableBuffer (#10105)
Part of #9006
2023-04-29 15:50:48 +01:00
Jelle Zijlstra 40975222b4 multiprocessing: Queue does not inherit from queues.Queue (#10104)
Fixes #3404
2023-04-29 15:39:11 +01:00
Jelle Zijlstra bff9d7a7df psutil: sconn.pid can be None (#9853)
Found out about this the hard way.

The code path that allows None is here: https://github.com/giampaolo/psutil/blob/2da99502238852f18f74db05304e67a01ee77005/psutil/_pslinux.py#L923
2023-03-07 22:07:54 +00:00
Jelle Zijlstra e17ee201f5 yaml: allow ReadableBuffer in represent_binary (#9701) 2023-02-09 16:03:49 +01:00
Jelle Zijlstra c65a87481d colorama: Preserve input type for wrap_stream (#9677) 2023-02-06 06:50:21 -08:00
Jelle Zijlstra 5b24c7bb41 stdlib: Run stubdefaulter on Linux for 3.9 (#9663) 2023-02-03 00:39:22 +00:00
Jelle Zijlstra 0fc3a567fc stdlib: add defaults for modules accessible on MacOS (#9659)
Ran stubdefaulter with standard options on a Mac.
2023-02-01 22:46:55 +00:00
Jelle Zijlstra bc463a0677 Remove default for size parameter to multiprocessing.heap.Heap (#9658)
It's system-dependent. stubdefaulter told me `multiprocessing.heap.Heap: parameter size: stub default 4096 != runtime default 16384`, which presumably means it's 4096 on @AlexWaygood's system and 16384 on mine. I looked in the code and the default is set to `mmap.PAGESIZE`, which in turn is set from some system call at import time.
2023-02-01 22:43:50 +00:00
Jelle Zijlstra af2ce282d5 builtins: do the TODO on compile() (#9567) 2023-01-18 11:48:48 -08:00
Jelle Zijlstra aa4d6d87ae asyncio: fix default for subprocess_exec (#9561) 2023-01-18 15:03:22 +01:00
Jelle Zijlstra ddfaca3200 stdlib: add argument default values (#9501) 2023-01-18 09:37:34 +01:00
Jelle Zijlstra b43e1db47b ssl, sysconfig: fix issues with defaults (#9507)
- ssl._create_unverified_context allows None since 3.10:
  https://github.com/python/cpython/commit/2875c603b2a7691b55c2046aca54831c91efda8e#diff-f6439be9c66350dde4c35dbeea0352c96cc970ba12b0478f6ae36f10725bd8c5
- sysconfig.is_python_build ignores its argument since 3.11:
  https://github.com/python/cpython/commit/067597522a9002f3b8aff7f46033f10acb2381e4
  (was backported into 3.11)
2023-01-12 10:19:41 -08:00
Jelle ZijlstraandAlex Waygood f64807a468 socketserver: improve bytes handling (#9096)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-01-12 16:46:20 +00:00
Jelle Zijlstra b9eab637cb subprocess: Improve bytes-related types (#9100) 2023-01-11 20:10:26 -08:00
Jelle Zijlstra 6a366c99a9 venv: add logger (#9508)
Not particularly useful but unreleased stubtest will require this:
https://github.com/python/typeshed/actions/runs/3898630022/jobs/6657546205
2023-01-11 19:33:16 -08:00
Jelle Zijlstra 1ce1c1ad17 subprocess: universal_newlines may be None (#9509)
All the way back to 3.7:
https://github.com/python/cpython/blob/3.7/Lib/subprocess.py#L684

It's treated like False
2023-01-11 19:15:40 -08:00
Jelle Zijlstra d2829ecdf7 urllib.parse.urlencode: encoding and errors can be None (#9506)
The runtime defaults are None. Found in #9501.
2023-01-11 18:55:38 -08:00
Jelle Zijlstra 7ca7b0c659 Add Nikita Sobolev to maintainers (#9351) 2022-12-11 09:43:59 +03:00
Jelle ZijlstraandAlex Waygood 388d7839d9 regr_test.py: improve interaction between --all and --quiet flags (#9349)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2022-12-10 21:39:33 +00:00
Jelle Zijlstra 00483b63e6 http.client.HTTPConnection.request accepts str as the body (#9322)
See code around https://github.com/python/cpython/blob/ab02262cd0385a2fb5eb8a6ee3cedd4b4bb969f3/Lib/http/client.py#L1328
2022-12-02 10:49:33 -08:00
Jelle Zijlstra 9452ce539c xmlrpc: improve bytes handling (#9166) 2022-11-25 19:33:53 -08:00
Jelle Zijlstra 59f35b51b2 pyflakes: fix stubtest (#9273)
Fixes #9272
2022-11-25 09:34:37 +01:00
Jelle Zijlstra 8da1e8c31d marshal: specify allowed types (#9165) 2022-11-24 22:54:09 -08:00
Jelle Zijlstra d2da97d99c urllib: improve bytes handling (#9167) 2022-11-22 16:38:28 -08:00
Jelle ZijlstraandShantanu ec4ec33639 xml: improve bytes types (#9110)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-11-10 20:43:26 -08:00