-
Notifications
You must be signed in to change notification settings - Fork 92
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
Several global constants lost in 5.2.1 #809
Comments
Instead of USER_ID, I think a get_uid function should be added. |
Thanks! Sorry for that, that had been due to the refactoring I made for 5.2.0 (to make pytype a bit faster...). |
|
Hm, I was sure that is there, but you are right of course. Will add this.
Also true. This will only correctly work for constants, not for mtuable POD globals, as otherwise always the local copy is used. This can only be fixed by moving the globals back, or adapting the user code to use Probably have to move the globals back... |
Adding these back opens a can of worm regarding cyclic dependencies, so I'm not sure yet how to handle this properly without reverting the whole refactoring. I'll probably leave them for the moment and think about how to do this later... |
- some if these had been accessed in user code, which caused a regression - add convenience function get_uid()/get_gid() - fixes pytest-dev#809
- some if these had been accessed in user code, which caused a regression - add convenience function get_uid()/get_gid() - fixes pytest-dev#809
- some if these had been accessed in user code, which caused a regression - add convenience function get_uid()/get_gid() - fixes pytest-dev#809
Adding this also works, but perhaps accessing the value through os.getuid (and setting, too? look through the os module's functions) is optimal.
|
- some if these had been accessed in user code, which caused a regression - add convenience function get_uid()/get_gid() - fixes pytest-dev#809
Ah, thanks - I forgot about this! I had already used that elsewhere... This is read-only, there is no possibility for a module-level property setter as far as I know. Thanks for the help! |
- some if these had been accessed in user code, which caused a regression - add convenience function get_uid()/get_gid() - see pytest-dev#809
Please check if the changes are sufficient for you - if yes, I will merge them and probably make another patch release shortly. |
I looked at the changes, and they will work. Thanks! |
- some if these had been accessed in user code, which caused a regression - add convenience function get_uid()/get_gid() - see #809
Fixed in just released version 5.2.2, closing. |
Upon importing pyfakefs 5.2.1, we see numerous errors due to lost global constants in fake_filesystem.py.
Please re-define them, for backward compatibiltiy.
Thanks.
The text was updated successfully, but these errors were encountered: