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

Consider non-LGPL character encoding library #1013

Closed
johnthagen opened this issue May 31, 2020 · 2 comments
Closed

Consider non-LGPL character encoding library #1013

johnthagen opened this issue May 31, 2020 · 2 comments

Comments

@johnthagen
Copy link

Python binary applications cannot legally depend on httpx because of it's dependency on chardet.

httpx/setup.py

Line 61 in 8c84210

"chardet==3.*",

Describe the solution you would like.

Here is a current license summary of httpx and its dependencies:

 % pip-licenses --from=mixed
 Name         Version     License                                             
 certifi      2020.4.5.1  Mozilla Public License 2.0 (MPL 2.0)                
 chardet      3.0.4       GNU Library or Lesser General Public License (LGPL) 
 h11          0.9.0       MIT License                                         
 h2           3.2.0       MIT License                                         
 hpack        3.0.0       MIT License                                         
 hstspreload  2020.5.30   BSD License                                         
 httpcore     0.9.1       BSD License                                         
 httpx        0.13.3      BSD License                                         
 hyperframe   5.2.0       MIT License                                         
 idna         2.9         BSD License                                         
 rfc3986      1.4.0       Apache Software License                             
 sniffio      1.1.0       MIT License, Apache Software License

chardet is LGPL licensed. I'm not a lawyer, but my understanding is that this makes it unsuitable for including 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 for a binary distribution.

Users who use httpx and want to deploy via Pyinstaller, Nuitka, PyOxdizer, etc. therefore are unable to use httpx, as I understand it.

charset_normalizer is one such alternative that is MIT licensed, thus making it appropriate for binary deployments.

@tomchristie
Copy link
Member

tomchristie commented Jun 1, 2020

I'm not seeing anything in https://github.com/chardet/chardet/blob/master/LICENSE that's obviously problematic with how we distribute httpx. Also similar comments in issues around https://github.com/psf/requests/search?q=lgpl&type=Issues

I'd be okay with reviewing any PR that made chardet an optional import, which would then give alternate packagers other options, but we'd still want our PyPI packaging to include it.

@johnthagen
Copy link
Author

This was fixed in #1269

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

No branches or pull requests

2 participants