Dinnerbone / mcstatus

A Python class for checking the status of an enabled Minecraft server
http://dinnerbone.com/minecraft/tools/status/
1.11k stars 146 forks source link

Drop support for python 3.6 #183

Closed ItsDrike closed 2 years ago

ItsDrike commented 2 years ago

As of the end of December 2021, python 3.6 has officially reached end of life and will not be receiving any further security updates. While this isn't necessarily an issue just yet, as the time goes on, the security issues will almost certainly start to pile up. Right now, the final update to python 3.6 occurred in 2021-09-04, which was python 3.6.15 as can be seen in PEP 494 (Python 3.6's release schedule)

While python 3.6 going EOL isn't necessarily a reason to avoid supporting it, since it's still ultimately up to the users of the application to choose the version of python that they'll be using to run this with, and it's them risking the security issues, not us. Nevertheless though, I think there's no reason to encourage the use of these EOL-ed versions.

Python 3.6 was first released 5 years ago (late 2016), and the next major release being python 3.7 came out in mid 2018. I believe that enough time has passed for most users/system maintainers to update already. But of course, this isn't a particularly pressing issue and it can be delayed if necessary.

Benefits of dropping 3.6

Dropping python 3.6 will mean we can start using certain 3.7 exclusive features, namely: dataclasses, support for typing genercis, obtaining type-hints at run-time, default values for named tuples, postponed type annotation evlauations with __future__.annotations (which is already the default in python 3.10), and many other less significant things.

Apart from gained features, another benefit this would have is avoiding having python 3.6 installed on the system for development on this project. While it's not actually necessary to have it installed locally, currently, the tox configuration for unit-tests includes 3.6 version, which means that without it, the developers wouldn't be able to test out whether the code actually works for such an old version of python. Not to mention that many developers find it helpful to create virtual environments at the lowest supported version to avoid accidentally using features which weren't yet in that version. This isn't a particularly huge benefit, but I think we should avoid requiring the developers to keep EOL-ed version of the language on their machines if we can.