Skip to content

Commit 2203897

Browse files
authored
Merge pull request #11173 from bluetech/enc-warning-detox
tox: turn off PYTHONWARNDEFAULTENCODING for pre-commit, sphinx etc.
2 parents b5bc53e + 119cec0 commit 2203897

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tox.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ skip_install = True
7474
basepython = python3
7575
deps = pre-commit>=2.9.3
7676
commands = pre-commit run --all-files --show-diff-on-failure {posargs:}
77+
setenv =
78+
# pre-commit and tools it launches are not clean of this warning.
79+
PYTHONWARNDEFAULTENCODING=
7780

7881
[testenv:docs]
7982
basepython = python3
@@ -88,6 +91,9 @@ commands =
8891
# changelog in the docs; this does not happen on ReadTheDocs because it uses
8992
# the standard sphinx command so the 'changelog_towncrier_draft' is never set there
9093
sphinx-build -W --keep-going -b html doc/en doc/en/_build/html -t changelog_towncrier_draft {posargs:}
94+
setenv =
95+
# Sphinx is not clean of this warning.
96+
PYTHONWARNDEFAULTENCODING=
9197

9298
[testenv:docs-checklinks]
9399
basepython = python3
@@ -96,6 +102,9 @@ changedir = doc/en
96102
deps = -r{toxinidir}/doc/en/requirements.txt
97103
commands =
98104
sphinx-build -W -q --keep-going -b linkcheck . _build
105+
setenv =
106+
# Sphinx is not clean of this warning.
107+
PYTHONWARNDEFAULTENCODING=
99108

100109
[testenv:regen]
101110
changedir = doc/en
@@ -110,6 +119,9 @@ allowlist_externals =
110119
make
111120
commands =
112121
make regen
122+
setenv =
123+
# We don't want this warning to reach regen output.
124+
PYTHONWARNDEFAULTENCODING=
113125

114126
[testenv:plugins]
115127
# use latest versions of all plugins, including pre-releases

0 commit comments

Comments
 (0)