hhatto / autopep8

A tool that automatically formats Python code to conform to the PEP 8 style guide.
https://pypi.org/project/autopep8/
MIT License
4.56k stars 290 forks source link

Add 'python_requires=">=3.6"' to match tomli package #656

Closed vphilippon closed 1 year ago

vphilippon commented 1 year ago

By adding a dependency on the tomli packages, which only has versions available for python >=3.6 (>=3.7 for the lastest version at the moment), autopep8 effectively became compatible with only python >=3.6 also. This changes reflects that by properly providing the Requires-Python package metadata (https://packaging.python.org/en/latest/guides/dropping-older-python-versions/#specify-the-version-ranges-for-supported-python-distributions).

Note for maintainers: After merging and releasing this, you would need to yank the autopep8 1.7.1 release*, so that python 2 environments stop attempting to install that incompatible version. From that point on, you would be safe and free to keep going py3 only withtout impacting py2 users anymore. This will make the life of those still using python 2 (or stuck maintaining stuff on it due to unfortunate circumstances out of their control... cough cough) that much easier.

* edit: I now see that you have made a 2.0.0 tag release, which hasn't landed on pypi yet, and with the intent of yanking 1.7.1. You'll need to also yank that 2.0.0 and make a 2.0.1 release with this fix, or something like that. With all those suggestions said, I'll now let you manage your project 😄 .

This addresses issue #655 .

Thanks and cheers!

codecov-commenter commented 1 year ago

Codecov Report

Base: 98.12% // Head: 98.12% // No change to project coverage :thumbsup:

Coverage data is based on head (25a95c1) compared to base (06efa44). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #656 +/- ## ======================================= Coverage 98.12% 98.12% ======================================= Files 1 1 Lines 2403 2403 ======================================= Hits 2358 2358 Misses 45 45 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hideo+Hattori). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Hideo+Hattori)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.