-
Notifications
You must be signed in to change notification settings - Fork 12
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
Py3.9 deprecates the second argument to random.shuffle #117
Comments
Yes, by passing our own random number generator to random.shuffle we allow complete reproduction of simulations using our set seed function. Without this users will have to keep seeds for both python and simuPOP's RNGs. I will be happy to merge a PR and make a minor release. |
Yes, the test suite also fails for python 3.11
@SimonGreenhill Are you familiar with Github Actions? I would appreciate it very much if you could add CI to this repository so that we can easily detect such issues. The workflow should basically involve a Python environment with |
yes -- here's the github actions: #118 |
Thanks. I merged the PR and will see if it works. I also created a PR #119 for the I will make a minor release after tests pass. |
Test fails due to incompatibility with the latest version of boost.
Appears to be the same problem as espressomd/espresso#3055 |
Thank @SimonGreenhill for reporting this issue and creating the github action file. I have merged the changes and released simuPOP version 1.1.14. |
The method
random.shuffle
has a parameterrandom
to allow users to specify a float in range [0.0, 1.0). However, this has been deprecated removed in 3.9 and removed in 3.11.This means that running
sampling.py:random_shuffle
will fail with:simuPOP/src/sampling.py
Lines 94 to 96 in b1ec05c
This is easily fixed by removing the second argument:
I can create a pull request to do this ... but I'm not sure whether removing this random argument makes a difference to the resulting shuffle (I think it just means you can't seed the random shuffle here).
See here for more details on the function, and more discussion here, and the code changes to python
The text was updated successfully, but these errors were encountered: