odoo / odoo

Odoo. Open Source Apps To Grow Your Business.
https://www.odoo.com
Other
36.68k stars 23.84k forks source link

Incompatibility with latest version of PyPDF2 #92595

Open Kontrolix opened 2 years ago

Kontrolix commented 2 years ago

Impacted versions: 12.0

Steps to reproduce: install odoo with latest version of PyPDF2 (Version 2.0.0, 2022-06-01)

Current behavior:

Traceback (most recent call last):
  File "/usr/bin/odoo", line 5, in <module>
    import odoo
  File "/usr/lib/python3/dist-packages/odoo/__init__.py", line 97, in <module>
    PyPDF2.filters.decompress = _decompress
AttributeError: module 'PyPDF2' has no attribute 'filters'

Expected behavior:

To not have this error

Video/Screenshot link (optional):

Support ticket number submitted via odoo.com/help (optional):

Kontrolix commented 2 years ago

Maybe it's not so relevant, since PyPDF2 version is fixed to 1.26.0.

kafai-lam commented 2 years ago

Maybe it's not so relevant, since PyPDF2 version is fixed to 1.26.0.

@Kontrolix But it is not fixed inside setup.py.

If user try to install odoo with pip install https://nightly.odoo.com/15.0/nightly/src/odoo_15.0.latest.tar.gz, it may lead to incompatible version dependencies to be installed.

MartinThoma commented 1 year ago

As a side-note: I would recommend to move to pypdf>=3.1.0.

PyPDF2==3.0.0 and pypdf==3.1.0 are essentially the same, just the name of the package changed.

I'm the maintainer of pypdf and PyPDF2 (on PyPI + the active development on GitHub). As the capitalization / the number frequently lead to confusion, I decided to move the project to pypdf. Only pypdf will receive updates.

I have no clue about the Debian packages.

bgermann commented 5 months ago

Also Debian is going to remove PyPDF2. The odoo package will be autoremoved with that happening, probably in a month.