Non-types dependencies: whitelist arrow
, click
, Flask
, Werkzeug
#85
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds four new items to the "non-types dependencies whitelist", in preparation for non-types dependencies being allowed in typeshed:
arrow
,click
,Flask
, andWerkzeug
.arrow
Typeshed has had a PR open to add stubs for
python-datemath
for a long time now: python/typeshed#5765. Thearrow
package is fundamental topython-datemath
, so the PR realistically can't be merged without havingarrow
as a dependency. At runtime,arrow
only depends onpython-dateutils
and, on Python <3.8,typing_extensions
: https://github.com/arrow-py/arrow/blob/74a759b88447b6ecd9fd5de610f272c8fb6130a2/setup.py#L25-L28. It is actively maintained, and has 8.2k stars on GitHub.arrow
is the sole dependency ofpython-datemath
at runtime: https://github.com/nickmaccarthy/python-datemath/blob/6d047b3cc4e357d83b50e7433c812994e21c3ffb/setup.py#L86.click
Typeshed has a PR open to add stubs for the
click-default-group
: python/typeshed#9304. Similar to the PR adding stubs forpython-datemath
, there's not much point merging the PR unless it can declare a dependency onclick
;click
is just too fundamental to the package.click
is obviously a hugely popular CLI framework for Python. Its only dependencies at runtime arecolorama
(if you're on Windows) andimportlib-metadata
(if you're on Python <3.8): https://github.com/pallets/click/blob/9595a190d79e80945f6827a79f12937a8212f307/setup.py#L5-L8.click
is the sole dependency ofclick-default-group
at runtime: https://github.com/click-contrib/click-default-group/blob/b671ae5325d186fe5ea7abb584f15852a1e931aa/setup.py#L52.Flask
andWerkzeug
Typeshed has stubs for several
Flask
plugins. Being able to declare a dependency onFlask
would be useful for typeshed's stubs forFlask-Cors
andFlask-Migrate
in particular.Flask
is declared as a dependency of bothFlask-Cors
andFlask-Migrate
at runtime.Flask
is obviously a hugely popular web framework for Python, that is actively maintained. It has a few more dependencies at runtime than the others on this list, but still not very many: https://github.com/pallets/flask/blob/836866dc19218832cf02f8b04911060ac92bfc0b/setup.py#L6-L12.Typeshed's stubs for
Flask-Cors
would also benefit from being able to declare a dependency onWerkzeug
: https://github.com/python/typeshed/blob/41de5317b5008719c899b0ca61f9fd37b774cade/stubs/Flask-Cors/flask_cors/core.pyi#L12. The benefit to this one would be fairly small, but it also seems silly to disallow declaring a dependency onWerkzeug
, sinceWerkzeug
is already a dependency ofFlask
at runtime, and is just as actively maintained asFlask
.