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

Py39 fix #510

Merged
merged 2 commits into from
Aug 29, 2023
Merged

Py39 fix #510

merged 2 commits into from
Aug 29, 2023

Conversation

alex-rakowski
Copy link
Collaborator

adding back python 3.9 compatability, by using from __future__ import annotations in wpf.py, which has made it install with python 3.9 environment. I haven't run other tests, maybe @Steve could double-check?

@sezelt
Copy link
Member

sezelt commented Aug 29, 2023

It seems pretty likely that before the usage of the new type hint syntax in wpf.py that we were Python 3.9 compatible.

As far as I know, we are not using match statements anywhere at the moment, but I can see them being super useful in a few places. I think a lot of code where we base our control flow on the shape of nested tuples could be improved that way, for example.

@alex-rakowski
Copy link
Collaborator Author

agreed, they'll be super useful. But until we use them, this PR will allow us to keep support for 3.9 with no rewrites as far as I can tell.

@bsavitzky bsavitzky merged commit b3791f1 into py4dstem:dev Aug 29, 2023
6 checks passed
@bsavitzky
Copy link
Member

It's definitely true that match could make some if/else clauses read a little more cleanly :)

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

Successfully merging this pull request may close these issues.

3 participants