See https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition-guide-to-Version-11.0 under Context based callbacks and Filters in handlers for a good guide on the changes in this commit.
* Change handlers so context is supported
* Attempt to make parameter "guessing" work on py < 3.5
* Document use_context in all handlers
* Add Context to docs
* Minor fixes to context handling
* Add tests for context stuff
* Allow the signature check to work on py<3.5 with methods
* Fix order of operations
* Address most issues raised in CR
* Make CommandHandler no longer support filter lists
* Fix indent
(pycharm can be an arse sometimes)
* Improve readability in conversationhandler
* Make context have Match instead of groups & groupdict
* Remove filter list support from messagehandler too
* Small fix to StringCommandHandler
* More small fixes to handlers
* Amend CHANGES
* Fix tests and fix bugs raised by tests
* Don't allow users to ignore errors without messing with the warning filters themselves
* Ignore our own deprecation warnings when testing
* Skipping deprecationwarning test on py2
* Forgot some changes
* Handler: Improved documentation and text of deprecation warnings
* HandlerContext: Keep only dispatcher and use properties; improved doc
* Complete fixing the documentation.
- Fixes per Eldinnie's comments.
- Fixes per warnings when running sphinx.
* Some small doc fixes (interlinks and optionals)
* Change add_error_handler to use HandlerContext too
* More context based changes
Context Based Handlers -> Context Based Callbacks
No longer use_context args on every single Handler
Instead set dispatcher/updater .use_context=True to use
Works with
- Handler callbacks
- Error handler callbacks
- Job callbacks
Change examples to context based callbacks so new users are not confused
Rename and move the context object from Handlers.HandlerContext to CallbackContext, since it doesn't only apply to handlers anymore.
Fix tests by adding a new fixture `cpd` which is a dispatcher with use_context=True
* Forgot about conversationhandler
* Forgot jobqueue
* Add tests for callbackcontext & for context based callback job
* Fix as per review :)
* Rename shortcut functions to snake_case
* More function renaming
* Example function rewrite
* Add myself to authors.rst
* More function renaming
* Rename mockbot test functions
* Break comment line for flake max line length
* New fields channel_post and edited_channel_post for Update
refs #468
* setGameScore() changes
- Changed behaviour: messages with high scores will be update with new
high scores by default. (documentation fix)
- Use (new) disable_edit_message in setGameScore to disable the above new
behaviour.
- The edit_message parameter from setGameScore is no longer in use. For
backward compatibility, it will be taken into account for a while,
unless disable_edit_message is passed explicitly.
refs #468
* New field forward_from_message_id for Message.
refs #468
* New parameter cache_time for answerCallbackQuery
refs #468
* replykeyboardhide renamed to replykeyboardremove
refs #468
* Unitests for updated setGameScore semantics
refs #468
* Backward compatibility for ReplyKeyboardHide
refs #468
* Fix docstrings of wrapper methods in Message
* Unitest new field forward_from_message_id of Message
refs #468
* Fix testMaxCaptionLength
Telegram servers changed their behaviour - now they truncate a long
caption instead of returning an error.
* MessageHandler: Added support for channel posts
* Fix flake8 complaints in a manner which yapf will like it too.
* fix rst markup
* initial commit for user_data
* add chat_data and use defaultdict
* fix chat_data copy-paste error
* add test for user_data and chat_data
* fix case where chat is None
* remove braces from import line
* bot.py: add create_references method
* create bot reference in webhook handler, use create_references on new updates
* message.py: implement reply_text
* echobot2.py: use Message.reply_text
* fix create_references in webhook handler
* add some more instance methods
* Chat.kick_member and unban_member
* bot.py: Create bot references in outgoing messages
* add tests for everything testable
* test_updater.py: add create_references method to MockBot
* remove Bot.create_references and refactor TelegramObject.de_json to take the additional parameter bot
* List bot as named kwarg where used
* file.py: Use Bot.request property instead of Bot._request attr
* initial commit for conversationhandler and example
* implement simple Promise for run_async/conversationhandler
* refactor Promise._done to done
* add handling for timed out Promises
* correctly handle promises with None results
* fix handling tuple states
* update comments on example
* Added a first test on the ConversationHandler.
* Fixed a small typo.
* Yapf'd.
* add sphinx doc for conversation handler
* fix title for callbackqueryhandler sphinx docs