Skip to content

Commit 015135b

Browse files
committed
Restricting EncodingWarning ignores in pytest.ini
1 parent b5aef75 commit 015135b

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

pytest.ini

+11-12
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@ filterwarnings=
1414
# Ensure ResourceWarnings are emitted
1515
default::ResourceWarning
1616

17+
# Workarounds for pypa/setuptools#3810
18+
# Can't use EncodingWarning as it doesn't exist on Python 3.9
19+
default:'encoding' argument not specified
20+
# subprocess.check_output still warns with EncodingWarning even with encoding set
21+
ignore:'encoding' argument not specified::setuptools.tests.environment
22+
1723
# realpython/pytest-mypy#152
1824
ignore:'encoding' argument not specified::pytest_mypy
1925

20-
# python/cpython#100750
21-
ignore:'encoding' argument not specified::platform
22-
23-
# pypa/build#615
24-
ignore:'encoding' argument not specified::build.env
26+
# pytest-dev/pytest # TODO: Raise issue upstream
27+
ignore:'encoding' argument not specified::_pytest
2528

26-
# dateutil/dateutil#1284
27-
ignore:datetime.datetime.utcfromtimestamp:DeprecationWarning:dateutil.tz.tz
29+
# TODO: This ignore doesn't work, why?
30+
# pypa/distutils # TODO: Raise issue upstream
31+
ignore:'encoding' argument not specified::setuptools._distutils
2832

2933
## end upstream
3034

@@ -68,11 +72,6 @@ filterwarnings=
6872
# https://github.com/pypa/setuptools/issues/3655
6973
ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning
7074

71-
# Workarounds for pypa/setuptools#3810
72-
# Can't use EncodingWarning as it doesn't exist on Python 3.9
73-
default:'encoding' argument not specified
74-
default:UTF-8 Mode affects locale.getpreferredencoding().
75-
7675
# Avoid errors when testing pkg_resources.declare_namespace
7776
ignore:.*pkg_resources\.declare_namespace.*:DeprecationWarning
7877

0 commit comments

Comments
 (0)