pre-commit-ci / issues

public issues for https://pre-commit.ci
17 stars 3 forks source link

Feature request: pypy3 support #191

Closed Mikaela closed 1 year ago

Mikaela commented 1 year ago

Locally I am on Fedora 39 Beta which ships with Python 3.12 which is currently in rc(3) state and not all Python hooks support it (https://github.com/editorconfig-checker/editorconfig-checker.python/issues/28).

I workarounded this by setting

default_language_version:
    python: pypy3

in my .pre-commit-config.yaml which results to pre-commit.ci reporting:

    An unexpected error has occurred: CalledProcessError: command: ('/venv/bin/python3', '-mvirtualenv', '/pc/clone/lYI5ehFFTTuvoau2j8-cXw/py_env-pypy3', '-p', 'pypy3')
    return code: 1
    stdout:
        RuntimeError: failed to find interpreter for Builtin discover of python_spec='pypy3'
    stderr: (none)

I noticed that I can install python3.11 from Fedora 39 repositories and set it as the default_language_version for python, but I am unsure on how available that is on other distributions and it will require me to bumb the version number manually in the future.

Thus I would like to request pypy3 to be supported as it tends to be compatible with CPython versions that aren't so bleeding/cutting edge (Fedora 39 is currently on 7.3.12 which equals CPython 3.10.12), widely packaged and I am hoping I could just leave it to my .pre-commit-config.yaml and not have to worry about it.