Switch LGPL'd chardet for MIT licensed charset_normalizer by ashb · Pull Request #5797 · psf/requests

5 min read Original article ↗

This was referenced

May 11, 2021

This was referenced

Jul 11, 2021

potiuk added a commit to potiuk/airflow that referenced this pull request

Jul 13, 2021
Following merging the psf/requests#5797
and requests 2.26.0 release without LGPL chardet dependency,
we can now bring back http as pre-installed provider as it does
not bring chardet automatically any more.

potiuk added a commit to apache/airflow that referenced this pull request

Jul 13, 2021
)

Following merging the psf/requests#5797
and requests 2.26.0 release without LGPL chardet dependency,
we can now bring back http as pre-installed provider as it does
not bring chardet automatically any more.

jonfung-scale pushed a commit to jonfung-scale/jonfung-requests that referenced this pull request

Jul 14, 2021
Although using the (non-vendored) chardet library is fine for requests
itself, but using a LGPL dependency the story is a lot less clear
for downstream projects, particularly ones that might like to bundle
requests (and thus chardet) in to a single binary -- think something
similar to what docker-compose is doing. By including an LGPL'd module
it is no longer clear if the resulting artefact must also be LGPL'd.

By changing out this dependency for one under MIT we remove all
license ambiguity.

As an "escape hatch" I have made the code so that it will use chardet
first if it is installed, but we no longer depend upon it directly,
although there is a new extra added, `requests[lgpl]`. This should
minimize the impact to users, and give them an escape hatch if
charset_normalizer turns out to be not as good. (In my non-exhaustive
tests it detects the same encoding as chartdet in every case I threw at
it)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

jonfung-scale pushed a commit to jonfung-scale/jonfung-requests that referenced this pull request

Jul 14, 2021
Although using the (non-vendored) chardet library is fine for requests
itself, but using a LGPL dependency the story is a lot less clear
for downstream projects, particularly ones that might like to bundle
requests (and thus chardet) in to a single binary -- think something
similar to what docker-compose is doing. By including an LGPL'd module
it is no longer clear if the resulting artefact must also be LGPL'd.

By changing out this dependency for one under MIT we remove all
license ambiguity.

As an "escape hatch" I have made the code so that it will use chardet
first if it is installed, but we no longer depend upon it directly,
although there is a new extra added, `requests[lgpl]`. This should
minimize the impact to users, and give them an escape hatch if
charset_normalizer turns out to be not as good. (In my non-exhaustive
tests it detects the same encoding as chartdet in every case I threw at
it)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

@akx akx mentioned this pull request

Jul 14, 2021

jonfung-scale pushed a commit to jonfung-scale/jonfung-requests that referenced this pull request

Jul 15, 2021
Although using the (non-vendored) chardet library is fine for requests
itself, but using a LGPL dependency the story is a lot less clear
for downstream projects, particularly ones that might like to bundle
requests (and thus chardet) in to a single binary -- think something
similar to what docker-compose is doing. By including an LGPL'd module
it is no longer clear if the resulting artefact must also be LGPL'd.

By changing out this dependency for one under MIT we remove all
license ambiguity.

As an "escape hatch" I have made the code so that it will use chardet
first if it is installed, but we no longer depend upon it directly,
although there is a new extra added, `requests[lgpl]`. This should
minimize the impact to users, and give them an escape hatch if
charset_normalizer turns out to be not as good. (In my non-exhaustive
tests it detects the same encoding as chartdet in every case I threw at
it)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

josh-fell pushed a commit to josh-fell/airflow that referenced this pull request

Jul 19, 2021
…che#16974)

Following merging the psf/requests#5797
and requests 2.26.0 release without LGPL chardet dependency,
we can now bring back http as pre-installed provider as it does
not bring chardet automatically any more.

potiuk added a commit to potiuk/airflow that referenced this pull request

Aug 2, 2021
…che#16974)

Following merging the psf/requests#5797
and requests 2.26.0 release without LGPL chardet dependency,
we can now bring back http as pre-installed provider as it does
not bring chardet automatically any more.

(cherry picked from commit c46e841)

potiuk added a commit to potiuk/airflow that referenced this pull request

Aug 5, 2021
…che#16974)

Following merging the psf/requests#5797
and requests 2.26.0 release without LGPL chardet dependency,
we can now bring back http as pre-installed provider as it does
not bring chardet automatically any more.

(cherry picked from commit c46e841)

@ad-m ad-m mentioned this pull request

Aug 11, 2021

kaxil pushed a commit to apache/airflow that referenced this pull request

Aug 17, 2021
)

Following merging the psf/requests#5797
and requests 2.26.0 release without LGPL chardet dependency,
we can now bring back http as pre-installed provider as it does
not bring chardet automatically any more.

(cherry picked from commit c46e841)

jhtimmins pushed a commit to apache/airflow that referenced this pull request

Aug 17, 2021
)

Following merging the psf/requests#5797
and requests 2.26.0 release without LGPL chardet dependency,
we can now bring back http as pre-installed provider as it does
not bring chardet automatically any more.

(cherry picked from commit c46e841)

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators

Oct 26, 2021