Skip to content

[FIX] *: support for pylint 4#236258

Closed
xmo-odoo wants to merge 1 commit intoodoo:17.0from
odoo-dev:17.0-astroid-4-compat-xmo
Closed

[FIX] *: support for pylint 4#236258
xmo-odoo wants to merge 1 commit intoodoo:17.0from
odoo-dev:17.0-astroid-4-compat-xmo

Conversation

@xmo-odoo
Copy link
Collaborator

  • astroid 4 deprecates toplevel exports of nodes, thankfully that was never actually necessary so we can just import that unconditionally
  • remove support for pre-jammy pylint / astroid, specifically astroid.nodes was added in astroid 2.7.0 and astroid.node_classes deprecated then and removed in 3.0, this can affect Bullseye users as it shipped with astroid 2.5
  • Astroid 4 changes spec.Finder.find_module in order to cache it (Make Finder.find_module static to facilitate future caching pylint-dev/astroid#2509), we can just make our method static for all versions as we don't need self anyway.
  • The mail test triggers function-redefined (E0102), fix it.
  • Skip the escpos script thing which triggers a bunch of undefined-variable (E0602) false positives.

@robodoo
Copy link
Contributor

robodoo commented Nov 18, 2025

Pull request status dashboard

@C3POdoo C3POdoo requested review from a team November 18, 2025 11:50
@xmo-odoo xmo-odoo force-pushed the 17.0-astroid-4-compat-xmo branch 2 times, most recently from c859fa4 to 17bdbcb Compare November 18, 2025 13:56
- astroid 4 deprecates toplevel exports of nodes, thankfully that was
  never actually necessary so we can just import that unconditionally
- remove support for pre-jammy pylint / astroid, specifically
  `astroid.nodes` was added in astroid 2.7.0 and
  `astroid.node_classes` deprecated then and removed in 3.0, this can
  affect Bullseye users as it shipped with astroid 2.5
- Astroid 4 changes `spec.Finder.find_module` in order to cache it
  (pylint-dev/astroid#2509), we can just make our method static for
  all versions as we don't need `self` anyway.
- The mail test triggers `function-redefined` (E0102), fix it.
- Skip the escpos script thing which triggers a bunch of
  `undefined-variable` (E0602) false positives.
@xmo-odoo xmo-odoo force-pushed the 17.0-astroid-4-compat-xmo branch from 17bdbcb to f5e2384 Compare November 18, 2025 15:10
@xmo-odoo
Copy link
Collaborator Author

@robodoo r+

robodoo pushed a commit that referenced this pull request Nov 19, 2025
- astroid 4 deprecates toplevel exports of nodes, thankfully that was
  never actually necessary so we can just import that unconditionally
- remove support for pre-jammy pylint / astroid, specifically
  `astroid.nodes` was added in astroid 2.7.0 and
  `astroid.node_classes` deprecated then and removed in 3.0, this can
  affect Bullseye users as it shipped with astroid 2.5
- Astroid 4 changes `spec.Finder.find_module` in order to cache it
  (pylint-dev/astroid#2509), we can just make our method static for
  all versions as we don't need `self` anyway.
- The mail test triggers `function-redefined` (E0102), fix it.
- Skip the escpos script thing which triggers a bunch of
  `undefined-variable` (E0602) false positives.

closes #236258

Related: odoo/enterprise#99809
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
@robodoo robodoo closed this Nov 19, 2025
@fw-bot fw-bot deleted the 17.0-astroid-4-compat-xmo branch November 26, 2025 08:11
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

Successfully merging this pull request may close these issues.

2 participants