Commit Graph

7537 Commits

Author SHA1 Message Date
Alex Waygood
f94d496626 Update cachetools stubs to 5.3.* (#9666) 2023-02-03 12:20:38 +00:00
Alex Waygood
4afda1dbe3 Rework CONTRIBUTING.md: simple parameter defaults are now accepted and encouraged (#9665) 2023-02-03 11:59:07 +00:00
hasier
c2e638e222 Fix python-jose unverified jws and jwt functions (#9662) 2023-02-03 11:53:00 +00:00
Sebastian Rittau
dc389eafe7 Update setuptools to 67.1 (#9664)
Replace some instances of `Any` with `Incomplete` or proper types.
2023-02-03 11:43:35 +00:00
Sebastian Rittau
cd64563dd8 Rework the "Incomplete stubs" section (#9548)
Also move it to the "Conventions" section due its scope change.

Closes: #8955
2023-02-03 11:58:25 +01:00
Jelle Zijlstra
5b24c7bb41 stdlib: Run stubdefaulter on Linux for 3.9 (#9663) 2023-02-03 00:39:22 +00:00
Alex Waygood
100cd62373 stdlib: Add bytes defaults (#9660) 2023-02-02 16:01:54 -08:00
Avasam
f1aede7162 Manual changes of Any union to Incomplete in stubs folder (#9566)
- ClassVar[Any | None]
- Missed previous changes due to alias
- Manual review of leftover Any unions (`| Any` and `Any |`)
2023-02-02 06:48:41 -08:00
Alex Waygood
95dc689b28 Remove unneeded ignore in .flake8 (#9661)
B028 was renamed as B907, and we don't have any of the B9 rules enabled for this repo (they're all off by default)
2023-02-02 13:29:50 +00:00
Peter Pentchev
1e5d72314f setuptools: add pkg_resources.Requirement.url (#9657)
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2023-02-01 23:44:08 -08: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
hamdanal
250befdef0 Fix optional USB attributes in pyserial's ListPortInfo (#9654)
Some USB specific attributes in pyserial's [`serial.tools.list_port_common.ListPortInfo`](https://github.com/python/typeshed/blob/main/stubs/pyserial/serial/tools/list_ports_common.pyi#L11-L24) class are not always available. They depend on the USB device and its driver correctly reporting these attributes. I discovered this recently with a new device that does not report its serial number. Only the Vendor ID `vid` and Product ID `pid` are guaranteed (This can be seen [here](https://github.com/pyserial/pyserial/blob/master/serial/tools/list_ports_linux.py#L52-L62) where `vid` and `pid` are always cast as `int` while other attributes are left as `str | None` for USB devices). 
This is a follow up to #9347 and the discussion at https://github.com/python/typeshed/pull/9347#issuecomment-1358245865
2023-02-01 14:03:24 -08:00
Alex Waygood
1d7dda7fa1 stdlib: Add defaults for positional-only parameters (#9655) 2023-02-01 21:44:08 +00:00
Alex Waygood
35172c7aab Stdlib: add some very large integer defaults (#9651)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-02-01 20:10:28 +00:00
Alex Waygood
8000fbd386 Bump various test dependencies (#9646) 2023-02-01 06:23:40 -08:00
Alex Waygood
23e3dc9bd8 Fix stubtest errors on beautifulsoup4 (#9648)
Fixes #9645.
2023-02-01 06:06:45 -08:00
Alex Waygood
8e7b78a8e8 Bump black to 23.1.0 (#9647) 2023-02-01 06:06:04 -08:00
Alex Waygood
7cd7ae46c0 Improve a few version-dependent tkinter functions (#9637) 2023-02-01 15:02:26 +02:00
Mehdi Drissi
d755da86dd Tensorflow: Add more stubs (#9560)
Co-authored-by: Mehdi Drissi <mdrissi@snapchat.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-01-31 22:12:41 -08:00
Victor B
1cc8080c7e Add stubs for zstd (#9484)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-01-31 21:41:19 -08:00
Avasam
0e7365a7ef Add defaults for params and constants in pyscreeze (#9641) 2023-01-31 17:56:29 -08:00
Alex Waygood
2539649560 Add a default for ssl.SSLContext.__new__ on 3.10+ (#9635) 2023-01-31 17:30:00 -08:00
Alex Waygood
510bd460d2 Improve statistics.median_grouped on <=3.10 (#9636) 2023-01-31 17:29:01 -08:00
Avasam
6c4059f188 Add defaults for params and constants in PyAutoGUI (#9639) 2023-01-31 17:26:03 -08:00
Avasam
b151e2396a Add defaults for params and constants in pyinstaller (#9640) 2023-01-31 17:24:39 -08:00
Alex Waygood
cec6162146 Bump flake8-pyi to 23.1.2 (#9643) 2023-02-01 00:07:09 +00:00
Alex Waygood
9e71de0421 Improve several stdlib setdefault methods (#9612) 2023-01-31 15:39:24 -08:00
Rodrigo Silva
064f7af176 PyAutoGui: Add more reexports from pyscreeze (#9634)
Add remaining methods from pyscreeze
2023-01-31 12:03:08 +00:00
Eclips4
3b4dbe36d4 ctypes._CData: Fix field name (#9633) 2023-01-31 09:16:39 +01:00
Alex Waygood
c54a1a9e16 urllib.parse: Fix issues with TypeVar usage and default values (#9629)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-01-31 02:21:50 +00:00
Alex Waygood
a6919227be Add several version-dependent default values to parameters in the stdlib (#9631) 2023-01-31 01:21:39 +00:00
Alex Waygood
81463b9995 tempfile.SpooledTemporaryFile: fix overloads (#9627) 2023-01-30 17:04:18 -08:00
Alex Waygood
8a098a8601 Various asyncio classes: remove the loop argument on 3.10 (#9630) 2023-01-30 16:55:08 -08:00
Alex Waygood
94065d3aa5 Fix typo in tests/regr_test.py (#9628)
It looks like in #9382, I reintroduced the bug that I previously fixed in #9349
2023-01-30 22:56:44 +00:00
Alex Waygood
9099403d58 builtins.pow: Add default values to <py38 branches; remove incorrect = ...s for the 13th overload (#9610) 2023-01-30 18:12:50 +01:00
Alex Waygood
b748a9a543 distutils.filelist overloads: Remove unnecessary = ...s (#9619) 2023-01-30 18:02:57 +01:00
Alex Waygood
7958a7f934 RawConfigParser.__init__: fix overloads (#9613) 2023-01-30 18:00:43 +01:00
Alex Waygood
b5a26d1ca2 email.message: Fix invalid TypeVar usage; add some default values (#9620) 2023-01-30 17:56:29 +01:00
Alex Waygood
6011cac0cc Stdlib: fix three trivial issues with parameter defaults (#9618) 2023-01-29 21:40:56 -08:00
Shantanu
398bd90b8e whatthepatch: add parse_git_binary_diff (#9616)
Added in 1.0.4
https://github.com/cscorley/whatthepatch/pull/whatthepatch

Fixes #9615
2023-01-30 00:49:49 +00:00
Alex Waygood
1b5bd63f78 Bump isort to 5.12.0 (#9617) 2023-01-29 16:37:55 -08:00
Alex Waygood
dd3aedd133 Correct str.maketrans and collections.UserString.maketrans (#9611) 2023-01-29 11:45:08 -08:00
Avasam
2ffd867f25 Increase mypy_primer comment length (#9598) 2023-01-29 11:43:38 -08:00
Alex Waygood
25b3999a10 croniter: complete stubs (#9584) 2023-01-29 11:41:09 -08:00
Alex Waygood
5dfee6aa66 Add some missing py311+ constants to sre_constants.pyi (#9614) 2023-01-29 11:33:37 -08:00
Alex Waygood
c9f17d80fa _bisect: Remove incorrect = ...s for several overloads (#9609) 2023-01-29 10:06:39 -08:00
github-actions[bot]
808a431a57 [stubsabot] Mark SQLAlchemy as obsolete since 2.0.0 (#9595)
Release: https://pypi.org/pypi/SQLAlchemy/2.0.0
Homepage: https://www.sqlalchemy.org
2023-01-29 01:52:18 +00:00
Alex Waygood
33a62ae42d Add more defaults to the stdlib (#9606)
Continuing work towards #8988.

The first five commits were created using stubdefaulter on various Python versions; the following commits were all created manually by me to fix various problems. The main things this adds that weren't present in #9501 are:

- Defaults in Windows-only modules and Windows-only branches (because I'm running a Windows machine)
- Defaults in non-py311 branches
- Defaults for float parameters
- Defaults for overloads
2023-01-29 01:51:23 +00:00
Alex Waygood
25e02db42c Fix typo in parse_metadata.read_stubtest_settings (#9605)
Fixes #9603
2023-01-29 00:40:42 +00:00