Skip to content

Commit

Permalink
Bump version to v21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibo-Joshi committed Jun 7, 2024
1 parent 78c945d commit a9f6afd
Show file tree
Hide file tree
Showing 23 changed files with 98 additions and 64 deletions.
34 changes: 34 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,40 @@
Changelog
=========

Version 21.3
============
*Released 2024-06-07*

This is the technical changelog for version 21.3. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_.

Major Changes
-------------

- Full Support for Bot API 7.4 (:pr:`4286`, :pr:`4276` closes :issue:`4275`, :pr:`4285`, :pr:`4283`, :pr:`4280`, :pr:`4278`, :pr:`4279`)
- Deprecate ``python-telegram-bot-raw`` (:pr:`4270`)
- Remove Functionality Deprecated in Bot API 7.3 (:pr:`4266` closes :issue:`4244`)

New Features
------------

- Add Parameter ``chat_id`` to ``ChatMemberHandler`` (:pr:`4290` by `uniquetrij <https://github.com/uniquetrij>`_ closes :issue:`4287`)

Documentation Improvements
--------------------------

- Documentation Improvements (:pr:`4264` closes :issue:`4240`)

Internal Changes
----------------

- Add ``setuptools`` to ``requirements-dev.txt`` (:pr:`4282`)
- Update Settings for pre-commit.ci (:pr:`4265`)

Dependency Updates
------------------

- Bump ``pytest`` from 8.2.0 to 8.2.1 (:pr:`4272`)

Version 21.2
============

Expand Down
2 changes: 1 addition & 1 deletion README_RAW.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
⚠️ Deprecation Notice
=====================

The ``python-telegram-bot-raw`` library will no longer be updated after NEXT.VERSION.
The ``python-telegram-bot-raw`` library will no longer be updated after 21.3.
Please instead use the ``python-telegram-bot`` `library <https://pypi.org/python-telegram-bot>`_.
The change requires no changes in your code and requires no additional dependencies.
For additional information, please see this `channel post <https://t.me/pythontelegrambotchannel/145>`_.
Expand Down
2 changes: 1 addition & 1 deletion telegram/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@
# seeing the warning.

warn(
warnings.PTBDeprecationWarning(version="NEXT.VERSION", message=_MESSAGE),
warnings.PTBDeprecationWarning(version="21.3", message=_MESSAGE),
stacklevel=2,
)
warn(
Expand Down
50 changes: 25 additions & 25 deletions telegram/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,7 +976,7 @@ async def send_message(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1350,10 +1350,10 @@ async def send_photo(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1508,7 +1508,7 @@ async def send_audio(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1662,7 +1662,7 @@ async def send_document(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1788,7 +1788,7 @@ async def send_sticker(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1944,10 +1944,10 @@ async def send_video(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2096,7 +2096,7 @@ async def send_video_note(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2253,10 +2253,10 @@ async def send_animation(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2408,7 +2408,7 @@ async def send_voice(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2534,7 +2534,7 @@ async def send_media_group(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2717,7 +2717,7 @@ async def send_location(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -3014,7 +3014,7 @@ async def send_venue(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -3156,7 +3156,7 @@ async def send_contact(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -3276,7 +3276,7 @@ async def send_game(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -4079,7 +4079,7 @@ async def edit_message_caption(
inline keyboard.
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Returns:
:class:`telegram.Message`: On success, if edited message is not an inline message, the
Expand Down Expand Up @@ -4976,7 +4976,7 @@ async def send_invoice(
`@BotFather <https://t.me/BotFather>`_. Pass an empty string for payments in
|tg_stars|.
.. deprecated:: NEXT.VERSION
.. deprecated:: 21.3
As of Bot API 7.4, this parameter is now optional and future versions of the
library will make it optional as well.
Expand Down Expand Up @@ -5057,7 +5057,7 @@ async def send_invoice(
.. versionadded:: 20.8
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -7045,7 +7045,7 @@ async def send_poll(
.. versionadded:: 21.2
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -7218,7 +7218,7 @@ async def send_dice(
.. versionadded:: 21.1
message_effect_id (:obj:`str`, optional): |message_effect_id|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -7641,7 +7641,7 @@ async def copy_message(
.. versionadded:: 20.8
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -7910,7 +7910,7 @@ async def create_invoice_link(
`@BotFather <https://t.me/BotFather>`_. Pass an empty string for payments in
|tg_stars|.
.. deprecated:: NEXT.VERSION
.. deprecated:: 21.3
As of Bot API 7.4, this parameter is now optional and future versions of the
library will make it optional as well.
Expand Down Expand Up @@ -9042,7 +9042,7 @@ async def refund_star_payment(
) -> bool:
"""Refunds a successful payment in |tg_stars|.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Args:
user_id (:obj:`int`): User identifier of the user whose payment will be refunded.
Expand Down
4 changes: 2 additions & 2 deletions telegram/_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
class _ChatBase(TelegramObject):
"""Base class for :class:`telegram.Chat` and :class:`telegram.ChatFullInfo`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
"""

__slots__ = ("first_name", "id", "is_forum", "last_name", "title", "type", "username")
Expand Down Expand Up @@ -3277,7 +3277,7 @@ class Chat(_ChatBase):
this field for backwards compatibility, it is available through
:attr:`~telegram.TelegramObject.api_kwargs`.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.3
As per Bot API 7.3, most of the arguments and attributes of this class have now moved to
:class:`telegram.ChatFullInfo`.
Expand Down
2 changes: 1 addition & 1 deletion telegram/_chatfullinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ChatFullInfo(_ChatBase):
.. versionadded:: 21.2
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.3
Explicit support for all shortcut methods known from :class:`telegram.Chat` on this
object. Previously those were only available because this class inherited from
:class:`telegram.Chat`.
Expand Down
12 changes: 6 additions & 6 deletions telegram/_files/inputmedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class InputMediaAnimation(InputMedia):
.. versionadded:: 20.2
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Attributes:
type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.ANIMATION`.
Expand All @@ -189,7 +189,7 @@ class InputMediaAnimation(InputMedia):
.. versionadded:: 20.2
show_caption_above_media (:obj:`bool`): Optional. |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
"""

__slots__ = (
Expand Down Expand Up @@ -277,7 +277,7 @@ class InputMediaPhoto(InputMedia):
.. versionadded:: 20.0
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Attributes:
type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.PHOTO`.
Expand All @@ -298,7 +298,7 @@ class InputMediaPhoto(InputMedia):
.. versionadded:: 20.0
show_caption_above_media (:obj:`bool`): Optional. |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
"""

__slots__ = (
Expand Down Expand Up @@ -387,7 +387,7 @@ class InputMediaVideo(InputMedia):
.. versionadded:: 20.2
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Attributes:
type (:obj:`str`): :tg-const:`telegram.constants.InputMediaType.VIDEO`.
Expand Down Expand Up @@ -416,7 +416,7 @@ class InputMediaVideo(InputMedia):
.. versionadded:: 20.2
show_caption_above_media (:obj:`bool`): Optional. |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
"""

__slots__ = (
Expand Down
4 changes: 2 additions & 2 deletions telegram/_inline/inlinequeryresultcachedgif.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class InlineQueryResultCachedGif(InlineQueryResult):
message to be sent instead of the gif.
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Attributes:
type (:obj:`str`): :tg-const:`telegram.constants.InlineQueryResultType.GIF`.
Expand All @@ -86,7 +86,7 @@ class InlineQueryResultCachedGif(InlineQueryResult):
message to be sent instead of the gif.
show_caption_above_media (:obj:`bool`): Optional. |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
"""

Expand Down
4 changes: 2 additions & 2 deletions telegram/_inline/inlinequeryresultcachedmpeg4gif.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):
message to be sent instead of the MPEG-4 file.
show_caption_above_media (:obj:`bool`, optional): Pass |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
Attributes:
type (:obj:`str`): :tg-const:`telegram.constants.InlineQueryResultType.MPEG4GIF`.
Expand All @@ -86,7 +86,7 @@ class InlineQueryResultCachedMpeg4Gif(InlineQueryResult):
message to be sent instead of the MPEG-4 file.
show_caption_above_media (:obj:`bool`): Optional. |show_cap_above_med|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.3
"""

Expand Down
Loading

0 comments on commit a9f6afd

Please sign in to comment.