Skip to content

Commit a6b28b0

Browse files
committed
Merge remote-tracking branch 'origin/master' into urllib3-vendor-beta
2 parents 4c8d1c9 + 284f16b commit a6b28b0

27 files changed

Lines changed: 694 additions & 130 deletions

.github/CONTRIBUTING.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ Here's how to make a one-off code change.
8585
8686
$ make test
8787
88+
If you don't have ``make``, do:
89+
90+
.. code-block::
91+
92+
$ nosetests -v
93+
8894
- To actually make the commit (this will trigger tests for yapf, lint and pep8 automatically):
8995

9096
.. code-block:: bash

AUTHORS.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ The following wonderful people contributed directly or indirectly to this projec
1919
- `Anton Tagunov <https://github.com/anton-tagunov>`_
2020
- `Balduro <https://github.com/Balduro>`_
2121
- `bimmlerd <https://github.com/bimmlerd>`_
22+
- `d-qoi <https://github.com/d-qoi>`_
2223
- `daimajia <https://github.com/daimajia>`_
2324
- `Eli Gao <https://github.com/eligao>`_
2425
- `ErgoZ Riftbit Vaper <https://github.com/ergoz>`_
@@ -28,6 +29,7 @@ The following wonderful people contributed directly or indirectly to this projec
2829
- `Jacob Bom <https://github.com/bomjacob>`_
2930
- `JASON0916 <https://github.com/JASON0916>`_
3031
- `jh0ker <https://github.com/jh0ker>`_
32+
- `John Yong <https://github.com/whipermr5>`_
3133
- `jossalgon <https://github.com/jossalgon>`_
3234
- `JRoot3D <https://github.com/JRoot3D>`_
3335
- `jlmadurga <https://github.com/jlmadurga>`_
@@ -36,6 +38,7 @@ The following wonderful people contributed directly or indirectly to this projec
3638
- `macrojames <https://github.com/macrojames>`_
3739
- `Michael Elovskikh <https://github.com/wronglink>`_
3840
- `naveenvhegde <https://github.com/naveenvhegde>`_
41+
- `neurrone <https://github.com/neurrone>`_
3942
- `njittam <https://github.com/njittam>`_
4043
- `Noam Meltzer <https://github.com/tsnoam>`_
4144
- `Oleg Shlyazhko <https://github.com/ollmer>`_
@@ -46,6 +49,7 @@ The following wonderful people contributed directly or indirectly to this projec
4649
- `Joscha Götzer <https://github.com/Rostgnom>`_
4750
- `Shelomentsev D <https://github.com/shelomentsevd>`_
4851
- `sooyhwang <https://github.com/sooyhwang>`_
52+
- `thodnev <https://github.com/thodnev>`_
4953
- `Valentijn <https://github.com/Faalentijn>`_
5054
- `voider1 <https://github.com/voider1>`_
5155
- `wjt <https://github.com/wjt>`_

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
Changes
33
=======
44

5+
**2017-04-17**
6+
7+
*Released 5.3.1*
8+
9+
- Hotfix release due to bug introduced by urllib3 version 1.21
10+
511
**2016-12-11**
612

713
*Released 5.3*

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
# The short X.Y version.
6262
version = '5.3' # telegram.__version__[:3]
6363
# The full version, including alpha/beta/rc tags.
64-
release = '5.3.0' # telegram.__version__
64+
release = '5.3.1' # telegram.__version__
6565

6666
# The language for content autogenerated by Sphinx. Refer to documentation
6767
# for a list of supported languages.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
telegram.ext.messagequeue module
2+
================================
3+
4+
.. automodule:: telegram.ext.messagequeue
5+
:members:
6+
:undoc-members:
7+
:show-inheritance:

docs/source/telegram.ext.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Submodules
1616
telegram.ext.commandhandler
1717
telegram.ext.inlinequeryhandler
1818
telegram.ext.messagehandler
19+
telegram.ext.messagequeue
1920
telegram.ext.filters
2021
telegram.ext.regexhandler
2122
telegram.ext.stringcommandhandler

telegram/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
limit, but eventually you'll begin receiving 429 errors.
3333
MAX_MESSAGES_PER_SECOND (int)
3434
MAX_MESSAGES_PER_MINUTE_PER_GROUP (int)
35+
MAX_INLINE_QUERY_RESULTS (int)
3536
3637
The following constant have been found by experimentation:
3738
@@ -52,3 +53,4 @@
5253
MAX_MESSAGES_PER_SECOND = 30
5354
MAX_MESSAGES_PER_MINUTE_PER_GROUP = 20
5455
MAX_MESSAGE_ENTITIES = 100
56+
MAX_INLINE_QUERY_RESULTS = 50

telegram/ext/callbackqueryhandler.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from future.utils import string_types
2424

2525
from telegram import Update
26-
from telegram.utils.deprecate import deprecate
2726
from .handler import Handler
2827

2928

@@ -105,8 +104,3 @@ def handle_update(self, update, dispatcher):
105104
optional_args['groupdict'] = match.groupdict()
106105

107106
return self.callback(dispatcher.bot, update, **optional_args)
108-
109-
# old non-PEP8 Handler methods
110-
m = "telegram.CallbackQueryHandler."
111-
checkUpdate = deprecate(check_update, m + "checkUpdate", m + "check_update")
112-
handleUpdate = deprecate(handle_update, m + "handleUpdate", m + "handle_update")

telegram/ext/commandhandler.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
from .handler import Handler
2323
from telegram import Update
24-
from telegram.utils.deprecate import deprecate
2524

2625

2726
class CommandHandler(Handler):
@@ -110,7 +109,7 @@ def check_update(self, update):
110109
res = self.filters(message)
111110

112111
return res and (message.text.startswith('/') and command[0] == self.command
113-
and command[1] == update.message.bot.username)
112+
and command[1].lower() == update.message.bot.username.lower())
114113
else:
115114
return False
116115

@@ -126,8 +125,3 @@ def handle_update(self, update, dispatcher):
126125
optional_args['args'] = message.text.split()[1:]
127126

128127
return self.callback(dispatcher.bot, update, **optional_args)
129-
130-
# old non-PEP8 Handler methods
131-
m = "telegram.CommandHandler."
132-
checkUpdate = deprecate(check_update, m + "checkUpdate", m + "check_update")
133-
handleUpdate = deprecate(handle_update, m + "handleUpdate", m + "handle_update")

telegram/ext/conversationhandler.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ def __init__(self,
145145
raise ValueError("If 'per_chat=True', 'InlineQueryHandler' doesn't work")
146146

147147
def _get_key(self, update):
148-
chat, user = update.extract_chat_and_user()
148+
chat = update.effective_chat
149+
user = update.effective_user
150+
149151
key = list()
150152

151153
if self.per_chat:
@@ -181,6 +183,7 @@ def check_update(self, update):
181183
res = new_state.result(timeout=self.run_async_timeout)
182184
except Exception as exc:
183185
self.logger.exception("Promise function raised exception")
186+
self.logger.exception("{}".format(exc))
184187
error = True
185188

186189
if not error and new_state.done.is_set():

0 commit comments

Comments
 (0)