-
Notifications
You must be signed in to change notification settings - Fork 126
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
Upgrade to Python 3.10 #35915
Upgrade to Python 3.10 #35915
Conversation
Needed to remove the setuptools pin to resolve dependencies. Co-authored-by: Jonathan Haigh <[email protected]>
Co-authored-by: Jonathan Haigh <[email protected]>
Iterables has been moved to collections.abc and was derecated from within collections a while ago. In Python 3.10 it was removed. Co-authored-by: Jonathan Haigh <[email protected]>
Co-authored-by: Jonathan Haigh <[email protected]>
Python 3.10 no longer uses implicit conversion with loss from a float to an int Co-authored-by: Jonathan Haigh <[email protected]>
Co-authored-by: Jonathan Haigh <[email protected]> Co-authored-by: Martyn Gigg <[email protected]>
Co-authored-by: Jonathan Haigh <[email protected]>
… lhs_info Co-authored-by: Jonathan Haigh <[email protected]>
Limited the scope of the GIL release so that manipulating python objects can be done within the function. Previously it worked, but the behaviour was changed for Python 3.10. See here: https://docs.python.org/3/c-api/dict.html#c.PyDict_GetItem Co-authored-by: Jonathan Haigh <[email protected]> Co-authored-by: Martyn Gigg <[email protected]>
WorkbenchStartupTest was failing in Python 3.10. Something was prepending the Windows long path syntax to the MANTIDPATH env variable. You cannot mix back and forward slashes in long paths, so here we have addressed that. Co-authored-by: Jonathan Haigh <[email protected]>
It's not compatible with Python 3.10. We will replace it with quickBayes when that is ready.
b8e6408
to
770876a
Compare
This function will do nothing in Python>=3.9 and was been called from Py_Initialize() since 3.7 https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes were made to this file to fix the failing tests before we understood that there was a problem with the lhs_info()
function. The fix in funcinspect.py
would have solved the problem anyway. I don't think there's any harm in keeping these changes in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the Windows and Linux installers, and they seem to be working as normal. No errors when loading, plotting or using some of the interfaces. Looks good to me
Description of work
Upgrade Python to 3.10.
Purpose of work
Last year conda-forge announced they were dropping support for Python 3.7 when 3.11 was released. If we expect similar for the release of Python 3.12, then they will drop support for Python 3.8 in October this year. Therefore we should move away from Python 3.8 for the upcoming release.
Summary of work
Mostly fixing deprecation warnings, but some obscure things had broken due to low-level Python changes, including:
lhs_info()
stopped working correctly in some casesSee individual commits for more information. The work has been separated out by commit in a logical way.
To test:
Fixes #35228
Reviewer
Please comment on the points listed below (full description).
Your comments will be used as part of the gatekeeper process, so please comment clearly on what you have checked during your review. If changes are made to the PR during the review process then your final comment will be the most important for gatekeepers. In this comment you should make it clear why any earlier review is still valid, or confirm that all requested changes have been addressed.
Code Review
Functional Tests
Does everything look good? Mark the review as Approve. A member of
@mantidproject/gatekeepers
will take care of it.Gatekeeper
If you need to request changes to a PR then please add a comment and set the review status to "Request changes". This will stop the PR from showing up in the list for other gatekeepers.