-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Pylint 2.10.0 incorrectly assumes that $HOME/.cache/pylint exists #4883
Comments
Reproduced on windows, python 3.9.4 in a venv:
|
I reproduced this on both Pop_OS linux locally, and inside GitHub actions using In my local environment I found that deleting the old cache directory that is mentioned by the warning will allow the new version of pylint to run successfully. |
This bug is breaking our CI runs when an earlier version of pylint has already run (in our case, pylint 2.7.1 as pinned by |
I'm experiencing this as well on all platforms I tested, Python 3.8 and 3.9, Linux and Windows, and with and without Pre-Commit. The culprit actually appears to be 56fdadb, a commit added directly to master only a few hours before release. The code, a check for a trivial nuisance under a specific run scenario and which did not include a test, assumes that the new home directory already exists, and is executed on file import, before it ever has a chance to be created, and thus crashes pylint. As such, it would appear that it will break running pylint on any machine that has previously run any prior version of Pylint. To work around this until a non-broken version is out, you can delete the old pylint directory from the path specified, and the problem code is never triggered. Ideally, there really should be at least a minimal smoke test for running Pylint when a previous directory was found and the new directory is not yet present, which would have caught this bug. The simplest fix for the issue itself is guarding the block by an additional check for whether |
The fix for this has been released in v2.10.1. Sorry that took a bit longer than expected. I wish you all a weekend of green CI runs! |
Thanks @AWhetter ! |
This bug still seems to be present in 2.10.2
The workaround is: But I would expect that if that directory is required then |
The issue for that is #4900 |
Bug description
I'm trying out Pylint 2.10.0, and seeing a crash (described below).
Configuration
No response
Command used
Pylint output
Expected behavior
I would not expect Pylint to crash. I'd expect it to create this
~/.cache/pylint
directory as needed.I believe this was broken in #4661
Pylint version
OS / Environment
Arch Linux
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: