You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/05/11 19:16:25 UTC

[GitHub] [airflow] potiuk opened a new pull request #15781: Get rid of requests as core dependency

potiuk opened a new pull request #15781:
URL: https://github.com/apache/airflow/pull/15781


   This change gets rid of requests as core dependency. We have to
   change requests to become an optional dependency because it
   (so far) pulls in `chardet` as dependency and chardet is
   LGPL, which is not allowed to be mandatory dependency by
   ASF policies.
   
   More info here:
   
   https://issues.apache.org/jira/browse/LEGAL-572
   
   The changes:
   
   * connexion is vendored-in (and requests usage is replaced with httpx)
   * Http Provider (which is not optional) is converted to httpx
   * Airbyte, Livy and OpsGenieAlert provider deriving from HttpProvider
     are also adapted.
   * Few places where requests were used in core are replaced
     to use httpx
   * new extra added for deprecated experimental API (which is disabled
     by default and optional)
   * tests are fixed (using pytest-httpx fixture package)
   
   <!--
   Thank you for contributing! Please make sure that your code changes
   are covered with tests. And in case of new features or big changes
   remember to adjust the documentation.
   
   Feel free to ping committers for the review!
   
   In case of existing issue, reference it using one of the following:
   
   closes: #ISSUE
   related: #ISSUE
   
   How to write a good git commit message:
   http://chris.beams.io/posts/git-commit/
   -->
   
   ---
   **^ Add meaningful description above**
   
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#pull-request-guidelines)** for more information.
   In case of fundamental code change, Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)) is needed.
   In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   In case of backwards incompatible changes please leave a note in [UPDATING.md](https://github.com/apache/airflow/blob/master/UPDATING.md).
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-840767948


   > > we will be able to simply delete that PR
   > 
   > I have the impression that httpx is a better library in the long term as it is under active development. If the change is accepted, maybe we want to merge at least some of the changes and set a new long-term goal for the transition to httpx?
   
   That might be an option as well. I think a lot depends on requests maintainer's responses now. I think it will be extremely difficult to get rid of requests. This is the 3rd most popular library in PIP and there are 100s if not thousands of packages using it. So we will have it anyway at least due to transitive dependencies. 
   
   I think once we start moving more torwards asyncio, httpx will definitely be the way to go. 


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841845018






-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-839056937


   Also. What I tested:
   * system test for http works (the example_http DAG succeeds communicates with real world)
   * http provider tests (including the system test) work fine with uninstalled `requests` library
   * airflow starts and processes example DAGS with uninstalled `requests` library. UI works.
   * the API works with uninstalled `requests` library


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632415749



##########
File path: setup.py
##########
@@ -432,6 +438,7 @@ def get_sphinx_theme_version() -> str:
 singularity = ['spython>=0.0.56']
 slack = [
     'slack_sdk>=3.0.0,<4.0.0',
+    'requests>=2.20.0',

Review comment:
       I couldn't see anywhere that `requests` is used in the slack provider
   ```suggestion
   ```




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841834265






-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-839038769


   A little context here. 
   
   1) I used pytest-httpx fixture here which is very convenient way of mocking httpx, however it is pytest-fixture only - which means that we have to mix pytest and unittest type of tests. Howver I think this is justified (and I believe we've already agreed that it might make sense to have both kind of tests at least for a transition period. So this might be a good start.
   
   2) I also might still take a look at slighly less-backwards-compatible change in HttpHook, however I think we will not avoid to also having to upgrade Airbyte, Livy and OpsgenieAlert providers - they all depend on HttpHook and I think we cannot make them backwrds-compatible.
   
   3) If anyone thinks that makes sense I can split the PR, however getting rid of the requests as core dependency is common among all the changes.
   
   4) I will have to add another change - add capability to add version dependencies between providers when they are generated. I planned to do it anyway and it was inevitable, but I want to do it as a separate PR. 
   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632415943



##########
File path: airflow/providers/google/cloud/hooks/cloud_sql.py
##########
@@ -500,7 +500,7 @@ def _download_sql_proxy_if_needed(self) -> None:
             )
         proxy_path_tmp = self.sql_proxy_path + ".tmp"
         self.log.info("Downloading cloud_sql_proxy from %s to %s", download_url, proxy_path_tmp)
-        response = requests.get(download_url, allow_redirects=True)
+        response = httpx.get(download_url, allow_redirects=True)

Review comment:
       It's a core dependency of Airlfow now. but you are right if it is installed for older version it should be.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632452209



##########
File path: setup.py
##########
@@ -524,15 +543,15 @@ def get_sphinx_theme_version() -> str:
 
 # Dict of all providers which are part of the Apache Airflow repository together with their requirements
 PROVIDERS_REQUIREMENTS: Dict[str, List[str]] = {
-    'airbyte': [],
+    'airbyte': http_provider,

Review comment:
       This is already handled by the cross-provider dep mechanism we have isn't it?
   
   https://github.com/apache/airflow/blob/bcfa0cbbfc941cae705a39cfbdd6330a5ba0578e/airflow/providers/dependencies.json#L2-L4

##########
File path: setup.py
##########
@@ -524,15 +543,15 @@ def get_sphinx_theme_version() -> str:
 
 # Dict of all providers which are part of the Apache Airflow repository together with their requirements
 PROVIDERS_REQUIREMENTS: Dict[str, List[str]] = {
-    'airbyte': [],
+    'airbyte': http_provider,

Review comment:
       Oh, oh no, not correctly.
   
   That' dependencies.json is only for _optional_ extras, so that would have `apache-airflow-providers-airbyte[http]` -- but that doesn't make sense as it's _required_.
   
   Something to fix in a future PR.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841131957


   @turbaszek @kaxil @ashb - as discussed, I separated out `connexion` vendor-in + core requests replacement with `httpx` and made `http` optional. 
   
   I will add `http` change to `httpx` as separate - draft PR in case it turns out `requests` will not merge our PR shortly.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-842199289


   [The Workflow run](https://github.com/apache/airflow/actions/runs/849232434) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632424200



##########
File path: setup.py
##########
@@ -524,15 +532,15 @@ def get_sphinx_theme_version() -> str:
 
 # Dict of all providers which are part of the Apache Airflow repository together with their requirements
 PROVIDERS_REQUIREMENTS: Dict[str, List[str]] = {
-    'airbyte': [],
+    'airbyte': http,
     'amazon': amazon,
     'apache.beam': apache_beam,
     'apache.cassandra': cassandra,
     'apache.druid': druid,
     'apache.hdfs': hdfs,
     'apache.hive': hive,
     'apache.kylin': kylin,
-    'apache.livy': [],
+    'apache.livy': http,

Review comment:
       ```suggestion
       'apache.livy': [],
   ```
   
   Already depends on http provider




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk closed pull request #15781:
URL: https://github.com/apache/airflow/pull/15781


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841174674






-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-842199453


   [The Workflow run](https://github.com/apache/airflow/actions/runs/849240388) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841864189


   [The Workflow run](https://github.com/apache/airflow/actions/runs/847557340) is cancelling this PR. Building images for the PR has failed. Follow the workflow link to check the reason.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841469897


   [The Workflow run](https://github.com/apache/airflow/actions/runs/843120700) is cancelling this PR. Building images for the PR has failed. Follow the workflow link to check the reason.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841845018


   [The Workflow run](https://github.com/apache/airflow/actions/runs/847253395) is cancelling this PR. Building images for the PR has failed. Follow the workflow link to check the reason.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632408316



##########
File path: UPDATING.md
##########
@@ -71,6 +71,20 @@ https://developers.google.com/style/inclusive-documentation
 
 -->
 
+### Connexion is now vendored in
+
+The `connexion` used for our REST API depends on `requests` library that's why we had to
+vendor it in (in `airflow/_vendor` package). Airflow does not depend on `connexion` any more.
+This is until `chardet` becomes an optional dependency of `requests`.
+
+See [PR to replace chardet with charset-normalizer](https://github.com/psf/requests/pull/5797)
+

Review comment:
       I don't think this is really relevant to users who are upgrading-- there is nothing they have to do with this information.
   
   
   ```suggestion
   ```

##########
File path: airflow/providers/google/cloud/hooks/cloud_sql.py
##########
@@ -500,7 +500,7 @@ def _download_sql_proxy_if_needed(self) -> None:
             )
         proxy_path_tmp = self.sql_proxy_path + ".tmp"
         self.log.info("Downloading cloud_sql_proxy from %s to %s", download_url, proxy_path_tmp)
-        response = requests.get(download_url, allow_redirects=True)
+        response = httpx.get(download_url, allow_redirects=True)

Review comment:
       `httpx` isn't listed in the google providers deps.
   
   Should it be?




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] turbaszek commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
turbaszek commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-840330176


   Hey @potiuk would you mind splitting this change into two commits (code vendor + changes)? It would improve reviewing the required changes 🙏 


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841251486


   [The Workflow run](https://github.com/apache/airflow/actions/runs/842202680) is cancelling this PR. Building images for the PR has failed. Follow the workflow link to check the reason.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk edited a comment on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk edited a comment on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841131957


   @turbaszek @kaxil @ashb - as discussed, I separated out `connexion` vendor-in + core requests replacement with `httpx` and made `http` provider optional. 
   
   I will add `http` change to `httpx` as separate - draft PR in case it turns out `requests` will not merge our PR shortly.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632424367



##########
File path: setup.py
##########
@@ -565,7 +573,7 @@ def get_sphinx_theme_version() -> str:
     'neo4j': neo4j,
     'odbc': odbc,
     'openfaas': [],
-    'opsgenie': [],
+    'opsgenie': http,

Review comment:
       ```suggestion
       'opsgenie': [],
   ```
   
   Already depends on http provider




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk closed pull request #15781:
URL: https://github.com/apache/airflow/pull/15781


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632445771



##########
File path: setup.py
##########
@@ -524,15 +532,15 @@ def get_sphinx_theme_version() -> str:
 
 # Dict of all providers which are part of the Apache Airflow repository together with their requirements
 PROVIDERS_REQUIREMENTS: Dict[str, List[str]] = {
-    'airbyte': [],
+    'airbyte': http,

Review comment:
       Not really. Those are optional dependencies (in extras). Cross-provider dependencies are extra/optional ones (because ofen those are optional dependencies of only one operator or so (like in case of slack). Before that, when http was mandatory, it did not matter. But now we have to explicitly change it to 'apache-airflow-provider-http` actuatlly if we want to be 100% correct.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632417996



##########
File path: setup.py
##########
@@ -432,6 +438,7 @@ def get_sphinx_theme_version() -> str:
 singularity = ['spython>=0.0.56']
 slack = [
     'slack_sdk>=3.0.0,<4.0.0',
+    'requests>=2.20.0',

Review comment:
       But yeah, SlackWebHook is only usable when optional [http] extra on slack provider, which pulls in requests anyway. So indeed - we can remove it from here.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk closed pull request #15781:
URL: https://github.com/apache/airflow/pull/15781


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632416506



##########
File path: airflow/providers/google/cloud/hooks/cloud_sql.py
##########
@@ -500,7 +500,7 @@ def _download_sql_proxy_if_needed(self) -> None:
             )
         proxy_path_tmp = self.sql_proxy_path + ".tmp"
         self.log.info("Downloading cloud_sql_proxy from %s to %s", download_url, proxy_path_tmp)
-        response = requests.get(download_url, allow_redirects=True)
+        response = httpx.get(download_url, allow_redirects=True)

Review comment:
       Oh yeah. And yeah, explicit is probably better than implicit.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632470167



##########
File path: setup.py
##########
@@ -524,15 +543,15 @@ def get_sphinx_theme_version() -> str:
 
 # Dict of all providers which are part of the Apache Airflow repository together with their requirements
 PROVIDERS_REQUIREMENTS: Dict[str, List[str]] = {
-    'airbyte': [],
+    'airbyte': http_provider,

Review comment:
       Now it's ok - the 'http_provider' dependency is actually dependency to the `apache-airlflow-providers-http` :D




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632423869



##########
File path: setup.py
##########
@@ -524,15 +532,15 @@ def get_sphinx_theme_version() -> str:
 
 # Dict of all providers which are part of the Apache Airflow repository together with their requirements
 PROVIDERS_REQUIREMENTS: Dict[str, List[str]] = {
-    'airbyte': [],
+    'airbyte': http,

Review comment:
       Ah, dependencies.json




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841171585


   I replaced those with explicit "apache-airflow-proividers-http' dependency 


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632417559



##########
File path: setup.py
##########
@@ -432,6 +438,7 @@ def get_sphinx_theme_version() -> str:
 singularity = ['spython>=0.0.56']
 slack = [
     'slack_sdk>=3.0.0,<4.0.0',
+    'requests>=2.20.0',

Review comment:
       Shouldn't that just be a cross-dep to the http provider then?




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841834265


   Trying to trigger the build.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-839129192


   [The Workflow run](https://github.com/apache/airflow/actions/runs/832960691) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-840586994


   Yeah. I am happy to do it.... But there is still a chance we will not have to do it https://github.com/psf/requests/pull/5797 - working on it, so maybe we will be able to simply delete that PR :)


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632416572



##########
File path: setup.py
##########
@@ -432,6 +438,7 @@ def get_sphinx_theme_version() -> str:
 singularity = ['spython>=0.0.56']
 slack = [
     'slack_sdk>=3.0.0,<4.0.0',
+    'requests>=2.20.0',

Review comment:
       SlackWebHook derives from SimpleHttpHook




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632424055



##########
File path: setup.py
##########
@@ -524,15 +532,15 @@ def get_sphinx_theme_version() -> str:
 
 # Dict of all providers which are part of the Apache Airflow repository together with their requirements
 PROVIDERS_REQUIREMENTS: Dict[str, List[str]] = {
-    'airbyte': [],
+    'airbyte': http,

Review comment:
       ```suggestion
       'airbyte': [],
   ```
   
   Already depends on http provider




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk merged pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #15781:
URL: https://github.com/apache/airflow/pull/15781


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ad-m commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ad-m commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-840755053


   > we will be able to simply delete that PR
   
   I have the impression that httpx is a better library in the long term as it is under active development. If the change is accepted, maybe we want to merge at least some of the changes and set a new long-term goal for the transition to httpx?


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632417559



##########
File path: setup.py
##########
@@ -432,6 +438,7 @@ def get_sphinx_theme_version() -> str:
 singularity = ['spython>=0.0.56']
 slack = [
     'slack_sdk>=3.0.0,<4.0.0',
+    'requests>=2.20.0',

Review comment:
       Ah -- I was looking for `requests` string, explains why I couldn't find it.
   
   Shouldn't that just be a cross-dep to the http provider then?

##########
File path: setup.py
##########
@@ -432,6 +438,7 @@ def get_sphinx_theme_version() -> str:
 singularity = ['spython>=0.0.56']
 slack = [
     'slack_sdk>=3.0.0,<4.0.0',
+    'requests>=2.20.0',

Review comment:
       Ah -- I was looking for `import requests` string, explains why I couldn't find it.
   
   Shouldn't that just be a cross-dep to the http provider then?




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841221167


   [The Workflow run](https://github.com/apache/airflow/actions/runs/841943008) is cancelling this PR. Building images for the PR has failed. Follow the workflow link to check the reason.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841851164


   [The Workflow run](https://github.com/apache/airflow/actions/runs/847385858) is cancelling this PR. Building images for the PR has failed. Follow the workflow link to check the reason.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk closed pull request #15781:
URL: https://github.com/apache/airflow/pull/15781






-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk closed pull request #15781:
URL: https://github.com/apache/airflow/pull/15781


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk closed pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk closed pull request #15781:
URL: https://github.com/apache/airflow/pull/15781


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] github-actions[bot] commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-839843498


   [The Workflow run](https://github.com/apache/airflow/actions/runs/835782830) is cancelling this PR. It has some failed jobs matching ^Pylint$,^Static checks,^Build docs$,^Spell check docs$,^Provider packages,^Checks: Helm tests$,^Test OpenAPI*.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk merged pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk merged pull request #15781:
URL: https://github.com/apache/airflow/pull/15781


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841842553


   :crossed_fingers:  - things start to slowly work again ....


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] potiuk commented on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
potiuk commented on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-841144108


   Also #15846 added to replace `requests` with `httpx` in the "Http family" providers.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] turbaszek edited a comment on pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
turbaszek edited a comment on pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#issuecomment-840330176


   Hey @potiuk would you mind splitting this change into two commits (code vendor + changes)? It would improve reviewing the required changes 🙏 
   
   Plus it may be useful to add note about this in our code style guide - requests are popular library, WDYT?


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [airflow] ashb commented on a change in pull request #15781: Get rid of requests as core dependency

Posted by GitBox <gi...@apache.org>.
ashb commented on a change in pull request #15781:
URL: https://github.com/apache/airflow/pull/15781#discussion_r632423430



##########
File path: setup.py
##########
@@ -524,15 +532,15 @@ def get_sphinx_theme_version() -> str:
 
 # Dict of all providers which are part of the Apache Airflow repository together with their requirements
 PROVIDERS_REQUIREMENTS: Dict[str, List[str]] = {
-    'airbyte': [],
+    'airbyte': http,

Review comment:
       Same for airbyte, apache.livy, and opsgenie as for slack -- we should depend upon the http provider, not http deps directly.
   
   I can't remember where we define cross-provider deps though.




-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org