8000 Full Support for Bot API 9.0 by Bibo-Joshi · Pull Request #4756 · python-telegram-bot/python-telegram-bot · GitHub
[go: up one dir, main page]

Skip to content

Full Support for Bot API 9.0 #4756

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

Merged
merged 19 commits into from
May 15, 2025
Merged

Full Support for Bot API 9.0 #4756

merged 19 commits into from
May 15, 2025

Conversation

Bibo-Joshi
Copy link
Member

Master PR for Bot API 9.0.
When ready, closes #4754 .

Checklist

  • double check https://t.me/bot_api_changes/239 for changes
  • Added .. versionadded:: NEXT.VERSION, .. versionchanged:: NEXT.VERSION, .. deprecated:: NEXT.VERSION or .. versionremoved:: NEXT.VERSION to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests
  • Documented code changes according to the CSI standard
  • Added myself alphabetically to AUTHORS.rst (optional)
  • Added new classes & modules to the docs and all suitable __all__ s
  • Checked the Stability Policy in case of deprecations or changes to documented behavior

If the PR contains API changes (otherwise, you can ignore this passage)

  • Checked the Bot API specific sections of the Stability Policy

  • Created a PR to remove functionality deprecated in the previous Bot API release (see here)

  • New classes:

    • Added self._id_attrs and corresponding documentation
    • __init__ accepts api_kwargs as kw-only
  • Added new shortcuts:

    • In telegram.Chat & telegram.Us 10000 er for all methods that accept chat/user_id
    • In telegram.Message for all methods that accept chat_id and message_id
    • For new telegram.Message shortcuts: Added quote argument if methods accepts reply_to_message_id
    • In telegram.CallbackQuery for all methods that accept either chat_id and message_id or inline_message_id
  • If relevant:

    • Added new constants at telegram.constants and shortcuts to them as class variables
    • Link new and existing constants in docstrings instead of hard-coded numbers and strings
    • Add new message types to telegram.Message.effective_attachment
    • Added new handlers for new update types
      • Add the handlers to the warning loop in the telegram.ext.ConversationHandler
    • Added new filters for new message (sub)types
    • Added or updated documentation for the changed class(es) and/or method(s)
    • Added the new method(s) to _extbot.py
    • Added or updated bot_methods.rst
    • Updated the Bot API version number in all places: README.rst (including the badge) and telegram.constants.BOT_API_VERSION_INFO
    • Added logic for arbitrary callback data in telegram.ext.ExtBot for new methods that either accept a reply_markup in some form or have a return type that is/contains telegram.Message

@Bibo-Joshi Bibo-Joshi added ⚙️ bot-api affected functionality: bot-api 🔌 enhancement pr description: enhancement labels Apr 11, 2025
@Bibo-Joshi Bibo-Joshi mentioned this pull request Apr 14, 2025
35 tasks
Bibo-Joshi and others added 16 commits April 16, 2025 17:45
Co-authored-by: Abdelrahman Elkheir <90580077+aelkheir@users.noreply.github.com>
TG's documentation inconsistently refers to the attributes
`can_edit_bio`, `can_edit_name`, and `can_edit_username` as
`can_change_bio`, `can_change_name`, and `can_change_username` in the
docstrings of respective bot methods, which is causing sphinx :attr:
references to break.
Follow up to #4763. sorry forgot to push before merging.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Abdelrahman Elkheir <90580077+aelkheir@users.noreply.github.com>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
@Bibo-Joshi Bibo-Joshi marked this pull request as ready for review May 12, 2025 19:31
@Bibo-Joshi Bibo-Joshi merged commit 7078059 into master May 15, 2025
6 checks passed
@Bibo-Joshi Bibo-Joshi deleted the api_9.0 branch May 15, 2025 19:56
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
⚙️ bot-api affected functionality: bot-api 🔌 enhancement pr description: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Full Support for Bot API 9.0
2 participants
0