druid-io / pydruid

A Python connector for Druid
Other
506 stars 194 forks source link

Replace requests library with urllib #128

Open nishantmonu51 opened 6 years ago

nishantmonu51 commented 6 years ago

We need to package superset, pydruid alongwith the dependencies to support offline installations for our clients. Now the issue is that requests brings in a LGPL dependent library named 'chardet' which we cannot ship in the bundle. (https://github.com/requests/requests/blob/master/setup.py#L46)

On a quick glance at the usage of requests inside pydruid, it seems this can easily be replaced with urllib.

mistercrunch commented 6 years ago

Oh snap. Both Airflow and Superset use requests as well.

nishantmonu51 commented 6 years ago

I looked at the usage in Superset, I found requests usage at limited places when interacting with Druid coordinator.

@mistercrunch Any thoughts on how invasive will be the changes in Airflow required to replace requests usage ?

mistercrunch commented 6 years ago

It's bad, 172 references for Airflow.

11:15 $ git grep requests | wc -l
     172

We should probably fork requests to requests-nogpl and start using that. Ideally someone would commit to keep doing matching releases long-ish term.