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

please make applying the umask configurable for create_dir() #1038

Closed
jcfp opened this issue Jul 11, 2024 · 5 comments · Fixed by #1039
Closed

please make applying the umask configurable for create_dir() #1038

jcfp opened this issue Jul 11, 2024 · 5 comments · Fixed by #1039

Comments

@jcfp
Copy link

jcfp commented Jul 11, 2024

Recent changes made pyfakefs apply the umask by default when creating files or dirs. For create_file(), this behaviour is configurable via the apply_umask parameter. Please add a similar parameter for create_dir(), to allow for ignoring the umask and thus enabling full control of the exact permissions on the new dir via the perm_bits parameter.

Currently, we work around the umask always getting applied to directories by configuring an unrealistic all-permissive umask ("0000") on the fake filesystem (like so) to get rid of some test failures (sabnzbd/sabnzbd#2883). Having an option to control the behaviour of create_dir() would obviously be a lot nicer.

@mrbean-bremen
Copy link
Member

Sure, that makes sense - I hadn't thought about this at the time.

mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Jul 11, 2024
@mrbean-bremen
Copy link
Member

I guess you will need a release with the change?

@mrbean-bremen
Copy link
Member

A new release is out.

joecool1029 added a commit to joecool1029/gentoo that referenced this issue Jul 18, 2024
Spoken with upstream, this is fixed in 4.3.3 (which uses newer pyfakefs).

Caused by pytest-dev/pyfakefs#1038

Signed-off-by: Joe Kappus <joe@wt.gd>
gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Jul 20, 2024
Spoken with upstream, this is fixed in 4.3.3 (which uses newer pyfakefs).

Caused by pytest-dev/pyfakefs#1038

Signed-off-by: Joe Kappus <joe@wt.gd>
Closes: #36990
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
@jcfp
Copy link
Author

jcfp commented Aug 12, 2024

@mrbean-bremen Couldn't respond timely as I found myself completely AFK the last four weeks, but still: thanks for the quick fix and the new release.

@Safihre
Copy link

Safihre commented Aug 16, 2024

Thanks @mrbean-bremen !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants