From fc7da6d1bdd93ee5dd9ba1d467355681faa8044b Mon Sep 17 00:00:00 2001 From: Davte Date: Sat, 13 Jul 2019 16:44:13 +0200 Subject: [PATCH] telepot-powered functions replaced with new ones telepot repository was archived in may 2019 --- README.md | 4 ++-- davtelepot/__init__.py | 5 +++-- davtelepot/custombot.py | 10 +++++++++- davtelepot/utilities.py | 2 +- requirements.txt | 1 - setup.py | 7 +++---- 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 5a4dd5a..df1965f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # davtelepot -This project conveniently subclasses third party telepot.aio.Bot, providing many interesting features. +This project conveniently mirrors the Telegram bot API with the class `Bot`. -Please note that you need Python3.5+ to run async code +Please note that you need Python3.5+ to run async code. Check requirements.txt for third party dependencies. diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index e26f9da..46ae87b 100644 --- a/davtelepot/__init__.py +++ b/davtelepot/__init__.py @@ -5,10 +5,11 @@ See custombot.py for information about Bot class. __author__ = "Davide Testa" __email__ = "davide@davte.it" -__credits__ = "Marco Origlia" +__credits__ = ["Marco Origlia", "Nick Lee @Nickoala"] __license__ = "GNU General Public License v3.0" -__version__ = "1.5.9" +__version__ = "2.0" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" +# Legacy module; please use `from davtelepot.bot import Bot` from now on from davtelepot.custombot import Bot diff --git a/davtelepot/custombot.py b/davtelepot/custombot.py index 110e321..467679b 100644 --- a/davtelepot/custombot.py +++ b/davtelepot/custombot.py @@ -1,4 +1,12 @@ -"""Subclass of third party telepot.aio.Bot, providing the following features. +"""WARNING: this is only a legacy module. + +For newer versions use `bot.py`. +This module relies on third party `telepot` library by Nick Lee (@Nickoala). +The `telepot` repository was archived in may 2019 and will no longer be listed + in requirements. For legacy code, install telepot manually. + `pip install telepot` + +Subclass of third party telepot.aio.Bot, providing the following features. - It prevents hitting Telegram flood limits by waiting between text and photo messages. diff --git a/davtelepot/utilities.py b/davtelepot/utilities.py index f155533..a8dad01 100644 --- a/davtelepot/utilities.py +++ b/davtelepot/utilities.py @@ -698,7 +698,7 @@ class Confirmable(): class HasBot(): - """Objects having a telepot.Bot subclass object as `.bot` attribute. + """Objects having a Bot subclass object as `.bot` attribute. HasBot objects have a .bot and .db properties for faster access. """ diff --git a/requirements.txt b/requirements.txt index e1f78ca..59a8267 100644 --- a/requirements.txt +++ b/requirements.txt @@ -29,7 +29,6 @@ requests-oauthlib==1.0.0 scipy==1.1.0 six==1.11.0 SQLAlchemy==1.2.12 -telepot==12.7 tweepy==3.6.0 urllib3==1.23 yarl==1.2.6 diff --git a/setup.py b/setup.py index ec0e4c5..dae1de8 100644 --- a/setup.py +++ b/setup.py @@ -45,8 +45,8 @@ setuptools.setup( author=find_information("author", "davtelepot", "__init__.py"), author_email=find_information("email", "davtelepot", "__init__.py"), description=( - "telepot.aio.Bot convenient subclass, featuring dataset-powered " - "SQLite." + "Telegram bot API mirroring class, featuring dataset-powered " + "SQLite databases." ), license=find_information("license", "davtelepot", "__init__.py"), long_description=long_description, @@ -58,7 +58,6 @@ setuptools.setup( 'aiohttp>=3.4.4', 'bs4>=0.0.1', 'dataset>=1.1.0', - 'telepot>=12.7' ], classifiers=[ "Development Status :: 3 - Alpha", @@ -73,6 +72,6 @@ setuptools.setup( "Programming Language :: Python :: 3 :: Only", "Topic :: Communications :: Chat", ], - keywords='telepot telegram bot python wrapper', + keywords='telegram bot python asyncio async aiohttp', include_package_data=True, )