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

Bot keeps bumping ruff-pre-commit to incompatible release #112

Closed
sjlongland opened this issue Oct 17, 2023 · 2 comments
Closed

Bot keeps bumping ruff-pre-commit to incompatible release #112

sjlongland opened this issue Oct 17, 2023 · 2 comments

Comments

@sjlongland
Copy link

Hi,

Firstly, great service, this tool is a great help keeping code in check. One little irritation however, the bot seems to always choose the latest version of each hook, even when that version is incompatible with the project.

Our project targets multiple versions of Python, including some that are no longer maintained such as Python 3.6… just because 3.12 is the latest does not mean every computer with Python installed magically updates itself and some production environment are very conservative regarding updates.

(I've had to argue with a manager about Python 2.7 for example, and I have colleagues that still happily load Debian Stretch onto new boxes despite it being ancient today.)

As such, we try to limit ourselves to features supported by Python 3.6, chosen as a lower practical limit that still supports 'modern' features, whilst still allowing a wide compatibility base.

The problem is the pre-commit bot insists on bumping ruff-pre-commit. The last version to support Python 3.6 is v0.0.233. When it bumps this and proposes a pull request, the PR tests fail because… surprise surprise… the version of ruff used doesn't support this version of Python.

https://results.pre-commit.ci/run/github/659078614/1697485172.NGow0yyXQNaO8Fti5MGycw

diazona/setuptools-pyproject-migration#108 is an example, where I've then had to revert one of the version bumps.

I had a look through the documentation and issues, couldn't see anywhere to "pin" a hook version. Is there a method to pin this particular hook to a compatible version?

(Previously raised pre-commit/pre-commit.com#887)

@sjlongland
Copy link
Author

closed this as completed

I must be dense, what was the resolution to this issue?

image

@asottile
Copy link
Member

I fixed the link in the original post to link to the correct spot where you'll find several duplicates and an explanation

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

No branches or pull requests

2 participants