GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — The pre-commit hooks do not work on macOS · Issue #110652 · python/cpython

The pre-commit hooks do not work on macOS #110652

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
The pre-commit hooks do not work on macOS#110652
Copy link
Labels
OS-mac

Description

@erlend-aasland
erlend-aasland
opened on Oct 10, 2023
Issue body actions
$ grep "entry.*python" .pre-commit-config.yaml
        entry: 'python Tools/patchcheck/reindent.py --nobackup --newline LF'
        entry: "python Tools/patchcheck/untabify.py"

Unfortunately, there is no python on macOS; only python3. Can we change these to python3?

Linked PRs

  • gh-110652: Fix pre-commit hooks on macOS #110653

Activity

  1. erlend-aasland
    added
    OS-mac
    on Oct 10, 2023
  2. erlend-aasland commented on Oct 10, 2023

    @erlend-aasland
    erlend-aasland
    on Oct 10, 2023
    ContributorAuthor
    More actions

    Simply executing these scripts directly would also do:

    $ head -n1 Tools/patchcheck/*.py
    ==> Tools/patchcheck/patchcheck.py <==
    #!/usr/bin/env python3
    
    ==> Tools/patchcheck/reindent.py <==
    #! /usr/bin/env python3
    
    ==> Tools/patchcheck/untabify.py <==
    #! /usr/bin/env python3
  3. erlend-aasland
    added a commit that references this issue on Oct 10, 2023

    pythongh-110652: Fix pre-commit hooks on macOS

    6509e94
  4. hugovk commented on Oct 10, 2023

    @hugovk
    hugovk
    on Oct 10, 2023
    Member
    More actions

    Yep, see also comments at #109891 (comment).

    We can't use python3 because that won't work on Windows...

    Let's check if direct execution works on Windows.

  5. AlexWaygood commented on Oct 10, 2023

    @AlexWaygood
    AlexWaygood
    on Oct 10, 2023
    Member
    More actions

    We can't use python3 because that won't work on Windows...

    Let's check if direct execution works on Windows.

    Unfortunately neither approach works on Windows: see #110653 (comment) ://

  6. AlexWaygood commented on Oct 11, 2023

    @AlexWaygood
    AlexWaygood
    on Oct 11, 2023
    Member
    More actions

    I think we should revert these commits until we figure out how to fix this properly (if it can be "fixed properly"):

    • f5edb56
    • 08ec4a1
    Reacted by Hugo van Kemenade
  7. hugovk commented on Oct 11, 2023

    @hugovk
    hugovk
    on Oct 11, 2023
    Member
    More actions

    Agree to revert.

    I'd prefer to replace Tools/patchcheck/reindent.py and Tools/patchcheck/untabify.py with other pre-commit hooks.

    Reacted by Erlend E. Aasland
  8. erlend-aasland commented on Oct 11, 2023

    @erlend-aasland
    erlend-aasland
    on Oct 11, 2023
    ContributorAuthor
    More actions

    I'd prefer to replace Tools/patchcheck/reindent.py and Tools/patchcheck/untabify.py with other pre-commit hooks.

    Surely there must be existing hooks we can use.

    If we need CPython specific hooks, we can create a repo for them under the GitHub python org. (for example python/pre-commit)

    Reacted by Hugo van Kemenade and Thomas Grainger
  9. erlend-aasland
    closed this as not plannedon Oct 11, 2023
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

    OS-mac

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.