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

Support Python 3.11 #5994

Merged
merged 9 commits into from Jan 24, 2023
Merged

Support Python 3.11 #5994

merged 9 commits into from Jan 24, 2023

Conversation

greglandrum
Copy link
Member

@greglandrum greglandrum commented Jan 20, 2023

This required minor changes to the way pickling is handled and a switch away from using random.shuffle with the random keyword.

Also adds a CI build for py 3.11

Fixes #5911

@greglandrum
Copy link
Member Author

@bp-kelley : this is an alternate approach to handle the deprecation of the extra argument to random.shuffle() and probably supersedes #5929

@greglandrum greglandrum added this to the 2022_09_5 milestone Jan 20, 2023
Copy link
Contributor

@ricrogz ricrogz left a comment

Choose a reason for hiding this comment

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

LGTM

@bp-kelley
Copy link
Contributor

I’ll be able to take a look this weekend. If it’s better Han the previous random fix, I’m all for it.

@@ -18,3 +17,30 @@
random = _random.random
randrange = _random.randrange
seed = _random.seed

if sys.hexversion >= 0x30b0000:
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice fix.

@bp-kelley
Copy link
Contributor

LGTM

@greglandrum greglandrum merged commit 79e8295 into rdkit:master Jan 24, 2023
10 checks passed
@greglandrum greglandrum deleted the fix/support_py311 branch January 24, 2023 17:16
greglandrum added a commit that referenced this pull request Feb 23, 2023
* remove some more deprecated numpy stuff

* workaround for changes to random.shuffle in python 3.11

* fix pickling of rdkit mols in python 3.11

* add py311 build to CI

* update py311 CI

* remove qt for py311 for the moment

* only use the new code with pyversion >=3.11

* use the new logic for all pickle_suites

* need to work with older py too
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatibility with python 3.11
3 participants