-
Notifications
You must be signed in to change notification settings - Fork 91
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
os.access() is not properly faked, wrong signature since python3.3 #585
Comments
Good point. I'll probably just add the argument for now, without it having an effect, as we don't really support guid/uid permissions (apart from uid 0 being root). Do you need to have it any functionality? |
Hi, thanks for the instant reply. I think it's fine to just accept the argument, but not switching test behaviour! I was just discovering the mismatch when testing a function decorated with |
Ok, thanks - will do this in this case in a moment. |
Should work now in master. |
Thanks for the fix! I confirm that using master from github works for me now! |
Can you live with master, or do you need a patch release? |
Hi, thanks for asking! |
Describe the bug
Signature of os.access() (since Python3.3) is:
os.access = access(path, mode, *, dir_fd=None, effective_ids=False, follow_symlinks=True)
If some code uses the "effective_ids" feature, it does not work when using pyfakefs because the "os.access" function in fake_filesystem.py::FakeOsModule::access() does not match the signature:
def access(self, path, mode, *, dir_fd=None, follow_symlinks=True):
How To Reproduce
Your environment
Please run the following and paste the output.
FreeBSD-12.1-RELEASE-p10-amd64-64bit-ELF
Python 3.7.9 (default, Dec 3 2020, 01:19:24)
[Clang 8.0.1 (tags/RELEASE_801/final 366581)]
pyfakefs 4.3.3
The text was updated successfully, but these errors were encountered: