7576805aee
zipfile: 3.11 fixes ( #7898 )
...
* zipfile: 3.11 fixes
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-05-21 09:22:32 +01:00
Alex Waygood and GitHub
aa70cc8abb
CI: Don't install tomli for stubtest_stdlib ( #7901 )
...
The script doesn't import tomli
2022-05-20 19:33:06 -07:00
Jelle Zijlstra and GitHub
585517b20e
stubtest: put all the incorrect __get__ sigs together ( #7899 )
2022-05-20 09:47:02 -07:00
Alex Waygood and GitHub
d54d018e2d
CI: Fix stubtest workflow; make paths for other workflows more specific ( #7897 )
2022-05-20 16:37:02 +01:00
Alex Waygood and GitHub
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
Jukka Lehtosalo and GitHub
cd039c9b73
Ignore mypy errors in Python 2 builtins and typing ( #7894 )
...
Similar errors are already ignored in Python 3 stubs. The
errors break Python 2 tests of mypy.
See https://github.com/python/typeshed/issues/7367#issuecomment-1131472225
for context.
2022-05-20 15:27:09 +01:00
Sebastian Rittau and GitHub
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
Jelle Zijlstra and GitHub
e7cbde0928
xml: stubtest fixes ( #7890 )
2022-05-20 13:03:45 +02:00
Jaakko Lappalainen and GitHub
611fa18b5c
Use bytes for resp param of imaplib.Internaldate2tuple ( #7892 )
2022-05-20 12:45:20 +02:00
Jelle Zijlstra and GitHub
26fa57ab78
traceback: update for py311 ( #7886 )
2022-05-19 19:14:12 -07:00
Jelle Zijlstra and GitHub
0b7df3b2aa
dataclasses: fix and sort stubtest complaints ( #7888 )
2022-05-19 19:13:22 -07:00
Jelle Zijlstra and GitHub
4220712aab
dis: add adaptive argument for 3.11 ( #7889 )
2022-05-19 18:27:34 -07:00
64766c8521
locale: add locale.getencoding ( #7887 )
...
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
2022-05-19 18:20:16 -07:00
Jelle Zijlstra and GitHub
1ffb1bdc0e
wsgiref: categorise stubtest issues ( #7885 )
2022-05-19 18:10:56 -07:00
Alex Waygood and GitHub
dd080d9840
Upgrade flake8-pyi to 22.5.1 ( #7882 )
2022-05-19 19:59:25 +02:00
Alex Waygood and GitHub
aa72cb1dcf
Run pyupgrade on the tests directory ( #7880 )
2022-05-19 14:16:53 +01:00
Jelle Zijlstra and GitHub
6f2c53f3b0
_imp: fix stubtest issues, add Python 3.11 items ( #7878 )
2022-05-19 14:43:58 +02:00
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
Jelle Zijlstra and GitHub
250f3d92e7
ast: fix stubtest issues ( #7877 )
...
Add annotations for `_ast.Tuple.dims` and `ast.main()`. Add allowlist comments for others.
2022-05-19 10:13:08 +01:00
Atsu Kakitani and GitHub
d389b5f9cb
Import SQLAlchemy types in Flask-SQLAlchemy ( #7861 )
2022-05-19 08:19:49 +02:00
Jelle Zijlstra and GitHub
4191906e6e
3.11: move some stubtest entries to wontfix list ( #7876 )
2022-05-19 08:14:44 +02:00
L and GitHub
4a08afcbc2
markdown: Annotate parseBoolValue() ( #7875 )
2022-05-18 20:20:23 -07:00
Mehdi ABAAKOUK and GitHub
f6c1383cae
reds: commands from asyncio module must be async ( #7820 )
...
redis-py has introduced an asyncio module since 4.2 and almost all
commands should be async if the redis.asyncio.Redis is used instead of
redis.Redis.
This changes adds the types for all core commands.
Related to #7597
2022-05-18 19:50:01 -07:00
Alex Waygood and GitHub
04dde4d000
enum: More changes for 3.11 (#7862 )
2022-05-18 19:35:22 -07:00
Akuli and GitHub
9a09db46f5
Fix requests.Session().hooks ( #7871 )
...
Fixes #7776
Mutating hooks, as in `session.hooks['response'] = ...`, should work. Reassigning it like `session.hooks = ...` is probably a bad idea, so it will always be a `dict`.
2022-05-18 19:31:34 -07:00
Alex Waygood and GitHub
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 and GitHub
753eb053ac
Add colour to the output of mypy_test ( #7872 )
...
And gracefully exit on KeyboardInterrupt.
2022-05-19 00:36:59 +01:00
Winston Chang and GitHub
6653be1511
Add overloads for asyncio.sleep() ( #7873 )
...
Closes #7866 . This adds an overload to `asyncio.sleep()`, so that when it is called _without_ `return=None`, the type checker knows that the return type is `None` instead of `unknown`.
Also related to https://github.com/microsoft/pyright/issues/3475 .
2022-05-18 16:19:45 -07:00
Eitan Mosenkis and GitHub
f2f72d6c52
Add return type for dateutil.rrule._rrulestr.__call__. ( #7868 )
2022-05-18 22:57:38 +01:00
Sebastian Rittau and GitHub
3aaa1d0ada
Upgrade pyright to 1.1.247 ( #7867 )
2022-05-18 19:56:19 +01:00
Sebastian Rittau and GitHub
7ca82d5fb4
stubtest third party: remove extra line when skipping a distribution ( #7864 )
2022-05-18 20:15:55 +02:00
Alex Waygood and GitHub
a98a1ead06
Improve output of mypy_test when reporting errors ( #7863 )
2022-05-18 19:10:54 +01:00
Jelle Zijlstra and GitHub
7998906226
re: 3.11 fixes ( #7859 )
2022-05-17 21:42:23 -07:00
Jelle Zijlstra and GitHub
bd394d2486
builtins: add BaseException.add_note in py311 ( #7860 )
2022-05-17 20:32:28 -07:00
Jelle Zijlstra and GitHub
a01f98c361
sqlite3.Blob: fix stubtest errors ( #7858 )
2022-05-17 19:50:19 -07:00
8f5a83516b
tempfile.SpooledTemporaryFile: inherit from IOBase on 3.11 ( #7802 )
...
python/cpython#29560
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-05-17 18:41:47 -07:00
eab82c838a
asyncio: updates for 3.11 ( #7844 )
...
CPython changes:
- https://github.com/python/cpython/commit/13c10bfb777483c7b02877aab029345a056b809c
- https://github.com/python/cpython/commit/9523c0d84f351a610dc651b234461eb015fa3b82
- https://github.com/python/cpython/commit/9f04ee569cebb8b4c6f04bea95d91a19c5403806
- https://github.com/python/cpython/commit/d03acd7270d66ddb8e987f9743405147ecc15087
- https://github.com/python/cpython/commit/195a46d6ffd4cec6c5fb69c5890f8b1758ac91ca
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com >
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com >
2022-05-17 18:11:29 -07:00
L and GitHub
ada3615a24
markdown: Annotate code_escape(). ( #7857 )
2022-05-17 17:54:25 -07:00
Sebastian Rittau and GitHub
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
Carl Meyer and GitHub
7ca8303672
CodeType.co_linetable is of type bytes ( #7856 )
...
Although the specific format of the bytes is opaque and undocumented, the fact that it will be bytes is stable.
This is necessary in order for type checkers to allow creating one code object from another, since the `lnotab`
positional argument to `__init__` is typed as bytes.
2022-05-17 11:49:12 -07:00
171ea08f0d
Add __class_getitem__ to classes in logging and csv ( #7830 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2022-05-17 14:12:42 +01:00
Sebastian Rittau and GitHub
f21898abb9
Improve I/O types in socket.pyi ( #7852 )
...
* Use a protocol for socket.sendfile() "file" argument.
* Use concrete classes for socket.makefile() return types.
2022-05-17 06:11:50 -07:00
Alex Waygood and GitHub
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
Sebastian Rittau and GitHub
e1bd9c73f0
Use I/O protocols in codecs.pyi ( #7849 )
2022-05-17 15:01:57 +02:00
Sebastian Rittau and GitHub
a05ee9740d
Markdown: use I/O protocols ( #7851 )
2022-05-17 15:00:59 +02:00
L and GitHub
81be86af6e
markdown: Annotate Registry.get_index_for_name() ( #7848 )
2022-05-17 11:48:55 +02:00
cb45a4387f
stubtest: organise allowlists ( #7847 )
...
Co-authored-by: hauntsaninja <>
2022-05-16 21:29:39 -07:00
Shantanu and GitHub
b445bb8856
stubtest: test against 3.11 ( #7845 )
2022-05-16 19:50:30 -07:00
05c929d42c
stubtest_stdlib: [minor] remove unused code ( #7846 )
...
Co-authored-by: hauntsaninja <>
2022-05-16 19:40:46 -07:00
Alex Waygood and GitHub
e9526faf40
Various py311 removals ( #7836 )
2022-05-16 17:28:13 -07:00