From 8b196ce71ff48a7978ac11d463e543a1f65e0a49 Mon Sep 17 00:00:00 2001 From: Rahiel Kasim Date: Sat, 12 Mar 2016 15:22:50 +0100 Subject: [PATCH] load Updater class only when used --- telegram/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/telegram/__init__.py b/telegram/__init__.py index 605bf291a..e28ac408a 100644 --- a/telegram/__init__.py +++ b/telegram/__init__.py @@ -52,7 +52,12 @@ from .bot import Bot from .dispatcher import Dispatcher from .jobqueue import JobQueue from .updatequeue import UpdateQueue -from .updater import Updater + + +def Updater(*args, **kwargs): + """Load the updater module on invocation and return an Updater instance.""" + from .updater import Updater as Up + return Up(*args, **kwargs) __author__ = 'devs@python-telegram-bot.org'