plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.

Home Page:https://plotly.com/dash

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Feature Request] Remove dependency on LGPL licensed `ansi2html`

johnthagen opened this issue · comments

Is your feature request related to a problem? Please describe.

Dash currently depends on ansi2html

ansi2html

ansi2html is licensed under LGPL:

This is not a truly permissive license, such as MIT, BSD, or Apache, which can cause headaches when distributing some private code that depends on Dash (and transitively depends on ansi2html).

LGPL makes it challenging for including Dash inside of a binary due to the restriction that users need to be able to have the ability to swap out the LGPL library for another of their choosing, something infeasible/very tricky for a binary distribution.

For example, this affects users of Pyinstaller, Nuitka, PyOxdizer, etc. that want to package their Python code and dependencies into a stand-alone binary.

Describe the solution you'd like

Dash only depends on fully permissive licensed packages (such as MIT, BSD, Apache).

Related Historical Work

For a long time chardet was an LGPL package depended on by popular packages, such as requests:

The community has migrated to a permissively licensed package charset_normalizer.

One of the motivations was to ensure that the full dependency tree was permissively licensed.

commented

Thanks for create this issue, @johnthagen. We'll make sure to take a deeper look into this after the holidays.
cc @alexcjohnson

Thanks @johnthagen! ansi2html is used here, to give nicely-formatted tracebacks in Jupyter:

dash/dash/_jupyter.py

Lines 474 to 476 in 7527383

# Use ansi2html to convert the colored ANSI string to HTML
conv = Ansi2HTMLConverter(scheme="ansi2html", dark_bg=False)
html_str = conv.convert(ansi_stacktrace)

@T4rk1n unless you can think of a simple alternative, I'd be fine with dropping color entirely. Presumably we can get a plain ASCII traceback and display it in a <pre> tag or something?