Skip to content
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

Cope with OSError when checking cache stat.mtime #11718

Merged
merged 1 commit into from
Dec 12, 2021

Conversation

Zac-HD
Copy link
Contributor

@Zac-HD Zac-HD commented Dec 12, 2021

If we get an error when accessing the mtime of a cache file, we should handle that as if the cache is unusable for any other reason.

I've been getting a bizzare crash here in while working on Hypothesis deps; I think it's something to with with my WSL+pyenv install breaking. Given that there was already a TODO comment requesting error handling here, I went ahead and added it in the obvious way.

@Zac-HD Zac-HD mentioned this pull request Dec 12, 2021
Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, mind adding logging along the new return paths?

If we get an error when accessing the mtime of a cache file, we should handle that as if the cache is unusable for any other reason.
@hauntsaninja hauntsaninja merged commit 5f7a3f1 into python:master Dec 12, 2021
@Zac-HD Zac-HD deleted the handle-stat-failures branch December 12, 2021 08:33
tushar-deepsource pushed a commit to DeepSourceCorp/mypy that referenced this pull request Jan 20, 2022
If we get an error when accessing the mtime of a cache file, we should handle that as if the cache is unusable for any other reason.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants