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

Fix Cython tests on Python 3.12 #1759

Merged
merged 2 commits into from
Oct 9, 2023
Merged

Fix Cython tests on Python 3.12 #1759

merged 2 commits into from
Oct 9, 2023

Conversation

mdickinson
Copy link
Member

@mdickinson mdickinson commented Oct 9, 2023

Our "test from PyPI" workflow was failing with Python 3.12 because it exercised the Cython tests, which use cython.inline, and cython.inline in turn uses distutils, which no longer exists in the Python 3.12 standard library.

As a temporary workaround, this PR adds setuptools to the list of packages installed into the test environment; setuptools provides a shim for distutils.

I'd guess that at some point in the reasonably near future the dependence of Cython on distutils will be fixed.

Closely related upstream issue: cython/cython#5751

@mdickinson mdickinson changed the title Build: don't run Cython tests on Python 3.12 Fix Cython tests on Python 3.12 Oct 9, 2023
@mdickinson
Copy link
Member Author

Updated to use a different workaround: install setuptools. Our other test workflows already do this (which is why they weren't failing in the same way that the test from PyPI workflow was).

Test run for the offending workflow: https://github.com/enthought/traits/actions/runs/6458759100

@mdickinson mdickinson marked this pull request as ready for review October 9, 2023 15:35
Copy link
Contributor

@corranwebster corranwebster left a comment

Choose a reason for hiding this comment

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

Looks good

@mdickinson mdickinson merged commit 3c6b250 into main Oct 9, 2023
82 checks passed
@mdickinson mdickinson deleted the fix/python312-cython branch October 9, 2023 15:42
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