-
Notifications
You must be signed in to change notification settings - Fork 29
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
lazy_module breaks logging #8
Comments
I totally agree with @emsi. Also, I would stay away from loading the version from another file because it's an unnecessary load which breaks when it comes to packing like pyinstaller. A lot of the default python features and basic practices should be removed from the package to not break things like logging or optimized packaging. |
@emsi @smerkousdavid @mnmelo |
I was also hit by this. I guess it is bad behavior of a library to setup/configure the global logging setup. |
Logging needs be configured by application code, while Deduce is a library (to be imported, not to be run). Reminiscent of mnmelo/lazy_import#8.
lazy_module changes root logger and thus affects programs importing it in undesired way.
The following snippet illustrates the issue:
Removing the
import lazy_import
restores desired default behavior.lazy_import should use its own logger and refrain from calling
logging.basicConfig()
.As per https://docs.python.org/3/library/logging.html#logging.basicConfig
The text was updated successfully, but these errors were encountered: