You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "gopidesupavan (via GitHub)" <gi...@apache.org> on 2025/08/02 22:03:47 UTC

[PR] Remove deprecated method check send_file usage from slack operators [airflow]

gopidesupavan opened a new pull request, #54061:
URL: https://github.com/apache/airflow/pull/54061

   
   We have removed send_file deprecation method part of this https://github.com/apache/airflow/pull/44693.
   
   There were some leftovers of usage of `send_file ` eg: https://github.com/apache/airflow/blob/main/providers/slack/src/airflow/providers/slack/operators/slack.py#L245, this would file as there is no send_file method in hooks.
   
   We should remove now usages.
   
   1. Bumped version to 3.36.0 latest
   2. Updated tests
   3. Removed deprecated usage.
   
   As we removed method_resolver function, we dont need of the method_version argument at all, for now added deprecation warning if anyone uses this would notify the default is slack_sdk file_upload_v2.
   
   <!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at
   
      http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
    -->
   
   <!--
   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 an 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/
   -->
   
   
   
   <!-- Please keep an empty line above the dashes. -->
   ---
   **^ Add meaningful description above**
   Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information.
   In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+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 a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments).
   


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Remove deprecated method check send_file usage from slack operators [airflow]

Posted by "gopidesupavan (via GitHub)" <gi...@apache.org>.
gopidesupavan commented on code in PR #54061:
URL: https://github.com/apache/airflow/pull/54061#discussion_r2250647807


##########
providers/slack/pyproject.toml:
##########
@@ -60,7 +60,7 @@ dependencies = [
     "apache-airflow>=2.10.0",
     "apache-airflow-providers-common-compat>=1.6.1",
     "apache-airflow-providers-common-sql>=1.27.0",
-    "slack_sdk>=3.19.0",
+    "slack_sdk>=3.36.0",

Review Comment:
   separated here https://github.com/apache/airflow/pull/54080/files



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Remove deprecated method check send_file usage from slack operators [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on code in PR #54061:
URL: https://github.com/apache/airflow/pull/54061#discussion_r2253307609


##########
providers/slack/src/airflow/providers/slack/hooks/slack.py:
##########
@@ -237,7 +237,6 @@ def send_file_v1_to_v2(
         initial_comment: str | None = None,
         title: str | None = None,
         snippet_type: str | None = None,
-        **kwargs,

Review Comment:
   Yeah. It was a remnant to serve the old method when that method could be used with "send_file" that had different parameters - not needed now.



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Remove deprecated method check send_file usage from slack operators [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #54061:
URL: https://github.com/apache/airflow/pull/54061#discussion_r2250606464


##########
providers/slack/src/airflow/providers/slack/hooks/slack.py:
##########
@@ -237,7 +237,6 @@ def send_file_v1_to_v2(
         initial_comment: str | None = None,
         title: str | None = None,
         snippet_type: str | None = None,
-        **kwargs,

Review Comment:
   But users nay use it for custom operators isn't it? Or are you saying that it didn't serve any functionality?



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Remove deprecated method check send_file usage from slack operators [airflow]

Posted by "gopidesupavan (via GitHub)" <gi...@apache.org>.
gopidesupavan commented on code in PR #54061:
URL: https://github.com/apache/airflow/pull/54061#discussion_r2250600152


##########
providers/slack/src/airflow/providers/slack/hooks/slack.py:
##########
@@ -237,7 +237,6 @@ def send_file_v1_to_v2(
         initial_comment: str | None = None,
         title: str | None = None,
         snippet_type: str | None = None,
-        **kwargs,

Review Comment:
   This was unused **kwargs, so i removed



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Remove deprecated method check send_file usage from slack operators [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk merged PR #54061:
URL: https://github.com/apache/airflow/pull/54061


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Remove deprecated method check send_file usage from slack operators [airflow]

Posted by "gopidesupavan (via GitHub)" <gi...@apache.org>.
gopidesupavan commented on code in PR #54061:
URL: https://github.com/apache/airflow/pull/54061#discussion_r2250617975


##########
providers/slack/src/airflow/providers/slack/hooks/slack.py:
##########
@@ -237,7 +237,6 @@ def send_file_v1_to_v2(
         initial_comment: str | None = None,
         title: str | None = None,
         snippet_type: str | None = None,
-        **kwargs,

Review Comment:
   Yes it doesnt serve any functionality, as we are not at all referring kwrgs in that function. if users sending any extract function args it will fail now, earlier with kwargs its accepting any kind args though we are not using.
   
   If you think we should keep that i am happy to keep, it just that i dont keep that as we are not using at all and its more confusion why kwargs used for ;)



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Remove deprecated method check send_file usage from slack operators [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #54061:
URL: https://github.com/apache/airflow/pull/54061#discussion_r2250509536


##########
providers/slack/pyproject.toml:
##########
@@ -60,7 +60,7 @@ dependencies = [
     "apache-airflow>=2.10.0",
     "apache-airflow-providers-common-compat>=1.6.1",
     "apache-airflow-providers-common-sql>=1.27.0",
-    "slack_sdk>=3.19.0",
+    "slack_sdk>=3.36.0",

Review Comment:
   I think it's best to bump seperatly



##########
providers/slack/pyproject.toml:
##########
@@ -60,7 +60,7 @@ dependencies = [
     "apache-airflow>=2.10.0",
     "apache-airflow-providers-common-compat>=1.6.1",
     "apache-airflow-providers-common-sql>=1.27.0",
-    "slack_sdk>=3.19.0",
+    "slack_sdk>=3.36.0",

Review Comment:
   I think it's best to bump separately



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Remove deprecated method check send_file usage from slack operators [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal commented on code in PR #54061:
URL: https://github.com/apache/airflow/pull/54061#discussion_r2250508027


##########
providers/slack/src/airflow/providers/slack/hooks/slack.py:
##########
@@ -237,7 +237,6 @@ def send_file_v1_to_v2(
         initial_comment: str | None = None,
         title: str | None = None,
         snippet_type: str | None = None,
-        **kwargs,

Review Comment:
   why did you remove kwargs?



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Remove deprecated method check send_file usage from slack operators [airflow]

Posted by "gopidesupavan (via GitHub)" <gi...@apache.org>.
gopidesupavan commented on code in PR #54061:
URL: https://github.com/apache/airflow/pull/54061#discussion_r2250617975


##########
providers/slack/src/airflow/providers/slack/hooks/slack.py:
##########
@@ -237,7 +237,6 @@ def send_file_v1_to_v2(
         initial_comment: str | None = None,
         title: str | None = None,
         snippet_type: str | None = None,
-        **kwargs,

Review Comment:
   Yes it doesnt serve any functionality, as we are not at all referring kwrgs in that function. if users sending any extract function args it will fail now, earlier with kwargs its accepting any kind args though we are not using.
   
   If you think we should keep that i am happy to keep, it just that i dont want keep that as we are not using at all in that function and its more confusion why kwargs used for ;)



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Remove deprecated method check send_file usage from slack operators [airflow]

Posted by "gopidesupavan (via GitHub)" <gi...@apache.org>.
gopidesupavan commented on code in PR #54061:
URL: https://github.com/apache/airflow/pull/54061#discussion_r2249427978


##########
providers/slack/pyproject.toml:
##########
@@ -60,7 +60,7 @@ dependencies = [
     "apache-airflow>=2.10.0",
     "apache-airflow-providers-common-compat>=1.6.1",
     "apache-airflow-providers-common-sql>=1.27.0",
-    "slack_sdk>=3.19.0",
+    "slack_sdk>=3.36.0",

Review Comment:
   happy to move to new PR this version bump



-- 
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: commits-unsubscribe@airflow.apache.org

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