Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:target: https://pypi.org/project/python-telegram-bot/
:alt: Supported Python versions

.. image:: https://img.shields.io/badge/Bot%20API-9.6-blue?logo=telegram
.. image:: https://img.shields.io/badge/Bot%20API-10.0-blue?logo=telegram
:target: https://core.telegram.org/bots/api-changelog
:alt: Supported Bot API version

Expand Down Expand Up @@ -77,7 +77,7 @@ After installing_ the library, be sure to check out the section on `working with
Telegram API support
~~~~~~~~~~~~~~~~~~~~

All types and methods of the Telegram Bot API **9.6** are natively supported by this library.
All types and methods of the Telegram Bot API **10.0** are natively supported by this library.
In addition, Bot API functionality not yet natively included can still be used as described `in our wiki <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Bot-API-Forward-Compatibility>`_.

Notable Features
Expand Down
19 changes: 18 additions & 1 deletion changes/unreleased/5196.7keq7yJhXbMb9RyShLHz4D.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
features = "Full Support for Bot API 9.6"
features = """
Full Support for Bot API 9.6

.. warning::

- Bot API 9.6 replaces the field ``correct_option_id`` of ``Poll`` with the new field ``correct_option_ids``. The field ``correct_option_id`` is still present in PTB for backward compatibility, but it will be removed in future releases.

- Bot API 9.6 replaces the argument ``correct_option_id`` of ``Bot.send_poll`` with the new argument ``correct_option_ids``. The argument ``correct_option_id`` is still present in PTB for backward compatibility, but it will be removed in future releases.

- Bot API 9.6 introduces a now required argument ``persistent_id`` to ``PollOption``. For backward compatibility, the argument is currently still marked as optional in the signature and its presence is enforced through a runtime check. In future versions, this argument will be made required in the signature as well.

- Bot API 9.6 introduces a now required argument ``option_persistent_ids`` to ``PollAnswer``. For backward compatibility, the argument is currently still marked as optional in the signature and its presence is enforced through a runtime check. In future versions, this argument will be made required in the signature as well.

- Bot API 9.6 introduces a now required argument ``allows_revoting`` to ``Poll``. For backward compatibility, the argument is currently still marked as optional in the signature and its presence is enforced through a runtime check. In future versions, this argument will be made required in the signature as well.


Please make sure to update your code accordingly to avoid potential issues in the future. We recommend using keyword arguments to ensure compatibility with future updates.
"""

pull_requests = [
{ uid = "5196", author_uid = "harshil21" },
Expand Down
33 changes: 33 additions & 0 deletions changes/unreleased/5229.87PBN4GFkuAaDhhgFwCYkY.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
features = """
Full Support for Bot API 10.0

.. warning::

- Bot API 10.0 introduces a now required argument ``members_only`` to ``Poll``. For backward compatibility, the argument is currently still marked as optional in the signature and its presence is enforced through a runtime check. In future versions, this argument will be made required in the signature as well.

Please make sure to update your code accordingly to avoid potential issues in the future. We recommend using keyword arguments to ensure compatibility with future updates.
"""

deprecations = """
* Deprecated passing the ``filename`` parameter positionally to the classes:

* ``InputMediaAnimation``
* ``InputMediaAudio``
* ``InputMediaPhoto``
* ``InputMediaDocument``
* ``InputMediaVideo``

Please pass ``filename`` as a keyword argument instead, as this parameter will become keyword-only in the future.

* Deprecated ``InputPollOption.de_json``. The class ``InputPollOption`` is input only and its ``de_json`` method will be removed in future versions. The Bot API 10.0 ``media`` field of ``InputPollOption`` will not be included for deserialization.

"""

pull_requests = [
{ uid = "5229", author_uid = "aelkheir", closes_threads = ["5228"] },
{ uid = "5230", author_uid = "harshil21" },
{ uid = "5235", author_uid = "harshil21" },
{ uid = "5238", author_uid = "harshil21" },
{ uid = "5232", author_uid = "aelkheir" },
{ uid = "5232", author_uid = ["Poolitzer", "Phil9l", "harshil21", "aelkheir"] },
]
1 change: 1 addition & 0 deletions docs/auxil/sphinx_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"_BaseMedium": "TelegramObject",
"_CredentialsBase": "TelegramObject",
"_ChatBase": "TelegramObject",
"_BaseInputMedia": "TelegramObject",
}


Expand Down
14 changes: 14 additions & 0 deletions docs/source/inclusions/bot_methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
- Used for sending paid media to channels
* - :meth:`~telegram.Bot.send_photo`
- Used for sending photos
* - :meth:`~telegram.Bot.send_live_photo`
- Used for sending live photos
* - :meth:`~telegram.Bot.send_poll`
- Used for sending polls
* - :meth:`~telegram.Bot.send_sticker`
Expand Down Expand Up @@ -80,6 +82,8 @@
- Used for answering the callback query
* - :meth:`~telegram.Bot.answer_inline_query`
- Used for answering the inline query
* - :meth:`~telegram.Bot.answer_guest_query`
- Used for replying to a received guest message
* - :meth:`~telegram.Bot.answer_pre_checkout_query`
- Used for answering a pre checkout query
* - :meth:`~telegram.Bot.answer_shipping_query`
Expand All @@ -104,6 +108,10 @@
- Used for stopping the running poll
* - :meth:`~telegram.Bot.set_message_reaction`
- Used for setting reactions on messages
* - :meth:`~telegram.Bot.delete_message_reaction`
- Used for deleting reactions on messages
* - :meth:`~telegram.Bot.delete_all_message_reactions`
- Used for deleting all reactions by a chat or user

.. raw:: html

Expand Down Expand Up @@ -167,6 +175,8 @@
- Used for unpinning a message
* - :meth:`~telegram.Bot.unpin_all_chat_messages`
- Used for unpinning all pinned chat messages
* - :meth:`~telegram.Bot.get_user_personal_chat_messages`
- Used for obtaining the personal chat messages of a user
* - :meth:`~telegram.Bot.get_user_profile_audios`
- Used for obtaining user's profile audios
* - :meth:`~telegram.Bot.get_user_profile_photos`
Expand Down Expand Up @@ -237,6 +247,10 @@
- Used for obtaining the menu button of a private chat or the default menu button
* - :meth:`~telegram.Bot.set_chat_menu_button`
- Used for setting the menu button of a private chat or the default menu button
* - :meth:`~telegram.Bot.set_managed_bot_access_settings`
- Used for changing the access settings of a managed bot
* - :meth:`~telegram.Bot.get_managed_bot_access_settings`
- Used for obtaining the access settings of a managed bot
* - :meth:`~telegram.Bot.set_my_description`
- Used for setting the description of the bot
* - :meth:`~telegram.Bot.get_my_description`
Expand Down
12 changes: 12 additions & 0 deletions docs/source/telegram.at-tree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Available Types
telegram.animation
telegram.audio
telegram.birthdate
telegram.botaccesssettings
telegram.botcommand
telegram.botcommandscope
telegram.botcommandscopeallchatadministrators
Expand Down Expand Up @@ -101,15 +102,22 @@ Available Types
telegram.inputmediaanimation
telegram.inputmediaaudio
telegram.inputmediadocument
telegram.inputmedialivephoto
telegram.inputmedialocation
telegram.inputmediaphoto
telegram.inputmediasticker
telegram.inputmediavenue
telegram.inputmediavideo
telegram.inputpaidmedia
telegram.inputpaidmedialivephoto
telegram.inputpaidmediaphoto
telegram.inputpaidmediavideo
telegram.inputpollmedia
telegram.inputprofilephoto
telegram.inputprofilephotoanimated
telegram.inputprofilephotostatic
telegram.inputpolloption
telegram.inputpolloptionmedia
telegram.inputstorycontent
telegram.inputstorycontentphoto
telegram.inputstorycontentvideo
Expand All @@ -119,6 +127,7 @@ Available Types
telegram.keyboardbuttonrequestmanagedbot
telegram.keyboardbuttonrequestusers
telegram.linkpreviewoptions
telegram.livephoto
telegram.location
telegram.locationaddress
telegram.loginurl
Expand Down Expand Up @@ -146,6 +155,7 @@ Available Types
telegram.ownedgiftunique
telegram.paidmedia
telegram.paidmediainfo
telegram.paidmedialivephoto
telegram.paidmediaphoto
telegram.paidmediapreview
telegram.paidmediapurchased
Expand All @@ -154,6 +164,7 @@ Available Types
telegram.photosize
telegram.poll
telegram.pollanswer
telegram.pollmedia
telegram.polloptionadded
telegram.polloptiondeleted
telegram.preparedkeyboardbutton
Expand All @@ -166,6 +177,7 @@ Available Types
telegram.replykeyboardmarkup
telegram.replykeyboardremove
telegram.replyparameters
telegram.sentguestmessage
telegram.sentwebappmessage
telegram.shareduser
telegram.story
Expand Down
6 changes: 6 additions & 0 deletions docs/source/telegram.botaccesssettings.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
BotAccessSettings
=================

.. autoclass:: telegram.BotAccessSettings
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.inputmedialivephoto.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
InputMediaLivePhoto
===================

.. autoclass:: telegram.InputMediaLivePhoto
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.inputmedialocation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
InputMediaLocation
==================

.. autoclass:: telegram.InputMediaLocation
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.inputmediasticker.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
InputMediaSticker
=================

.. autoclass:: telegram.InputMediaSticker
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.inputmediavenue.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
InputMediaVenue
===============

.. autoclass:: telegram.InputMediaVenue
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.inputpaidmedialivephoto.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
InputPaidMediaLivePhoto
======================

.. autoclass:: telegram.InputPaidMediaLivePhoto
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.inputpollmedia.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
InputPollMedia
==============

.. versionadded:: NEXT.VERSION

.. autoclass:: telegram.InputPollMedia
6 changes: 6 additions & 0 deletions docs/source/telegram.inputpolloptionmedia.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
InputPollOptionMedia
====================

.. versionadded:: NEXT.VERSION

.. autoclass:: telegram.InputPollOptionMedia
6 changes: 6 additions & 0 deletions docs/source/telegram.livephoto.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
LivePhoto
=========

.. autoclass:: telegram.LivePhoto
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.paidmedialivephoto.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PaidMediaLivePhoto
==================

.. autoclass:: telegram.PaidMediaLivePhoto
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.pollmedia.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PollMedia
=========

.. autoclass:: telegram.PollMedia
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.sentguestmessage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
SentGuestMessage
================

.. autoclass:: telegram.SentGuestMessage
:members:
:show-inheritance:
Loading