-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Unable to configure logging in 2.8.11 using TOML. #2879
Comments
One way to fix this would be to not freeze the logging section in the parser: In luigi/luigi/configuration/toml_parser.py instead of: # freeze dict params
for section, content in self.data.items():
for key, value in content.items():
if isinstance(value, dict):
self.data[section][key] = recursively_freeze(value) It would be possible to do: # freeze dict params
for section, content in self.data.items():
if key.lower() == 'logging':
continue
for key, value in content.items():
if isinstance(value, dict):
self.data[section][key] = recursively_freeze(value) Another solution, that is probably better, is to let the config parser make a mutable copy. That would however require us to write a more complicated "recursively_unfreeze" function. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If closed, you may revisit when your time allows and reopen! Thank you for your contributions. |
Also experiencing this issue when attempting to configure logging via toml. I tried editing my toml_parser.py as suggested by @hirolau and can confirm the solution works (I assume you meant # freeze dict params
for section, content in self.data.items():
if section.lower() == 'logging':
continue
for key, value in content.items():
if isinstance(value, dict):
self.data[section][key] = recursively_freeze(value) |
I'm confused about why this is WONTFIX. I have a fork with the change (and one other change that was blocking toml config processing) that I will send, will they be accepted? I don't see a way to work around this in the toml file (maybe I'm missing something here?) EDIT: Is the (non-code-change) "solution" to not include the |
In 2.8.11 the TOML parser freezes the config dict, this makes it no longer possible to load logging using that config.
I have not had time to look into possible solutions for now.
The text was updated successfully, but these errors were encountered: