OCA / community-data-files

https://odoo-community.org/project/tools-maintainers-30
GNU Affero General Public License v3.0
33 stars 171 forks source link

[14.0 an others] base_iso3166: recurrent pycountry version installation error #125

Closed dalonsod closed 2 years ago

dalonsod commented 2 years ago

When installing base_iso3166 many issues are documented related to pycountry version (see #108 and #108 ). I've recently faced another one with v14 and Python 3.8. Depending on the Odoo/Python active version, is it possible to pin a certain version of this library and prevent this issue, or is it a bad practice, and any error should be fixed upgrading or downgrading pycountry library?

Module

base_iso3166

Describe the bug

When installing the addon, an error is raised. In v14 and Python 3.8.10 case a LookupError one. It's been fixed downgrading pycountry from 20.7.3 to 19.8.18.

To Reproduce

It seems to be a general problem, depending on the development status of pycountry library and the Odoo target version.

Steps to reproduce the behavior (in v14):

  1. Use a Python 3.8 environment, e.g. 3.8.10.
  2. Install pycountry via pip, without version selection.
  3. Install an addon that depends on base_iso3166 (e.g. l10n_es_facturae, for Spanish l10n) => an error is fired.

Expected behavior Installation without errors

Additional context If in this issue is defined a clear strategy for v14, I'd make a PR, but I'm not sure which soluction fits better OCA conventions (oca_dependencies.txt, manifest file, setup file,...)

cc @rousseldenis @pedrobaeza

rousseldenis commented 2 years ago

@dalonsod I've already discovered that limitation there https://github.com/OCA/community-data-files/pull/108/files

The good thing is to do the same for 14.0

rousseldenis commented 2 years ago

@dalonsod I've already discovered that limitation there https://github.com/OCA/community-data-files/pull/108/files

The good thing is to do the same for 14.0

If people has interest to it. :smile:

dalonsod commented 2 years ago

I know @rousseldenis , that's why I've included you in this thread :smile: Other example, for v12: #89 Your proposed solution is for v10, and I don't really know if for v14 is the best one, that's why I've opened this issue. setup.py change is a good solution for me :)

@etobella did you face any issue with this during l10n_es_facturae migration to v14?

rousseldenis commented 2 years ago

Yes, the good thing is not to limit to one version with an = but with a <

You can obviously do a PR with the last version that works inspired by mine.

github-actions[bot] commented 2 years ago

There hasn't been any activity on this issue in the past 6 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 issue to never become stale, please ask a PSC member to apply the "no stale" label.