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

Fix support for pre-commit versions < 3.2.0 #4041

Closed

Conversation

andrewmwilson
Copy link

Description

This previous change broke support for versions of pre-commit earlier than 3.2.0.

As far as I can tell, there's no reason not to leave these as commit, merge-commit and push for now. Eventually they will need to be updated, but the current version of pre-commit supports both sets of values.

Checklist - did you ...

  • Add an entry in CHANGES.md if necessary?
  • Add / update tests if necessary?
  • Add new / update outdated documentation?

CHANGES.md Outdated Show resolved Hide resolved
Co-authored-by: Cooper Lees <me@cooperlees.com>
@davidculley
Copy link
Contributor

As far as I can tell, there's no reason not to leave these as commit, merge-commit and push for now.

Agreed.

the current version of pre-commit supports both sets of values.

True.

Eventually they will need to be updated

Yes, probably sometime in mid-to-late 2024, see #4067 (comment)

abompard added a commit to fedora-infra/sqlalchemy-helpers that referenced this pull request Dec 5, 2023
Newer versions of Black only support pre-commit > 3.2.0 and the distro's
version may be older. See psf/black#4041

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
abompard added a commit to fedora-infra/datagrepper that referenced this pull request Dec 5, 2023
Newer versions of Black only support pre-commit > 3.2.0 and the distro's
version may be older. See psf/black#4041

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
abompard added a commit to fedora-infra/discourse2fedmsg that referenced this pull request Dec 5, 2023
Newer versions of Black only support pre-commit > 3.2.0 and the distro's
version may be older. See psf/black#4041

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
abompard added a commit to fedora-infra/discourse2fedmsg that referenced this pull request Dec 5, 2023
Newer versions of Black only support pre-commit > 3.2.0 and the distro's
version may be older. See psf/black#4041

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
@owenlamont
Copy link

Can this PR be merged soon? I'm keen to get this fix and aren't in a position to update pre-commit in the environment I'm using.

@hauntsaninja
Copy link
Collaborator

Thanks for the PR! However, this situation seems pretty annoying, since specifying these values sounds like it will just break again with a newer pre-commit in a few months. I think we should just revert #3940 , afaict users who care about specific stages can just specify that directly in their own config. Does that sound reasonable, @davidculley? Maybe there's some motivation for that change that I'm missing

@hauntsaninja
Copy link
Collaborator

Also note for anyone currently broken by this, you can try using https://github.com/psf/black-pre-commit-mirror instead. This never received that change, so should still work. It'll also make black like 2x faster :-)

@davidculley
Copy link
Contributor

I think we should just revert #3940 , afaict users who care about specific stages can just specify that directly in their own config. Does that sound reasonable, @davidculley? Maybe there's some motivation for that change that I'm missing

Yes, that sounds reasonable to me.

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.

None yet

5 participants