enthought / traits

Observable typed attributes for Python classes
Other
432 stars 85 forks source link

Fix Cython tests on Python 3.12 #1759

Closed mdickinson closed 12 months ago

mdickinson commented 12 months ago

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: https://github.com/cython/cython/issues/5751

mdickinson commented 12 months ago

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