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

also run unit tests with Python 3.12 + add it to classifiers in setup.py #4484

Merged
merged 5 commits into from
Mar 24, 2024

Conversation

bartoldeman
Copy link
Contributor

No description provided.

@bartoldeman bartoldeman added the EasyBuild-5.0 EasyBuild 5.0 label Mar 13, 2024
This (or "pip install build" with "python -m build") is needed
for Python 3.12 with "python setup.py sdist"
@bartoldeman
Copy link
Contributor Author

I didn't add setuptools to requirements.txt since it's not an explicit runtime dependency, we only need it for python setup.py sdist.

This gives a SyntaxWarning in Python 3.12. In older Pythons it would
not warn, but in all cases it gives a literal raw \u (with a backslash)
instead of Unicode characters.

Python 2.x needed u'\uxxxx' but the u is no longer needed with 3.x.
@bartoldeman
Copy link
Contributor Author

Still needs some work on Unicode handling. run_shell_cmd fails with unicode output in C locale.

@@ -83,6 +85,10 @@ jobs:
pip install --upgrade pip
pip --version
pip install -r requirements.txt
if [[ "${{matrix.python}}" == 3.12 ]]; then
Copy link
Member

Choose a reason for hiding this comment

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

This will also be required for Python versions > 3.12, right?

Can we cut off the minor part (12) and then do a comparison, so we can forget about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought in the end it's even better to check for functionality: so checking if distutils can be imported rather than an explicit version check.

@boegel boegel added the tests label Mar 15, 2024
@boegel boegel added this to the 5.0 milestone Mar 15, 2024
This makes the check more general and compatible with later versions
of Python than just 3.12.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants