Skip to content

Broken by uv 0.11.22 #152

Closed
Closed

Description

@GideonBear

Config:

repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v6.0.0
    hooks:
      - id: end-of-file-fixer

Repro

All using uv-managed cpython 3.14.6.

$ which pre-commit
$ uv tool install pre-commit
Resolved 10 packages in 3ms
Installed 10 packages in 4ms
 + cfgv==3.5.0
 + distlib==0.4.3
 + filelock==3.29.4
 + identify==2.6.19
 + nodeenv==1.10.0
 + platformdirs==4.10.0
 + pre-commit==4.6.0
 + python-discovery==1.4.2
 + pyyaml==6.0.3
 + virtualenv==21.5.1
Installed 1 executable: pre-commit
$ which pre-commit
/home/gideon/.local/bin/pre-commit
$ pre-commit run -a
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
fix end of files.........................................................Passed
$ uv tool uninstall pre-commit
Uninstalled 1 executable: pre-commit
$ uv tool install pre-commit --with pre-commit-uv
Resolved 12 packages in 6ms
Installed 12 packages in 4ms
 + cfgv==3.5.0
 + distlib==0.4.3
 + filelock==3.29.4
 + identify==2.6.19
 + nodeenv==1.10.0
 + platformdirs==4.10.0
 + pre-commit==4.6.0
 + pre-commit-uv==4.2.1
 + python-discovery==1.4.2
 + pyyaml==6.0.3
 + uv==0.11.22
 + virtualenv==21.5.1
Installed 1 executable: pre-commit
$ pre-commit run -a
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Using pre-commit with uv 0.11.22 via pre-commit-uv 4.2.1
An unexpected error has occurred: AssertionError: BUG: expected environment for python to be healthy immediately after install, please open an issue describing your environment

more info:

virtualenv python version did not match created version:
- actual version: 3.14.6
- expected version: 3.14

Check the log at /home/gideon/.cache/pre-commit/pre-commit.log
$ uv tool install pre-commit --with pre-commit-uv --with uv==0.11.21
Resolved 12 packages in 7ms
Uninstalled 1 package in 0.53ms
Installed 1 package in 4ms
 - uv==0.11.22
 + uv==0.11.21
Installed 1 executable: pre-commit
$ pre-commit run -a
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Using pre-commit with uv 0.11.21 via pre-commit-uv 4.2.1
fix end of files.........................................................Passed

Activity

  1. GideonBear commented on Jun 19, 2026

    @GideonBear
    Author
  2. GideonBear commented on Jun 19, 2026

    @GideonBear
    Author

    Also reported in astral-sh/uv#19920

  3. Gankra commented on Jun 19, 2026

    @Gankra

    We're reverting this change in 0.11.23 for now but per astral-sh/uv#19920 (comment) we think this is probably pre-commit-uv being overzealous in its validations.

  4. gaborbernat commented on Jun 19, 2026

    @gaborbernat
    Member

    Fixing it...

  5. GideonBear commented on Jun 19, 2026

    @GideonBear
    Author

    Can confirm the issue is fixed, thanks! @Gankra I guess you can revert the revert now...?

  6. Gankra commented on Jun 19, 2026

    @Gankra

    Ok we'll probably un-revert some time next week, thanks for the quick response!

  7. added a commit that references this issue on Aug 15, 2026
    dfe7d0c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions