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

Remove support for Python 3.8 #1966

Closed
4 tasks done
mr-tz opened this issue Feb 1, 2024 · 10 comments · Fixed by #2467
Closed
4 tasks done

Remove support for Python 3.8 #1966

mr-tz opened this issue Feb 1, 2024 · 10 comments · Fixed by #2467
Labels
good first issue Good for newcomers question Further information is requested

Comments

@mr-tz
Copy link
Collaborator

mr-tz commented Feb 1, 2024

After that, it is expected that security updates (source only) will be released until 5 years after the release of 3.8 final, so until approximately October 2024. - https://peps.python.org/pep-0569/

Tasks

Preview Give feedback
  1. good first issue
  2. dependencies
@mr-tz mr-tz added good first issue Good for newcomers question Further information is requested labels Feb 1, 2024
@doomedraven
Copy link
Contributor

i would suggest to go directly with 3.10 instead of 3.9, like for example ubuntu 20 comes with 3.8, but ubuntu 22 comes with 3.10, so there is 3.9 only in non LTS versions. just my 2 cents

Bhairvi23 added a commit to Bhairvi23/capa that referenced this issue Feb 19, 2024
Changes the minimum version to 3.9
@mr-tz
Copy link
Collaborator Author

mr-tz commented Oct 1, 2024

this is coming soon, should we go with 3.9 or 3.10?

@doomedraven
Copy link
Contributor

3.10 😜

@williballenthin
Copy link
Collaborator

To define the issue, "declaring support" (or "removing support for") means that:

  1. we update pyproject.toml specifying the minimum supported Python version, which prevents installation on lesser versions, and
  2. enables us to use language features from that version and earlier.

By keeping more versions of Python available, theoretically there are more users/environments that can install capa. But, in practice, who are these people? Especially in the age of docker containers and virtual environments.

Python 3.9 is supported (security patches) for the next year, until Oct 2025. https://devguide.python.org/versions/

So, the Python organization provides support for this audience.

According to pypistats.org, around 2% of capa downloads are for Python 3.9
https://pypistats.org/packages/flare-capa

image

Here are the upcoming language features of Python that we can start using:

https://web.archive.org/web/20240915170814/https://www.nicholashairs.com/posts/major-changes-between-python-versions/

image

image

image

@williballenthin
Copy link
Collaborator

williballenthin commented Oct 1, 2024

We could try dropping support for 3.9 but not use any new language features, and if noone complains after X amount of time (advertised in the readme/changelog/warning messages) then we could make it official (or revert and re-add support for 3.9).

https://docs.python.org/3/library/exceptions.html#DeprecationWarning

@williballenthin
Copy link
Collaborator

Personally, I like the consistency of following Python.org, because then we don't have to make decisions ourselves and debate which language features are worth what user base.

OTOH, I think capa would use the following 3.10 language features reasonably heavily:

  • structural pattern matching
  • unions with pipe
  • type alias

@mr-tz
Copy link
Collaborator Author

mr-tz commented Oct 1, 2024

Nice stats, thank you! I agree that 3.10 offers some cool new language features. For the <2% of Python 3.9 downloads I think the pros outweigh the few users (who can probably easily upgrade to a newer Python anyway).

@williballenthin
Copy link
Collaborator

if we do a point release soon (which I think we were planning to do), then lets include a note about this (and maybe warning when run under Python 3.8 or 3.9). then as soon as that's released, bump the minimum python version to 3.10 and start using those language features.

thoughts?

@mr-tz
Copy link
Collaborator Author

mr-tz commented Oct 1, 2024

Sounds good to me!

@mr-tz
Copy link
Collaborator Author

mr-tz commented Oct 21, 2024

Notably, Windows 7 will not be supported anymore as the last supporte Python is 3.8 (https://www.python.org/downloads/windows/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants