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

[Feature Request] Remove dependency on LGPL licensed ansi2html #2713

Closed
johnthagen opened this issue Dec 18, 2023 · 2 comments · Fixed by #2721
Closed

[Feature Request] Remove dependency on LGPL licensed ansi2html #2713

johnthagen opened this issue Dec 18, 2023 · 2 comments · Fixed by #2721
Assignees
Labels
infrastructure build process etc.

Comments

@johnthagen
Copy link

johnthagen commented Dec 18, 2023

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.

@Coding-with-Adam
Copy link

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

@alexcjohnson
Copy link
Collaborator

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure build process etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants