-
Notifications
You must be signed in to change notification settings - Fork 3
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
Drop Python 3.9 support in favor of 3.12 and 3.13 #241
Conversation
Otherwise fails with TypeError: '<' not supported between instances of 'Path' and 'Path'
8ff8285
to
188e0c0
Compare
188e0c0
to
958641a
Compare
ec91724
to
8f81129
Compare
8f81129
to
832928d
Compare
# Linux's default ``fork`` start method causes a lot of random | ||
# issues, including python/cpython#110770 (prompted this change) | ||
# and python/cpython#84559 (general discussion). This default | ||
# will be changed to ``forkserver`` in Python 3.14. MacOS and | ||
# Windows use the much safer but slightly slower ``spawn`` method | ||
if sys.platform not in ("darwin", "win32"): | ||
start_method = "forkserver" | ||
else: | ||
start_method = "spawn" | ||
mp_ctx = multiprocessing.get_context(start_method) |
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.
great!
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.
Thanks @thalassemia! So is there topology graphing as it currently stands?
nbconvert==7.16.4 | ||
nbformat==5.10.4 | ||
nbsphinx==0.9.5 | ||
networkx==3.4.2 |
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.
ok, so this is compatible with 3.10+ but not 3.9?
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.
These are the current latest versions of all requirements that work on 3.10-3.13. The problem with 3.9 is that you can't install networkx 3.4+, which requires a change in plot_topology to work (included in this PR).
plot_topology works in the current release as long as you have networkx<3.4. I think those older versions of networkx should work on Python 3.10-3.13 as well. I don't think it is a good idea to cap the networkx version to address the issue with networkx 3.4+. |
@thalassemia -- looks like there are still some 3.9-related tests hanging. Can you remove these from the GitHub actions? |
I think those are required by some repository setting that I can't access. Instead of hanging they're just not being run. These docs might be helpful. |
I was able to update
requirements.txt
to work on Python 3.10-3.13. Unfortunately, the latest possible version ofnetworkx
that installs on Python 3.9 is 3.2.1, and a change innetworkx
3.4 breaks ourplot_topology
function. I could add logic to determine the version ofnetworkx
and do different things depending on whether it is greater or less than 3.4, but that sounds unnecessarily complicated. Instead, I think it makes more sense to just bump the required Python version to 3.10 andnetworkx
version to 3.4. For context, Python 3.9 reaches end-of-life in 2025-10, and big packages like Numpy and Scipy have already dropped support for it.Other changes include:
forkserver
on Linux to fix Nested profiling with cProfile raises exception in Python 3.12. python/cpython#110770 (default will beforkserver
in Python 3.14 anyways)By creating this pull request, I agree to the Contributor License
Agreement, which is available in
CLA.md
at the top level of thisrepository.