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

Check compatible Python versions #123

Open
1 task
barneydobson opened this issue Apr 5, 2024 · 2 comments
Open
1 task

Check compatible Python versions #123

barneydobson opened this issue Apr 5, 2024 · 2 comments
Labels
python Pull requests that update Python code

Comments

@barneydobson
Copy link
Collaborator

barneydobson commented Apr 5, 2024

I think match is a wider discussion about Python version compatibility. If I have already prevented use of older python versions through other code then I think for sure it makes sense. But I don't want to remove backwards compatibility without good reason.

Originally posted by @barneydobson in #104 (comment)

Yeah, this whole function with lots of if statements, some returning others creating some variables used later on needs a complete re-think. I would separate each branch in a separate function and call the appropriate one with some kind of registry, but even if you don't fancy that (I agree it might obscure the code) I would at least use the match statement as @cheginit suggest.

Python 3.10 is 3 years old and has reached the end of full support, so aiming to support things older than that without exploiting newer capabilities seems just not using Python to its full potential.

Originally posted by @dalonsoa in #104 (comment)

If using Python 3.10+:

@cheginit
Copy link
Collaborator

cheginit commented Apr 5, 2024

In pyproject.toml you specified that the package requires py3.10+, so it won't be installed for older versions anyway (this's the reason for that comment on mine). If that was unintentional, you need to relax that. I think py3.9+ or py3.8+ is sensible since, I think, these two are the min versions that most of the package's dependencies support.

@barneydobson
Copy link
Collaborator Author

Ah perfect thanks - Yeah that was probably just from the template I used

@barneydobson barneydobson added on hold python Pull requests that update Python code and removed on hold labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

2 participants