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

globalvars.py: Use ConfigParser instead of RawConfigParser #6540

Merged
merged 1 commit into from Jun 19, 2021

Conversation

teward
Copy link
Member

@teward teward commented Jun 16, 2021

According to the documentation for configparser.RawConfigParser (https://docs.python.org/3/library/configparser.html#configparser.RawConfigParser), this is a legacy API call that allows for non-string section names, option names, and values via the unsafe add_section and set methods. We don't use those methods, but it's overall still a legacy compatibility and should be avoided.

The documentation suggests that instead of using RawConfigParser, we should use ConfigParser and set interpolation=None at instantiation instead.

According to the documentation for `configparser.RawConfigParser` (https://docs.python.org/3/library/configparser.html#configparser.RawConfigParser), this is a **legacy** API call that allows for non-string section names, option names, and values via the unsafe `add_section` and `set` methods.  We don't use those methods, but it's overall still a legacy compatibility and should be avoided.

The documentation suggests that instead of using `RawConfigParser`, we should use `ConfigParser` and set `interpolation=None` at instantiation instead.
@makyen
Copy link
Contributor

makyen commented Jun 19, 2021

Given that this is merged, everyone's still welcome to review it, but it doesn't need to be a task for them.

@makyen makyen deleted the config-parser-modernization branch June 19, 2021 01:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants