mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-11 01:54:53 +00:00
Removed obsolete code
This commit is contained in:
parent
41c764971b
commit
70ad68cf4a
2 changed files with 0 additions and 26 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue