-
Notifications
You must be signed in to change notification settings - Fork 10
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
Emergent Access Denied errors on Windows #28
Comments
Workaround for businho/pytest-ruff#28; Closes #4467.
In a conversation with the Ruff team, they've indicated a desire to handle this situation more robustly, so there may be nothing for pytest-ruff to do here. |
Now that ruff has merged a fix, we know the long-term strategy, but there's still an issue for consumers. In particular, setuptools is still pinned against pytest-ruff 0.4. Once the latest ruff is released, setuptools can remove that pin, but will still fail in environments that happen to pick up the latest pytest-ruff but an older version of ruff. I see that pytest-ruff depends on a very old ruff, so I'm uneasy suggesting that should be bumped to Maybe it's not common enough for an environment to encounter that condition above, so it's not worth addressing. If we wanted to address this issue in pytest-ruff, we could do so thus:
That would give users of pytest-ruff 0.4.1 (or similar new release) the stable behavior without having to avoid older versions of ruff. Personally, I'm just happy to "work at head" (expect the latest versions of everything), but others may want to be more precise about the requirements or have pinned behavior on older versions of ruff. I'll leave it to the maintainer to decide how to proceed. |
I think it is a good idea to check ruff output to ignore these known errors. 👍🏻 |
With the release of pytest-ruff 0.4, when running a sizeable test suite under
pytest-xdist
on Windows, many failures are emitted. This issue was reported in pypa/setuptools#4467.It seems that there's a race condition when ruff is invoked in parallel on the same project on Windows. The cache files collide and fail to be saved.
This issue was masked in 0.3.2 because the exit code from ruff was 2 and ignored.
I wonder if pytest-ruff should detect these "errors saving cache" and continue to suppress them. Or maybe ruff should have a separate exit code for "access denied when saving cache" so that "pytest-ruff" can suppress that code.
Thoughts?
The text was updated successfully, but these errors were encountered: