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

Trigger warning when trying to check hidden file status on PyPy #238

Merged
merged 4 commits into from
Sep 10, 2021

Conversation

jasongrout
Copy link
Member

As discussed in #235, perhaps the best thing to do to give best-effort support for pypy and help users to understand the current limitations is to trigger a warning when we know we cannot give good results.

@jasongrout jasongrout changed the title Trigger warning when trying to check hidden status on pypy Trigger warning when trying to check hidden file status on PyPy Sep 2, 2021
@jasongrout
Copy link
Member Author

@bollwyvl (or others) - can you review this?

@jasongrout jasongrout mentioned this pull request Sep 2, 2021
@stonebig
Copy link

stonebig commented Sep 5, 2021

isn't this going to solve the problem ? https://foss.heptapod.net/pypy/pypy/-/issues/3469

@jasongrout
Copy link
Member Author

isn't this going to solve the problem ? https://foss.heptapod.net/pypy/pypy/-/issues/3469

It looks like it will in the next pypy release. Having this warning in will still help people that are on older releases, though.

@@ -275,6 +275,7 @@ def is_file_hidden_win(abs_path, stat_res=None):
# allow AttributeError on PyPy for Windows
# 'stat_result' object has no attribute 'st_file_attributes'
# https://foss.heptapod.net/pypy/pypy/-/issues/3469
warnings.warn("hidden files are not detectable on this system, so no file will be marked as hidden.")
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we have/open a dedicated issue and link to it from here?

@bollwyvl
Copy link
Contributor

bollwyvl commented Sep 8, 2021

LGTM, modulo the small docs items... but since we anticipate it being fixed upstream soon anyway...

@jasongrout
Copy link
Member Author

Thanks everyone for your comments and reviews!

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.

5 participants