8000 Bump version to v21.4 (#4371) · Relaxx422/python-telegram-bot@2ac4e00 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2ac4e00

Browse files
authored
Bump version to v21.4 (python-telegram-bot#4371)
1 parent efe1392 commit 2ac4e00

19 files changed

+122
-70
lines changed

CHANGES.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,58 @@
44
Changelog
55
=========
66

7+
Version 21.4
8+
============
9+
10+
*Released 2024-07-12*
11+
12+
This is the technical changelog for version 21.4. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel <https://t.me/pythontelegrambotchannel>`_.
13+
14+
Major Changes
15+
-------------
16+
17+
- Full Support for Bot API 7.5 (:pr:`4328`, :pr:`4316`, :pr:`4315`, :pr:`4312` closes :issue:`4310`, :pr:`4311`)
18+
- Full Support for Bot API 7.6 (:pr:`4333` closes :issue:`4331`, :pr:`4344`, :pr:`4341`, :pr:`4334`, :pr:`4335`, :pr:`4351`, :pr:`4342`, :pr:`4348`)
19+
- Full Support for Bot API 7.7 (:pr:`4356` closes :issue:`4355`)
20+
- Drop ``python-telegram-bot-raw`` And Switch to ``pyproject.toml`` Based Packaging (:pr:`4288` closes :issue:`4129` and :issue:`4296`)
21+
- Deprecate Inclusion of ``successful_payment`` in ``Message.effective_attachment`` (:pr:`4365` closes :issue:`4350`)
22+
23+
New Features
24+
------------
25+
26+
- Add Support for Python 3.13 Beta (:pr:`4253`)
27+
- Add ``filters.PAID_MEDIA`` (:pr:`4357`)
28+
- Log Received Data on Deserialization Errors (:pr:`4304`)
29+
- Add ``MessageEntity.adjust_message_entities_to_utf_16`` Utility Function (:pr:`4323` by `Antares0982 <https://github.com/Antares0982>`_ closes :issue:`4319`)
30+
- Make Argument ``bot`` of ``TelegramObject.de_json`` Optional (:pr:`4320`)
31+
32+
Documentation Improvements
33+
--------------------------
34+
35+
- Documentation Improvements (:pr:`4303` closes :issue:`4301`)
36+
- Restructure Readme (:pr:`4362`)
37+
- Fix Link-Check Workflow (:pr:`4332`)
38+
39+
Internal Changes
40+
----------------
41+
42+
- Automate PyPI Releases (:pr:`4364` closes :issue:`4318`)
43+
- Add ``mise-en-place`` to ``.gitignore`` (:pr:`4300`)
44+
- Use a Composite Action for Testing Type Completeness (:pr:`4367`)
45+
- Stabilize Some Concurrency Usages in Test Suite (:pr:`4360`)
46+
- Add a Test Case for ``MenuButton`` (:pr:`4363`)
47+
- Extend ``SuccessfulPayment`` Test (:pr:`4349`)
48+
- Small Fixes for ``test_stars.py`` (:pr:`4347`)
49+
- Use Python 3.13 Beta 3 in Test Suite (:pr:`4336`)
50+
51+
Dependency Updates
52+
------------------
53+
54+
- Bump ``ruff`` and Add New Rules (:pr:`4329`)
55+
- Bump ``pre-commit`` Hooks to Latest Versions (:pr:`4337`)
56+
- Add Lower Bound for ``flaky`` Dependency (:pr:`4322` by `Palaptin <https://github.com/Palaptin>`_)
57+
- Bump ``pytest`` from 8.2.1 to 8.2.2 (:pr:`4294`)
58+
759
Version 21.3
860
============
961
*Released 2024-06-07*

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ Verifying Releases
119119

120120
To enable you to verify that a release file that you downloaded was indeed provided by the ``python-telegram-bot`` team, we have taken the following measures.
121121

122-
Starting with NEXT.VERSION, all releases are signed via `sigstore <https://sigstore.dev>`_.
122+
Starting with v21.4, all releases are signed via `sigstore <https://sigstore.dev>`_.
123123
The corresponding signature files are uploaded to the `GitHub releases page`_.
124124
To verify the signature, please install the `sigstore Python client <https://pypi.org/project/sigstore/>`_ and follow the instructions for `verifying signatures from GitHub Actions <https://github.com/sigstore/sigstore-python#signatures-from-github-actions>`_. As input for the ``--repository`` parameter, please use the value ``python-telegram-bot/python-telegram-bot``.
125125

telegram/_bot.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2856,7 +2856,7 @@ async def edit_message_live_location(
28562856
.. versionadded:: 21.2.
28572857
business_connection_id (:obj:`str`, optional): |business_id_str_edit|
28582858
2859-
.. versionadded:: NEXT.VERSION
2859+
.. versionadded:: 21.4
28602860
28612861
Keyword Args:
28622862
location (:class:`telegram.Location`, optional): The location to send.
@@ -2932,7 +2932,7 @@ async def stop_message_live_location(
29322932
inline keyboard.
29332933
business_connection_id (:obj:`str`, optional): |business_id_str_edit|
29342934
2935-
.. versionadded:: NEXT.VERSION
2935+
.. versionadded:: 21.4
29362936
29372937
Returns:
29382938
:class:`telegram.Message`: On success, if edited message is not an inline message, the
@@ -4006,7 +4006,7 @@ async def edit_message_text(
40064006
inline keyboard.
40074007
business_connection_id (:obj:`str`, optional): |business_id_str_edit|
40084008
4009-
.. versionadded:: NEXT.VERSION
4009+
.. versionadded:: 21.4
40104010
40114011
Keyword Args:
40124012
disable_web_page_preview (:obj:`bool`, optional): Disables link previews for links in
@@ -4104,7 +4104,7 @@ async def edit_message_caption(
41044104
.. versionadded:: 21.3
41054105
business_connection_id (:obj:`str`, optional): |business_id_str_edit|
41064106
4107-
.. versionadded:: NEXT.VERSION
4107+
.. versionadded:: 21.4
41084108
41094109
Returns:
41104110
:class:`telegram.Message`: On success, if edited message is not an inline message, the
@@ -4177,7 +4177,7 @@ async def edit_message_media(
41774177
inline keyboard.
41784178
business_connection_id (:obj:`str`, optional): |business_id_str_edit|
41794179
4180-
.. versionadded:: NEXT.VERSION
4180+
.. versionadded:: 21.4
41814181
41824182
Returns:
41834183
:class:`telegram.Message`: On success, if edited message is not an inline message, the
@@ -4238,7 +4238,7 @@ async def edit_message_reply_markup(
42384238
inline keyboard.
42394239
business_connection_id (:obj:`str`, optional): |business_id_str_edit|
42404240
4241-
.. versionadded:: NEXT.VERSION
4241+
.. versionadded:: 21.4
42424242
42434243
Returns:
42444244
:class:`telegram.Message`: On success, if edited message is not an inline message, the
@@ -7185,7 +7185,7 @@ async def stop_poll(
71857185
message inline keyboard.
71867186
business_connection_id (:obj:`str`, optional): |business_id_str_edit|
71877187
7188-
.. versionadded:: NEXT.VERSION
7188+
.. versionadded:: 21.4
71897189
71907190
Returns:
71917191
:class:`telegram.Poll`: On success, the stopped Poll is returned.
@@ -9138,7 +9138,7 @@ async def get_star_transactions(
91389138
) -> StarTransactions:
91399139
"""Returns the bot's Telegram Star transactions in chronological order.
91409140
9141-
.. versionadded:: NEXT.VERSION
9141+
.. versionadded:: 21.4
91429142
91439143
Args:
91449144
offset (:obj:`int`, optional): Number of transactions to skip in the response.
@@ -9193,7 +9193,7 @@ async def send_paid_media(
91939193
) -> Message:
91949194
"""Use this method to send paid media to channel chats.
91959195
9196-
.. versionadded:: NEXT.VERSION
9196+
.. versionadded:: 21.4
91979197
91989198
Args:
91999199
chat_id (:obj:`int` | :obj:`str`): |chat_id_channel|

telegram/_botcommandscope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def de_json(
9595
bot (:class:`telegram.Bot`, optional): The bot associated with this object. Defaults to
9696
:obj:`None`, in which case shortcut methods will not be available.
9797
98-
.. versionchanged:: NEXT.VERSION
98+
.. versionchanged:: 21.4
9999
:paramref:`bot` is now optional and defaults to :obj:`None`
100100
101101
Returns:

telegram/_chat.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3286,7 +3286,7 @@ async def send_paid_media(
32863286
For the documentation of the arguments, please see
32873287
:meth:`telegram.Bot.send_paid_media`.
32883288
3289-
.. versionadded:: NEXT.VERSION
3289+
.. versionadded:: 21.4
32903290
32913291
Returns:
32923292
:class:`telegram.Message`: On success, instance representing the message posted.

telegram/_chatfullinfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class ChatFullInfo(_ChatBase):
198198
can_send_paid_media (:obj:`bool`, optional): :obj:`True`, if paid media messages can be
199199
sent or forwarded to the channel chat. The field is available only for channel chats.
200200
201-
.. versionadded:: NEXT.VERSION
201+
.. versionadded:: 21.4
202202
203203
Attributes:
204204
id (:obj:`int`): Unique identifier for this chat.
@@ -352,7 +352,7 @@ class ChatFullInfo(_ChatBase):
352352
can_send_paid_media (:obj:`bool`): Optional. :obj:`True`, if paid media messages can be
353353
sent or forwarded to the channel chat. The field is available only for channel chats.
354354
355-
.. versionadded:: NEXT.VERSION
355+
.. versionadded:: 21.4
356356
357357
.. _accent colors: https://core.telegram.org/bots/api#accent-colors
358358
.. _topics: https://telegram.org/blog/topics-in-groups-collectible-usernames#topics-in-groups

telegram/_files/inputmedia.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class InputPaidMedia(TelegramObject):
124124
125125
.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`
126126
127-
.. versionadded:: NEXT.VERSION
127+
.. versionadded:: 21.4
128128
129129
Args:
130130
type (:obj:`str`): Type of media that the instance represents.
@@ -164,7 +164,7 @@ class InputPaidMediaPhoto(InputPaidMedia):
164164
165165
.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`
166166
167-
.. versionadded:: NEXT.VERSION
167+
.. versionadded:: 21.4
168168
169169
Args:
170170
media (:obj:`str` | :term:`file object` | :obj:`bytes` | :class:`pathlib.Path` | \
@@ -196,7 +196,7 @@ class InputPaidMediaVideo(InputPaidMedia):
196196
197197
.. seealso:: :wiki:`Working with Files and Media <Working-with-Files-and-Media>`
198198
199-
.. versionadded:: NEXT.VERSION
199+
.. versionadded:: 21.4
200200
201201
Note:
202202
* When using a :class:`telegram.Video` for the :attr:`media` attribute, it will take the

telegram/_menubutton.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def de_json(
8080
bot (:class:`telegram.Bot`, optional): The bot associated with this object. Defaults to
8181
:obj:`None`, in which case shortcut methods will not be available.
8282
83-
.. versionchanged:: NEXT.VERSION
83+
.. versionchanged:: 21.4
8484
:paramref:`bot` is now optional and defaults to :obj:`None`
8585
8686
Returns:

telegram/_message.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -582,11 +582,11 @@ class Message(MaybeInaccessibleMessage):
582582
paid_media (:obj:`telegram.PaidMediaInfo`, optional): Message contains paid media;
583583
information about the paid media.
584584
585-
.. versionadded:: NEXT.VERSION
585+
.. versionadded:: 21.4
586586
refunded_payment (:obj:`telegram.RefundedPayment`, optional): Message is a service message
587587
about a refunded payment, information about the payment.
588588
589-
.. versionadded:: NEXT.VERSION
589+
.. versionadded:: 21.4
590590
591591
Attributes:
592592
message_id (:obj:`int`): Unique message identifier inside this chat.
@@ -909,11 +909,11 @@ class Message(MaybeInaccessibleMessage):
909909
paid_media (:obj:`telegram.PaidMediaInfo`): Optional. Message contains paid media;
910910
information about the paid media.
911911
912-
.. versionadded:: NEXT.VERSION
912+
.. versionadded:: 21.4
913913
refunded_payment (:obj:`telegram.RefundedPayment`): Optional. Message is a service message
914914
about a refunded payment, information about the payment.
915915
916-
.. versionadded:: NEXT.VERSION
916+
.. versionadded:: 21.4
917917
918918
.. |custom_emoji_no_md1_support| replace:: Since custom emoji entities are not supported by
919919
:attr:`~telegram.constants.ParseMode.MARKDOWN`, this method now raises a
@@ -1426,10 +1426,10 @@ def effective_attachment(
14261426
:attr:`dice`, :attr:`passport_data` and :attr:`poll` are now also considered to be an
14271427
attachment.
14281428
1429-
.. versionchanged:: NEXT.VERSION
1429+
.. versionchanged:: 21.4
14301430
:attr:`paid_media` is now also considered to be an attachment.
14311431
1432-
.. deprecated:: NEXT.VERSION
1432+
.. deprecated:: 21.4
14331433
:attr:`successful_payment` will be removed in future major versions.
14341434
14351435
"""
@@ -1442,7 +1442,7 @@ def effective_attachment(
14421442
if attachment_type == MessageAttachmentType.SUCCESSFUL_PAYMENT:
14431443
warn(
14441444
PTBDeprecationWarning(
1445-
"NEXT.VERSION",
1445+
"21.4",
14461446
"successful_payment will no longer be considered an attachment in"
14471447
" future major versions",
14481448
),
@@ -3649,7 +3649,7 @@ async def edit_text(
36493649
of methods) or channel posts, if the bot is an admin in that channel. However, this
36503650
behaviour is undocumented and might be changed by Telegram.
36513651
3652-
.. versionchanged:: NEXT.VERSION
3652+
.. versionchanged:: 21.4
36533653
Now also passes :attr:`business_connection_id`.
36543654
36553655
Returns:
@@ -3706,7 +3706,7 @@ async def edit_caption(
37063706
of methods) or channel posts, if the bot is an admin in that channel. However, this
37073707
behaviour is undocumented and might be changed by Telegram.
37083708
3709-
.. versionchanged:: NEXT.VERSION
3709+
.. versionchanged:: 21.4
37103710
Now also passes :attr:`business_connection_id`.
37113711
37123712
Returns:
@@ -3759,7 +3759,7 @@ async def edit_media(
37593759
of methods) or channel posts, if the bot is an admin in that channel. However, this
37603760
behaviour is undocumented and might be changed by Telegram.
37613761
3762-
.. versionchanged:: NEXT.VERSION
3762+
.. versionchanged:: 21.4
37633763
Now also passes :attr:`business_connection_id`.
37643764
37653765
Returns:
@@ -3808,7 +3808,7 @@ async def edit_reply_markup(
38083808
of methods) or channel posts, if the bot is an admin in that channel. However, this
38093809
behaviour is undocumented and might be changed by Telegram.
38103810
3811-
.. versionchanged:: NEXT.VERSION
3811+
.. versionchanged:: 21.4
38123812
Now also passes :attr:`business_connection_id`.
38133813
38143814
Returns:
@@ -3862,7 +3862,7 @@ async def edit_live_location(
38623862
of methods) or channel posts, if the bot is an admin in that channel. However, this
38633863
behaviour is undocumented and might be changed by Telegram.
38643864
3865-
.. versionchanged:: NEXT.VERSION
3865+
.. versionchanged:: 21.4
38663866
Now also passes :attr:`business_connection_id`.
38673867
38683868
Returns:
@@ -3916,7 +3916,7 @@ async def stop_live_location(
39163916
of methods) or channel posts, if the bot is an admin in that channel. However, this
39173917
behaviour is undocumented and might be changed by Telegram.
39183918
3919-
.. versionchanged:: NEXT.VERSION
3919+
.. versionchanged:: 21.4
39203920
Now also passes :attr:`business_connection_id`.
39213921
39223922
Returns:
@@ -4072,7 +4072,7 @@ async def stop_poll(
40724072
40734073
For the documentation of the arguments, please see :meth:`telegram.Bot.stop_poll`.
40744074
4075-
.. versionchanged:: NEXT.VERSION
4075+
.. versionchanged:: 21.4
40764076
Now also passes :attr:`business_connection_id`.
40774077
40784078
Returns:

telegram/_messageentity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def adjust_message_entities_to_utf_16(
158158
For more information, see `Unicode <https://en.wikipedia.org/wiki/Unicode>`_ and
159159
`Plane (Unicode) <https://en.wikipedia.org/wiki/Plane_(Unicode)>`_.
160160
161-
.. versionadded:: NEXT.VERSION
161+
.. versionadded:: 21.4
162162
163163
Examples:
164164
Below is a snippet of code that demonstrates how to use this function to convert

telegram/_paidmedia.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class PaidMedia(TelegramObject):
4242
Objects of this class are comparable in terms of equality. Two objects of this class are
4343
considered equal, if their :attr:`type` is equal.
4444
45-
.. versionadded:: NEXT.VERSION
45+
.. versionadded:: 21.4
4646
4747
Args:
4848
type (:obj:`str`): Type of the paid media.
@@ -114,7 +114,7 @@ class PaidMediaPreview(PaidMedia):
114114
considered equal, if their :attr:`width`, :attr:`height`, and :attr:`duration`
115115
are equal.
116116
117-
.. versionadded:: NEXT.VERSION
117+
.. versionadded:: 21.4
118118
119119
Args:
120120
type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.PREVIEW`.
@@ -156,7 +156,7 @@ class PaidMediaPhoto(PaidMedia):
156156
Objects of this class are comparable in terms of equality. Two objects of this class are
157157
considered equal, if their :attr:`photo` are equal.
158158
159-
.. versionadded:: NEXT.VERSION
159+
.. versionadded:: 21.4
160160
161161
Args:
162162
type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.PHOTO`.
@@ -202,7 +202,7 @@ class PaidMediaVideo(PaidMedia):
202202
Objects of this class are comparable in terms of equality. Two objects of this class are
203203
considered equal, if their :attr:`video` are equal.
204204
205-
.. versionadded:: NEXT.VERSION
205+
.. versionadded:: 21.4
206206
207207
Args:
208208
type (:obj:`str`): Type of the paid media, always :tg-const:`telegram.PaidMedia.VIDEO`.
@@ -248,7 +248,7 @@ class PaidMediaInfo(TelegramObject):
248248
Objects of this class are comparable in terms of equality. Two objects of this class are
249249
considered equal, if their :attr:`star_count` and :attr:`paid_media` are equal.
250250
251-
.. versionadded:: NEXT.VERSION
251+
.. versionadded:: 21.4
252252
253253
Args:
254254
star_count (:obj:`int`): The number of Telegram Stars that must be paid to buy access to

0 commit comments

Comments
 (0)
0