Aadv1k / schoolOS-api-wrapper

A simple api wrapper based around https://www.toppr.school/
GNU General Public License v3.0
9 stars 0 forks source link

Why is 3.9 required? #1

Open PySimpleGUI opened 2 years ago

PySimpleGUI commented 2 years ago

Curious what about your code requires that 3.9 be used.

Many open-source developers don't realize how limiting a minimum version of Python can be. The chances that someone will upgrade their Python interpreter/development environment in order to try your program are incredibly small. Better chance of winning the lottery?

Here is the break-out of 1 day of PySimpleGUI pip installs. It shows how many users are running each version of Python: image

The reason PySimpleGUI supports 3.4 and up is so that I can capture as many users as possible.... so that the tent can be as large as possible. The downside is that it's personally limiting. I am unable to use f-strings in the main PySimpleGUI code. But, that's only for the core code and it only impacts me. The upside is all of those users that are possibly going to use PySimpleGUI. It's been worth the tradeoff.

Be thoughtful about these kinds of decisions. It's OK to require a minimum version of Python to be whatever you want. Try to weigh the potential costs of that kind of decision to help make a better decision.

Keep making stuff! As you pointed out, knowing you make a positive impact on one person is enough to provide lots of motivation-fuel.

I'm pretty sure you're very young.... so don't worry too much about making mistakes and feeling overwhelmed sometimes. You've got an entire lifetime ahead of you to enjoy learning this craft. If you've found that programming is your calling, is what you feel really passionate about, then congratulations! Some people spend a lifetime searching for that.

Aadv1k commented 2 years ago

I just put that line in there as a precautionary measure, as that was the enviorment I built it in, I will remove this line, as I havent used anything out of the blue, just the requests module so it should work with 3.6 (f strings)

PySimpleGUI commented 2 years ago

Maybe change your comment to "Tested only on 3.9... your mileage may vary"

image

3.4 is pretty extreme to support. 3.6+ is a great target if you can do it.

Aadv1k commented 2 years ago

Hey, thanks for raising this issue, now that you have pointed this out i WILL make the shift shortly, I am not closing this issue just yet. although I have included a little line in the readme if that helps

PySimpleGUI commented 2 years ago

3.4 is pretty close to the low-end of the spectrum in many ways.

This report shows all PyPI packages https://pypistats.org/packages/__all__

Here's a snapshot for 1 day:

image

3.4 is the first release I see in that list that has a good number of users. It's still only 0.36% of the total.

The biggest thing that messes me up with 3.4, 3.5 is the use of f-strings.

If you have an f-string anywhere in your .py file, trying to run it on 3.4 will immediately cause a syntax error... before you can even try to run it. Of the 3.6 features, I use the most, I would say f-strings are by far the biggest one. It's one of the best language constructs I have ever seen in the last 44 years of coding. I'm sure some other languages have something similar, but given my C background, I haven't seen anything as nice as f-strings.

You're being mindful.... deliberate.... great stuff!

Aadv1k commented 2 years ago

Hey! I ended up dockerizing my application to test it in different versions of python, I got docker and the dockerfile setup, but now gotta hit the sac, Will look into the tomorrow, bye :)

PySimpleGUI commented 2 years ago

VERY CLEVER!

I'm impressed! Nice job.

image