diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6fbd29664..f2e0c0fd1 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -22,7 +22,7 @@ jobs: - {name: 'PyPy', python: pypy3, os: ubuntu-latest, tox: pypy3} - {name: Style, python: '3.8', os: ubuntu-latest, tox: style} - {name: Docs, python: '3.8', os: ubuntu-latest, tox: docs} - - {name: Typing, python: '3.8', os: ubuntu-latest, tox: mypy} + - {name: Typing, python: '3.8', os: ubuntu-latest, tox: typing} - {name: Windows, python: '3.8', os: windows-latest, tox: py38} - {name: Mac, python: '3.8', os: macos-latest, tox: py38} steps: diff --git a/requirements/dev.in b/requirements/dev.in index c854000e4..2588467c1 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -1,5 +1,6 @@ -r docs.in -r tests.in +-r typing.in pip-tools pre-commit tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 0c12a8fe0..b205cb991 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -25,6 +25,8 @@ iniconfig==1.0.0 # via pytest jinja2==2.11.2 # via sphinx markupsafe==1.1.1 # via jinja2 more-itertools==8.3.0 # via pytest +mypy-extensions==0.4.3 # via mypy +mypy==0.782 # via -r requirements/typing.in nodeenv==1.3.5 # via pre-commit packaging==20.3 # via pallets-sphinx-themes, pytest, sphinx, tox pallets-sphinx-themes==1.2.3 # via -r requirements/docs.in @@ -57,6 +59,8 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.4 # via sphinx toml==0.10.1 # via pre-commit, pytest, tox tox==3.20.0 # via -r requirements/dev.in +typed-ast==1.4.1 # via mypy +typing-extensions==3.7.4.3 # via mypy urllib3==1.25.9 # via requests, requests-unixsocket virtualenv==20.0.20 # via pre-commit, tox watchdog==0.10.3 # via -r requirements/tests.in diff --git a/requirements/typing.in b/requirements/typing.in new file mode 100644 index 000000000..f0aa93ac8 --- /dev/null +++ b/requirements/typing.in @@ -0,0 +1 @@ +mypy diff --git a/requirements/typing.txt b/requirements/typing.txt new file mode 100644 index 000000000..a169bd4c3 --- /dev/null +++ b/requirements/typing.txt @@ -0,0 +1,10 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile requirements/typing.in +# +mypy-extensions==0.4.3 # via mypy +mypy==0.782 # via -r requirements/typing.in +typed-ast==1.4.1 # via mypy +typing-extensions==3.7.4.3 # via mypy diff --git a/src/werkzeug/utils.py b/src/werkzeug/utils.py index adbb1683c..61a2dc95e 100644 --- a/src/werkzeug/utils.py +++ b/src/werkzeug/utils.py @@ -231,11 +231,6 @@ class HTMLBuilder: _c_like_cdata = {"script", "style"} def __init__(self, dialect): - warnings.warn( - "'utils.HTMLBuilder' is deprecated and will be removed in 2.1.", - DeprecationWarning, - stacklevel=2, - ) self._dialect = dialect def __call__(self, s): diff --git a/tox.ini b/tox.ini index ff7fcdecc..7f176aa9d 100644 --- a/tox.ini +++ b/tox.ini @@ -19,7 +19,7 @@ commands = pre-commit run --all-files --show-diff-on-failure deps = -r requirements/docs.txt commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html -[testenv:mypy] -deps = mypy +[testenv:typing] +deps = -r requirements/typing.txt commands = mypy src/werkzeug/ tests/