OCA/edi

[14.0]double requirements for dateparser causing pip install to fail

Closed this issue · 9 comments

running pip install -r requirements.txt causes

 ERROR: Double requirement given: dateparser==1.1.1 

Expected behavior

a single version has to be given in dependencies.

Why does the module account_invoice_import_invoice2data depend on dateparser ? I don't understand why this dependency was added.

I prefer if we can avoid to force a specific version in the manifest in order to allow the installation of updates to benefit from bugfixes in the dateparser python lib.

Hi @alexis-via so your opiinion is :

  • delete dependency of dateparser in this module
  • don't specify the version of dateparser in the simple_pdf importer (this one cause the deplication in requirements)

Check this pls #544

Thanks @simahawk ,
So, AFICU, it's mandatory to specify the version because of an invoice2data issue and we also have @alexis-via that is not in favor of specifying the version.
My idea could be one of the 2 following solutions :

  • use explicitly the release in both modules
  • change the way requirements is generated to keep only one dependency

I'll will follow your recommendations.

Regards

To me, in the long run, it should be fixed on https://github.com/invoice-x/invoice2data (see invoice-x/invoice2data#371).
Regarding having duplicated deps in requirements.txt AFAIR is not an issue, see acsone/setuptools-odoo#59
CC @sbidoul

In this case I would set the same dep in *_simple_pdf, at least for now.

@flotho Recent pip versions should be able to resolve these double dependency. Can you check your pip version ?

In general, please avoid pinning versions. Placing a lower bound is ok (but don't be stricter than necessary). Placing upper bounds should be avoided as much as possible. Pinning exact versions must really be avoided.

OK, let's make it temporary until the python lib invoice2data is fixed.