Comments (15)
@dan-blanchard I'm 98% certain that only the original author of the code can, regardless of how reachable the original author is. I'm very certain we can't change the license unless we totally rewrite it. I'm also curious why you don't like the LGPL.
from chardet.
@sigmavirus24 I must admit that I was pretty certain that was the case as well.
In general I prefer MIT/BSD licenses just because they're simpler, and I feel like people are more likely to contribute if there are fewer strings attached.
The only reason I am advocating for MPL in this particular case is that a straight literal port like chardet is usually considered a modification/derivative of the original code. Given the terms of the MPL, it seems to me like chardet should have been required to be released under MPL in the first place, and that the LGPL choice was a legal oversight on Mark's part.
Not that I think Mozilla would be extremely upset about the license being wrong for a port of a part of their code that I doubt they'll even keep around much longer—they somewhat recently imported ICU into their codebase—but you never know.
from chardet.
I'm fairly certain that the original Mozilla project was LGPL'd honestly. As the original authors/owner of the copyright in that case, they can change their license on that code to whatever (including the MPL). That said, while this code is derivative of that work, they're not the copyright owner and Mark is.
from chardet.
According to section 3.1 of the MPL (https://www.mozilla.org/MPL/2.0/), software that once falls under the MPL must forever stay under the MPL. Whether this port of chardet is a "derivative work" for copyright purposes I do not know. https://julien.ponge.org/blog/mozilla-public-license-v2-a-good-middleground/ suggests that derivative works themselves needn't necessarily be MPL'd but unmodified code must. I don't know if that's accurate or if a line-for-line port of C++ to Python is considered unmodified.
This is a legal rat's nest for anybody but Mark, and I suspect it's not worth the trouble unless there's a concrete difficulty with the current license.
from chardet.
This is a legal rat's nest for anybody but Mark, and I suspect it's not worth the trouble unless there's a concrete difficulty with the current license.
Fair enough. I just thought I'd raise the issue.
from chardet.
FWIW, https://github.com/Ousret/charset_normalizer seems to be an alternative package that is MIT licensed.
from chardet.
@dan-blanchard I see you have been contributing to chardet
recently. Any chance this issue could be revisited?
LGPL makes it challenging for including chardet
(or any of the many packages that transitively depend on chardet
such as requests
) 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.
This affects users of Pyinstaller, Nuitka, PyOxdizer, etc. that want to package their Python code and dependencies into a stand-alone binary.
from chardet.
Unfortunately, because the code that chardet was originally based on was LGPL, we don't really have a way to relicense it. Believe me, if we could, I would. There was talk of chardet being added to the standard library, and that was deemed impossible because of being unable to change the license.
from chardet.
@dan-blanchard any chance you could maybe talk to the maintainers of requests
to get off of chardet
given the inability to change the license?
I know its odd someone, to ask others to not use their code, but such a restriction of chardet
prevents development of closed source using one of the most downloaded packages on the pypi. requests
and even the python documentation on urllib.requests
seem to be overlooking this problem that the LGPL introduces.
Those who work with license scanning software, to ensure their code doesn't contain copy-left linking will eventually see chardet
and be confused given that their code doesn't knowingly contain that and will end up down a familiar rabbit hole for many, where they use requests
which then leads to the install of chardet
all because they followed the plethora of examples to use requests
including the quote from urllib.request
documentation itself suggesting it.
See also The Requests package is recommended for a higher-level HTTP client interface.
--- https://docs.python.org/3/library/urllib.request.html#module-urllib.request:
Given than that its license prevents it from being included in the standard library, it seems odd that the the standard library documentation is actually recommending a package that has it as a dependency.
from chardet.
Hi, requests maintainer here. We're not dropping the dependency any time soon. @dan-blanchard you can say we've talked now
from chardet.
Also, I'm aware of many enterprise companies using requests + chardet with license scanning software. LGPL is a gray area in Python and not nearly as infections as AGPL or the non-open-source licenses like SSPL.
from chardet.
I'm curious if there anything in particular about charset_normalizer
that makes it unsuitable compared to chardet
? It advertises itself as an MIT-licensed alternative. Could migration to that be a solution?
from chardet.
We (the maintainers) don't have the time to make such a migration with confidence or without the risk of introducing bugs. Regardless, alternative
doesn't mean drop-in replacement that doesn't regress behaviour for Requests. Conversations like this tend to take up more of our time given how limited our time is to do work on Requests. This precludes us from exploring other options, making improvements, or doing anything except the bare minimum (researching/fixing security bugs, etc.)
from chardet.
@sigmavirus24 for the maintainers of requests
is it a "wont fix" or a "don't have time to fix"?
Curious if the maintainers are opposed to merge requests that attempt to replace chardet
, I've seen every conversation regarding this "closed" with the conversation implying a "won't fix".
If its a "don't have time to fix" then people who are invested in this as an issue could attempt to resolve it.
from chardet.
It's both really
from chardet.
Related Issues (20)
- Predicted encoding unable to decode given string HOT 2
- Not working for .DELTA file
- [Bug]Predicted encoding error
- detect encode wrong!
- Detect pep-0263
- test_detect_all_and_detect_one_should_agree fails on Python 3.11b3 HOT 4
- Dependency warning (v5.0.0) HOT 1
- chardet 5.0 KeyError with Python 3.10 on Windows HOT 5
- Is the license LGPL v2.1 or later or just LGPLv2.1 only? HOT 3
- Documentation licensed only to non-commercial and personal use found
- Documentation licensed only to non-commercial and personal use found HOT 1
- Allow running of the package via `python3 -m chardet ...` HOT 4
- Encoding error
- Next release for Python 3.11 HOT 1
- type annotation and implementation mismatch HOT 2
- How to use Chardet for this Python code, as to read files that have ANSI encoder?
- chardetect cli: UnicodeEncodeError when filename is not utf8
- wrong result. actual johab - expected latin1 HOT 4
- Failed to detect CP932 encoded file
- pip intall chardet
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chardet.