Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI tests failing #3726

Closed
jaraco opened this issue Dec 16, 2022 · 3 comments
Closed

CI tests failing #3726

jaraco opened this issue Dec 16, 2022 · 3 comments
Assignees

Comments

@jaraco
Copy link
Member

jaraco commented Dec 16, 2022

Last night, I was applying some changes from jaraco/skeleton, including a fix for breakage in tox 4 (jaraco/skeleton#74). Merging the skeleton introduces other changes, such as testing on Python 3.12. Regardless, after merging the skeleton, there are still some new test failures.

@jaraco jaraco self-assigned this Dec 16, 2022
@jaraco
Copy link
Member Author

jaraco commented Dec 16, 2022

I see now the issue. In the new matrix, for some jobs, SETUPTOOLS_USE_DISTUTILS is set to , but a lot of the logic depends on the value being set to either "local" or "stdlib". In particular, the detection behavior treats blank as "stdlib":

which = os.environ.get('SETUPTOOLS_USE_DISTUTILS', 'local')
return which == 'local'

But the workaround for distutils detection in test_manifest treats blank as "local":

@pytest.fixture(autouse=os.getenv("SETUPTOOLS_USE_DISTUTILS") == "stdlib")
def _compat_record_logs(self, monkeypatch, caplog):
"""Account for stdlib compatibility"""
def _log(_logger, level, msg, args):
exc = sys.exc_info()
rec = logging.LogRecord("distutils", level, "", 0, msg, args, exc)
caplog.records.append(rec)
monkeypatch.setattr(log.Log, "_log", _log)

So the tests are running as stdlib, when we really want these tests to run as "local".

@jaraco
Copy link
Member Author

jaraco commented Dec 16, 2022

I plan to take this opportunity to treat a blank value as not supplied (same as 'local') in _distutils_hack.

@jaraco
Copy link
Member Author

jaraco commented Dec 16, 2022

While troubleshooting this issue, I noticed that pypy tests fail to install if SETUPTOOLS_USE_DISTUTILS=local. That's weird and surprising and concerning.

@jaraco jaraco closed this as completed in 93ce5a0 Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant