-
Notifications
You must be signed in to change notification settings - Fork 6k
Feat: API 7.1 #4118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: API 7.1 #4118
Conversation
…e_web_page_preview` keyword-only parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! Looks like you edited README.rst or README_RAW.rst. I'm just a friendly reminder to apply relevant changes to both of those files :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial review
Filters and Message.effective_attachment needs to be updated
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fast PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also I noticed the workflows are running twice so that needs to be fixed also
test_official should also be updated to ignore the 3 new optional param -> required param
This is an important observation. Looking back at the workflow changes, I think we don't need to run many workflows on pushes to branches. I noticed that the doc-test worflow did not run on this PR. this is probably due to:
So in |
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
|
I added basic bool filter. For all of them more arguments could be supported, but I thought we could wait for this if people actually want that. |
Bibo-Joshi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates! Just a bit more nitpicking.
test_official needs to be adjusted to deal with the temporariy deviation of the can_* being required. IISC the following needs to be updated for that:
python-telegram-bot/tests/test_official/exceptions.py
Lines 153 to 161 in 277031c
| IGNORED_PARAM_REQUIREMENTS = { | |
| # Ignore these since there's convenience params in them (eg. Venue) | |
| # <---- | |
| "send_location": {"latitude", "longitude"}, | |
| "edit_message_live_location": {"latitude", "longitude"}, | |
| "send_venue": {"latitude", "longitude", "title", "address"}, | |
| "send_contact": {"phone_number", "first_name"}, | |
| # ----> | |
| } |
Please leave a comment including NEXT.VERSION and "API 7.1" so we have a chance of finding that again when actually making these arguments required :)
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
harshil21
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good to me. We can incorporate https://t.me/bot_api_changes/123 into doc-fixes later.
This is based against the deprecations so we have less merge pain
Checklist
.. versionadded:: NEXT.VERSION,.. versionchanged:: NEXT.VERSIONor.. deprecated:: NEXT.VERSIONto the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)CSI standard <https://standards.mousepawmedia.com/en/stable/csi.html>__AUTHORS.rst(optional)__all__sStability Policy <https://docs.python-telegram-bot.org/stability_policy.html>_ in case of deprecations or changes to documented behaviorIf the PR contains API changes (otherwise, you can ignore this passage)
Checked the Bot API specific sections of the Stability Policy
New classes:
self._id_attrsand corresponding documentation__init__acceptsapi_kwargsas kw-onlyAdded new shortcuts:
In :class:~telegram.Chat& :class:~telegram.Userfor all methods that acceptchat/user_idIn :class:~telegram.Messagefor all methods that acceptchat_idandmessage_idFor new :class:~telegram.Messageshortcuts: Addeddo_quoteargument if methods acceptsreply_to_message_idIn :class:~telegram.CallbackQueryfor all methods that accept eitherchat_idandmessage_idorinline_message_idIf relevant:
telegram.constantsand shortcuts to them as class variablestelegram.Message.effective_attachmentAdded new handlers for new update typesAdd the handlers to the warning loop in the :class:~telegram.ext.ConversationHandlerAdded the new method(s) to_extbot.pyAdded or updatedbot_methods.rstREADME.rstandREADME_RAW.rst(including the badge), as well astelegram.constants.BOT_API_VERSION_INFOAdded logic for arbitrary callback data in :class:telegram.ext.ExtBotfor new methods that either accept areply_markupin some form or have a return type that is/contains :class:~telegram.Message