Skip to content

Commit

Permalink
Bump Version to v20.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Bibo-Joshi committed May 7, 2023
1 parent 0c4180c commit bfbf6d3
Show file tree
Hide file tree
Showing 20 changed files with 133 additions and 61 deletions.
72 changes: 72 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,78 @@
Changelog
=========

Version 20.3
============
*Released 2023-05-07*

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

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

- Full support for API 6.7 (`#3673`_)
- Add a Stability Policy (`#3622`_)

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

- Add ``Application.mark_data_for_update_persistence`` (`#3607`_)
- Make ``Message.link`` Point to Thread View Where Possible (`#3640`_)
- Localize Received ``datetime`` Objects According to ``Defaults.tzinfo`` (`#3632`_)

Minor Changes, Documentation Improvements and CI
------------------------------------------------

- Empower ``ruff`` (`#3594`_)
- Drop Usage of ``sys.maxunicode`` (`#3630`_)
- Add String Representation for ``RequestParameter`` (`#3634`_)
- Stabilize CI by Rerunning Failed Tests (`#3631`_)
- Give Loggers Better Names (`#3623`_)
- Add Logging for Invalid JSON Data in ``BasePersistence.parse_json_payload`` (`#3668`_)
- Improve Warning Categories & Stacklevels (`#3674`_)
- Stabilize ``test_delete_sticker_set`` (`#3685`_)
- Shield Update Fetcher Task in ``Application.start`` (`#3657`_)
- Recover 100% Type Completeness (`#3676`_)
- Documentation Improvements (`#3628`_, `#3636`_, `#3694`_)

Dependencies
------------

- Bump ``actions/stale`` from 7 to 8 (`#3644`_)
- Bump ``furo`` from 2023.3.23 to 2023.3.27 (`#3643`_)
- ``pre-commit`` autoupdate (`#3646`_, `#3688`_)
- Remove Deprecated ``codecov`` Package from CI (`#3664`_)
- Bump ``sphinx-copybutton`` from 0.5.1 to 0.5.2 (`#3662`_)
- Update ``httpx`` requirement from ~=0.23.3 to ~=0.24.0 (`#3660`_)
- Bump ``pytest`` from 7.2.2 to 7.3.1 (`#3661`_)

.. _`#3673`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3673
.. _`#3622`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3622
.. _`#3607`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3607
.. _`#3640`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3640
.. _`#3632`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3632
.. _`#3594`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3594
.. _`#3630`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3630
.. _`#3634`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3634
.. _`#3631`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3631
.. _`#3623`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3623
.. _`#3668`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3668
.. _`#3674`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3674
.. _`#3685`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3685
.. _`#3657`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3657
.. _`#3676`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3676
.. _`#3628`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3628
.. _`#3636`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3636
.. _`#3694`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3694
.. _`#3644`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3644
.. _`#3643`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3643
.. _`#3646`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3646
.. _`#3688`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3688
.. _`#3664`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3664
.. _`#3662`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3662
.. _`#3660`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3660
.. _`#3661`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3661

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

# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = "6.1.3"
Expand Down
6 changes: 3 additions & 3 deletions docs/source/stability_policy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Stability Policy

.. important::

This stability policy is in place since version NEXT.VERSION.
This stability policy is in place since version 20.3.
While earlier versions of ``python-telegram-bot`` also had stable interfaces, they had no explicit stability policy and hence did not follow the rules outlined below in all detail.
Please also refer to the :ref:`changelog <ptb-changelog>`.

Expand Down Expand Up @@ -105,7 +105,7 @@ Should a similarly big change ever be deemed necessary again by the development
Non-Bot API Functionality
#########################

Starting with version NEXT.VERSION, deprecated functionality will stay available for the current and the next major version.
Starting with version 20.3, deprecated functionality will stay available for the current and the next major version.
For example:

- In PTB v20.1.1 the feature exists
Expand All @@ -120,7 +120,7 @@ Bot API Functionality

As PTB has no control over deprecations introduced by Telegram and the schedule of these deprecations rarely coincides with PTBs deprecation schedule, we have a special policy for Bot API functionality.

Starting with NEXT.VERSION, deprecated Bot API functionality will stay available for the current and the next major version of PTB *or* until the next version of the Bot API.
Starting with 20.3, deprecated Bot API functionality will stay available for the current and the next major version of PTB *or* until the next version of the Bot API.
More precisely, two cases are possible, for which we show examples below.

Case 1
Expand Down
8 changes: 4 additions & 4 deletions telegram/_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2866,20 +2866,20 @@ async def answer_inline_query(
specified text that switches the user to a private chat with the bot and sends the
bot a start message with the parameter :paramref:`switch_pm_parameter`.
.. deprecated:: NEXT.VERSION
.. deprecated:: 20.3
|api6_7_depr|
switch_pm_parameter (:obj:`str`, optional): Deep-linking parameter for the
:guilabel:`/start` message sent to the bot when user presses the switch button.
:tg-const:`telegram.InlineQuery.MIN_SWITCH_PM_TEXT_LENGTH`-
:tg-const:`telegram.InlineQuery.MAX_SWITCH_PM_TEXT_LENGTH` characters,
only ``A-Z``, ``a-z``, ``0-9``, ``_`` and ``-`` are allowed.
.. deprecated:: NEXT.VERSION
.. deprecated:: 20.3
|api6_7_depr|
button (:class:`telegram.InlineQueryResultsButton`, optional): A button to be shown
above the inline query results.
.. versionadded:: NEXT.VERSION
.. versionadded:: 20.3
Keyword Args:
current_offset (:obj:`str`, optional): The :attr:`telegram.InlineQuery.offset` of
Expand Down Expand Up @@ -8185,7 +8185,7 @@ async def set_my_name(
"""
Use this method to change the bot's name.
.. versionadded:: NEXT.VERSION
.. versionadded:: 20.3
Args:
name (:obj:`str`, optional): New bot name;
Expand Down
2 changes: 1 addition & 1 deletion telegram/_botname.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class BotName(TelegramObject):
Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`name` is equal.
.. versionadded:: NEXT.VERSION
.. versionadded:: 20.3
Args:
name (:obj:`str`): The bot's name.
Expand Down
4 changes: 2 additions & 2 deletions telegram/_chatinvitelink.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class ChatInviteLink(TelegramObject):
expire_date (:class:`datetime.datetime`, optional): Date when the link will expire or
has been expired.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 20.3
|datetime_localization|
member_limit (:obj:`int`, optional): Maximum number of users that can be members of the
chat simultaneously after joining the chat via this invite link;
Expand All @@ -82,7 +82,7 @@ class ChatInviteLink(TelegramObject):
expire_date (:class:`datetime.datetime`): Optional. Date when the link will expire or
has been expired.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 20.3
|datetime_localization|
member_limit (:obj:`int`): Optional. Maximum number of users that can be members
of the chat simultaneously after joining the chat via this invite link;
Expand Down
4 changes: 2 additions & 2 deletions telegram/_chatjoinrequest.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class ChatJoinRequest(TelegramObject):
from_user (:class:`telegram.User`): User that sent the join request.
date (:class:`datetime.datetime`): Date the request was sent.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 20.3
|datetime_localization|
user_chat_id (:obj:`int`): Identifier of a private chat with the user who sent the join
request. This number may have more than 32 significant bits and some programming
Expand All @@ -77,7 +77,7 @@ class ChatJoinRequest(TelegramObject):
from_user (:class:`telegram.User`): User that sent the join request.
date (:class:`datetime.datetime`): Date the request was sent.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 20.3
|datetime_localization|
user_chat_id (:obj:`int`): Identifier of a private chat with the user who sent the join
request. This number may have more than 32 significant bits and some programming
Expand Down
8 changes: 4 additions & 4 deletions telegram/_chatmember.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ class ChatMemberRestricted(ChatMember):
until_date (:class:`datetime.datetime`): Date when restrictions
will be lifted for this user.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 20.3
|datetime_localization|
can_send_audios (:obj:`bool`): :obj:`True`, if the user is allowed to send audios.
Expand Down Expand Up @@ -445,7 +445,7 @@ class ChatMemberRestricted(ChatMember):
until_date (:class:`datetime.datetime`): Date when restrictions
will be lifted for this user.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 20.3
|datetime_localization|
can_send_audios (:obj:`bool`): :obj:`True`, if the user is allowed to send audios.
Expand Down Expand Up @@ -574,7 +574,7 @@ class ChatMemberBanned(ChatMember):
until_date (:class:`datetime.datetime`): Date when restrictions
will be lifted for this user.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 20.3
|datetime_localization|
Attributes:
Expand All @@ -584,7 +584,7 @@ class ChatMemberBanned(ChatMember):
until_date (:class:`datetime.datetime`): Date when restrictions
will be lifted for this user.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 20.3
|datetime_localization|
"""
Expand Down
8 changes: 4 additions & 4 deletions telegram/_chatmemberupdated.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ChatMemberUpdated(TelegramObject):
date (:class:`datetime.datetime`): Date the change was done in Unix time. Converted to
:class:`datetime.datetime`.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 20.3
|datetime_localization|
old_chat_member (:class:`telegram.ChatMember`): Previous information about the chat member.
new_chat_member (:class:`telegram.ChatMember`): New information about the chat member.
Expand All @@ -62,15 +62,15 @@ class ChatMemberUpdated(TelegramObject):
via_chat_folder_invite_link (:obj:`bool`, optional): :obj:`True`, if the user joined the
chat via a chat folder invite link
.. versionadded:: NEXT.VERSION
.. versionadded:: 20.3
Attributes:
chat (:class:`telegram.Chat`): Chat the user belongs to.
from_user (:class:`telegram.User`): Performer of the action, which resulted in the change.
date (:class:`datetime.datetime`): Date the change was done in Unix time. Converted to
:class:`datetime.datetime`.
.. versionchanged:: NEXT.VERSION
.. versionchanged:: 20.3
|datetime_localization|
old_chat_member (:class:`telegram.ChatMember`): Previous information about the chat member.
new_chat_member (:class:`telegram.ChatMember`): New information about the chat member.
Expand All @@ -79,7 +79,7 @@ class ChatMemberUpdated(TelegramObject):
via_chat_folder_invite_link (:obj:`bool`): Optional. :obj:`True`, if the user joined the
chat via a chat folder invite link
.. versionadded:: NEXT.VERSION
.. versionadded:: 20.3
"""

Expand Down
4 changes: 2 additions & 2 deletions telegram/_inline/inlinekeyboardbutton.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class InlineKeyboardButton(TelegramObject):
specified type, open that chat and insert the bot's username and the specified inline
query in the input field.
.. versionadded:: NEXT.VERSION
.. versionadded:: 20.3
Tip:
This is similar to :paramref:`switch_inline_query`, but gives more control on
Expand Down Expand Up @@ -193,7 +193,7 @@ class InlineKeyboardButton(TelegramObject):
specified type, open that chat and insert the bot's username and the specified inline
query in the input field.
.. versionadded:: NEXT.VERSION
.. versionadded:: 20.3
Tip:
This is similar to :attr:`switch_inline_query`, but gives more control on
Expand Down

0 comments on commit bfbf6d3

Please sign in to comment.