Skip to content

Consider simplifying ini config parsing #1176

@Lotram

Description

@Lotram

I started working on static config models. While doing that, I added some tests on the load.parse_file function.
I then realized that all the parsing done in ini2toml_plugin is not used when parsing a ini file (except for the ini2toml command).

I see 2 problems with that:

  • The result of parse_file is quite different, depending on the input file (toml vs ini)
  • The ini parsing logic is duplicated between parse_file and ini2toml_plugin, with different results

Can't we simplify this ? We could either

  • add ini2toml to required dependencies and always use it when parsing an ini file (we could even write the toml file ourselves ? )
  • keep it as optional, but force the user to install it if they want to keep an ini file (or suggest to run it once to use a toml file instead)
  • same, but always raising an error when trying to parse an ini file, and ask the user to migrate to toml file, using the ini2toml command

I know those solutions are drastic, and we probably want to deprecate it first, but I think we should avoid having multiple ways to parse a config file, and multiple results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintenancedoesn't necessarily have an immediate impact on users

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions