Skip to content

Windows drive letters are parsed as config section delimiters #597

Description

@rioyu123

Description

Absolute Windows config paths are currently parsed as if the drive-letter colon starts a config section. For example, C:\Users\name\config.yaml is split into file path C and section \Users\name\config.yaml.

This affects the config export helpers, ConfigSerializer.dump_dict, config-path detection, and lazy @config loading. On Windows, the existing CLI/config test set hits the same failure across YAML, JSON, TOML, section export, and lazy loading.

Reproduction

Paths such as these fail or resolve to the wrong file/section:

_serialize_configuration(config, to_yaml=rC:\tmp\config.yaml)
load_config_from_path(r@C:\tmp\config.yaml)

Expected behavior

The drive prefix should remain part of the path. An optional section should only be parsed from a colon after that prefix, so C:\tmp\config.yaml:model resolves to path C:\tmp\config.yaml and section model.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions