Skip to content

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

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

Open
jnhnum1 opened this issue Mar 24, 2025 · 0 comments
Open

Comments

@jnhnum1
Copy link

jnhnum1 commented Mar 24, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant