mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-24 16:17:37 +01:00
merge master
This commit is contained in:
commit
663fa0013d
5 changed files with 42 additions and 44 deletions
|
@ -465,7 +465,7 @@ You can get help in several ways:
|
|||
_`Contributing`
|
||||
===============
|
||||
|
||||
Contributions of all sizes are welcome. Please review our `contribution guidelines <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/CONTRIBUTING.rst>`_ to get started. You can also help by `reporting bugs <https://github.com/python-telegram-bot/python-telegram-bot/issues/new>`_.
|
||||
Contributions of all sizes are welcome. Please review our `contribution guidelines <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/.github/CONTRIBUTING.rst>`_ to get started. You can also help by `reporting bugs <https://github.com/python-telegram-bot/python-telegram-bot/issues/new>`_.
|
||||
|
||||
==========
|
||||
_`License`
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
import sys
|
||||
import os
|
||||
import shlex
|
||||
import telegram
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
|
@ -58,9 +59,9 @@ author = u'Leandro Toledo'
|
|||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '4.1'
|
||||
version = telegram.__version__[:3]
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '4.1.2'
|
||||
release = telegram.__version__
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
@ -270,7 +271,7 @@ man_pages = [
|
|||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, 'PythonTelegramBot', u'Python Telegram Bot Documentation',
|
||||
author, 'PythonTelegramBot', 'One line description of project.',
|
||||
author, 'PythonTelegramBot', 'Not just a Python wrapper around the Telegram Bot API',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
|
|
72
setup.py
72
setup.py
|
@ -1,17 +1,11 @@
|
|||
#!/usr/bin/env python
|
||||
'''The setup and build script for the python-telegram-bot library.'''
|
||||
|
||||
import os
|
||||
"""The setup and build script for the python-telegram-bot library."""
|
||||
|
||||
import codecs
|
||||
import telegram
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
|
||||
def read(*paths):
|
||||
"""Build a file path from *paths* and return the contents."""
|
||||
with open(os.path.join(*paths), 'r') as f:
|
||||
return f.read()
|
||||
|
||||
|
||||
def requirements():
|
||||
"""Build the requirements list for this project"""
|
||||
requirements_list = []
|
||||
|
@ -22,33 +16,33 @@ def requirements():
|
|||
|
||||
return requirements_list
|
||||
|
||||
|
||||
setup(name='python-telegram-bot',
|
||||
version='4.1.2',
|
||||
author='Leandro Toledo',
|
||||
author_email='devs@python-telegram-bot.org',
|
||||
license='LGPLv3',
|
||||
url='https://github.com/python-telegram-bot/python-telegram-bot',
|
||||
keywords='python telegram bot api wrapper',
|
||||
description='A Python wrapper around the Telegram Bot API',
|
||||
long_description=(read('README.rst')),
|
||||
packages=find_packages(exclude=['tests*']),
|
||||
install_requires=requirements(),
|
||||
include_package_data=True,
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
|
||||
'Operating System :: OS Independent',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
'Topic :: Communications :: Chat',
|
||||
'Topic :: Internet',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
],)
|
||||
with codecs.open('README.rst', 'r', 'utf-8') as fd:
|
||||
setup(name='python-telegram-bot',
|
||||
version=telegram.__version__,
|
||||
author='Leandro Toledo',
|
||||
author_email='devs@python-telegram-bot.org',
|
||||
license='LGPLv3',
|
||||
url='https://github.com/python-telegram-bot/python-telegram-bot',
|
||||
keywords='python telegram bot api wrapper',
|
||||
description='Not just a Python wrapper around the Telegram Bot API',
|
||||
long_description=fd.read(),
|
||||
packages=find_packages(exclude=['tests*']),
|
||||
install_requires=requirements(),
|
||||
include_package_data=True,
|
||||
classifiers=[
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'Intended Audience :: Developers',
|
||||
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
|
||||
'Operating System :: OS Independent',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
'Topic :: Communications :: Chat',
|
||||
'Topic :: Internet',
|
||||
'Programming Language :: Python',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.6',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.3',
|
||||
'Programming Language :: Python :: 3.4',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
],)
|
||||
|
|
|
@ -77,7 +77,7 @@ class NetworkError(TelegramError):
|
|||
pass
|
||||
|
||||
|
||||
class BadRequest(TelegramError):
|
||||
class BadRequest(NetworkError):
|
||||
pass
|
||||
|
||||
|
||||
|
|
|
@ -207,6 +207,9 @@ class BotTest(BaseTest, unittest.TestCase):
|
|||
with self.assertRaisesRegexp(telegram.error.BadRequest, 'Chat not found'):
|
||||
chat = self._bot.leaveChat(-123456)
|
||||
|
||||
with self.assertRaisesRegexp(telegram.error.NetworkError, 'Chat not found'):
|
||||
chat = self._bot.leaveChat(-123456)
|
||||
|
||||
@flaky(3, 1)
|
||||
@timeout(10)
|
||||
def testGetChat(self):
|
||||
|
|
Loading…
Reference in a new issue