Skip to content

Conversation

@notable-equivalent
Copy link

@notable-equivalent notable-equivalent commented Apr 25, 2025

Currently, this package declares that it needs Python >= 3.9, and so pip will not allow you to install it on earlier Python versions.

However, this package actually works fine on Python 3.8; I force-installed it using pip install 'shfmt-py~=3.11' --ignore-requires-python and it installed and worked with no issues.

The only reason that this package is currently set to require Python >= 3.9 is because that's the default min-py-version for the setup_cfg_fmt autoformatter, and so the formatter automatically changed the value in this repo's setup.cd (see commit e710e89). This PR updates the pre-commit config to pass --min-py-version '3.8' to setup_cfg_fmt

@notable-equivalent
Copy link
Author

notable-equivalent commented Apr 28, 2025

@MaxWinterstein any question or concerns with this?

@Zoz24
Copy link

Zoz24 commented May 30, 2025

Python 3.8 has already reached its end-of-life anyway, so I don't see any point in supporting python 3.8.
It'd probably makes sense to just upgrade python version being used.

Check https://devguide.python.org/versions/

@notable-equivalent
Copy link
Author

I suppose that's fair, although unfortunately upgrading is not that quick of a process for us 😅. I think if the package supports 3.8 in reality, there's no reason to incorrectly mark it as not supporting 3.8 just because it's EOL

@Zoz24
Copy link

Zoz24 commented Jun 12, 2025

I suppose that's fair, although unfortunately upgrading is not that quick of a process for us 😅. I think if the package supports 3.8 in reality, there's no reason to incorrectly mark it as not supporting 3.8 just because it's EOL

Assume your org has a private artifact platform. If upgrading to >= python3.9 is an issue, you can probably just fork this repo and apply your code changes and build the wheel package and upload it to your private artifact platform.
I think using --ignore-requires-python is also alright, but imho, it's just much easier to bump to at least 3.9, there aren't much breaking changes to worry about here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants