Closed kkirsche closed 1 year ago
Thanks for this @kkirsche ! It looks like this breaks tests on older Python versions. I wanted to align with Flask and prometheus_client here, so maybe it's time to drop Python 2 support and the oldest 3.x, but haven't started working on it yet - we should be able to drop a bit of compatibility code there as well
Personally, I think because 2.x is end of life, many of the major libraries have dropped support, and 3.11 in October will be faster than 2.x had been, it's time to just drop comparability and embrace modern versions.
While 2.x support was important, developers have had nearly 14 years since 3.0's release to migrate. I think it's important to stop encouraging developers to hold off upgrading any longer.
To your point, currently flask requires Python 3.7+ while client_Python in Prometheus requires 3.6+. If you want to use data classes or some of the typing module, 3.7 may make more sense as a target, otherwise 3.6 is pretty similar (outside of asyncio)
Wanted to sync up on this again now that 0.22.0 has removed support for 3.6
Hello! Yeah, I think it's time now to do this. Could you please rebase this PR on top of the latest changes? I can then run it through actions and cut a release. Thanks!
Of course, I believe I have rebased against the latest master
branch. If you have any questions or encounter any issues, just let me know 🙂
Thank you for your time, patience and help. If there are any changes that would be of use that you may not have time to work on, feel free to let me know 👍
No, thank you for your contribution! Improvements are always welcome!
This replaces the use of lower-performance interpolation with f-strings and simplifies conditionals and file reading to match the supported Python versions as per the README.md badges