Skip to content

Circular dependencies between astroid.nodes and astroid.bases  #2155

Open
@Pierre-Sassoulas

Description

@Pierre-Sassoulas

In order to remove the deprecated astroid.nodes_classes and astroid.scoped_nodes we're going to have to resolve this circular dependencies.

bases.py:

from astroid.nodes.node_classes import Name, Const, NodeNG, Call, Attribute, EmptyNode, const_factory
from astroid.nodes.scoped_nodes import ClassDef, FunctionDef

astroid.nodes.nodes_classes.py:

from astroid.bases import Instance, _infer_stmts

astroid.nodes.scoped_nodes .py:

from astroid.bases import BoundMethod, _infer_stmts, Instance

To be totally honest I'm under the impression that the import by full namespace (from astroid import bases) permitted to hide the circular dependencies under the lazy import rug for a long time, and the current situation is a mess that I despair of being able to fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    High effort 🏋Difficult solution or problem to solve

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions