[ 
https://issues.apache.org/jira/browse/AIRFLOW-4543?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17098044#comment-17098044
 ] 

ASF GitHub Bot commented on AIRFLOW-4543:
-----------------------------------------

kaxil commented on pull request #5519:
URL: https://github.com/apache/airflow/pull/5519#issuecomment-622989835


   Check this out: 
https://github.com/slackapi/python-slackclient/wiki/Migrating-to-2.x
   
   
   **Before 2.0**:
   
   ```python
   from slackclient import SlackClient
   
   client = SlackClient(os.environ["SLACK_API_TOKEN"])
   client.api_call('chat.postMessage',
       timeout=30,
       channel='C0123456',
       text="Hi!")
   ```
   
   **After 2.0**:
   ```python
   import slack
   
   client = slack.WebClient(os.environ["SLACK_API_TOKEN"], timeout=30)
   client.api_call('chat.postMessage', json={
       'channel': 'C0123456',
       'text': 'Hi!'})
   
   # Note: That while the above is allowed, the more efficient way to call that 
API is like this:
   client.chat_postMessage(
       channel='C0123456',
       text='Hi!')
   ```


----------------------------------------------------------------
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:
[email protected]


> Update slack operator to support slackclient v2
> -----------------------------------------------
>
>                 Key: AIRFLOW-4543
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-4543
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: hooks, operators
>            Reporter: Sergio Kef
>            Assignee: Sergio Kef
>            Priority: Major
>
> Official [Slack API for python|https://pypi.org/project/slackclient/] has 
> recently released 
> [v.2|https://github.com/slackapi/python-slackclient/wiki/Migrating-to-2.x0]
> Among others some important points:
>  * Async IO
>  * SSL and Proxy
>  * Dropping 2.7 support
> Opening this ticket to work on the upgrade. Current functionalities will be 
> migrated and will try to extend functionalities, if possible.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to