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
Alex Waygood
910397c714
mypy_test.py: Simplify add_third_party_files() (#9476 )
2023-01-08 12:25:06 -08:00
Alex Waygood
4d6fda99f0
mypy_test.py: Allow non-types dependencies (#9408 )
...
The approach is pretty similar to the approach I took in #9382 for regr_test.py: dynamically create virtual environments for testing stubs packages in isolation. However, since mypy_test.py tests all of typeshed's stubs in succession (and since lots of typeshed's stubs packages depend on other typeshed stubs packages), the performance issues with creating a virtual environment for testing each stubs package are even more severe than with regr_test.py.
I mitigate the performance issues associated with dynamically creating virtual environments in two ways:
- Dynamically creating venvs is mostly slow due to I/O bottlenecks. Creating the virtual environments can be sped up dramatically by creating them concurrently in a threadpool. The same goes for pip installing the requirements into the venvs -- though unfortunately, we have to use pip with --no-cache-dir, as the pip cache gets easily corrupted if you try to do concurrent reads and writes to the pip cache.
- If types-pycocotools requires numpy>=1 and types-D3DShot also requires numpy>=1 (for example), there's no need to create 2 virtual environments. The same requirements have been specified, so they can share a virtual environment between them. This means we don't have to create nearly so many virtual environments.
2023-01-07 23:57:49 +00:00
Avasam
70025c3723
Support third-party stub external dependencies in pytype ( #9449 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-01-04 19:32:23 +00:00
Avasam
3e24c65c3b
Rework how pyright is run in CI to allow for non-types dependencies( #9434 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2023-01-03 22:43:56 +00:00
Avasam
7c15e6998f
Autoformat YAML files ( #9450 )
2023-01-03 08:55:06 +01:00
Avasam
0edcfa13ad
Add syntax highlight to all shell code blocks ( #9445 )
2023-01-02 23:55:25 +00:00
Alex Waygood
a7f1d3c08d
Improve mypy flags for regr_test.py and typecheck_typeshed.py ( #9441 )
...
- Remove redundant flags that are now enabled by default
- Add `--pretty` to `typecheck_typeshed.py`
2023-01-02 12:01:44 +00:00
Avasam
46f0d918ef
A more accurate termcolor.colored fallback ( #9435 )
2022-12-31 22:52:26 +00:00
hamdanal
6c32486971
pytype_test.py: fix f-string missing “f” (#9430 )
2022-12-31 10:07:02 +00:00
Alex Waygood
fd3e64ac3e
regr_test.py: Fix out-of-date comment (#9419 )
2022-12-27 17:26:48 +00:00
Alex Waygood
8671fc5c0f
regr_test.py: Allow non-types dependencies (#9382 )
2022-12-23 13:55:54 -08:00
Alex Waygood
352f496d69
Unpin stubtest from Python 3.10.8 and 3.11.0 ( #9368 )
2022-12-20 20:31:13 +00:00
hamdanal
3592dba338
Stubtest_third_party.py: better error message if ensurepip isn't available
2022-12-18 12:05:31 +00:00
Alex Waygood
c78bc57f78
shutil.rmtree: add avoids_symlink_attacks attribute ( #9366 )
2022-12-15 09:56:58 +00:00
Jelle Zijlstra
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
Ilya Konstantinov
578cebe1c5
protobuf: Annotate well_known_types.pyi (#9323 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-12-05 18:49:55 +00:00
Avasam
c6b9b4ce85
Stricter settings in mypy_test ( #9294 )
2022-12-02 18:55:55 +00:00
Nikita Sobolev
bc1da6a748
Remove unused code from pytype_test.py ( #9317 )
2022-12-02 18:33:24 +00:00
Avasam
5c3f10e1df
Deduplicate pinned pyright version ( #9299 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-11-30 08:52:55 +00:00
Nikita Sobolev
7806607df9
Improve error message of Unrecognised platforms specified ( #9283 )
2022-11-26 14:46:43 +01:00
Avasam
087917f2b8
Space out pytype errors ( #9281 )
2022-11-26 01:32:08 +01:00
Alex Waygood
95c74ba7e1
Minor improvements to tests/regr_test.py ( #9274 )
2022-11-25 15:03:20 +00:00
github-actions[bot]
5453c97753
Bump protobuf to 4.21.*; delete google/__init__.pyi ( #8360 )
...
This major version bump of the stubs package deletes google/__init__.py, which does not exist at runtime, and caused problems for several users. Mypy now has --namespace-packages enabled by default, which should hopefully mean that this causes minimal pain.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-11-25 11:28:56 +00:00
Nikita Sobolev
bdf036d516
check_consistent.py: Add check ensuring packages are not installed for unspecified platforms ( #9265 )
2022-11-25 10:11:59 +00:00
Avasam
7050c1d907
Add support for Homebrew and Chocolatey ( #9187 )
2022-11-24 07:17:17 +00:00
Alex Waygood
01e78c7e81
Use modern syntax in test-case files where possible ( #9261 )
2022-11-23 11:58:11 -08:00
Sebastian Rittau
02942b710c
Support "stub_distribution" and "upload" metadata fields ( #9256 )
2022-11-23 13:05:13 +01:00
Nikita Sobolev
bd75ceb0b6
Fix stdlib stubtest failures on main ( #9255 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-11-23 10:07:05 +00:00
Alex Waygood
4588dd6c74
check_consistent.py: Allow having weird filenames in the test_cases directory (#9239 )
2022-11-21 17:40:11 +00:00
Alex Waygood
1f8491d23d
Allow adding test cases testing version-dependent Python features ( #9238 )
2022-11-21 08:03:28 -08:00
Alex Waygood
3fec65927c
check_consistent.py: Add a check guarding against typos for the new platforms key (#9203 )
2022-11-15 16:23:22 +00:00
Avasam
72d1597de2
stubtest_third_party.py: Allow running non-listed platforms locally ( #9173 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-11-15 01:39:57 +00:00
Nikita Sobolev
9cd9f6f6e0
Add the ability to run third-party stubtest on Windows or MacOS when needed ( #8923 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2022-11-11 13:40:50 +00:00
Alex Waygood
cc7ac01a3e
Stubtest: Don't allowlist termios and posix constants on Windows ( #9150 )
2022-11-10 07:02:53 -08:00
Nikita Sobolev
805519717b
regr_test.py: fix typo in --help (#9147 )
...
It used to be:
```
-p [{3.11,3.10,3.9,3.8,3.7} ...], --python-version [{3.11,3.10,3.9,3.8,3.7} ...]
Run mypy for certain Python versions (defaults to
sys.version_info[:2])Note that this cannot be specified if
--all is also specified.
```
2022-11-10 13:32:22 +00:00
Samuel T
796bdc2eb0
Improve accuracy of six byte index methods ( #9117 )
2022-11-09 19:22:33 -08:00
Alex Waygood
4f381af4c5
Upgrade mypy to 0.990 ( #9123 )
2022-11-07 11:20:47 -08:00
Nikita Sobolev
86f9d93003
Update pyright to 1.1.278 ( #9077 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-11-03 15:32:10 +00:00
Jelle Zijlstra
6b702452b6
http: improve types ( #9055 )
2022-11-03 09:55:56 +01:00
Jelle Zijlstra
3d8d744eb4
ctypes: improve bytes handling ( #9029 )
2022-10-31 15:26:09 +01:00
Nikita Sobolev
fd75bc21fc
Use 3.11 instead of 3.11-dev ( #8983 )
2022-10-26 15:52:24 +02:00
Sebastian Rittau
b2d6d3c935
Update distutils stubtest allowlists for Python 3.11 release ( #8985 )
...
Closes : #8984
2022-10-26 00:18:09 +02:00