[16.0][FIX] Upgrade pre-commit dependency setuptools-odoo to v3.3.2#1421
[16.0][FIX] Upgrade pre-commit dependency setuptools-odoo to v3.3.2#1421ivilata wants to merge 1 commit into
Conversation
That version avoids `ModuleNotFoundError: No module named 'pkg_resources'` when running the Git pre-commit hook, which causes an error in all CI runs. See OCA#1402 or OCA#1419 for examples of 16.0 PRs failing because of this error, and acsone/setuptools-odoo#126 for some context on the error (caused by the recent removal on `pkg_resources` from `setuptools`) and how `setuptools-odoo` v3.3.2 fixes it. Pre-commit hook configurations for 17.0 and 18.0 don't seem to depend on `setuptools-odoo`. Similar changes may be ported back to 16.0 as a more stable fix, but the current one is a very simple, low-impact fix that may help unlock PRs right now.
dabdcf8 to
79e09f9
Compare
|
Pinging @sbejaoui and @pedrobaeza for a review. Please note how the PR fixed the "pre-commit" check in comparison with the check failing on the mentioned PRs #1402 and #1419, and that the Thanks! 🙂 |
|
Please update copier template instead. |
|
Thanks @pedrobaeza for the heads up, I didn't know about the Copier setup. I see that oca/oca-addons-repo-template already (by v1.38, currently at v1.40) updated If it needs to be done by someone with special privileges, I can ping them. I may keep this PR for the comments and close it afterwards. |
|
You need to:
|
|
Thanks @pedrobaeza for the instructions! Please check the new PR #1422 for the resulting dotfile updates. |
|
@ivilata are you aware of https://www.aeodoo.org/event/spanish-oca-days-2026-143/page/introduccion-spanish-oca-days-2026, where we are going to meet to do collaborative development of features? |
Mainly to avoid `ModuleNotFoundError: No module named 'pkg_resources'` when running the `setuptools-odoo` pre-commit hook, as v3.1.8 was bitten by the removal of `pkg_resources` from recent versions of `setuptools`. This was fixed by v1.38 of `oca-addons-repo-template` by updating `setuptools-odoo` to v3.3.2. See OCA#1421 for more more information.
That version avoids
ModuleNotFoundError: No module named 'pkg_resources'when running the Git pre-commit hook, which causes an error in all CI runs.See #1402 or #1419 for examples of 16.0 PRs failing because of this error, and acsone/setuptools-odoo#126 for some context on the error (caused by the recent removal on
pkg_resourcesfromsetuptools) and howsetuptools-odoov3.3.2 fixes it.Pre-commit hook configurations for 17.0 and 18.0 don't seem to depend on
setuptools-odoo. Similar changes may be ported back to 16.0 as a more stable fix, but the current one is a very simple, low-impact fix that may help unlock PRs right now.