lazily load Updater & move extended classes to submodule#198
lazily load Updater & move extended classes to submodule#198leandrotoledo merged 5 commits intopython-telegram-bot:masterfrom rahiel:master
Conversation
|
Tests pass 😄, @taemery could you help test this on GAE? |
|
Very nice @rahiel :) |
|
+1 @rahiel. Maybe we should add an INFO log mentioning this is a deprecated function and will be removed in the future? |
|
Also, let's move the extended classes to a different submodule, here follows some suggestions:
Looking forward to hearing some input from y'all. |
|
I can test this tomorrow, don't merge yet |
|
GAE works! I can put my stamp of approval on this pull request |
|
Thanks @taemery 😊.
@leandrotoledo there isn't an alternate interface to
That is probably cleaner, but I think the And |
Agree. I didn't mean though we should make people use
Until people get used to it, lazying importing it from a submodule shouldn't bother either. My 2cents. |
|
@leandrotoledo I agree, the separation is good. If we decide on a name for the submodule, I can move the extended classes over. (I wasn't happy having a telegram.updater.Updater instance before, that's why I rolled it back 😅) |
|
I'm down for telegram.ext.*, who is with (or against) it? |
I also like the sound of telegram.ext. I changed some of the tests to import from telegram.ext, but kept an import of |
|
Great work @rahiel, just a minor comment/suggestion:
Everything else does look good to be merged! |
|
@leandrotoledo the docs mention that |
|
@rahiel good catch. |
lazily load Updater & move extended classes to submodule
I've added a
Updaterfunction to the original__init__.pythat will lazily load the Updater class and return an Updater instance.This should not break existing code that uses
from telegram import Updater, while fixing #184.