Shantanu
a24ce3f935
dis: update for py311 ( #7649 )
2022-04-17 20:40:39 +03:00
Shantanu
b562089d13
ast: add TryStar in py311 ( #7646 )
...
Co-authored-by: hauntsaninja <>
2022-04-16 22:13:21 -07:00
Shantanu
556fe3e4ef
weakref: use positional-only args ( #7653 )
...
Co-authored-by: hauntsaninja <>
2022-04-16 22:10:39 -07:00
Shantanu
435f758019
sqlite3: add py311 constants ( #7654 )
...
bpo-24139
2022-04-16 22:08:42 -07:00
Alex Waygood
7ce4607dee
Upgrade flake8-pyi to 22.4.0, enable Y026 in .flake8 config ( #7650 )
2022-04-17 01:23:35 +01:00
Shantanu
145a85307a
random: update for py311 (#7651 )
2022-04-17 01:01:36 +01:00
Shantanu
520f807b5f
builtins: default values for int.(to|from)_bytes in py311 ( #7647 )
...
See https://github.com/python/cpython/issues/89318
2022-04-17 00:57:13 +01:00
Shantanu
c93f92d92e
builtins: add BaseExceptionGroup.__class_getitem__ ( #7648 )
2022-04-17 00:48:46 +01:00
Jelle Zijlstra
bedf520d76
typing(_extensions) updates for 3.11 ( #7643 )
2022-04-16 21:42:12 +02:00
Sebastian Rittau
499e74cf2a
Add wsgiref.types (Python 3.11+) ( #7644 )
...
_typeshed.wsgi: Import from wsgiref.types in Python 3.11+
Make types match wsgiref.types
2022-04-16 21:36:31 +02:00
Jelle Zijlstra
b0611bc031
Improve sqlite3 types ( #7641 )
...
Read through the code in CPython and made the types more precise
where possible.
Co-authored-by: Sebastian Rittau <srittau@rittau.biz >
2022-04-16 11:20:11 -07:00
Alex Waygood
2e98c8284c
Move code from decimal.pyi to _decimal.pyi ( #7640 )
...
* Move code from `decimal.pyi` to `_decimal.pyi`
The stub previously did `from decimal import *` in `_decimal.pyi`, but the opposite happens at runtime.
2022-04-16 17:01:13 +01:00
Sebastian Rittau
7a3eb5a481
Use tuple instead of _typing.Tuple in ast ( #7639 )
2022-04-16 16:15:42 +01:00
Alex Waygood
819900fa55
Python 3 stubs: use str instead of typing.Text ( #7638 )
2022-04-16 15:47:00 +01:00
Jelle Zijlstra
d802e65f67
sqlite3: add 3.11 additions ( #7625 )
...
- Blob from python/cpython#30680 (and anticipating that python/cpython#91550 will be merged)
- Aggregate window functions from python/cpython#20903
- Serialize/deserialize from python/cpython#26728
- Limit setting from python/cpython#28463
2022-04-16 16:09:26 +02:00
Sebastian Rittau
182fa6321c
Update gettext translations ( #7636 )
...
* Use a protocol instead of `IO` for `fp` argument.
* Annotate a few missing return types.
* Mark some class constants as final.
Fixes #7628
2022-04-16 07:07:15 -07:00
Alex Waygood
653f2c6ba4
Third-party stubs: import from collections.abc where possible ( #7637 )
2022-04-16 14:52:57 +01:00
Jelle Zijlstra
ee09d9eb19
builtins: Audit bytes arguments ( #7631 )
...
Most use the C buffer protocol, so _typeshed.ReadableBuffer is the right type. A few
check specifically for bytes and bytearray.
2022-04-16 14:16:11 +02:00
Alex Waygood
66bea8ca48
Use imports instead of TypeAliases in a couple places ( #7634 )
...
Fixes #7632
2022-04-16 01:38:59 -07:00
Alex Waygood
740193a8fc
Use TypeAlias where possible for type aliases ( #7630 )
2022-04-15 18:01:00 -07:00
Alex Waygood
c0e6dd3f3f
Use str instead of typing.Text ( #7629 )
2022-04-16 00:47:42 +02:00
Jelle Zijlstra
d09689f811
Add typing_extensions.assert_type ( #7627 )
...
Hasn't been released yet but I'd like it to be in the next mypy release.
2022-04-15 15:17:37 -07:00
Jelle Zijlstra
e0654bdbc0
ExceptionGroup: make it generic ( #7626 )
2022-04-15 16:24:17 +02:00
till
7f9be7fd00
Update linecache.pyi ( #7623 )
...
The `mtime` in linecache entries can be set to `None` for files loaded via a `__loader__` (cf: https://github.com/python/cpython/blob/3.10/Lib/linecache.py#L70 )
2022-04-14 17:25:25 +01:00
Alex Waygood
40985b4f02
Fix various __all__ bugs and omissions ( #7618 )
2022-04-14 08:03:19 -07: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
Jukka Lehtosalo
ce88976c0d
Add back six.moves.http_cookies.Morsel ( #7617 )
2022-04-13 16:52:29 +02:00
Jukka Lehtosalo
483550abe0
Drop some literal types from argparse (add_argument) ( #7614 )
...
These were introduced in #7329 and they cause false positives
in code that used to be accepted before.
2022-04-13 14:01:54 +02:00
Jukka Lehtosalo
f888995239
Add back six.moves.configparser.Error ( #7616 )
2022-04-13 14:01:03 +02:00
matt-slack
6573761324
Add stubs for Python-Jose ( #7613 )
2022-04-12 19:08:23 +02:00
Jukka Lehtosalo
75bcb07d06
Add missing definitions to six.moves.http_client ( #7615 )
...
These were removed as a side-effect of #7327 , which added
`__all__` to `http.client`. I checked that all the definitions
are present at runtime via `six.moves.http_client`.
2022-04-12 06:51:02 -07:00
Sebastian Rittau
636a7e8b37
Update bleach stubs to version 5 ( #7612 )
2022-04-11 17:48:55 -07:00
Akuli
40553277ad
asyncio: use WriteTransport in StreamWriter ( #7611 )
2022-04-09 07:03:34 -07:00
kasium
354787f6e0
Add stubs for stdlib-list ( #7608 )
2022-04-08 13:05:48 -07:00
Rebecca Chen
f1856a384e
pytype_test: Don't mix up stdlib and stub packages starting with stdlib. ( #7609 )
...
This should fix the pytype_test failure in
https://github.com/python/typeshed/pull/7608 .
2022-04-08 13:01:37 -07:00
Bao
79c654ef43
psycopg2: correct return type ( #7607 )
...
Fixes the return type of `psycopg2.cursor.fetchone()` to match the psycopg2 code:
1d3a89a0bb/psycopg/cursor_type.c (L647-L651)
1d3a89a0bb/psycopg/cursor_type.c (L748-L786)
It also matches the [psycopg2 documentation](https://www.psycopg.org/docs/cursor.html?highlight=copy_from#cursor.fetchone ) as well as the [DB-API](https://peps.python.org/pep-0249/#fetchone )
2022-04-07 15:36:26 -07:00
Will Frey
17b2f31b8c
Use ReadableBuffer instead of bytes in base64.pyi ( #7605 )
2022-04-07 19:47:04 +02:00
hasier
21171f1cb9
SQLAlchemy improvements for Operators ( #7604 )
2022-04-07 19:45:27 +02:00
hasier
754f421990
SQLAlchemy improvements for generative methods ( #7603 )
2022-04-07 13:06:46 +02:00
Sebastian Rittau
ef819f3910
Remove pre-Python 3.6 branches from datetime.pyi ( #7602 )
2022-04-07 11:33:45 +02:00
Alex Waygood
536f783a82
Exclude Y037 in .flake8 config, for now ( #7600 )
...
Unblocks https://github.com/PyCQA/flake8-pyi/pull/202
2022-04-06 17:24:02 +01:00
Hans Aarne Liblik
71d80efa43
Update pyVmomi stubs ( #7599 )
...
* Add generic base class `DynamicData`
* Add missing `key` prop to `OptionValue`
* Fix `MethodFault` not inheriting from `Exception`
* Fix `RetrieveOptions` default `maxObjects` type and default
2022-04-06 14:58:23 +02:00
Alex Waygood
3c85f36b7f
Reduce code duplication in the email module ( #7558 )
2022-04-06 12:20:14 +02:00
Alex Waygood
1ceb486b75
Replace Union with union operator ( #7596 )
2022-04-05 23:07:31 +02:00
Marko Zagožen
8ae678129e
Use Self return type for the 'replace()' methods in datetime classes ( #7595 )
2022-04-05 22:20:31 +02:00
Sebastian Rittau
3941e959ca
Update google-cloud-ndb stubs to 1.11 ( #7593 )
2022-04-05 06:58:02 -07:00
Alex Waygood
85aec034ae
Mark many attributes as read-only properties ( #7591 )
2022-04-05 08:37:24 +02:00
Alex Waygood
b8f2eb3930
Make several fields on _dummy_threading classes read-only properties ( #7588 )
2022-04-05 08:35:00 +02:00