Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] python library dependency conflict 'pyparsing' (social/server-ux) #1316

Closed
CRogos opened this issue Feb 27, 2024 · 9 comments
Closed
Labels

Comments

@CRogos
Copy link

CRogos commented Feb 27, 2024

Module

mail_drop_target
#1217

Describe the bug

I am running Odoo in odoo.sh and since the PR above, I get a dependency version conflict which is originally caused by extract_msg . Does anyone have similar issues or an idea how so solve this?

2024-02-23T17:27:27,474 ERROR: Cannot install -r /home/odoo/.requirements.txt (line 14) and RTFDE because these package versions have conflicting dependencies.
2024-02-23T17:27:27,474 
2024-02-23T17:27:27,474 The conflict is caused by:
2024-02-23T17:27:27,474     pyrfc6266 1.0.0 depends on pyparsing~=3.0.7
2024-02-23T17:27:27,474     oletools 0.60.1 depends on pyparsing<3 and >=2.1.0

To Reproduce

I am not using this module, but having extract_msg in the requirements.txt is enough to get startup errors.

@CRogos CRogos added the bug label Feb 27, 2024
@uvid-sinisa
Copy link

uvid-sinisa commented Mar 7, 2024

I have the same problem on odoo.sh. Specifically, these two seem to be in conflict:

social/mail_drop_target
Python dependency: extract_msg -> RTFDE -> oletools -> pyparsing (< 3,>=2.1.0)

server-ux/base_binary_url_import
Python dependency: pyrfc6266 -> pyparsing (~=3.0.7)

@CRogos
Copy link
Author

CRogos commented Mar 7, 2024

This could fix the issue...
decalage2/oletools#812

... or mail_drop_target needs to remove the dependency of extract_msg

@gbtechnology
Copy link

@CRogos unfortunately that won't solve the issue.
pyrfc6266 1.0.0 depends on pyparsing~=3.0.7
oletools 0.60.1 depends on pyparsing<3 and >=2.1.0

By odoo.sh logs it seems that pyrfc6266 1.0.0 wants a pyparsing version greater of the ones wanted by oletools. This is very annoying, as it is blocking social repository deployment

@CRogos
Copy link
Author

CRogos commented Apr 25, 2024

@gbtechnology from my point of view, we need a new version of oletools, which depends on pypasing > 3.0.0 which is currently not available. But the linked PR would archive this.

The most annoying thing is, that I do not need the module which adds the oletools dependency. But because all dependencies are automatically added to the requirements.txt and all requirements.txt are automatically aggregated/installed by odoo.sh this dependency causes the block.

When adding OCA repositories as submodules to odoo.sh projects, this can also cause updates of libraries which might not be compatible with some odoo core functions. (recently happened to me with lxml and also pikepdf)

Currently I see only the option to fork the repository and create a new branch, that remove the requirements.txt or at least the unneeded libs.

there is also a good thread on these kind of topic here: OCA/queue#530

@ramiadavid
Copy link

@CRogos @gbtechnology

And we couldn't just remove the dependency pyrfc6266? is only used for the base_binary_url_import module and only in one place a single function to extract a file name from http response, we could try to replicate that behavior without using the module, right?

https://github.com/OCA/server-ux/blob/42fac842508cb17364a1105398756bc69037e8bb/base_binary_url_import/wizard/base_binary_url_import.py#L320-L322

@CRogos
Copy link
Author

CRogos commented Apr 25, 2024

yes also a good option... for both modules/libraries.
Nevertheless it is a pity that we cannot add social + server-ux at the same time in odoo.sh eventhough we are not installing the incompatible modules.

@ramiadavid
Copy link

@CRogos @gbtechnology
I have uploaded a PR with a proposed solution, what do you think?

@CRogos
Copy link
Author

CRogos commented May 16, 2024

I don't think adding a copy of the library is a good solution.
The patch for oletools is already applied but there is no new version build yet.
Is there a possibility to install oletools from the github repo main branch, instead of pip?

@CRogos
Copy link
Author

CRogos commented Jul 3, 2024

A new version oletools 0.60.2 is now available which solves the conflict.

@CRogos CRogos closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants