Commit Graph

184 Commits

Author SHA1 Message Date
Jelle Zijlstra
5477097c6d Upgrade pyright (#8541) 2022-08-12 20:24:51 -07:00
Alex Waygood
1ec57121e3 Unpin stubtest from 3.10.5 (#8523) 2022-08-12 10:01:26 +02:00
Alex Waygood
c68bcc7e69 Temporarily pin stubtest to 3.10.5 (#8511) 2022-08-09 13:55:00 +02:00
Alex Waygood
eca5549ee1 CI: Use macos-latest for stubtest (#8353) 2022-07-21 16:52:41 +02:00
Shantanu
936314b979 Add stubsabot Github Action (#8303) 2022-07-17 13:21:51 -07:00
Shantanu
5ef20e8021 Use packaging to parse versions (#8314)
packaging is the standard tool for dealing with versions and
requirements. This allows us to easily support all PEP 508 specs.
packaging also has good error messages, so I don't create our own here.
This lets us get rid of our handrolled half parser and sanity checks.
I kept the whitespace consistency check, since that's just a formatting
lint and isn't testing the correctness of parsing (which we now
definitely do correctly).
2022-07-17 12:35:32 -07:00
Alex Waygood
78d96cd17e Drop support for Python 2 (#8272) 2022-07-12 09:08:56 +02:00
Sebastian Rittau
9a5c865034 Drop support for Python 3.6, part 1 (#8250)
* Document that typeshed support 3.7+.
* Don't run tests on Python 3.6.
* Remove Python 3.6 allow lists.
* Merge common allowlist items.

Part of #6189
2022-07-07 14:42:02 +02:00
Jon Dufresne
0570cd9f9c Update GitHub actions to their latest versions (#8160)
The actions/setup-python now always requires a version specified.
2022-06-26 11:36:15 +02:00
Alex Waygood
bae4fd2209 Upgrade pyright (#8110) 2022-06-20 17:07:43 +01:00
Alex Waygood
6b0c8df9ec Upgrade pyright, improve pyright config files (#8072) 2022-06-16 18:50:50 +01:00
Shantanu
bf68214245 mypy_primer: report lines truncated (#7993)
Co-authored-by: hauntsaninja <>
2022-05-30 17:04:34 -07:00
Alex Waygood
ac9efd8573 stubtest_stdlib: run on PRs updating requirements-tests.txt (#7949) 2022-05-25 15:29:05 +02:00
Sebastian Rittau
a412ddb437 Update pyright (#7914)
Required for #7865
2022-05-21 19:15:06 +01:00
Alex Waygood
aa70cc8abb CI: Don't install tomli for stubtest_stdlib (#7901)
The script doesn't import tomli
2022-05-20 19:33:06 -07:00
Alex Waygood
d54d018e2d CI: Fix stubtest workflow; make paths for other workflows more specific (#7897) 2022-05-20 16:37:02 +01:00
Alex Waygood
e2cf6c21d5 CI: Don't run stubtest_stdlib on PRs that don't touch the stdlib (#7895)
* Don't run stubtest_stdlib on PRs that don't touch the stdlib
2022-05-20 15:56:29 +01:00
Sebastian Rittau
adf48f1f96 Only run CI on pushes to main/master and pull requests (#7883)
Currently, when a maintainer opens a pull request from a branch in the
typeshed repository (instead of a fork), CI is run twice: once for the
PR and once for the push. This not only wastes CI minutes (and it seems
we're running into some limits lately), but also makes CI output twice
as large and more difficult to process.

The disadvantage is that a PR needs to be opened to run CI.
Alternatively, CI can be triggered manually.
2022-05-20 14:14:25 +02:00
Alex Waygood
44d33f2fdb Add colour to the output of mypy_test, take 2 (#7879)
Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
2022-05-19 13:29:15 +01:00
Alex Waygood
a348dac6e7 Revert "Add colour to the output of mypy_test" (#7874)
Revert "Add colour to the output of `mypy_test` (#7872)"

This reverts commit 753eb053ac.
2022-05-18 17:13:06 -07:00
Alex Waygood
753eb053ac Add colour to the output of mypy_test (#7872)
And gracefully exit on KeyboardInterrupt.
2022-05-19 00:36:59 +01:00
Sebastian Rittau
3aaa1d0ada Upgrade pyright to 1.1.247 (#7867) 2022-05-18 19:56:19 +01:00
Sebastian Rittau
b65ef3a722 Make third party stubtest output more succinct (#7853)
stubtest_third_party.py will now only print a single line when the test
succeeds for a certain distribution, unless the "-v" option is given.
When the test fails or "-v" is given, will still print the full output.

The success status is now colored to make spotting failures easier.

stdout/stderr is now used consistently: The distribution name and
success status is always printed to stdout, all other output goes to
stderr. Running the script with "2>/dev/null" will only show the success
status of the test, one per line.
2022-05-17 16:10:58 -07:00
Alex Waygood
eadb35e620 Don't run mypy_primer on changes to test files (#7854)
Only changes to files in `stdlib` or `stubs` will ever have any effect on the checked open-source code. But also run primer on changes to files in `.github/workflows` so that we can see the effect of changes to the `mypy_primer.yml` file itself.
2022-05-17 14:03:58 +01:00
Shantanu
b445bb8856 stubtest: test against 3.11 (#7845) 2022-05-16 19:50:30 -07:00
Akuli
6c6c669ada Run mypy_primer in all pull requests (#7804) 2022-05-07 09:58:53 +03:00
Alex Waygood
c6b3211afa Improve test-suite documentation (#7756)
- mypy_test and pyright no longer just test the stubs, they now also test other parts of typeshed as well.
- pytype_test.py can now be run on 3.10, meaning the whole test suite can now also be run on 3.10.
- Various test scripts now have from `__future__ import annotations`, meaning they can now only be run on 3.7+.
- Clean up the description of pyright_test.py, which had a slightly confusing wording.
- Also fix the `--dry-run` config option in mypy_test.py, which I accidentally broke in #7746
2022-04-30 12:43:48 -06:00
Sebastian Rittau
fa701ab0ee Run apt-get update before installing packages (#7749)
Fixes #7743
2022-04-30 06:42:23 -06:00
Sebastian Rittau
02310d93da Update pyright to 1.1.240 (#7701) 2022-04-27 15:02:30 +02:00
Sebastian Rittau
54c8f45869 pytype now supports Python 3.10 (#7700) 2022-04-27 10:59:34 +02:00
Jelle Zijlstra
a17b3afb16 Run pytype test with --print-stderr (#7656) 2022-04-18 10:57:48 +03:00
Akuli
f87e811345 Remove old comments about pinned Python versions (#7622) 2022-04-14 00:58:47 -07:00
Shantanu
e90a551ceb Unpin Python micro versions (#7621)
Fixes #7620
2022-04-13 18:47:17 -07:00
Alex Waygood
a1b1b95f67 Unpin Python micro versions used by stubtest (#7619)
Add new `asyncio` method, fix allowlists
2022-04-13 22:07:01 +02:00
Sebastian Rittau
41160cc294 Fix primer comment workflow (#7545) 2022-03-24 08:02:54 -07:00
Shantanu
0af746d048 mypy_primer: mention if output is truncated (#7525) 2022-03-21 23:41:31 +01:00
Alex Waygood
ec8f51726f Unpin pyright-action (#7499)
The issues that broke typeshed's CI have been fixed by e7c2cbabca
2022-03-16 16:21:05 +00:00
Alex Waygood
15e21a8dc1 Use pyright 1.1.230 in CI, temporarily pin pyright-action to 1.0.4 (#7495)
* Upgrade pyright to 1.1.230
* Add `type: ignore`s for new pyright checks regarding multiple inheritance
* Temporarily pin pyright-action to 1.0.4, as changes made in 1.0.5 break typeshed's CI

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2022-03-16 14:24:55 +00:00
Sebastian Rittau
fdc5863337 Use stubtest 0.941 (#7490) 2022-03-15 00:37:34 -07:00
Alex Waygood
2f338ce077 Further improve mypy_test.py (#7484)
* Run mypy on the 3.11 stdlib in CI, as a regression test for https://github.com/python/mypy/issues/12220
* Correct the docstring at the top of the file following the changes made in #7478
* Stop the test from crashing when run locally if there's an extra file/folder in the stubs directory.
2022-03-13 19:58:30 +00:00
Akuli
30a424c661 Finish renaming stubtest.yml to daily.yml (#7448) 2022-03-07 11:09:24 +02:00
Shantanu
6cdecae6f9 Rename Github workflow (#7445)
Calling this "stubtest.yml" is a little confusing, since most of the
time stubtest is actually run out of "tests.yml". I renamed the workflow
in #7306 and this gets the filename to match.

Co-authored-by: hauntsaninja <>
2022-03-06 15:24:18 -08:00
Shantanu
77e5a2d468 Upgrade to stubtest with dunder pos only reverted (#7442) 2022-03-05 18:38:08 -08:00
Alex Waygood
cda3d9cf72 Use latest stubtest in CI (#7438) 2022-03-04 15:19:29 +01:00
Shantanu
c2fb0fb814 Downgrade stubtest a little (#7346)
Fixes #7344 for now.

As discussed in that issue, I think it might make sense to revert the
change to check positional-only arguments on dunders for now, since it
seems to be mostly busywork and has very little benefit for end users.

However, that'll happen on stubtest master, which typeshed isn't yet
ready for.

Co-authored-by: hauntsaninja <>
2022-02-21 17:05:46 -08:00
Shantanu
075b8e02eb Update stubtest for async and dunder pos only checking (#7333)
Co-authored-by: hauntsaninja <>
2022-02-21 15:54:16 -08:00
Shantanu
823592e100 Update stubtest for final checking (#7312)
Co-authored-by: hauntsaninja <>
2022-02-19 18:53:15 -08:00
Shantanu
879b617366 Update stubtest for submodule versions, typeddict fix (#7306)
First step in #7305

Co-authored-by: hauntsaninja <>
2022-02-19 15:53:40 -08:00
Sebastian Rittau
92685d18f7 Update to Python 3.9.10 and 3.10.2 (#6977) 2022-02-11 17:37:31 -08:00
Nikita Sobolev
b0202f71eb Update actions/github-script to v5 (#7151) 2022-02-08 14:09:36 -08:00