Skip to content

Commit

Permalink
Bump version to v21.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibo-Joshi committed Apr 12, 2024
1 parent 1538947 commit f6d009d
Show file tree
Hide file tree
Showing 22 changed files with 182 additions and 140 deletions.
42 changes: 42 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,48 @@
Changelog
=========

Version 21.1
==============

*Released 2024-04-12*

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

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

- API 7.2 (:pr:`4180` closes :issue:`4179` and :issue:`4181`, :issue:`4181`)
- Make ``ChatAdministratorRights/ChatMemberAdministrator.can_*_stories`` Required (API 7.1) (:pr:`4192`)

Minor Changes
-------------

- Refactor Debug logging in ``Bot`` to Improve Type Hinting (:pr:`4151` closes :issue:`4010`)

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

- Make ``Message.reply_*`` Reply in the Same Topic by Default (:pr:`4170` by `@aelkheir <https://github.com/aelkheir>`__ closes :issue:`4139`)
- Accept Socket Objects for Webhooks (:pr:`4161` closes :issue:`4078`)
- Add ``Update.effective_sender`` (:pr:`4168` by `@aelkheir <https://github.com/aelkheir>`__ closes :issue:`4085`)

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

- Documentation Improvements (:pr:`4171`, :pr:`4158` by `@teslaedison <https://github.com/teslaedison>`__)

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

- Temporarily Mark Tests with ``get_sticker_set`` as XFAIL due to API 7.2 Update (:pr:`4190`)

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

- ``pre-commit`` autoupdate (:pr:`4184`)
- Bump ``dependabot/fetch-metadata`` from 1.6.0 to 2.0.0 (:pr:`4185`)


Version 21.0.1
==============

Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
# built documents.
#
# The short X.Y version.
version = "21.0.1" # telegram.__version__[:3]
version = "21.1" # telegram.__version__[:3]
# The full version, including alpha/beta/rc tags.
release = "21.0.1" # telegram.__version__
release = "21.1" # telegram.__version__

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = "6.1.3"
Expand Down
2 changes: 1 addition & 1 deletion telegram/_birthdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Birthdate(TelegramObject):
Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`day`, and :attr:`month` are equal.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Args:
day (:obj:`int`): Day of the user's birth; 1-31.
Expand Down
44 changes: 22 additions & 22 deletions telegram/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ async def send_message(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1332,7 +1332,7 @@ async def send_photo(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1481,7 +1481,7 @@ async def send_audio(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1630,7 +1630,7 @@ async def send_document(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1751,7 +1751,7 @@ async def send_sticker(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -1901,7 +1901,7 @@ async def send_video(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2044,7 +2044,7 @@ async def send_video_note(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2195,7 +2195,7 @@ async def send_animation(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2340,7 +2340,7 @@ async def send_voice(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2461,7 +2461,7 @@ async def send_media_group(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2637,7 +2637,7 @@ async def send_location(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -2918,7 +2918,7 @@ async def send_venue(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -3055,7 +3055,7 @@ async def send_contact(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -3170,7 +3170,7 @@ async def send_game(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -3248,7 +3248,7 @@ async def send_chat_action(
.. versionadded:: 20.0
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Returns:
:obj:`bool`: On success, :obj:`True` is returned.
Expand Down Expand Up @@ -6365,7 +6365,7 @@ async def create_new_sticker_set(
.. versionadded:: 20.2
.. deprecated:: NEXT.VERSION
.. deprecated:: 21.1
Use :paramref:`telegram.InputSticker.format` instead.
sticker_type (:obj:`str`, optional): Type of stickers in the set, pass
Expand Down Expand Up @@ -6502,7 +6502,7 @@ async def set_sticker_set_thumbnail(
.. versionadded:: 20.2
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 21.1
As per Bot API 7.2, the new argument :paramref:`format` will be required, and thus the
order of the arguments had to be changed.
Expand All @@ -6515,7 +6515,7 @@ async def set_sticker_set_thumbnail(
for a ``.TGS`` animation, :tg-const:`telegram.constants.StickerFormat.VIDEO` for a
WEBM video.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
thumbnail (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path`, \
optional): A **.WEBP** or **.PNG** image with the thumbnail, must
Expand Down Expand Up @@ -6909,7 +6909,7 @@ async def send_poll(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -7072,7 +7072,7 @@ async def send_dice(
.. versionadded:: 20.8
business_connection_id (:obj:`str`, optional): |business_id_str|
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Keyword Args:
allow_sending_without_reply (:obj:`bool`, optional): |allow_sending_without_reply|
Expand Down Expand Up @@ -8791,7 +8791,7 @@ async def get_business_connection(
"""
Use this method to get information about the connection of the bot with a business account.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Args:
business_connection_id (:obj:`str`): Unique identifier of the business connection.
Expand Down Expand Up @@ -8834,7 +8834,7 @@ async def replace_sticker_in_set(
The method is equivalent to calling :meth:`delete_sticker_from_set`,
then :meth:`add_sticker_to_set`, then :meth:`set_sticker_position_in_set`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Args:
user_id (:obj:`int`): User identifier of the sticker set owner.
Expand Down
12 changes: 6 additions & 6 deletions telegram/_business.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class BusinessConnection(TelegramObject):
considered equal if their :attr:`id`, :attr:`user`, :attr:`user_chat_id`, :attr:`date`,
:attr:`can_reply`, and :attr:`is_enabled` are equal.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Args:
id (:obj:`str`): Unique identifier of the business connection.
Expand Down Expand Up @@ -130,7 +130,7 @@ class BusinessMessagesDeleted(TelegramObject):
considered equal if their :attr:`business_connection_id`, :attr:`message_ids`, and
:attr:`chat` are equal.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Args:
business_connection_id (:obj:`str`): Unique identifier of the business connection.
Expand Down Expand Up @@ -195,7 +195,7 @@ class BusinessIntro(TelegramObject):
Two objects of this class are considered equal, if their
:attr:`title`, :attr:`message` and :attr:`sticker` are equal.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Args:
title (:obj:`str`, optional): Title text of the business intro.
Expand Down Expand Up @@ -252,7 +252,7 @@ class BusinessLocation(TelegramObject):
Two objects of this class are considered equal, if their
:attr:`address` is equal.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Args:
address (:obj:`str`): Address of the business.
Expand Down Expand Up @@ -304,7 +304,7 @@ class BusinessOpeningHoursInterval(TelegramObject):
Two objects of this class are considered equal, if their
:attr:`opening_minute` and :attr:`closing_minute` are equal.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Examples:
A day has (24 * 60 =) 1440 minutes, a week has (7 * 1440 =) 10080 minutes.
Expand Down Expand Up @@ -396,7 +396,7 @@ class BusinessOpeningHours(TelegramObject):
Two objects of this class are considered equal, if their
:attr:`time_zone_name` and :attr:`opening_hours` are equal.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Args:
time_zone_name (:obj:`str`): Unique name of the time zone for which the opening
Expand Down
20 changes: 10 additions & 10 deletions telegram/_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,17 +177,17 @@ class Chat(TelegramObject):
business accounts, the intro of the business. Returned only in
:meth:`telegram.Bot.get_chat`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
business_location (:class:`telegram.BusinessLocation`, optional): For private chats with
business accounts, the location of the business. Returned only in
:meth:`telegram.Bot.get_chat`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
business_opening_hours (:class:`telegram.BusinessOpeningHours`, optional): For private
chats with business accounts, the opening hours of the business. Returned only in
:meth:`telegram.Bot.get_chat`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
available_reactions (Sequence[:class:`telegram.ReactionType`], optional): List of available
reactions allowed in the chat. If omitted, then all of
:const:`telegram.constants.ReactionEmoji` are allowed. Returned only in
Expand Down Expand Up @@ -251,11 +251,11 @@ class Chat(TelegramObject):
birthdate (:obj:`telegram.Birthdate`, optional): For private chats,
the date of birth of the user. Returned only in :meth:`telegram.Bot.get_chat`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
personal_chat (:obj:`telegram.Chat`, optional): For private chats, the personal channel of
the user. Returned only in :meth:`telegram.Bot.get_chat`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
Attributes:
id (:obj:`int`): Unique identifier for this chat. This number may be greater than 32 bits
Expand Down Expand Up @@ -343,17 +343,17 @@ class Chat(TelegramObject):
business accounts, the intro of the business. Returned only in
:meth:`telegram.Bot.get_chat`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
business_location (:class:`telegram.BusinessLocation`): Optional. For private chats with
business accounts, the location of the business. Returned only in
:meth:`telegram.Bot.get_chat`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
business_opening_hours (:class:`telegram.BusinessOpeningHours`): Optional. For private
chats with business accounts, the opening hours of the business. Returned only in
:meth:`telegram.Bot.get_chat`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
available_reactions (Tuple[:class:`telegram.ReactionType`]): Optional. List of available
reactions allowed in the chat. If omitted, then all of
:const:`telegram.constants.ReactionEmoji` are allowed. Returned only in
Expand Down Expand Up @@ -417,11 +417,11 @@ class Chat(TelegramObject):
birthdate (:obj:`telegram.Birthdate`): Optional. For private chats,
the date of birth of the user. Returned only in :meth:`telegram.Bot.get_chat`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
personal_chat (:obj:`telegram.Chat`): Optional. For private chats, the personal channel of
the user. Returned only in :meth:`telegram.Bot.get_chat`.
.. versionadded:: NEXT.VERSION
.. versionadded:: 21.1
.. _topics: https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups
.. _accent colors: https://core.telegram.org/bots/api#accent-colors
Expand Down

0 comments on commit f6d009d

Please sign in to comment.