Skip to content

RootView only accepts a single configuration source #194

@gimpel-cs

Description

@gimpel-cs

I just reactivated a project where I used confuse 2.0.1. After updating to confuse 2.2.0, when creating a RootView instance from two SourceYaml instances, only the first one is taken into account. (Windows 11 pro, Python 3.14.2)

cfg1.yaml

group_1:
  item1: item_1.1
group_2:
  item1: item_2.1

cfg2.yaml

group_3:
  item1: item_3.1
import confuse

cfg1_source = confuse.YamlSource("cfg1.yaml")
cfg2_source = confuse.YamlSource("cfg2.yaml")
root_view: confuse.RootView = confuse.RootView([cfg1_source, cfg2_source])

print(root_view.get().items())

Output

dict_items([('group_1', OrderedDict({'item1': 'item_1.1'})), ('group_2', OrderedDict({'item1': 'item_2.1'}))])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions