soldni / springs

A set of utilities to turn Dataclasses into useful configuration managers.
https://springs.soldaini.net
MIT License
11 stars 2 forks source link

Import `install` module from `rich.traceback` causing traceback to be forced to `rich` when `import springs` is executed. #16

Closed davidlin409 closed 1 year ago

davidlin409 commented 1 year ago

In nicknames.py, there is a line

LOGGER = configure_logging(__name__)

Above line will install rich-traceback to system, when this file is executed. Meanwhile, simple import springs will already execute nicknames.py, which means, importing springs will already install rich handler, while there is no "uninstall" mechanism for it.

So, is it possible to avoid configure_logging at global scope?

soldni commented 1 year ago

thank you for the report! this is now fixed & pushed to PyPI.