Skip to content

Commit

Permalink
Avoid using EncodingWarning because it is not defined for Python < 3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Apr 17, 2024
1 parent 8ec554f commit d08c2b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setuptools/tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,11 @@ def test_pbr(install_context):


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

Expand Down

0 comments on commit d08c2b0

Please sign in to comment.