-
Notifications
You must be signed in to change notification settings - Fork 93
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
open is not skipped for skipped modules #552
Comments
Thanks for the report -- this has probably never been used so far, so it has not been noticed. |
This one may be a bit tricky, because other than all other patched imports, |
Out of interest - what is the use case you need this for? |
I am using the botocore library, which generates objects dynamically based on data files that come with it. It uses the builtin |
Actually I used to do the same for some django-related package (I think tzinfo, which loads the timezone info from disk). I agree that this is not ideal (though it works well enough, and has no real performance penalty), so to fix these things is a good idea. |
Hi. In my project I have a file |
@hard7 - thanks for the report--this is obviously a bug. |
While experimenting with the package, I have found that the
open
builtin is faked for even for modules that I have excluded from faking via the Patcher context manager.How To Reproduce
I have the following setup:
test.py:
my_file.py:
Your enviroment
The output is as follows:
Could a possible solution be patching the builtin
open
by overriding it only in the modules not listed for skip? It should be checked that the module hadn't overrode theopen
by itself, since it may cause overriding it again.The text was updated successfully, but these errors were encountered: