Skip to content

Commit aeac45b

Browse files
committed
Avoid using EncodingWarning because it is not defined for Python < 3.10
1 parent 74a6228 commit aeac45b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setuptools/tests/test_integration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,11 @@ def test_pbr(install_context):
9999

100100

101101
@pytest.mark.xfail
102-
@pytest.mark.filterwarnings("ignore::EncodingWarning")
102+
@pytest.mark.filterwarnings("ignore:'encoding' argument not specified")
103103
# ^-- Dependency chain: `python-novaclient` < `oslo-utils` < `netifaces==0.11.0`
104104
# netifaces' setup.py uses `open` without `encoding="utf-8"` which is hijacked by
105105
# `setuptools.sandbox._open` and triggers the EncodingWarning.
106+
# Can't use EncodingWarning in the filter, as it does not exist on Python < 3.10.
106107
def test_python_novaclient(install_context):
107108
_install_one('python-novaclient', install_context, 'novaclient', 'base.py')
108109

0 commit comments

Comments
 (0)