odoo-plus / odootools

Odoo Tools
GNU General Public License v3.0
21 stars 7 forks source link

Update requirements.txt for Odoo Version 11 to 16 #8

Closed kafai-lam closed 2 years ago

kafai-lam commented 2 years ago

Copied requirements.txt from several odoo versions (from 11 to 16)

llacroix commented 2 years ago

Thank you for the contribution.

The reason the requirements.txt are in this repository is because they are modified to have less strict requirements. Odoo requirements files are uselessly too strict and prevent it from using native libraries when it's possible.

For example, odoo requirements require gevent 1.1.2 . Let say your distribution provide gevent 1.1.3 with a python-gevent package. When installing the requirements it will try to uninstall 1.1.3 and compile 1.1.2. But in order to do that, you have to install binaries to compile code like build-essential and python-dev. That's all completely useless when 1.1.3 would work just fine.

If I wanted to use the copy of requirements.txt, I'd use them from the repository itself when it is cloned.

If you want to add a requirements for 16.0 I'm not against it keep the version as relaxed as 15.0 as much as possible.

llacroix commented 2 years ago

You can see the pipeline fails for various reasons, usually it's gevent/lxml/psycopg2 that are the most problematic. So please don't modify existing requirements unless you add an issue installing something.

And enable tests for odoo 16 in https://github.com/llacroix/odoo-tools/blob/main/.github/workflows/python-package.yml#L20-L25

codecov[bot] commented 2 years ago

Codecov Report

Base: 94.28% // Head: 94.28% // No change to project coverage :thumbsup:

Coverage data is based on head (3cc77ba) compared to base (40a7ed0). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #8 +/- ## ======================================= Coverage 94.28% 94.28% ======================================= Files 64 64 Lines 4603 4603 ======================================= Hits 4340 4340 Misses 263 263 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Lo%C3%AFc+Faure-Lacroix). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Lo%C3%AFc+Faure-Lacroix)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

kafai-lam commented 2 years ago

@llacroix Thank you for the great job on this tools! it helps me a lot.

I got a small issue when I setup odoo env through odoo-tools with command odootools manage setup 15.0

Odoo server failed to start and I have to install library cryptography with version cryptography==2.6.1 to make it works.

I understand your concern. Maybe I close this PR first since it contains lot of changes which are not related to my main purpose. I will create a new issue about my problem.

llacroix commented 2 years ago

It remind me of something between pyopenssl, cryptography and requests.

Installing requests[security] can solve all those incompatibilities issue as it will install the right version of pyopenssl then the dependencies of pyopenssl force the right version of cryptography.

But you're right, the cryptography should at least be a dependency. I see it's a change in the requirements that dates from 16 days ago. So it seems fairly new.

The only modules that directly depend on cryptography in odoo15 are l10n_es_edi, account_edi_proxy_client and on enterprise there's the sale_ebay module.

Do you have issue with this module?

It would be nice if you can post the error that prevents odoo from starting.