-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: pre-commit version 4.0.0 is required #61328
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
Comments
We don't really advertise/support creating development environments from apt packages so I'm a little hesitant wanting to support that use case. Is there a reason you need to use pre-commit from apt? |
Do you think it should be pip installed by the system installed Python instead? On Debian you are discouraged from doing so:
For sure can go through the alternatives listed above, but it would be nicer to avoid. Is there a particular feature we need the 4.0.0 min for? |
We do also encourage development environments to be in a virtual environment, as describe in that traceback.
Not in particular, but I am also just not very fond on being bound to limitations of the apt ecosystem because in my experience Python library authors are usually not the ones releasing/maintaining their apt equivalents. |
Just to clarify the use case, I think this mostly will affect IDEs and editors that are not attached to a given virtual environment. In my use case, I have my IDE set up to the system pre-commit, so that I don't need to putz around with every single project to make a commit, and can work multiple projects from a single session. pre-commit will create its own virtual environment separate from the virtual environment you use for development anyway, so it doesnt affect the functionality of the checks by using a system installed package |
Yeah your convenience use case is understandable, but would still be -0 to change (but won't die on that hill) due to apt not being in lockstep with pypi/conda generally. |
I'm a little confused here. Are you not using a virtual environment when working on pandas, and if you are, are you needing to do anything more than |
I use a virtual environment for working on pandas, but for committing files to git and running git hooks I just use my IDE directly, which doesn't need to be launched from or activate the virtual environment |
I see - thanks. Though I do agree with @mroeschke - I don't think we should be holding back dev tools because a developer wants to do dev-related activities with the system's installation of Python. |
I suppose it depends how you look at it. I don't consider anything from my setup to be using system Python for development. I am just using system libraries to commit to the VCS (namely git and its pre-commit ecosystem, within which there is a popular Python package of the same name) |
Ah, indeed - apologies. I'd be opposed to the policy of holding back dev tools for any contributor, but I think perhaps core-devs deserve more consideration. If there is a feature we want to use or bug we're impacted by, then I'd also be opposed. But barring that, I'm okay to hold pre-commit back. |
I am also using a (user-)global pre-commit installation for simplicity. However, you can just remove the older version from apt and install pre-commit via Global installs of pre-commit and tools like ruff are useful especially when working in multiple different projects of varying quality. |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
It looks like the minimum pre-commit version was bumped to 4.0.0 in #61246
However, the version that gets installed by apt on Ubuntu 24.04 is only 3.6.2, so you would have to mess with the system provided version to develop on pandas, or set up a more complicated environment
Expected Behavior
The pre-commit minimum version pin should probably be a little looser @mroeschke
Installed Versions
main
The text was updated successfully, but these errors were encountered: