[GitHub] [airflow] eladkal commented on a diff in pull request #28953: Updated Telegram Provider to ensure compatbility with >=20.0.0

2023-02-22 Thread via GitHub


eladkal commented on code in PR #28953:
URL: https://github.com/apache/airflow/pull/28953#discussion_r1114794911


##
airflow/providers/telegram/provider.yaml:
##
@@ -39,7 +40,7 @@ dependencies:
   # The telegram bot 20.0.0 is not yet compatible with our provider as 
documented in
   # https://github.com/apache/airflow/issues/28670. This limit should be 
removed (and likely replaced
   # with >=20.0.0) once the issue is fixed.
-  - python-telegram-bot>=13.0,<20.0.0
+  - python-telegram-bot>=20.0.0

Review Comment:
   Can you please also remove the comments in the linea above? They are no 
longer relevant



-- 
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-unsubscr...@airflow.apache.org

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



[GitHub] [airflow] eladkal commented on a diff in pull request #28953: Updated Telegram Provider to ensure compatbility with >=20.0.0

2023-02-22 Thread via GitHub


eladkal commented on code in PR #28953:
URL: https://github.com/apache/airflow/pull/28953#discussion_r1114657947


##
tests/providers/telegram/hooks/test_telegram.py:
##
@@ -30,6 +30,10 @@
 TELEGRAM_TOKEN = "dummy token"
 
 
+class AsyncMock(mock.MagicMock):
+async def __call__(self, *args, **kwargs):
+return super(AsyncMock, self).__call__(*args, **kwargs)
+
 class TestTelegramHook:

Review Comment:
   ```suggestion
   async def __call__(self, *args, **kwargs):
   return super(AsyncMock, self).__call__(*args, **kwargs)
   
   
   class TestTelegramHook:
   ```



-- 
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-unsubscr...@airflow.apache.org

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



[GitHub] [airflow] eladkal commented on a diff in pull request #28953: Updated Telegram Provider to ensure compatbility with >=20.0.0

2023-02-20 Thread via GitHub


eladkal commented on code in PR #28953:
URL: https://github.com/apache/airflow/pull/28953#discussion_r964786


##
airflow/providers/telegram/CHANGELOG.rst:
##
@@ -24,6 +24,23 @@
 Changelog
 -
 
+3.2.0
+.

Review Comment:
   ```suggestion
   4.0.0
   .
   
   Breaking changes
   
   ```



##
airflow/providers/telegram/CHANGELOG.rst:
##
@@ -24,6 +24,23 @@
 Changelog
 -
 
+3.2.0
+.
+
+In this version, we upgraded the ``python-telegram-bot`` to ``20.0.0`` and 
above.
+All remains the same except that now the ``get_conn()`` method in 
``TelegramHook`` is a coroutine function.
+Refer to `python-telegram-bot transition guide 
`_
 for more details.
+
+Misc
+
+
+* ``Upgraded python-telegram-bot to 20.0.0 and above``
+* ``Updated unit tests to handle coroutine functions``
+
+.. Below changes are excluded from the changelog. Move them to
+   appropriate section above if needed. Do not delete the lines(!):

Review Comment:
   ```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.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

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



[GitHub] [airflow] eladkal commented on a diff in pull request #28953: Updated Telegram Provider to ensure compatbility with >=20.0.0

2023-01-16 Thread GitBox


eladkal commented on code in PR #28953:
URL: https://github.com/apache/airflow/pull/28953#discussion_r1071208489


##
airflow/providers/telegram/CHANGELOG.rst:
##
@@ -24,6 +24,19 @@
 Changelog
 -
 
+4.0.0
+.
+
+Breaking changes
+
+
+* This release of provider only supports ``python-telegram-bot 20.0.0`` and 
above. All previous versions will
+  not work with ``4.0.0``.

Review Comment:
   Preferably we should say what users require to do/look for. See other 
providers change log for reference. For example 
https://github.com/apache/airflow/blob/main/airflow/providers/amazon/CHANGELOG.rst#700
   
   The information of `Updated Telegram Provider to ensure compatibility with 
>=20.0.0` will be shown as part of the commit message added tot he log. Here we 
are asking to provide some more context into what specifically users should 
look for. It's also OK to link to telegram github/docs if they provide 
information on how to migrate.



-- 
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-unsubscr...@airflow.apache.org

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