mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 10:11:52 +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 ..bot import Bot
|
||||||
from ..types.message import ContentType
|
from ..types.message import ContentType
|
||||||
from ..utils import context
|
from ..utils import context
|
||||||
from ..utils.deprecated import deprecated
|
|
||||||
from ..utils.exceptions import NetworkError, TelegramAPIError, Throttled
|
from ..utils.exceptions import NetworkError, TelegramAPIError, Throttled
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
@ -200,17 +199,6 @@ class Dispatcher:
|
||||||
|
|
||||||
return await self.bot.delete_webhook()
|
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):
|
async def start_polling(self, timeout=20, relax=0.1, limit=None, reset_webhook=None):
|
||||||
"""
|
"""
|
||||||
Start long-polling
|
Start long-polling
|
||||||
|
|
@ -276,10 +264,6 @@ class Dispatcher:
|
||||||
except TelegramAPIError:
|
except TelegramAPIError:
|
||||||
log.exception('Cause exception while processing updates.')
|
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):
|
def stop_polling(self):
|
||||||
"""
|
"""
|
||||||
Break long-polling process.
|
Break long-polling process.
|
||||||
|
|
@ -298,10 +282,6 @@ class Dispatcher:
|
||||||
"""
|
"""
|
||||||
await asyncio.shield(self._close_waiter, loop=self.loop)
|
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):
|
def is_polling(self):
|
||||||
"""
|
"""
|
||||||
Check if polling is enabled
|
Check if polling is enabled
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
|
|
||||||
from . import context
|
from . import context
|
||||||
from .deprecated import deprecated
|
|
||||||
from ..bot.api import log
|
from ..bot.api import log
|
||||||
from ..dispatcher import Dispatcher
|
from ..dispatcher import Dispatcher
|
||||||
from ..dispatcher.webhook import BOT_DISPATCHER_KEY, get_new_configured_app
|
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)
|
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,
|
def start_polling(dispatcher, *, loop=None, skip_updates=False,
|
||||||
on_startup=None, on_shutdown=None):
|
on_startup=None, on_shutdown=None):
|
||||||
log.warning('Start bot with long-polling.')
|
log.warning('Start bot with long-polling.')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue