Skip to content

Conversation

rahiel
Copy link
Contributor

@rahiel rahiel commented May 24, 2016

Moves botan support to ext.

@rahiel rahiel added this to the 5.0 milestone May 24, 2016
@coveralls
Copy link

coveralls commented May 24, 2016

Coverage Status

Coverage decreased (-0.009%) to 93.999% when pulling c4d5eff on move-botan into f45ecee on master.

@leandrotoledo
Copy link
Member

Maybe we should a backwards compatibility import to telegram.utils.__init__ and warns, and by v5 remove it, like we did with all the ext classes in the past.

@rahiel
Copy link
Contributor Author

rahiel commented May 25, 2016

Maybe we should a backwards compatibility import to telegram.utils.init and warns, and by v5 remove it, like we did with all the ext classes in the past.

I'm having some trouble with this, putting the following in telegram.utils.__init__:

from telegram.ext.botan import Botan

breaks importing NullHandler:

In [1]: import telegram
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-c0c4e3ab5730> in <module>()
----> 1 import telegram

/home/rahiel/Code/telegram/python-telegram-bot/telegram/__init__.py in <module>()
     42 from .error import TelegramError
     43 from .inputfile import InputFile
---> 44 from .file import File
     45 from .nullhandler import NullHandler
     46 from .emoji import Emoji

/home/rahiel/Code/telegram/python-telegram-bot/telegram/file.py in <module>()
     22 
     23 from telegram import TelegramObject
---> 24 from telegram.utils.request import download as _download
     25 

/home/rahiel/Code/telegram/python-telegram-bot/telegram/utils/__init__.py in <module>()
----> 1 from telegram.ext.botan import Botan

/home/rahiel/Code/telegram/python-telegram-bot/telegram/ext/__init__.py in <module>()
     19 """Extensions over the Telegram Bot API to facilitate bot making"""
     20 
---> 21 from .dispatcher import Dispatcher
     22 from .jobqueue import JobQueue
     23 from .updater import Updater

/home/rahiel/Code/telegram/python-telegram-bot/telegram/ext/dispatcher.py in <module>()
     26 from queue import Empty
     27 
---> 28 from telegram import (TelegramError, NullHandler)
     29 from telegram.ext.handler import Handler
     30 from telegram.utils.deprecate import deprecate

ImportError: cannot import name 'NullHandler'

Same with relative import (from ..ext.botan import Botan)

@leandrotoledo
Copy link
Member

#306 drops use of NullHandler, let's see how it goes.

@leandrotoledo leandrotoledo added 📋 pending-review work status: pending-review and removed 📋 pending-review work status: pending-review labels May 25, 2016
@leandrotoledo
Copy link
Member

#306 removed NullHandler by accident, we may have to reavaluete this.

@leandrotoledo leandrotoledo added the 📋 pending-review work status: pending-review label May 26, 2016
@leandrotoledo leandrotoledo changed the title move botan from utils to ext move botan from utils to contrib May 26, 2016
@leandrotoledo
Copy link
Member

Changed PR title and scope for moving those kind of libs to either telegram.contrib or telegram.third_party, this will be decided by the community on telegram.me/pythontelegrambotgroup

@leandrotoledo
Copy link
Member

leandrotoledo commented May 27, 2016

24h poll indicates contrib over third_party, as follows:

In the future, how would you like to import 3rd party libraries (like Botan.io, AddyBot.com etc)? Please pick one of the options below.

from telegram.contrib import Botan – 36
👍👍👍👍👍👍👍 78%

from telegram.third_party import Botan – 10
👍👍 22%

👥 46 people voted so far.

@rahiel
Copy link
Contributor Author

rahiel commented May 28, 2016

Travis is finally happy, ready for final review.

@leandrotoledo
Copy link
Member

I believe we also should include that to v4.2 and by v5 remove the warning? Thoughts?

@rahiel
Copy link
Contributor Author

rahiel commented May 28, 2016

I believe we also should include that to v4.2 and by v5 remove the warning? Thoughts?

I agree, we can also postpone removing the backwards compatibility if we move too fast.

@rahiel rahiel merged commit f31bd91 into master May 28, 2016
@rahiel rahiel deleted the move-botan branch May 28, 2016 19:32
@rahiel rahiel removed the 📋 pending-review work status: pending-review label Jul 14, 2016
@github-actions github-actions bot locked and limited conversation to collaborators Aug 24, 2020
@Bibo-Joshi Bibo-Joshi added 🔌 enhancement pr description: enhancement and removed enhancement labels Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔌 enhancement pr description: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants