Skip to content

Commit

Permalink
CI: catch unexpected warning messages
Browse files Browse the repository at this point in the history
The CI runs of sherpa#1752 after
pulling in this branch sherpa#1753
started to fail because of a warning message that I could not
replicate. A search lead to this set of issues

- pypa/setuptools#2104
- pypa/setuptools#2052
- pypa/setuptools#1383

which suggests there's a subtle interaction between pip and
setuptools that we are falling over. As we currently have setuptools
pinned to < 60, whilst the distutils changes coming in Python 3.12
work through the ecosystem, the OTS code we run is likely to
hit this issue (i.e. nothing we can fix) so we can just skip the
warnings. Hopefully we can remove these additions soon.
  • Loading branch information
DougBurke committed May 1, 2023
1 parent e213242 commit 18f17cc
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion sherpa/conftest.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (C) 2016, 2017, 2018, 2019, 2020, 2021, 2022
# Copyright (C) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023
# Smithsonian Astrophysical Observatory
#
#
Expand Down Expand Up @@ -188,6 +188,19 @@ def pytest_collection_modifyitems(config, items):
],
VisibleDeprecationWarning:
[],
ImportWarning:
[
# It is not clear why this happens - seen when testing
# https://github.com/sherpa/sherpa/pull/1752 - and the problem appears
# to be a setuptools/pip interaction, based on
# https://github.com/pypa/setuptools/issues/2104
# https://github.com/pypa/setuptools/issues/2052
# https://github.com/pypa/setuptools/issues/1383
# At present Sherpa forces an old version of setuptoools (<60) so it is
# unlikely to be fixed. When the setuptools restriction is removed we can
# hopefully remove this.
r"VendorImporter.find_spec\(\) not found; falling back to find_module\(\)",
]
}

if have_astropy:
Expand Down

0 comments on commit 18f17cc

Please sign in to comment.