Commit Graph

848 Commits

Author SHA1 Message Date
Avasam
2e59b81ffd Use of twisted in pika (#9494)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-03-24 22:51:59 -06:00
Alex Waygood
ca55889329 distutils/setuptools: Don't use wildcards for allowlist entries (#9900) 2023-03-17 14:05:12 -07:00
Henry Schreiner
2d990ee2f7 Fill out more annotations for distutils & setuptools dist (#9895)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-03-17 18:48:24 +00:00
Henry Schreiner
3a82796d1e [distutils] Add generated methods to Distribution (#9896) 2023-03-17 12:14:36 +01:00
Mehdi Drissi
1d15121f1d Tensorflow protobuf stubs (#9873)
Co-authored-by: Mehdi Drissi <mdrissi@snapchat.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-03-15 00:51:16 -07:00
Anton Grübel
53e1b534c7 add signal.SIGSTKFLT on py311+ (#9870) 2023-03-12 14:18:23 +00:00
Avasam
a5fc97e6da Fix misnamed parameter in stubtest_third_party (#9716) 2023-03-09 07:33:45 +00:00
Alex Waygood
8a2bc88409 Improve typechecking of the test suite (#9806) 2023-03-08 08:35:41 +00:00
Avasam
14b06ae672 pytype_test.py: Fix typechecking errors following #9747 (#9849) 2023-03-06 18:23:07 +00:00
Alex Waygood
257e287fec Stdlib: correct many parameter names (#9815) 2023-03-04 09:53:12 +00:00
Alex Waygood
2daa07ddf0 stubtest_stdlib: suppress output from pip (#9807) 2023-02-25 16:32:24 -08:00
Alex Waygood
1d2ae2598b Fix some typos in comments (#9802) 2023-02-23 22:11:24 +00:00
Avasam
75f47d0cb1 Typecheck typeshed's code with pyright (#9793)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-02-22 18:53:07 +00:00
Alex Waygood
fea57ad095 hmac.HMAC: digestmod defaults to None on py37 (#9790) 2023-02-21 18:24:34 +00:00
Avasam
5ac80781ec Integrate requirements-stubtest.txt into METADATA.toml (#9778) 2023-02-21 11:19:50 +01:00
Avasam
a6c6bc1b8e Fix stdlib/disutils testing (#9734) 2023-02-21 08:06:20 +00:00
Alex Waygood
880c0da404 Enable some more mypy lints when checking our own code (#9787) 2023-02-21 00:54:35 +00:00
Alex Waygood
bc847a9b07 Use generic NamedTuples to clean up urllib.parse (#9773) 2023-02-20 16:41:49 -08:00
Alex Waygood
4d99b33f84 Fix an unnecessary allowlist entry in ssl.pyi (#9776) 2023-02-20 16:35:38 -08:00
Avasam
ed6748fb32 Stubtest settings: change ignore_missing_stub default to false (#9779)
If you're reading about this commit from an autogenerated changelog entry, this should have no user-visible impact on how the stubs are interpreted by a type checker; it's just an internal change to how typeshed's tests work.
2023-02-20 22:37:45 +00:00
Alex Waygood
3786ab295e Fix an unnecessary socketserver allowlist entry (#9777) 2023-02-20 11:14:20 -08:00
Thomas M Kehrenberg
40d853cbe2 Add __set__ to functools.cached_property (#9762) 2023-02-20 12:36:45 +00:00
Alex Waygood
c5b5dd4bf4 Various stdlib dunders: correct parameter names; improve types; add defaults (#9761)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2023-02-19 22:44:20 +00:00
Avasam
74112dc189 Add a run_stubtest flag to scripts/runtests.py (#9717)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2023-02-19 22:10:32 +00:00
Shantanu
5c54e52e23 Fix default value of input, remove now unused allowlist entry for epoll (#9742) 2023-02-17 01:55:31 +02:00
Avasam
140bba3425 Add comments when subclassing Any (#9732) 2023-02-14 14:11:56 +01:00
Alex Waygood
60789273a2 Improve pyright verification of third-party test cases in CI (#9650)
Co-authored-by: Avasam <samuel.06@hotmail.com>
2023-02-07 11:53:54 +00:00
Alex Waygood
0ef9c3f8e8 Enable flake8-pyi's Y037 (#9686) 2023-02-06 19:01:02 -08:00
Alex Waygood
efee70abfa Bump mypy to 1.0 (#9684) 2023-02-06 15:57:17 -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
9e71de0421 Improve several stdlib setdefault methods (#9612) 2023-01-31 15:39:24 -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
6011cac0cc Stdlib: fix three trivial issues with parameter defaults (#9618) 2023-01-29 21:40:56 -08:00
Alex Waygood
dd3aedd133 Correct str.maketrans and collections.UserString.maketrans (#9611) 2023-01-29 11:45:08 -08:00
Alex Waygood
25e02db42c Fix typo in parse_metadata.read_stubtest_settings (#9605)
Fixes #9603
2023-01-29 00:40:42 +00:00
Alex Waygood
c216b74e39 Centralize METADATA.toml parsing in the test suite (#9534) 2023-01-28 15:13:46 +00:00
Alex Waygood
a4e3cfefac Improve pre-commit config (#9563)
- Add a few more hooks. These are all very fast, and I've found them useful in other projects:
  - Autofixes:
    - `trailing-whitespace`: fixes trailing whitespace
    - `requirements-txt-fixer`: alphabetises items in `requirements.txt` files
    - `end-of-file-fixer`: makes sure every file ends with a single newline character
    - `mixed-line-ending`: Makes sure Windows users don't accidentally introduce CRLF line endings into a file that uses LF line endings
  - None-autofixes:
    - `check-yaml`: loads YAML files to validate syntax
    - `check-toml`: loads TOML files to validate syntax
    - `check-merge-conflict`: detects merge-conflict strings in files and blocks them from accidentally being committed
    - `check-case-conflict`: checks for files with names that would conflict on a case-insensitive filesystem like MacOS HFS+ or Windows FAT; blocks them from being committed.
  - Change the bot schedule to quarterly, to reduce noisy PRs
  - Change the `black` language target-version to Python 3.10, synching the setting here with the changes that were made to our `pyproject.toml` file in #7538
2023-01-18 06:29:18 -08:00
Jelle Zijlstra
aa4d6d87ae asyncio: fix default for subprocess_exec (#9561) 2023-01-18 15:03:22 +01:00
Avasam
c70d303985 Audit stdlib object annotations (#9519) 2023-01-17 15:40:00 +00:00
Alex Waygood
3d6b8dccfe mypy_test.py: Try using a process pool instead of a thread pool (#9556) 2023-01-17 14:17:45 +00:00
Alex Waygood
597e1a0078 Bump various test dependencies (#9549) 2023-01-16 11:04:45 -08:00
Avasam
0e36622c72 Resolve stubtest allowlist entries for ldap3 (#9532) 2023-01-14 18:11:17 +00:00
Avasam
1a9aa3f3fe Update various comments now non-types dependencies are allowed (#9527) 2023-01-14 13:20:04 +00:00
Alex Waygood
00d663e109 third_party_stubtest: use MYPYPATH for internal dependencies (#9512) 2023-01-12 13:13:42 -08:00
Jelle Zijlstra
b43e1db47b ssl, sysconfig: fix issues with defaults (#9507)
- ssl._create_unverified_context allows None since 3.10:
  2875c603b2 (diff-f6439be9c66350dde4c35dbeea0352c96cc970ba12b0478f6ae36f10725bd8c5)
- sysconfig.is_python_build ignores its argument since 3.11:
  067597522a
  (was backported into 3.11)
2023-01-12 10:19:41 -08:00
Alex Waygood
0b903441e8 Allow stubs to depend on numpy (#9499) 2023-01-12 09:01:23 +00:00
Alex Waygood
ab1921a737 Teach isort that imports from utils are first-party imports (#9500) 2023-01-11 17:25:32 +01:00
Rebecca Chen
622a96b1de pytype_test: Mark typeshed-external dependencies as missing. (#9486)
Co-authored-by: Avasam <samuel.06@hotmail.com>
2023-01-10 22:00:43 +00:00
Alex Waygood
9aa3d99ac2 mypy_test.py: Add more comments (#9477)
Some fairly subtle logic was added in #9408, and I'm immediately regretting not having documented it slightly better. This PR adds some more comments to make maintaining this code easier in the future.
2023-01-08 12:26:11 -08:00