Sebastian Rittau
6708ffae14
Add tz{utc,offset}.fromutc() ( #6360 )
2021-11-23 00:33:40 -08:00
Sebastian Rittau
4c41f5d769
Only run daily stubtest on python/typeshed repository ( #6354 )
2021-11-22 07:35:35 -08:00
Sebastian Rittau
5b668419ae
Fix MutableMapping overrides ( #6352 )
2021-11-21 07:04:40 -08:00
Sebastian Rittau and Jelle Zijlstra
a6e369906d
max() uses SupportsGreaterThanT ( #6342 )
...
Add SupportsGreaterThan and SupportsGreaterThanT
Closes : #6336
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2021-11-21 13:28:46 +01:00
Sebastian Rittau
77810277d5
Recommend to use mypy error codes if applicable ( #6305 )
2021-11-17 21:58:05 -08:00
Sebastian Rittau
ccc09aa196
Rework stubtest tests ( #6318 )
2021-11-17 21:54:13 -08:00
Sebastian Rittau
9c2be9500a
Add hilite(shebang) argument and return type ( #6316 )
2021-11-16 09:17:08 -08:00
Sebastian Rittau
1b0e268102
Improve fpdf.image_parsing ( #6313 )
...
* Annotate more attributes, arguments, and return types.
* Add "dims" argument to get_img_info(), added in 2.4.6.
2021-11-16 17:35:08 +01:00
Sebastian Rittau
bcc743dd2b
mypy_test: Skip files starting with '.' ( #6306 )
2021-11-16 17:00:39 +02:00
Sebastian Rittau
edf82e8094
Clean up mypy flags ( #6308 )
...
* Remove --strict-optional: This has been the default since mypy 0.600.
* Remove --disallow-subclassing-any: When we subclass Any in typeshed,
we do so deliberately. This just causes us to add unncessary ignores.
2021-11-16 12:58:53 +00:00
Sebastian Rittau
5bd747570d
Update Python version for pytype ( #6288 )
2021-11-12 22:26:22 +01:00
Sebastian Rittau
f2551376ae
Add stubs for fpdf2 ( #6252 )
2021-11-10 19:06:26 +02:00
Sebastian Rittau
2679ed1c07
Add some kwonly arguments to Session.send() ( #6266 )
...
Bump version to 2.26
2021-11-09 17:23:48 -08:00
Sebastian Rittau
e22b63d9cc
Reduce mypy_test output ( #6268 )
...
Only print the mypy command twice per version: Once for the stdlib and
once for the stubs. Use a dummy /tmp path. Add a header for each tested
Python version and remove the Python version from the individual stubs.
2021-11-09 18:03:29 +01:00
Sebastian Rittau
b26fada4b9
Remove our custom code of conduct link ( #6258 )
...
By removing this, the code of conduct from the Python organization
(https://github.com/python/.github/blob/master/CODE_OF_CONDUCT.md )
should be picked up.
2021-11-08 09:47:19 -08:00
Sebastian Rittau
f4ad8f06b0
Update httplib version to 0.20.* ( #6256 )
2021-11-08 14:47:01 +02:00
Sebastian Rittau
3876587a65
Remove support for mypy_exclude_list ( #6230 )
2021-11-08 10:45:46 +02:00
Sebastian Rittau
50c1f2ab7c
Test third-party stubs in isolation ( #6229 )
2021-11-07 15:05:49 -08:00
Sebastian Rittau
c846c35d50
Process.status returns a status string ( #6245 )
...
Typed STATUS_* constants using Literal
2021-11-07 15:04:27 -08:00
Sebastian Rittau
0958692028
Suppress unnecessary traceback ( #6253 )
2021-11-07 07:35:31 -08:00
Sebastian Rittau
ce94db762c
Update pytype and pyright ( #6222 )
...
* Upgrade pytype
* Update pyright
2021-11-02 09:19:07 -07:00
Sebastian Rittau
b3f29b619b
Remove unnecessary _Collection alias ( #6188 )
...
This was a remnant of Python 3.5 compatibility, where Collection did not
exists and _Collection was aliased to a dummy class.
2021-10-22 12:32:35 -07:00
Sebastian Rittau
4e592ada7b
Upgrade PyYAML to version 6 ( #6183 )
...
* Fix load_all() argument
* Remove Python 2 remnants
+ Replace Text with str
+ Replace alias "_Str" with str
+ Import from collections.abc and re where applicable
+ Remove Python 2 branches
* Fix PyYaml allowlist entries
+ Add yaml._yaml and move CParser and CEmitter there.
+ Add missing functions, classes, and arguments.
* Use relative imports in some modules.
* Add __all__ to yaml.cyaml.
* Remove unnecessary noqa markers.
2021-10-22 20:05:58 +02:00
Sebastian Rittau
eab7adad62
Upgrade all packages ( #6160 )
2021-10-13 20:11:38 +03:00
Sebastian Rittau and Akuli
bb24e77404
Update remaining versions for third-party stubs ( #6094 )
...
Also remove the python2 markers of packages that don't list Python 2
as supported in the latest version.
Don't special case version '0.1'
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-10-12 12:30:45 +02:00
Sebastian Rittau
9f86972350
Add star to all non-0.1 versions ( #6146 )
2021-10-11 13:41:19 -07:00
Sebastian Rittau and Akuli
46fc031ee7
Allow third-party versions to end in asterisk ( #6129 )
...
This is a first step towards #6095 , where x.y and x.y.* are treated as
equivalent. The next step is to update existing versions to use x.y.*
where applicable and then treat x.y differently.
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-10-11 00:46:18 +02:00
Sebastian Rittau
ad7d478a8f
Use release version of Python 3.10 ( #6116 )
2021-10-05 15:49:51 +03:00
Sebastian Rittau and Akuli
32bc2161a1
Unbreak CI ( #6093 )
...
* Temporarily remove `cachetools` stubs. They will be added back soon, and meanwhile they will continue to be available on pypi.
* Remove `filelock.logger()` (no longer exists in filelock 3.2)
* Delete `OpenSSL.crypto` from stubtest whitelist
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-09-30 14:18:47 +03:00
Sebastian Rittau
3128c6afbf
requests: Response.encoding can be None ( #6067 )
...
The type of the `encoding` attribute was previously typed as `str`, even though it can be `None` at runtime.
2021-09-25 11:50:36 +03:00
Sebastian Rittau
915feaceb6
maxminddb: Update version field and set obsolete_since ( #6055 )
2021-09-20 06:44:34 -07:00
Sebastian Rittau
0506182348
Allow three-component third-party versions ( #5995 )
...
Closes : #5992
2021-09-18 20:08:51 -07:00
Sebastian Rittau
d7bae50199
Update third-party package versions ( #5996 )
2021-09-18 20:08:38 -07:00
Sebastian Rittau
aa4a0c763a
Fix distribution name backports.ssl_match_hostname ( #5997 )
...
Bump version number to latest version available on pypi
Turn backports.ssl_match_hostname into a package to match upstream
2021-09-18 20:08:21 -07:00
Sebastian Rittau
db69e41fda
Add setuptools stubs ( #5762 )
2021-09-18 19:45:23 -07:00
Sebastian Rittau
ca38856670
Fix set annotations in concurrent.futures._base ( #6034 )
2021-09-14 11:50:20 +03:00
Sebastian Rittau
b562d233ae
(a)next only requires __(a)next__, not Iterator ( #6036 )
2021-09-14 11:43:21 +03:00
Sebastian Rittau
9295c70ec0
'module' argument to ForwardRef.__init__() added in Python 3.9.7 ( #6017 )
...
Pin Python 3.9.7 for stubtest and update 3.10.0 to rc2
2021-09-10 01:10:28 +02:00
Sebastian Rittau
2f3964e24b
Return ItemsView/KeysView from Mapping methods ( #6014 )
...
* Return ItemsView/KeysView from Mapping methods
* Make RawConfigParser compatible with Mapping
2021-09-09 07:37:26 -07:00
Sebastian Rittau
2620120a90
Update deprecated.sphinx.deprecated signature ( #6005 )
...
The signature was changed in Deprecated 1.2.13.
2021-09-05 19:11:27 -07:00
Sebastian Rittau
5f77310418
Update bleach version (no changes) ( #5982 )
2021-08-30 07:15:23 -07:00
Sebastian Rittau
bc19a28c0d
CI: use one runner per mypy version ( #5909 )
...
This makes it easier to see in which version(s) an error occurred.
2021-08-29 04:00:10 -07:00
Sebastian Rittau
8e0e13a2d5
Commit messages for stubs are now used as changelog ( #5950 )
2021-08-28 12:11:22 -07:00
Sebastian Rittau
f1532745bc
A few html5lib annotations ( #5913 )
2021-08-28 12:08:45 -07:00
Sebastian Rittau
27af44fee2
Deprecate geoip stubs ( #5967 )
...
Geoip comes with its own type hints starting at version 4.0.2.
2021-08-28 14:58:38 +03:00
Sebastian Rittau
5a7f25584e
Remove tornado stubs again ( #5973 )
2021-08-27 20:48:32 +02:00
Sebastian Rittau
47dd8549d2
Temporarily restore tornado stubs and add obsolete_since ( #5968 )
...
The stubs can be removed again, once a new release was built.
2021-08-27 10:00:37 -07:00
Sebastian Rittau
9b366daaec
Explain adding new third-party stubs ( #5951 )
...
Closes : #5438
2021-08-23 20:47:54 -07:00
Sebastian Rittau
db0f37ccdf
Modernize mock stubs ( #5949 )
...
* Import from `collections.abc`, instead of `typing`.
* Replace `Text` with `str`.
* Remove version checks.
* Convert mock into a package
2021-08-23 11:53:03 -07:00
Sebastian Rittau and Akuli
5f2e117bba
CONTRIBUTING: Use PEP 604 syntax ( #5925 )
...
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-08-14 20:48:40 -07:00
Sebastian Rittau
6c41e3cead
Improve six stubs ( #5908 )
...
* Update version field in METADATA.toml.
* Import from collections.abc in Python 3 stub.
* Add six.__author__.
* Annotate PY2, PY3, and PY34 as literals.
* Correctly annotate *_type and replace instances where they were used
as type aliases.
* Use new union syntax in Python 2 stub.
* Use built-in generics in Python 2 stub where possible.
* Renamed _LazyDescriptor to _LazyDescr to match implementation.
* Derive _LazyDescr from object in Python 2 stub.
2021-08-11 07:40:09 -07:00
Sebastian Rittau
30ad9e945f
Mention discussions forum ( #5901 )
2021-08-09 22:11:41 +02:00
Sebastian Rittau
978659643d
Upgrade bleach version to 4 and drop Python 2 ( #5897 )
...
bleach 4 has no API changes, but dropped support for old Python
versions.
2021-08-09 07:26:30 -07:00
Sebastian Rittau
b4385fa127
Modernize orjson stub ( #5870 )
...
* Use | instead of Union and Optional
* Import Callable from collections.abc, not typing
* Set version in METADATA
* Remove redundant "bytearray" from argument type
* Add obsolete_since metadata field
2021-08-07 08:10:03 -07:00
Sebastian Rittau
6ccf5e7d65
Upgrade pytype ( #5858 )
2021-08-06 17:27:02 +02:00
Sebastian Rittau
74c3d9a093
Modernize freezegun stubs, set version ( #5843 )
2021-08-04 15:57:12 -07:00
Sebastian Rittau
840df19501
Switch to Python 3.10.0-rc.1 in CI ( #5845 )
...
* Switch to Python 3.10.0-rc.1 in CI
* Add module argument to ForwardRef.__init__()
2021-08-04 07:14:38 -07:00
Sebastian Rittau
acc576659a
Use Python 3.10 beta 4 instead of beta 1 in CI ( #5839 )
...
Quote all Python versions to make sure they are interpreted as strings,
not floats.
2021-08-02 07:30:32 -07:00
Sebastian Rittau
eb431196fa
CI: use mypy version from requirements for primer ( #5834 )
2021-08-02 00:51:46 -07:00
Sebastian Rittau
955a3e5d9d
Remove PyJWT ( #5767 )
...
Closes : #4856
2021-07-24 14:08:20 -07:00
Sebastian Rittau
2410c4f751
Add missing items for distutils.command.* ( #5773 )
...
This was mostly generated by running stubgen. Existing annotations were
kept, but converted to use PEP 604 and PEP 585.
2021-07-24 14:04:17 -07:00
Sebastian Rittau
ad3f0c8e34
Allow non-types dependencies ( #5769 )
...
Remove the check in check_consistency that ensures that only other
type packages from typeshed are being depended on. Instead, add an
explanation to CONTRIBUTING that spells out the requirements. This
adds a higher, but reasonable burden on maintainers to check the
dependencies manually.
Part of #5768
2021-07-14 14:29:53 +02:00
Sebastian Rittau
3bb397055c
Improve distutils and lib2to3 ( #5763 )
...
Add missing elements to distutils.util:
* run_2to3()
* copydir_run_2to3()
* Mixin2to3
Use PEP 604 and PEP 585.
Add lib2to3.refactor.
2021-07-12 20:15:54 +02:00
Sebastian Rittau
7c382c7cd8
Run mypy tests for stdlib and third-party separately ( #5760 )
2021-07-12 10:09:13 +02:00
Sebastian Rittau
8d12d6f468
Use vobject stubs in caldav ( #5749 )
2021-07-09 16:57:16 +03:00
Sebastian Rittau
aca5952361
Wrap vobject.win32tz in platform check ( #5747 )
2021-07-09 11:32:57 +02:00
Sebastian Rittau
a7446632f7
Add third-party vobject stubs ( #5733 )
2021-07-08 18:26:24 -07:00
Sebastian Rittau
788b20e326
Upgrade Pillow stubs for Pillow 8.3 ( #5731 )
...
* Upgrade Pillow stubs for Pillow 8.3
* stubtest: ignore PIL._tkinter_finder
* Annotate TiffTags.py
* Pillow: stubtest and various other fixes
* Remove tkinter modules from stubtest_allowlist
2021-07-08 18:22:07 -07:00
Sebastian Rittau
1cffceb767
Add httplib2 third-party stubs ( #5713 )
2021-06-30 07:54:02 -07:00
Sebastian Rittau and Jelle Zijlstra
2b35ea5f91
Add caldav third-party stubs ( #5684 )
...
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2021-06-30 16:28:40 +02:00
Sebastian Rittau
40b127d46a
Add third-party commonmark stubs ( #5702 )
2021-06-30 07:19:43 -07:00
Sebastian Rittau
f260ea2383
Add html5lib third-party stubs ( #5701 )
2021-06-29 21:15:59 -07:00
Sebastian Rittau
2b64f54008
Support @tests/requirements-stubtest.txt files ( #5704 )
2021-06-28 19:42:27 +02:00
Sebastian Rittau
bda76bb7d8
Re-add python2 keys to METADATA temporarily ( #5686 )
2021-06-24 00:48:05 +02:00
Sebastian Rittau
dd441645ad
Make logging.StreamHandler generic over stream ( #5681 )
...
Closes #5680
2021-06-23 17:03:18 +03:00
Sebastian Rittau
816a92b8e8
Add Self type var to _typeshed ( #5677 )
...
Cf. #5676
2021-06-22 22:15:27 +02:00
Sebastian Rittau
3ec061022a
Improve logging.StreamHandler and FileHandler ( #5663 )
...
* Use PEP 604, instead of Optional.
* Override FileHandler.stream and setStream to require a TextIOWrapper
instead of a SupportsWrite object.
* FileHandler._open() now returns a TextIOWrapper instead of IO. Using
anything but a file opened in text mode would not work.
2021-06-21 22:50:49 +02:00
Sebastian Rittau
68dc2d132b
Move Python 2-only stubs to @python2 directory ( #5660 )
2021-06-21 11:28:25 -07:00
Sebastian Rittau
a319ba4604
pkg_resources is part of setuptools ( #5669 )
2021-06-21 15:19:18 +01:00
Sebastian Rittau
b1ef60c9d5
Update a few stub versions ( #5670 )
2021-06-21 07:15:00 -07:00
Sebastian Rittau
9ec2f87124
Copy args from json.loads() to requests.Response.json() ( #5664 )
2021-06-20 07:21:20 -07:00
Sebastian Rittau
67087721c5
Update mypy and black ( #5665 )
2021-06-20 07:14:56 -07:00
Sebastian Rittau and Akuli
bc2ec748f6
Move routes stubs to @python2 directory ( #5637 )
...
* Move routes stubs to @python2 directory
* Ignore Python-2-only stubs for stubtest
* Use standard idiom for re-exporting items
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-06-18 17:05:23 +03:00
Sebastian Rittau
64f463172b
bleach: Loosen attribute dict type ( #5651 )
...
Closes : #5650
2021-06-17 12:53:16 +02:00
Sebastian Rittau
a98fceca2f
Rename openssl-python to pyOpenSSL ( #5649 )
...
Remove stubtest allowlist
Set package version
2021-06-16 08:22:45 -07:00
Sebastian Rittau
4c3e3a68a6
Update bleach stubs ( #5631 )
2021-06-14 06:50:51 -07:00
Sebastian Rittau
beb6891a3b
Fix imports in paramiko ( #5606 )
2021-06-13 12:41:58 -07:00
Sebastian Rittau
d3ba8a3858
Pillow: fix errors found by stubtest ( #5629 )
...
* Update Pillow stubtest allowlist
* Update cryptography allowlist
2021-06-13 15:15:51 +03:00
Sebastian Rittau and Akuli
3368258e4a
Add distributions arg to third-party stubtest ( #5628 )
...
* Add distributions arg to third-party stubtest
Make stubtest_third_party.py executable
Co-authored-by: Akuli <akuviljanen17@gmail.com >
2021-06-13 14:53:29 +03:00
Sebastian Rittau
a3a355433d
Add missing Pillow stubs ( #5626 )
...
These were generated with stubgen and then slightly hand edited, mostly
by fixing imports and a few other bits and bobs.
2021-06-12 18:38:59 -07:00
Sebastian Rittau
f28100af19
Mark cryptography as obsolete ( #5619 )
...
Bump version to 3.3 (last version before Python 2 removal)
2021-06-12 10:51:53 +03:00
Sebastian Rittau
d143a5d04b
Metadata versions field now reflects the latest supported version ( #5600 )
2021-06-09 20:30:44 +02:00
Sebastian Rittau
6a6d5d8fd2
Fix zincrby argument order ( #5608 )
2021-06-09 21:16:34 +03:00
Sebastian Rittau
d7d3926b2c
Fix generate protobuf script and run formatters ( #5605 )
...
* Fix generate protobuf script
* Install and run black and isort
2021-06-09 19:13:31 +03:00
Sebastian Rittau and Jelle Zijlstra
5d811e18b5
Add rudimentary Pillow stubs ( #5594 )
...
* Add rudimentary Pillow stubs
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com >
2021-06-09 17:36:46 +03:00
Sebastian Rittau
67a2ed7dd7
Fix PyJWT package name ( #5604 )
...
The "jwt" package on PyPI is actually a different, incompatible package,
called python-jwt. Fix the name, so that the package name is corrected
from types-jwt to types-PyJWT, matching the upstream name.
2021-06-09 16:36:27 +02:00
Sebastian Rittau
6e153a3a4e
Bump versions of obsolete packages ( #5601 )
...
To latest version pre obsoletion
2021-06-09 07:24:38 -07:00
Sebastian Rittau
711580722b
Enable pyright for all Python 3 stubs ( #5597 )
...
* pyright: disable reportUnknownParameterType
Unknown parameter types are preferred over Any annotations for
incomplete stubs. Especially larger stubs are expected to be
incomplete for some time and it would be a shame to lose the
other pyright warnings for those stubs.
* Also disable reportUnknownVariableType
Fix problems with tkinter
* Disable reportUnknownMemberType
Fix pyright problems
2021-06-09 07:14:22 -07:00
Sebastian Rittau
c601d5cf3d
Use stable mypy ( #5595 )
...
Use stable mypy
Pin all package versions
Don't upgrade pip itself
2021-06-09 11:27:45 +02:00
Sebastian Rittau
4edbeff5cc
Update black, isort, flake8* ( #5596 )
2021-06-09 10:51:15 +03:00