Skip to content

Fix failing CI jobs#4078

Merged
abravalheri merged 2 commits intopypa:mainfrom
abravalheri:fix-ci
Oct 12, 2023
Merged

Fix failing CI jobs#4078
abravalheri merged 2 commits intopypa:mainfrom
abravalheri:fix-ci

Conversation

@abravalheri
Copy link
Contributor

@abravalheri abravalheri commented Oct 12, 2023

Summary of changes

  • Unify passenv with pass_env in tox.ini so we don't have trouble with TOX_OVERRIDE
  • Use Python 3.11 inventory to avoid errors with distutils references

Fix fbe0d79#commitcomment-129798103

Pull Request Checklist

@abravalheri abravalheri force-pushed the fix-ci branch 3 times, most recently from 19f431c to 981d20a Compare October 12, 2023 14:43
@abravalheri
Copy link
Contributor Author

This is a copy of the comment where I was keeping track of the investigation:

For some reason, this change (fbe0d79) is failing on the CI for tox -e docs and on Windows...

For the docs error, sphinx/sphinx-doc#11662 seems to be closed so we can probably remove the cap and see what happens.

For the windows error, is it possible that a newer version of the Github worker node doesn't export the windir environment variable?

UPDATE 1: For the windows error, maybe it happens because now we have a TOX_OVERRIDE: testenv.pass_env+=... env var... I think that will cause both passenv and pass_env to be present in the tox configuration and tox will prefer the later, ignoring passenv completely...

UPDATE 2: The sphinx error is probably described by sphinx-doc/sphinx#11720.

UPDATE 3: Sphinx may error even for Python 3.10, because it will fail on any warning.

UPDATE 4: Actually the sphinx errors where happening because the distutils functions are no longer part of the intersphinx inventory for Python 3.12... Changing the intersphinx_mapping to use Python 3.11 may solve the problem.

@abravalheri abravalheri marked this pull request as ready for review October 12, 2023 17:36
@abravalheri abravalheri merged commit 9ece3c9 into pypa:main Oct 12, 2023
@abravalheri abravalheri deleted the fix-ci branch October 12, 2023 17:57
Comment on lines +204 to +208
python=('https://docs.python.org/3.11/', None),
# ^-- Python 3.11 is required because it still contains `distutils`.
# Just leaving it as `3` would imply 3.12+, but that causes an
# error with the cross references to disutils functions.
# Inventory cache may cause errors, deleting it solves the problem.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workaround is fine as a stop gap. I think the long-term strategy is for Setuptools to own the distutils documentation (https://setuptools.pypa.io/en/latest/deprecated/distutils/index.html). Probably the proper fix is to simply re-point distutils references to this documentation. I filed #4081 to track.

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

Successfully merging this pull request may close these issues.

2 participants