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
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
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. |
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>
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.VERSION
or.. deprecated:: NEXT.VERSION
to 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_attrs
and corresponding documentation__init__
acceptsapi_kwargs
as kw-onlyAdded new shortcuts:
In :class:~telegram.Chat
& :class:~telegram.User
for all methods that acceptchat/user_id
In :class:~telegram.Message
for all methods that acceptchat_id
andmessage_id
For new :class:~telegram.Message
shortcuts: Addeddo_quote
argument if methods acceptsreply_to_message_id
In :class:~telegram.CallbackQuery
for all methods that accept eitherchat_id
andmessage_id
orinline_message_id
If relevant:
telegram.constants
and shortcuts to them as class variablestelegram.Message.effective_attachment
Added new handlers for new update typesAdd the handlers to the warning loop in the :class:~telegram.ext.ConversationHandler
Added the new method(s) to_extbot.py
Added or updatedbot_methods.rst
README.rst
andREADME_RAW.rst
(including the badge), as well astelegram.constants.BOT_API_VERSION_INFO
Added logic for arbitrary callback data in :class:telegram.ext.ExtBot
for new methods that either accept areply_markup
in some form or have a return type that is/contains :class:~telegram.Message