Skip to content

Confusing undocumented behavior of "root" Configuration property name. #874

Closed
@jnhnum1

Description

@jnhnum1

Using dependency-injector version 4.45.0 in Python 3.13.1 in MacOS 14.5.

Minimal reproducible example:

from dependency_injector.providers import Configuration

config = Configuration()
config.from_dict(
    {"a": {"root": 3}}
)

assert config.a.root() == 3, f"Expected 3, got {config.a.root()}"

Skimming the source, it appears the issue is here: https://github.com/ets-labs/python-dependency-injector/blob/6e4794bab18fef3ffbc6a11bee526fe24688286f/src/dependency_injector/providers.pyx#L1595C1-L1597C26

It doesn't appear that this "root" property is used anywhere, nor is it documented at https://python-dependency-injector.ets-labs.org/providers/configuration.html

Activity

added a commit that references this issue on Apr 6, 2025
db946de
added a commit that references this issue on Apr 7, 2025
4ae79ac
added theissue type on May 28, 2025
ZipFile

ZipFile commented on May 28, 2025

@ZipFile
Contributor

Fixed in v4.47.0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @jnhnum1@ZipFile

      Issue actions

        Confusing undocumented behavior of "root" Configuration property name. · Issue #874 · ets-labs/python-dependency-injector