Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions telegram/ext/_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -1027,10 +1027,6 @@ async def __create_task_callback(
if isinstance(coroutine, Generator):
return await asyncio.create_task(coroutine)
return await coroutine
except asyncio.CancelledError as cancel:
# TODO: in py3.8+, CancelledError is a subclass of BaseException, so we can drop this
# clause when we drop py3.7
raise cancel
except Exception as exception:
if isinstance(exception, ApplicationHandlerStop):
warn(
Expand Down
4 changes: 0 additions & 4 deletions telegram/ext/_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,6 @@ async def polling_action_cb() -> bool:
pool_timeout=pool_timeout,
allowed_updates=allowed_updates,
)
except asyncio.CancelledError as exc:
# TODO: in py3.8+, CancelledError is a subclass of BaseException, so we can drop
# this clause when we drop py3.7
raise exc
except TelegramError as exc:
# TelegramErrors should be processed by the network retry loop
raise exc
Expand Down
5 changes: 0 additions & 5 deletions telegram/request/_baserequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# along with this program. If not, see [http://www.gnu.org/licenses/].
"""This module contains an abstract class to make POST and GET requests."""
import abc
import asyncio
import json
from http import HTTPStatus
from types import TracebackType
Expand Down Expand Up @@ -283,10 +282,6 @@ async def _request_wrapper(
connect_timeout=connect_timeout,
pool_timeout=pool_timeout,
)
except asyncio.CancelledError as exc:
# TODO: in py3.8+, CancelledError is a subclass of BaseException, so we can drop this
# clause when we drop py3.7
raise exc
except TelegramError as exc:
raise exc
except Exception as exc:
Expand Down