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

Question: Why do you require python >=3.10? #42

Closed
dmilcevski opened this issue Oct 4, 2022 · 4 comments
Closed

Question: Why do you require python >=3.10? #42

dmilcevski opened this issue Oct 4, 2022 · 4 comments
Labels

Comments

@dmilcevski
Copy link

I was wondering why do you require python 3.10 as min version? Thank you!

@dosisod
Copy link
Owner

dosisod commented Oct 4, 2022

Great question! Python 3.10 introduced Structural Pattern Matching which is used heavily in this codebase. I have been looking into mypyc, which should improve the speed of Refurb, and could also allow for running in older versions of Python.

As it stands currently, Refurb will be sticking with Python 3.10. It can check code from earlier versions of Python, but the tool itself must be ran under 3.10. It would be really cool to transpile Refurb for older versions of Python, but I doubt it will work. I would love to be proven wrong though!

@henryiii
Copy link

henryiii commented Oct 4, 2022

I've done the same thing elsewhere, for the same reason. I'd generally assume checks are being run by developers and developers should be able to upgrade Python more easily than users. :)

@dmilcevski
Copy link
Author

Thanks for your fast response. Our repos allow >=3.7<=3.10, but I woudn't restrict to >=3.10. However, the pre-commit hook is really useful, so for now this is a nice solution.
Thanks!

@dosisod
Copy link
Owner

dosisod commented Oct 7, 2022

Closing this in favor of #57. If compatibility with earlier versions of Python is made available with the mypyc migration, I will make sure to mention it here.

Thank you for initially reporting this @dmilcevski!

@dosisod dosisod closed this as completed Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants