Skip to content

Run pre-commit with latest Python#344

Open
NMertsch wants to merge 1 commit intobeeware:mainfrom
NMertsch:use-latest-py
Open

Run pre-commit with latest Python#344
NMertsch wants to merge 1 commit intobeeware:mainfrom
NMertsch:use-latest-py

Conversation

@NMertsch
Copy link
Copy Markdown
Contributor

This PR reverts #260, which pinned the pre-commit Python version to 3.13 until docformatter supports 3.14.

97ac9c5 removed docformatter from the pre-commit config, so that bandaid is not necessary anymore.
Also, docformatter v1.7.8 was just released, now supporting Python 3.14: PyCQA/docformatter#342.

PR Checklist:

Sorry, I don't know how to test or document this.

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

@NMertsch
Copy link
Copy Markdown
Contributor Author

NMertsch commented Apr 21, 2026

Bumping docformatter to v1.7.8 in .pre-commit-config.yaml should fix the builds for python-support-testbed and rubicon-objc. I guess dependabot will handle this in the next days?
Sorry, I thought this is a quick fix and don't have time to do this manually right now.

The failed toga Android build on Windows seems to be unrelated to pre-commit, so I don't see a connection to this PR.

@freakboy3742
Copy link
Copy Markdown
Member

Thanks - as you've noted, I'm guessing this will pass CI once dependabot has run on the downstream repos.

@NMertsch
Copy link
Copy Markdown
Contributor Author

I just realized that Dependabot is not configured to update pre-commit hooks, so this won't resolve itself (pre-commit support in Dependabot is a pretty new feature).

How would a good resolution look like? I could spend some time on this in the next days.

  1. Don't update the Dependabot configs, just update the docformatter hook manually in rubicon-objc and python-support-testbed.
  2. Add pre-commit to the Dependabot configs of all Beeware repos with a pre-commit configuration.
  3. Something else?

@freakboy3742
Copy link
Copy Markdown
Member

I just realized that Dependabot is not configured to update pre-commit hooks, so this won't resolve itself (pre-commit support in Dependabot is a pretty new feature).

I missed that announcement in Dependabot - but we've already worked around this. We have an independent pre-commit update workflow that is (or should be) installed on every repository. It runs on Sunday for "core" repositories, and on the first Sunday of the month for every other repository.

  1. Add pre-commit to the Dependabot configs of all Beeware repos with a pre-commit configuration.

This is what we should be aiming for. PyCon US sprints are coming up, and this sort of upgrade is good fodder for first time contributors. It's not super urgent that it be done, it's relatively easy to explain, and it's spread across a lot of repositories.

@freakboy3742
Copy link
Copy Markdown
Member

@freakboy3742
Copy link
Copy Markdown
Member

CI now passes; but we can't merge until beeware/briefcase#2815 has been merged. That's the last active reference to docformatter that I can find that hasn't been updated.

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