Skip to content

[16.0] pre-commit: bump setuptools-odoo to 3.3.2 to fix pkg_resources ImportError - #217

Open
DarioLodeiros wants to merge 1 commit into
OCA:16.0from
DarioLodeiros:16.0-bump-setuptools-odoo
Open

DarioLodeiros wants to merge 1 commit into
OCA:16.0from
DarioLodeiros:16.0-bump-setuptools-odoo

Conversation

@DarioLodeiros

Copy link
Copy Markdown
Member

Summary

`setuptools-odoo` 3.1.8 imports `pkg_resources`, which is no longer available in `setuptools >= 81`. As a result, the `setuptools-odoo-make-default` and `setuptools-odoo-get-requirements` pre-commit hooks now fail on every PR opened against this branch with:

```
ModuleNotFoundError: No module named 'pkg_resources'
```

Example failure on a recent PR: https://github.com/OCA/currency/actions/runs/25795732013/job/75772439565

Fix

Bump `acsone/setuptools-odoo` from `3.1.8` to `3.3.2`, which uses `importlib.metadata` instead of `pkg_resources`. Other OCA 16.0 repositories already moved to 3.3.2:

  • OCA/server-tools (16.0)
  • OCA/web (16.0)
  • OCA/partner-contact (16.0)
  • OCA/account-invoicing (16.0)

Test plan

setuptools-odoo 3.1.8 imports `pkg_resources`, which is no longer
available in `setuptools >= 81`. As a result, the
setuptools-odoo-make-default and setuptools-odoo-get-requirements
pre-commit hooks now fail on every PR opened against this branch with
`ModuleNotFoundError: No module named 'pkg_resources'`.

Other OCA 16.0 repositories (server-tools, web, partner-contact,
account-invoicing, ...) already moved to setuptools-odoo 3.3.2, which
uses `importlib.metadata` and works with current setuptools versions.
klodr added a commit to klodr/OCA-currency that referenced this pull request Sep 12, 2026
… ImportError

setuptools-odoo 3.1.8 imports the removed `pkg_resources` module, so the
`setuptools-odoo-make-default` and `setuptools-odoo-get-requirements` hooks fail
with `ModuleNotFoundError: No module named 'pkg_resources'` on recent
setuptools (>= 81). This makes the pre-commit check red on every PR currently
opened against this branch.

Bump the hook to 3.3.2, same as OCA#217 for 16.0.

Signed-off-by: Claude Perrin <klodr@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant