Skip to content

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Sep 29, 2025

Description

Followup to #2833

Deprecate the import of node classes from toplevel astroid.
Import them from astroid.nodes instead.

@cdce8p cdce8p added this to the 4.0.0 milestone Sep 29, 2025

from astroid.util import Uninferable

__all__ = [
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added __all__ to not expose the _DEPRECATED_* classes here.

@cdce8p cdce8p force-pushed the deprecate-nodes-import branch from df34d94 to 921e924 Compare September 29, 2025 10:42
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.37%. Comparing base (166f444) to head (b1e551e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2837   +/-   ##
=======================================
  Coverage   93.36%   93.37%           
=======================================
  Files          92       92           
  Lines       11139    11148    +9     
=======================================
+ Hits        10400    10409    +9     
  Misses        739      739           
Flag Coverage Δ
linux 93.23% <100.00%> (+<0.01%) ⬆️
pypy 93.37% <100.00%> (+<0.01%) ⬆️
windows 93.35% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
astroid/__init__.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good, clever trick.

@cdce8p cdce8p merged commit 61aa567 into pylint-dev:main Sep 29, 2025
19 checks passed
@cdce8p cdce8p deleted the deprecate-nodes-import branch September 29, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants