sirVir commented on code in PR #29206:
URL: https://github.com/apache/airflow/pull/29206#discussion_r1090308852
##########
airflow/providers/http/hooks/http.py:
##########
@@ -95,6 +98,11 @@ def get_conn(self, headers: dict[Any, Any] | None = None) ->
requests.Session:
self.base_url = self.base_url + ":" + str(conn.port)
if conn.login:
session.auth = self.auth_type(conn.login, conn.password)
+ elif self.auth_type is not None and self.auth_type is not
HTTPBasicAuth:
Review Comment:
Agreed, it is weird. My line of thinking is - since the `HTTPBasicAuth` is
the default, people might rely on default behavior. So someone might not
provide login/password and hope that `auth_type` will not be initialized if no
login is present. That's why I am trying not to introduce a breaking change.
If we don't check for the type then we would always try to initialize the
`auth_type`. I tried to cover this in tests.
Any suggestions? Maybe we could should check for the subclasses of
`HTTPBasicAuth` as well?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]