apache / airflow

Apache Airflow - A platform to programmatically author, schedule, and monitor workflows
https://airflow.apache.org/
Apache License 2.0
36.56k stars 14.16k forks source link

switch HttpHook from using requests library to httpx? #40580

Closed kiaradlf closed 2 months ago

kiaradlf commented 3 months ago

Description

the HttpHook currently uses the requests library for HTTP calls. httpx appears a more modern alternative, boasting support for e.g. http2, async support, and type annotations. it would be nice if the http hook could perhaps take advantage of these as well.

Use case/motivation

my own immediate use-case was password-protected client certificates, which seem not supported in requests.

Related issues

No response

Are you willing to submit a PR?

Code of Conduct

potiuk commented 3 months ago

I am not sure we recently switched back from httpx to requests in file task handler, because it did not work with some specific NO_PROXY settings https://github.com/apache/airflow/pull/39799. And since HTTPHook is just simple wrapper and has simple functionality - we do not need all the "fancy" features httpx has. But if someone (like you) take on the task to make sure to handle the issues like the one in #39799 - then why not - with documentation etc.

We need someone to take a lead, analyse all pros and cons and things supported/not supported by both and come up with good documentation.

Would you like to take a lead on that one ?

github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has been open for 14 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author.

github-actions[bot] commented 2 months ago

This issue has been closed because it has not received response from the issue author.