-
Notifications
You must be signed in to change notification settings - Fork 101
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
Fix PyJulia on Python 3.12 #538
Conversation
Seems like the issue now is that the returned module is not a |
I'm looking. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## fix-ci-settings #538 +/- ##
===================================================
- Coverage 85.22% 81.43% -3.79%
===================================================
Files 39 39
Lines 2342 2349 +7
===================================================
- Hits 1996 1913 -83
- Misses 346 436 +90 ☔ View full report in Codecov by Sentry. |
Okay it seems like it's mostly working now after adding a missing method:
Want to take a look? |
764aa33
to
6feab5a
Compare
@mkitti do you think you might be able to take a look at this? Seems like we're very close now. |
I will have a little more time on Thursday. |
Did you get a chance to take a look? Anything I can help push on? |
I'm taking a look now. |
This is taking a while to review since I'm trying to figure out why CI is failing. If you have any insight on getting CI to succeed to disabling some tests, let me know. |
I did a downstream integration test with the full PySR suite and with this PR, everything seems to be working. I think the current CI failure is due to this:
Seems like distutils is being used somewhere in the pipeline? |
Which tool is running this command?
Is this from Conda.jl or PyCall.jl maybe? (distutils has been removed in 3.12) |
I think this is partially fixed by my PR JuliaPy/PyCall.jl#1068... let's see |
@mkitti it seems like with JuliaPy/PyCall.jl#1068, many of the 3.12 CI runs are now passing! There are some remaining issues but those look to be weirdness about the CI cache (?). I wonder if we can merge this now (after your review) to fix 3.12 and then fix those other GitHub action-specific issues later? |
Ok, let's try |
Thanks! Not sure why but it merged into #541 rather than master... I guess I had set that as the base or something? |
* Update setup actions * Fix PyJulia on Python 3.12 (#538) * Fix importlib deprecated API * Test Python 3.12 * Test Julia 1.9 * Fix semantics of exec_module vs create_module * Ensure we can find spec from JuliaModule * Bump version with python 3.12 compat * Declare compat for 3.11 and 3.12 * Only test 1.6, 1.9, 1
Squashed commit of the following: commit 12cba08 Merge: 28af425 ce3ac83 Author: Miles Cranmer <[email protected]> Date: Sat Dec 30 02:23:21 2023 +0000 Merge pull request #544 from JuliaPy/update-to-0.6.2 Bump to 0.6.2 with Python 3.12 fix commit ce3ac83 Author: MilesCranmer <[email protected]> Date: Sat Dec 30 02:03:45 2023 +0000 Bump to 0.6.2 with Python 3.12 fix commit 28af425 Author: Miles Cranmer <[email protected]> Date: Fri Dec 29 16:55:50 2023 +0000 Update setup actions and get working on 3.12 (#541) * Update setup actions * Fix PyJulia on Python 3.12 (#538) * Fix importlib deprecated API * Test Python 3.12 * Test Julia 1.9 * Fix semantics of exec_module vs create_module * Ensure we can find spec from JuliaModule * Bump version with python 3.12 compat * Declare compat for 3.11 and 3.12 * Only test 1.6, 1.9, 1
Squashed commit of the following: commit 18589bb Author: MilesCranmer <[email protected]> Date: Sat Dec 30 02:25:30 2023 +0000 Bump to 0.6.2 Squashed commit of the following: commit 12cba08 Merge: 28af425 ce3ac83 Author: Miles Cranmer <[email protected]> Date: Sat Dec 30 02:23:21 2023 +0000 Merge pull request #544 from JuliaPy/update-to-0.6.2 Bump to 0.6.2 with Python 3.12 fix commit ce3ac83 Author: MilesCranmer <[email protected]> Date: Sat Dec 30 02:03:45 2023 +0000 Bump to 0.6.2 with Python 3.12 fix commit 28af425 Author: Miles Cranmer <[email protected]> Date: Fri Dec 29 16:55:50 2023 +0000 Update setup actions and get working on 3.12 (#541) * Update setup actions * Fix PyJulia on Python 3.12 (#538) * Fix importlib deprecated API * Test Python 3.12 * Test Julia 1.9 * Fix semantics of exec_module vs create_module * Ensure we can find spec from JuliaModule * Bump version with python 3.12 compat * Declare compat for 3.11 and 3.12 * Only test 1.6, 1.9, 1
commit 57d6b6a Author: MilesCranmer <[email protected]> Date: Sat Dec 30 02:45:53 2023 +0000 Ensure setuptools installed in test commit 18589bb Author: MilesCranmer <[email protected]> Date: Sat Dec 30 02:25:30 2023 +0000 Bump to 0.6.2 Squashed commit of the following: commit 12cba08 Merge: 28af425 ce3ac83 Author: Miles Cranmer <[email protected]> Date: Sat Dec 30 02:23:21 2023 +0000 Merge pull request #544 from JuliaPy/update-to-0.6.2 Bump to 0.6.2 with Python 3.12 fix commit ce3ac83 Author: MilesCranmer <[email protected]> Date: Sat Dec 30 02:03:45 2023 +0000 Bump to 0.6.2 with Python 3.12 fix commit 28af425 Author: Miles Cranmer <[email protected]> Date: Fri Dec 29 16:55:50 2023 +0000 Update setup actions and get working on 3.12 (#541) * Update setup actions * Fix PyJulia on Python 3.12 (#538) * Fix importlib deprecated API * Test Python 3.12 * Test Julia 1.9 * Fix semantics of exec_module vs create_module * Ensure we can find spec from JuliaModule * Bump version with python 3.12 compat * Declare compat for 3.11 and 3.12 * Only test 1.6, 1.9, 1
cc @mkitti do you think you could give this a look over? It still seems like there are some issues even though
from julia import Main
doesn't blow up... Any help appreciated.This updates the importlib API according to what was noticed in #509 (which were giving deprecation warnings, we simply didn't update in time).
This is a lot of guess work about the importlib API: https://docs.python.org/3/library/importlib.html, so I'd appreciate if someone could give a close reading.
I found this stackoverflow answer to be particularly helpful: https://stackoverflow.com/a/43573798/2689923
cc @IlyaOrson this should finally fix the PySR issue you saw (the proper way!)