From 9ef8826f33ec1ce204d7a13ae6bbb1a9eb9c255b Mon Sep 17 00:00:00 2001 From: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com> Date: Tue, 3 Oct 2023 15:39:57 +0200 Subject: [PATCH] Bump Version to v20.6 --- CHANGES.rst | 50 +++++++++++++++++++++ docs/source/conf.py | 4 +- telegram/_bot.py | 6 +-- telegram/_chat.py | 2 +- telegram/_chatadministratorrights.py | 14 +++--- telegram/_chatmember.py | 12 ++--- telegram/_passport/passportelementerrors.py | 4 +- telegram/_passport/passportfile.py | 4 +- telegram/_poll.py | 2 +- telegram/_version.py | 2 +- telegram/_writeaccessallowed.py | 14 +++--- 11 files changed, 82 insertions(+), 32 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 7b6dfc252..9ff94c287 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,56 @@ Changelog ========= +Version 20.6 +============ + +*Released 2023-10-03* + +This is the technical changelog for version 20.6. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `__. + +Major Changes +------------- + +- Drop Backward Compatibility Layer Introduced in :pr:`3853` (API 6.8) (:pr:`3873`) +- Full Support for Bot API 6.9 (:pr:`3898`) + +New Features +------------ + +- Add Rich Equality Comparison to ``WriteAccessAllowed`` (:pr:`3911` closes :issue:`3909`) +- Add ``__repr__`` Methods Added in :pr:`3826` closes :issue:`3770` to Sphinx Documentation (:pr:`3901` closes :issue:`3889`) +- Add String Representation for Selected Classes (:pr:`3826` closes :issue:`3770`) + +Minor Changes +------------- + +- Add Support Python 3.12 (:pr:`3915`) +- Documentation Improvements (:pr:`3910`) + +Internal Changes +---------------- + +- Verify Type Hints for Bot Method & Telegram Class Parameters (:pr:`3868`) +- Move Bot API Tests to Separate Workflow File (:pr:`3912`) +- Fix Failing ``file_size`` Tests (:pr:`3906`) +- Set Threshold for DeepSource’s PY-R1000 to High (:pr:`3888`) +- One-Time Code Formatting Improvement via ``--preview`` Flag of ``black`` (:pr:`3882`) +- Move Dunder Methods to the Top of Class Bodies (:pr:`3883`) +- Remove Superfluous ``Defaults.__ne__`` (:pr:`3884`) + +Dependency Updates +------------------ + +- ``pre-commit`` autoupdate (:pr:`3876`) +- Update ``pre-commit`` Dependencies (:pr:`3916`) +- Bump ``actions/checkout`` from 3 to 4 (:pr:`3914`) +- Update ``httpx`` requirement from ~=0.24.1 to ~=0.25.0 (:pr:`3891`) +- Bump ``furo`` from 2023.8.19 to 2023.9.10 (:pr:`3890`) +- Bump ``sphinx`` from 7.2.5 to 7.2.6 (:pr:`3892`) +- Update ``tornado`` requirement from ~=6.2 to ~=6.3.3 (:pr:`3675`) +- Bump ``pytest`` from 7.4.0 to 7.4.2 (:pr:`3881`) + + Version 20.5 ============ *Released 2023-09-03* diff --git a/docs/source/conf.py b/docs/source/conf.py index bcbc33e9e..80e954726 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,9 +21,9 @@ author = "Leandro Toledo" # built documents. # # The short X.Y version. -version = "20.5" # telegram.__version__[:3] +version = "20.6" # telegram.__version__[:3] # The full version, including alpha/beta/rc tags. -release = "20.5" # telegram.__version__ +release = "20.6" # telegram.__version__ # If your documentation needs a minimal Sphinx version, state it here. needs_sphinx = "6.1.3" diff --git a/telegram/_bot.py b/telegram/_bot.py index b9735c7a0..59e69dcc8 100644 --- a/telegram/_bot.py +++ b/telegram/_bot.py @@ -4651,15 +4651,15 @@ class Bot(TelegramObject, AsyncContextManager["Bot"]): can_post_stories (:obj:`bool`, optional): Pass :obj:`True`, if the administrator can post stories in the channel; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_edit_stories (:obj:`bool`, optional): Pass :obj:`True`, if the administrator can edit stories posted by other users; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_delete_stories (:obj:`bool`, optional): Pass :obj:`True`, if the administrator can delete stories posted by other users; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 Returns: :obj:`bool`: On success, :obj:`True` is returned. diff --git a/telegram/_chat.py b/telegram/_chat.py index 8083966eb..aba7695a1 100644 --- a/telegram/_chat.py +++ b/telegram/_chat.py @@ -944,7 +944,7 @@ class Chat(TelegramObject): The argument ``can_manage_voice_chats`` was renamed to :paramref:`~telegram.Bot.promote_chat_member.can_manage_video_chats` in accordance to Bot API 6.0. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.6 The arguments `can_post_stories`, `can_edit_stories` and `can_delete_stories` were added. diff --git a/telegram/_chatadministratorrights.py b/telegram/_chatadministratorrights.py index d7a76a364..aaea49ed3 100644 --- a/telegram/_chatadministratorrights.py +++ b/telegram/_chatadministratorrights.py @@ -40,7 +40,7 @@ class ChatAdministratorRights(TelegramObject): :attr:`can_manage_topics` is considered as well when comparing objects of this type in terms of equality. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.6 :attr:`can_post_stories`, :attr:`can_edit_stories`, and :attr:`can_delete_stories` are considered as well when comparing objects of this type in terms of equality. @@ -73,15 +73,15 @@ class ChatAdministratorRights(TelegramObject): can_post_stories (:obj:`bool`, optional): :obj:`True`, if the administrator can post stories in the channel; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_edit_stories (:obj:`bool`, optional): :obj:`True`, if the administrator can edit stories posted by other users; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_delete_stories (:obj:`bool`, optional): :obj:`True`, if the administrator can delete stories posted by other users; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_manage_topics (:obj:`bool`, optional): :obj:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only. @@ -116,15 +116,15 @@ class ChatAdministratorRights(TelegramObject): can_post_stories (:obj:`bool`): Optional. :obj:`True`, if the administrator can post stories in the channel; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_edit_stories (:obj:`bool`): Optional. :obj:`True`, if the administrator can edit stories posted by other users; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_delete_stories (:obj:`bool`): Optional. :obj:`True`, if the administrator can delete stories posted by other users; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_manage_topics (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only. diff --git a/telegram/_chatmember.py b/telegram/_chatmember.py index 0ab51080c..164430fc4 100644 --- a/telegram/_chatmember.py +++ b/telegram/_chatmember.py @@ -228,15 +228,15 @@ class ChatMemberAdministrator(ChatMember): can_post_stories (:obj:`bool`, optional): :obj:`True`, if the administrator can post stories in the channel; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_edit_stories (:obj:`bool`, optional): :obj:`True`, if the administrator can edit stories posted by other users; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_delete_stories (:obj:`bool`, optional): :obj:`True`, if the administrator can delete stories posted by other users; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_manage_topics (:obj:`bool`, optional): :obj:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only. @@ -282,15 +282,15 @@ class ChatMemberAdministrator(ChatMember): can_post_stories (:obj:`bool`): Optional. :obj:`True`, if the administrator can post stories in the channel; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_edit_stories (:obj:`bool`): Optional. :obj:`True`, if the administrator can edit stories posted by other users; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_delete_stories (:obj:`bool`): Optional. :obj:`True`, if the administrator can delete stories posted by other users; channels only. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 can_manage_topics (:obj:`bool`): Optional. :obj:`True`, if the user is allowed to create, rename, close, and reopen forum topics; supergroups only diff --git a/telegram/_passport/passportelementerrors.py b/telegram/_passport/passportelementerrors.py index 390380c14..49b30e88b 100644 --- a/telegram/_passport/passportelementerrors.py +++ b/telegram/_passport/passportelementerrors.py @@ -206,7 +206,7 @@ class PassportElementErrorFiles(PassportElementError): def file_hashes(self) -> List[str]: """List of base64-encoded file hashes. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.6 This attribute will return a tuple instead of a list in future major versions. """ warn( @@ -423,7 +423,7 @@ class PassportElementErrorTranslationFiles(PassportElementError): def file_hashes(self) -> List[str]: """List of base64-encoded file hashes. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.6 This attribute will return a tuple instead of a list in future major versions. """ warn( diff --git a/telegram/_passport/passportfile.py b/telegram/_passport/passportfile.py index dd2a290fe..9c9ce6cf4 100644 --- a/telegram/_passport/passportfile.py +++ b/telegram/_passport/passportfile.py @@ -47,7 +47,7 @@ class PassportFile(TelegramObject): file_size (:obj:`int`): File size in bytes. file_date (:obj:`int`): Unix time when the file was uploaded. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.6 This argument will only accept a datetime instead of an integer in future major versions. @@ -103,7 +103,7 @@ class PassportFile(TelegramObject): def file_date(self) -> int: """:obj:`int`: Unix time when the file was uploaded. - .. deprecated:: NEXT.VERSION + .. deprecated:: 20.6 This attribute will return a datetime instead of a integer in future major versions. """ warn( diff --git a/telegram/_poll.py b/telegram/_poll.py index 9025315a8..b2c2e99b3 100644 --- a/telegram/_poll.py +++ b/telegram/_poll.py @@ -89,7 +89,7 @@ class PollAnswer(TelegramObject): The order of :paramref:`option_ids` and :paramref:`user` is changed in 20.5 as the latter one became optional. - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.6 Backward compatiblity for changed order of :paramref:`option_ids` and :paramref:`user` was removed. diff --git a/telegram/_version.py b/telegram/_version.py index c44d22d2e..f99dc7880 100644 --- a/telegram/_version.py +++ b/telegram/_version.py @@ -51,7 +51,7 @@ class Version(NamedTuple): __version_info__: Final[Version] = Version( - major=20, minor=5, micro=0, releaselevel="final", serial=0 + major=20, minor=6, micro=0, releaselevel="final", serial=0 ) __version__: Final[str] = str(__version_info__) diff --git a/telegram/_writeaccessallowed.py b/telegram/_writeaccessallowed.py index f23e73dad..9f6fdb132 100644 --- a/telegram/_writeaccessallowed.py +++ b/telegram/_writeaccessallowed.py @@ -34,7 +34,7 @@ class WriteAccessAllowed(TelegramObject): considered equal, if their :attr:`web_app_name` is equal. .. versionadded:: 20.0 - .. versionchanged:: NEXT.VERSION + .. versionchanged:: 20.6 Added custom equality comparison for objects of this class. Args: @@ -46,11 +46,11 @@ class WriteAccessAllowed(TelegramObject): accepted an explicit request from a Web App sent by the method `requestWriteAccess `_. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 from_attachment_menu (:obj:`bool`, optional): :obj:`True`, if the access was granted when the bot was added to the attachment or side menu. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 Attributes: web_app_name (:obj:`str`): Optional. Name of the Web App, if the access was granted when @@ -58,13 +58,13 @@ class WriteAccessAllowed(TelegramObject): .. versionadded:: 20.3 from_request (:obj:`bool`): Optional. :obj:`True`, if the access was granted after the user - accepted an explicit request from a Web App. + accepted an explicit request from a Web App. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 from_attachment_menu (:obj:`bool`): Optional. :obj:`True`, if the access was granted when - the bot was added to the attachment or side menu. + the bot was added to the attachment or side menu. - .. versionadded:: NEXT.VERSION + .. versionadded:: 20.6 """