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

Python 3.7 EOL #11808

Closed
amitdo opened this issue May 23, 2023 · 9 comments
Closed

Python 3.7 EOL #11808

amitdo opened this issue May 23, 2023 · 9 comments
Labels
needs-info waiting information from user. May close if no response for long time.

Comments

@amitdo
Copy link
Contributor

amitdo commented May 23, 2023

Python 3.7 was released in June 27, 2018.

It will reach EOL next month. So maybe you want to remove the support for this version in meson sometime in the next 6 months.

@xclaesse
Copy link
Member

IMHO, it does not matter much if it's EOL, what matters is what we gain from using Python3.8? What are the new APIs and syntaxes that can improve Meson code?

@eli-schwartz
Copy link
Member

I am the person that did this change for python 3.6 -> 3.7, so I was looking into it for 3.7 -> 3.8 as well.

My thoughts on the matter:

  • we shall not under any circumstances ever bump the metadata requirements or the startup error checking, in an untruthful manner -- so if meson runs under 3.7 (and we currently test it extensively under CI, so we know it does) then we shall continue to annotate the metadata to truthfully report that it does so
  • upgrading to a new minimum version of python means starting to use features that require that new minimum
  • having looked at the whatsnew for python 3.8, I don't feel strongly tempted by anything in order to use it for meson specifically. I think mainly what it allows is:
    • f-strings with f'{foo=}', but this is almost entirely useful for debugging locally, so meson doesn't need it
    • walrus operator, which I simply do not find appealing. Also it doesn't actually typically provide any new functionality, it just allows you to slightly rewrite the exact same code. I have seen one or two examples of things that can't be done without it, but those were very contorted code golfing exercises that I'd reject in a review as deceptive

If we compare this to the 3.7 upgrade, there were some extremely useful things we took advantage of there. __future__ annotations is one. Dataclasses is another. importlib.resources (replacing a custom compiler that converted data files into inline string variables in a .py file) is a third.

I think that by the time the question of upgrading to a 3.9 minimum comes around, I'll be a lot more tempted to upgrade. And I'm desperately looking forward to the very day that 3.9 is EOL so I can upgrade to 3.10 and get KW_ONLY in dataclasses. That alone is going to be a lifesaver.

Are there any killer features of python 3.8 that people would like to use? All suggestions are welcome.

@amitdo
Copy link
Contributor Author

amitdo commented May 23, 2023

@eli-schwartz
Copy link
Member

Thanks, but I already said I looked at that and didn't find anything appealing. I was asking what you consider a killer feature for use in meson.

@eli-schwartz eli-schwartz added the needs-info waiting information from user. May close if no response for long time. label May 23, 2023
@eli-schwartz
Copy link
Member

Without anything other than a link I've already read... Marking this for potential future closing.

@amitdo
Copy link
Contributor Author

amitdo commented May 23, 2023

I added a link because you didn't add a link.

@amitdo
Copy link
Contributor Author

amitdo commented May 23, 2023

IIRC, in the past you (the Meson team) upgraded the minimum required Python version not long after the version became EOL. That's why I opened this issue.

I didn't contribute code to this project, so I don't want to try to convince you or other devs to drop support for Python 3.7.

@amitdo amitdo closed this as completed May 23, 2023
@eli-schwartz
Copy link
Member

Okay, thanks for clarifying. :)

If anyone else comes across this ticket -- I'm still interested in hearing if anyone feels that upgrading the minimum version of python would enable using any specific features that help them write better code for meson. Upgrading is absolutely still an option, if someone can champion it as something that will help them code better on meson.

@joukewitteveen
Copy link
Contributor

shlex.join could replace ' '.join([shlex.quote(x) for x in ...]), although it may be clearer if we aliased it inside mesonlib anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-info waiting information from user. May close if no response for long time.
Projects
None yet
Development

No branches or pull requests

4 participants