-
Notifications
You must be signed in to change notification settings - Fork 53
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
python 2 -> 3 #64
Comments
Hi benjimin, |
Another potential complication is the necessary update from ConfigParser to configparser (with side-benefit of code simplification by its "fallback" argument), which currently triggers a metaclass conflict (in python 2 at least) upon multiple-inheritance with a Singleton class.. (Instead of fixing this particular complication, it could be bypassed with refactors to also address issues #61 and #68..) |
I've just pushed some changes (e.g. commit 90e6da0 to hazimp branch) that bypass the configparser/singleton/metaclass conflict. |
Checked; a trivial
@GrahamMore how have your changes been going? |
@benjimin - I've pushed some changes to my forked repo. Excuse my ignorance to commonplace coding practises, as I'm not a full time programmer so I'm more used to hacking stuff together rather than formal version controlling, structuring etc. So far I've got all the tests to pass, bar those in TestRandom that I'm trying to sort out. I had tried to rerun the validation tests with randomgen in place and using their Mersenne Twister algorithm, that should be consistent with the existing implementation in Random, but for the same seed of 1 I obtained different results. I suspect this might be due to a between the representation of 1 between Py 2 (C int/ python long) and 3 ( python long only), but I'm not sure, I'm in progress of building a test to see if the overall histrogram created from the Random vs randomgen for the same seed is generally consistent. I've updated the requirements.txt file so if you wanted to clone my fork and try running the code it should be possible. Cheers, |
@GrahamMore did you get the tests to pass? I saw your changes looked fairly extensive, and I'd be interested if you're able to give a bit more detailed explanation (e.g. which automated commands you applied, and which parts you chose to change manually)? |
@benjimin |
Hi @GrahamMore We now have a version (currently in the "py3" branch) which passes all tests under python 3. Thanks! I didn't merge the entirety of your changes verbatim (because they were extensive with limited explanatory detail and because they were branched from an older release compared to the main development branch), nonetheless I've been finding them extremely helpful! Hopefully after a few weeks (and some additional tests) we'll update an official release. |
Hi @benjimin, excellent effort! |
Update: a couple further fixes; both example scenarios should now be running (in addition to the tests). BTW @GrahamMore, I agree with your choice to use |
Need to port to mpi4py as PyPar not planning to transition to Python3.x (see daleroberts/pypar#13). I'll raies as a separate issue |
Could also consider using python standard library functions for multiprocessing (as no need for MPI specifically). |
@GrahamMore can you please take a look at the new master branch (tag v3.0 |
Python 2 (and associated libraries/dependencies) will be unmaintained/unsupported about 9 months from now; upgrading also provides various improvements and compatibility.
TODO:
Then confirm it still works (e.g. automated tests pass)
Doing this prior to hazimp integration would simplify versioning.
The text was updated successfully, but these errors were encountered: