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 Python3.12 #127

Open
masa10-f opened this issue Apr 5, 2024 · 5 comments
Open

Support Python3.12 #127

masa10-f opened this issue Apr 5, 2024 · 5 comments
Labels
new feature New feature or request

Comments

@masa10-f
Copy link
Contributor

masa10-f commented Apr 5, 2024

Describe the feature you'd like

Graphix currently supports Python 3.8 through 3.11. Python 3.12 was released last October, so It would be beneficial to support 3.12.

Additional context

I would like to have criteria for when to add new Python versions and when to drop older ones. It seems reasonable to me to follow the status of Python versions. Following this, we will drop the oldest next October and add the latest once released. If anyone has opinions or suggestions, please share them in this issue.

@masa10-f masa10-f added the new feature New feature or request label Apr 5, 2024
@shinich1
Copy link
Contributor

shinich1 commented Apr 8, 2024

@masa10-f thanks, I think it might also make sense to discontinue 3.9 as well which will be end-of-life in a year or so (and according to @thierry-martinez we can have more organized code writing by restricting to 3.10+)

@EarlMilktea
Copy link
Contributor

Can I work on this?

we can have more organized code

I suspect it's based on the match syntax.
Actually it's possible to switch implementation based on version like this:
(memo: it may cause black to fail, since now it's based on py38 profile.)

if sys.version_info >= (3, 9):
    TestCaseType = dict[str, dict[str, tuple[bool, dict[int, set[int]]]]]
else:
    TestCaseType = Dict[str, Dict[str, Tuple[bool, Dict[int, Set[int]]]]]

@masa10-f
Copy link
Contributor Author

@EarlMilktea Thanks for you comment! I didn't know that

@shinich1 Dropping support for 3.9 seems a bit excessive because physicists do not update python versions frequently.
I think updating python version is not so convinient as with other languages. Looking at other quantum software, it seems reasonable to support the latest 4 versions, and I agree with that. What do you think about?

@shinich1
Copy link
Contributor

@EarlMilktea Thanks for you comment! I didn't know that

@shinich1 Dropping support for 3.9 seems a bit excessive because physicists do not update python versions frequently. I think updating python version is not so convinient as with other languages. Looking at other quantum software, it seems reasonable to support the latest 4 versions, and I agree with that. What do you think about?

that sounds good, yeah if we have good way around switch syntax, dropping only 3.8 seems reasonable.

@EarlMilktea
Copy link
Contributor

support the latest 4 versions

Let me point out that this is due to the EOL policy of Python, which guarantees security supports for 5 years.
So I recommend to deprecate 3.8 after 31 Oct 2024.

MEMO: https://endoflife.date/python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants