Skip to content
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

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

Open
Pierre-Sassoulas opened this issue Apr 25, 2023 · 0 comments
Open
Labels
High effort 🏋 Difficult solution or problem to solve
Milestone

Comments

@Pierre-Sassoulas
Copy link
Member

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.

@Pierre-Sassoulas Pierre-Sassoulas added the High effort 🏋 Difficult solution or problem to solve label Apr 25, 2023
@Pierre-Sassoulas Pierre-Sassoulas added this to the 3.0.0b0 milestone Apr 25, 2023
@jacobtylerwalls jacobtylerwalls modified the milestones: 3.1, 4.0 Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High effort 🏋 Difficult solution or problem to solve
Projects
None yet
Development

No branches or pull requests

2 participants