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.12 #281

Closed
kwabenantim opened this issue Jul 10, 2024 · 4 comments · Fixed by #280
Closed

Support Python 3.12 #281

kwabenantim opened this issue Jul 10, 2024 · 4 comments · Fixed by #280
Assignees
Labels
enhancement New feature or request

Comments

@kwabenantim
Copy link
Member

Summary

The stable and supported versions of Python are currently 3.8 to 3.12.

What’s New In Python 3.12

@kwabenantim kwabenantim added the enhancement New feature or request label Jul 10, 2024
@kwabenantim kwabenantim self-assigned this Jul 10, 2024
@kwabenantim kwabenantim linked a pull request Jul 10, 2024 that will close this issue
9 tasks
@kwabenantim
Copy link
Member Author

kwabenantim commented Jul 12, 2024

test_jacobian fails when comparing equations due to differences in printing OrderedDict between Python 3.11 and 3.12. python/cpython#101446

In Python 3.11 the output is a list of (key, value) tuples:

OrderedDict([('lhs', 'x0'), ('rhs', 'x0120.0*_sodium_channel_m_gate$m**3.0'), ('sympy_lhs', x0)])

In Python 3.12 the output is a dictionary:

OrderedDict({'lhs': 'x0', 'rhs': 'x0120.0*_sodium_channel_m_gate$m**3.0', 'sympy_lhs': x0})

@kwabenantim
Copy link
Member Author

pkg_resources is deprecated in Python 3.12: mu-editor/mu#2485

@bdevans
Copy link

bdevans commented Sep 18, 2024

It's a good time to remove instances of OrderedDict and change them to standard dict instances since they have respected insertion order since Python 3.6.

@kwabenantim
Copy link
Member Author

kwabenantim commented Sep 19, 2024

Thanks @bdevans. That seems like a good approach as we only support Python 3.6+. It's guaranteed to work with all Python interpreters from 3.7 and CPython from 3.6 [1] [2] but I think we only need to worry about CPython.

kwabenantim added a commit that referenced this issue Sep 30, 2024
kwabenantim added a commit that referenced this issue Sep 30, 2024
kwabenantim added a commit that referenced this issue Sep 30, 2024
kwabenantim added a commit that referenced this issue Sep 30, 2024
kwabenantim added a commit that referenced this issue Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants