PyMISP icon indicating copy to clipboard operation
PyMISP copied to clipboard

optional dependency reportlab is not optional

Open ghost opened this issue 4 years ago • 3 comments

reportlab is an optional dependency of the reportlab_generator:

https://github.com/MISP/PyMISP/blob/eff7146b3c4a981c9e13fa9a4c403950dfddd503/pymisp/tools/reportlab_generator.py#L22-L37

But the imported Flowable is then a hard requirement:

https://github.com/MISP/PyMISP/blob/eff7146b3c4a981c9e13fa9a4c403950dfddd503/pymisp/tools/reportlab_generator.py#L52

ghost avatar Mar 08 '20 19:03 ghost

Yeah, this file is definitely not supposed to be imported unless you have that dep. In which context does it trigger an exception? This file isn't imported in __init__.py

Rafiot avatar Mar 08 '20 20:03 Rafiot

Yeah, this file is definitely not supposed to be imported unless you have that dep. In which context does it trigger an exception? This file isn't imported in __init__.py

Testing - that loads every file to look for tests.

ghost avatar Mar 09 '20 08:03 ghost

Oh yeah, sure, testing does, that was a shortcut. Well, I can add reportlab in the requirement for testing.

That module is only supposed to be used if you know what youŕe doing.

Rafiot avatar Mar 09 '20 12:03 Rafiot