From 70ad68cf4a3263afa06f091e3a13e16f69eeae60 Mon Sep 17 00:00:00 2001 From: Alex Root Junior Date: Sun, 15 Apr 2018 04:26:31 +0300 Subject: [PATCH] Removed obsolete code --- aiogram/dispatcher/__init__.py | 20 -------------------- aiogram/utils/executor.py | 6 ------ 2 files changed, 26 deletions(-) diff --git a/aiogram/dispatcher/__init__.py b/aiogram/dispatcher/__init__.py index 8f89d4bf..edd09667 100644 --- a/aiogram/dispatcher/__init__.py +++ b/aiogram/dispatcher/__init__.py @@ -15,7 +15,6 @@ from .webhook import BaseResponse from ..bot import Bot from ..types.message import ContentType from ..utils import context -from ..utils.deprecated import deprecated from ..utils.exceptions import NetworkError, TelegramAPIError, Throttled log = logging.getLogger(__name__) @@ -200,17 +199,6 @@ class Dispatcher: return await self.bot.delete_webhook() - @deprecated('The old method was renamed to `start_polling`') - async def start_pooling(self, *args, **kwargs): - """ - Start long-lopping - - :param args: - :param kwargs: - :return: - """ - return await self.start_polling(*args, **kwargs) - async def start_polling(self, timeout=20, relax=0.1, limit=None, reset_webhook=None): """ Start long-polling @@ -276,10 +264,6 @@ class Dispatcher: except TelegramAPIError: log.exception('Cause exception while processing updates.') - @deprecated('The old method was renamed to `stop_polling`') - def stop_pooling(self): - return self.stop_polling() - def stop_polling(self): """ Break long-polling process. @@ -298,10 +282,6 @@ class Dispatcher: """ await asyncio.shield(self._close_waiter, loop=self.loop) - @deprecated('The old method was renamed to `is_polling`') - def is_pooling(self): - return self.is_polling() - def is_polling(self): """ Check if polling is enabled diff --git a/aiogram/utils/executor.py b/aiogram/utils/executor.py index 62e1cd1e..51ecd924 100644 --- a/aiogram/utils/executor.py +++ b/aiogram/utils/executor.py @@ -1,7 +1,6 @@ from aiohttp import web from . import context -from .deprecated import deprecated from ..bot.api import log from ..dispatcher import Dispatcher from ..dispatcher.webhook import BOT_DISPATCHER_KEY, get_new_configured_app @@ -48,11 +47,6 @@ async def _wh_shutdown(app): await _shutdown(dispatcher, callback=callback) -@deprecated('The old function was renamed to `start_polling`') -def start_pooling(*args, **kwargs): - return start_polling(*args, **kwargs) - - def start_polling(dispatcher, *, loop=None, skip_updates=False, on_startup=None, on_shutdown=None): log.warning('Start bot with long-polling.')