Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Cope with OSError when checking cache stat.mtime - #11718

Merged
hauntsaninja merged 1 commit into
python:masterfrom
Zac-HD:handle-stat-failures
Dec 12, 2021
Merged

Cope with OSError when checking cache stat.mtime#11718
hauntsaninja merged 1 commit into
python:masterfrom
Zac-HD:handle-stat-failures

Conversation

@Zac-HD

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

Copy link
Copy Markdown
Contributor

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

@hauntsaninja hauntsaninja left a comment

Copy link
Copy Markdown
Collaborator

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.
@Zac-HD
Zac-HD force-pushed the handle-stat-failures branch from ef7e7b5 to 1f32982 Compare December 12, 2021 06:16
@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