X Tutup
Skip to content

Commit 663fa00

Browse files
committed
merge master
2 parents 37c7af2 + d90b0f4 commit 663fa00

File tree

5 files changed

+42
-44
lines changed

5 files changed

+42
-44
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ You can get help in several ways:
465465
_`Contributing`
466466
===============
467467

468-
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>`_.
468+
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>`_.
469469

470470
==========
471471
_`License`

docs/source/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import sys
1616
import os
1717
import shlex
18+
import telegram
1819

1920
# If extensions (or modules to document with autodoc) are in another directory,
2021
# add these directories to sys.path here. If the directory is relative to the
@@ -58,9 +59,9 @@
5859
# built documents.
5960
#
6061
# The short X.Y version.
61-
version = '4.1'
62+
version = telegram.__version__[:3]
6263
# The full version, including alpha/beta/rc tags.
63-
release = '4.1.2'
64+
release = telegram.__version__
6465

6566
# The language for content autogenerated by Sphinx. Refer to documentation
6667
# for a list of supported languages.
@@ -270,7 +271,7 @@
270271
# dir menu entry, description, category)
271272
texinfo_documents = [
272273
(master_doc, 'PythonTelegramBot', u'Python Telegram Bot Documentation',
273-
author, 'PythonTelegramBot', 'One line description of project.',
274+
author, 'PythonTelegramBot', 'Not just a Python wrapper around the Telegram Bot API',
274275
'Miscellaneous'),
275276
]
276277

setup.py

Lines changed: 33 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
#!/usr/bin/env python
2-
'''The setup and build script for the python-telegram-bot library.'''
3-
4-
import os
2+
"""The setup and build script for the python-telegram-bot library."""
53

4+
import codecs
5+
import telegram
66
from setuptools import setup, find_packages
77

88

9-
def read(*paths):
10-
"""Build a file path from *paths* and return the contents."""
11-
with open(os.path.join(*paths), 'r') as f:
12-
return f.read()
13-
14-
159
def requirements():
1610
"""Build the requirements list for this project"""
1711
requirements_list = []
@@ -22,33 +16,33 @@ def requirements():
2216

2317
return requirements_list
2418

25-
26-
setup(name='python-telegram-bot',
27-
version='4.1.2',
28-
author='Leandro Toledo',
29-
author_email='devs@python-telegram-bot.org',
30-
license='LGPLv3',
31-
url='https://github.com/python-telegram-bot/python-telegram-bot',
32-
keywords='python telegram bot api wrapper',
33-
description='A Python wrapper around the Telegram Bot API',
34-
long_description=(read('README.rst')),
35-
packages=find_packages(exclude=['tests*']),
36-
install_requires=requirements(),
37-
include_package_data=True,
38-
classifiers=[
39-
'Development Status :: 5 - Production/Stable',
40-
'Intended Audience :: Developers',
41-
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
42-
'Operating System :: OS Independent',
43-
'Topic :: Software Development :: Libraries :: Python Modules',
44-
'Topic :: Communications :: Chat',
45-
'Topic :: Internet',
46-
'Programming Language :: Python',
47-
'Programming Language :: Python :: 2',
48-
'Programming Language :: Python :: 2.6',
49-
'Programming Language :: Python :: 2.7',
50-
'Programming Language :: Python :: 3',
51-
'Programming Language :: Python :: 3.3',
52-
'Programming Language :: Python :: 3.4',
53-
'Programming Language :: Python :: 3.5',
54-
],)
19+
with codecs.open('README.rst', 'r', 'utf-8') as fd:
20+
setup(name='python-telegram-bot',
21+
version=telegram.__version__,
22+
author='Leandro Toledo',
23+
author_email='devs@python-telegram-bot.org',
24+
license='LGPLv3',
25+
url='https://github.com/python-telegram-bot/python-telegram-bot',
26+
keywords='python telegram bot api wrapper',
27+
description='Not just a Python wrapper around the Telegram Bot API',
28+
long_description=fd.read(),
29+
packages=find_packages(exclude=['tests*']),
30+
install_requires=requirements(),
31+
include_package_data=True,
32+
classifiers=[
33+
'Development Status :: 5 - Production/Stable',
34+
'Intended Audience :: Developers',
35+
'License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)',
36+
'Operating System :: OS Independent',
37+
'Topic :: Software Development :: Libraries :: Python Modules',
38+
'Topic :: Communications :: Chat',
39+
'Topic :: Internet',
40+
'Programming Language :: Python',
41+
'Programming Language :: Python :: 2',
42+
'Programming Language :: Python :: 2.6',
43+
'Programming Language :: Python :: 2.7',
44+
'Programming Language :: Python :: 3',
45+
'Programming Language :: Python :: 3.3',
46+
'Programming Language :: Python :: 3.4',
47+
'Programming Language :: Python :: 3.5',
48+
],)

telegram/error.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class NetworkError(TelegramError):
7777
pass
7878

7979

80-
class BadRequest(TelegramError):
80+
class BadRequest(NetworkError):
8181
pass
8282

8383

tests/test_bot.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,9 @@ def testLeaveChat(self):
207207
with self.assertRaisesRegexp(telegram.error.BadRequest, 'Chat not found'):
208208
chat = self._bot.leaveChat(-123456)
209209

210+
with self.assertRaisesRegexp(telegram.error.NetworkError, 'Chat not found'):
211+
chat = self._bot.leaveChat(-123456)
212+
210213
@flaky(3, 1)
211214
@timeout(10)
212215
def testGetChat(self):

0 commit comments

Comments
 (0)
X Tutup