Skip to content

[REF] pylintrc-mandatory: enable deprecated module checks#359

Open
moylop260 wants to merge 1 commit into
OCA:masterfrom
vauxoo-dev:master-deprecated-modules-moy
Open

[REF] pylintrc-mandatory: enable deprecated module checks#359
moylop260 wants to merge 1 commit into
OCA:masterfrom
vauxoo-dev:master-deprecated-modules-moy

Conversation

@moylop260

Copy link
Copy Markdown
Contributor

Enable pylint's deprecated-module check in the mandatory rcfile used by the blocking pre-commit hook for Odoo 13.0 and newer.

This makes generated OCA repositories fail fast when forbidden imports such as pdb, pudb, ipdb, or bs4 are introduced, instead of leaving the check only in the optional IDE-oriented pylint configuration.

For Odoo 20.0 and newer, also mark pytz as deprecated so repositories generated from this template follow the upstream direction taken in Odoo saas-19.1.

That branch removed pytz usage in Odoo commit:

Keep the scope limited to 13.0+ templates, where src/.pylintrc-mandatory.jinja is the source used to render both .pylintrc-mandatory and the inherited optional .pylintrc. Legacy <=12.0 templates are intentionally left unchanged.

Extend the bootstrap test to assert the rendered [IMPORTS] section and the version-specific pytz addition.

Enable pylint's deprecated-module check in the mandatory rcfile used by the blocking pre-commit hook for Odoo 13.0 and newer.

This makes generated OCA repositories fail fast when forbidden imports such as pdb, pudb, ipdb, or bs4 are introduced, instead of leaving the check only in the optional IDE-oriented pylint configuration.

For Odoo 20.0 and newer, also mark pytz as deprecated so repositories generated from this template follow the upstream direction taken in Odoo saas-19.1.

That branch removed pytz usage in Odoo commit 6fdb36716aac5d2b084fb0faa94ccb2f3ee7f99c: odoo/odoo@6fdb367

Keep the scope limited to 13.0+ templates, where src/.pylintrc-mandatory.jinja is the source used to render both .pylintrc-mandatory and the inherited optional .pylintrc. Legacy <=12.0 templates are intentionally left unchanged.

Extend the bootstrap test to assert the rendered [IMPORTS] section and the version-specific pytz addition.
@moylop260

Copy link
Copy Markdown
Contributor Author

@sbidoul @hbrunn @StefanRijnhart

Could you review it, please?

Odoo v19.1 have deleted pytz dependency

A faster fail is enabling this module as deprecated

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.

1 participant