We’ve just released v20.6.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This release brings full support for Bot API 6.9. Moreover, it removes backward compatibility for functionality deprecated in API 6.8. This is in line with our stability policy.
For the full list of changes and improvements, please see the below changelog.
Major Changes
• Drop Backward Compatibility Layer Introduced in #3853 (API 6.8) (#3873)
• Full Support for Bot API 6.9 (#3898)
New Features
• Add Rich Equality Comparison to
• Add
• Add String Representation for Selected Classes (#3826 closes #3770)
Minor Changes
• Add Support Python 3.12 (#3915)
• Documentation Improvements (#3910)
Internal Changes
• Verify Type Hints for Bot Method & Telegram Class Parameters (#3868)
• Move Bot API Tests to Separate Workflow File (#3912)
• Fix Failing
• Set Threshold for DeepSource’s PY-R1000 to High (#3888)
• One-Time Code Formatting Improvement via
• Move Dunder Methods to the Top of Class Bodies (#3883)
• Remove Superfluous
Dependency Updates
•
• Update
• Bump
• Update
• Bump
• Bump
• Update
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This release brings full support for Bot API 6.9. Moreover, it removes backward compatibility for functionality deprecated in API 6.8. This is in line with our stability policy.
For the full list of changes and improvements, please see the below changelog.
Major Changes
• Drop Backward Compatibility Layer Introduced in #3853 (API 6.8) (#3873)
• Full Support for Bot API 6.9 (#3898)
New Features
• Add Rich Equality Comparison to
WriteAccessAllowed (#3911 closes #3909)• Add
__repr__ Methods Added in #3826 closes #3770 to Sphinx Documentation (#3901 closes #3889)• Add String Representation for Selected Classes (#3826 closes #3770)
Minor Changes
• Add Support Python 3.12 (#3915)
• Documentation Improvements (#3910)
Internal Changes
• Verify Type Hints for Bot Method & Telegram Class Parameters (#3868)
• Move Bot API Tests to Separate Workflow File (#3912)
• Fix Failing
file_size Tests (#3906)• Set Threshold for DeepSource’s PY-R1000 to High (#3888)
• One-Time Code Formatting Improvement via
--preview Flag of black (#3882)• Move Dunder Methods to the Top of Class Bodies (#3883)
• Remove Superfluous
Defaults.__ne__ (#3884)Dependency Updates
•
pre-commit autoupdate (#3876)• Update
pre-commit Dependencies (#3916)• Bump
actions/checkout from 3 to 4 (#3914)• Update
httpx requirement from ~=0.24.1 to ~=0.25.0 (#3891)• Bump
furo from 2023.8.19 to 2023.9.10 (#3890)• Bump
sphinx from 7.2.5 to 7.2.6 (#3892)• Update
tornado requirement from ~=6.2 to ~=6.3.3 (#3675)• Bump
pytest from 7.4.0 to 7.4.2 (#3881)🔥27👍14❤🔥6🐳4❤3🦄3🌭2⚡1👌1
We’ve just released v20.7.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This release brings support for socket options, a filter for mentions and separate handling of
⚠️ Note that the changes related to timeout behavior come with some deprecations. Please pay attention to the warnings that PTB issues, especially if you have a custom implementation of the
For the full list of changes and improvements, please see the below changelog.
New Features
• Add
• Add Parameter
• Add
• Improve
• Add
• Rename
Bug Fixes & Changes
• Adjust
• Improve
• Fix Persistency Issue with Ended Non-Blocking Conversations (#3962)
• Improve Type Hinting for Arguments with Default Values in
Documentation Improvements
• Add Documentation for
• Improve Insertion of Kwargs into
Internal Changes
• Adjust Tests to New Error Messages (#3970)
Dependency Updates
• Bump
•
• Update
• Bump
• Update
• Bump
• Update
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This release brings support for socket options, a filter for mentions and separate handling of
write_timeout for media methods as new features. Moreover, inconsistencies in the handling of the read_timeout parameter for get_updates were fixed.⚠️ Note that the changes related to timeout behavior come with some deprecations. Please pay attention to the warnings that PTB issues, especially if you have a custom implementation of the
BaseRequest class.For the full list of changes and improvements, please see the below changelog.
New Features
• Add
JobQueue.scheduler_configuration and Corresponding Warnings (#3913 closes #3837)• Add Parameter
socket_options to HTTPXRequest (#3935 closes #2965)• Add
ApplicationBuilder.(get_updates_)socket_options (#3943)• Improve
write_timeout Handling for Media Methods (#3952)• Add
filters.Mention (#3941 closes #3799)• Rename
proxy_url to proxy and Allow httpx.{Proxy, URL} as Input (#3939 closes #3844)Bug Fixes & Changes
• Adjust
read_timeout Behavior for Bot.get_updates (#3963 closes #3893)• Improve
BaseHandler.__repr__ for Callbacks without __qualname__ (#3934)• Fix Persistency Issue with Ended Non-Blocking Conversations (#3962)
• Improve Type Hinting for Arguments with Default Values in
Bot (#3942)Documentation Improvements
• Add Documentation for
__aenter__ and __aexit__ Methods (#3907 closes #3886)• Improve Insertion of Kwargs into
Bot Methods (#3965)Internal Changes
• Adjust Tests to New Error Messages (#3970)
Dependency Updates
• Bump
pytest-xdist from 3.3.1 to 3.4.0 (#3975)•
pre-commit autoupdate (#3967)• Update
httpx requirement from ~=0.25.1 to ~=0.25.2 (#3983)• Bump
pytest-xdist from 3.4.0 to 3.5.0 (#3982)• Update
httpx requirement from ~=0.25.0 to ~=0.25.1 (#3961)• Bump
srvaroa/labeler from 1.6.1 to 1.7.0 (#3958)• Update
cachetools requirement from ~=5.3.1 to ~=5.3.2 (#3954)• Bump
pytest from 7.4.2 to 7.4.3 (#3953)👍37🎉31❤🔥11🌚5💋2☃1
We’ve just released v20.8.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This release brings full support for Bot API 7.0. A few comments are in order about this.
1️⃣ Bot API 7.0 introduced the classes
2️⃣ Constructing the arguments
3️⃣ Due to the renaming of
4️⃣ We faced some difficulties while updating
Apart from Bot API related changes, this release adds a parameter
Moreover, to make new Bot API functionality available to you even before we release an update of the library, we have added the new method
For the full list of changes and improvements, please see the documentation and below (we just left out dependency updates and internal changes to fit the message length limit).
Major Changes
• API 7.0 (#4034 closes #4033, #4038 by @aelkheir)
Minor Changes
• Fix Type Hint for
• Deprecate
• Improve Error Handling in Built-In Webhook Handler (#3987 closes #3979)
New Features
• Add Parameter
• Add Missing Conversions of
• Add Support for Unix Sockets to
• Add
• Add
Documentation Improvements
• Documentation Improvements (#3919)
• Add Docstring to Dunder Methods (#3929 closes #3926)
• Documentation Improvements (#4002, #4079 by @kenjitagawa, #4104 by @xTudoS)
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This release brings full support for Bot API 7.0. A few comments are in order about this.
1️⃣ Bot API 7.0 introduced the classes
MaybeInaccessibleMessage and InaccessibleMessage. To check if Message.pinned_message or CallbackQuery.message are usable, it hence no longer suffices to do if message.pinned_message/if callback_query.message. We have overridden MaybeInaccessibleMessage.__bool__ to ease the transition, but highly recommend to manually check your code for compatibility. You can use the helper property MaybeInaccessibleMessage.is_accessible or things like if message.pinned_message is not None/if isinstance(message.pinned_message, Message) instead. Note that Update.effective_message does not return MaybeInaccessibleMessage but only Message.2️⃣ Constructing the arguments
quote_position and quote_entities for the new ReplyParameters can be tedious. We have added helper methods Message.compute_quote_position_and_entities and Message.build_reply_arguments to make life easier for you. Note that to avoid confusion, we have deprecated the argument quote of Message.reply_* in favour of the new argument do_quote.3️⃣ Due to the renaming of
user_shared to users_shared, we deprecated filters.USER_SHARED in favour of the new filters.USERS_SHARED. We're pointing this out here, since accessing filters.USER_SHARED does not issue a warning at runtime.4️⃣ We faced some difficulties while updating
Message.text/caption_markdown/html to the new block quote entities. After contacting Telegram about inconsistencies in the handling of message entities, we were adviced to work with MessageEntity objects directly rather than converting them back into formatted strings as done by Message.text/caption_markdown/html. As these utility properties have been available in PTB for a long time, we have decided to still keep and extend them to new message entity types. However, they will handle only the most common use cases and might not be able to handle all edge cases. We have added corresponding notes to the documentation.Apart from Bot API related changes, this release adds a parameter
pattern to PreCheckoutQueryHandler and adds filters.SuccessfulPayment.Moreover, to make new Bot API functionality available to you even before we release an update of the library, we have added the new method
Bot.do_api_request that allows you to directly call any Bot API method even if it is not yet implemented in the library. Please also have a look at this wiki page on how PTB makes new Bot API functionality available to you.For the full list of changes and improvements, please see the documentation and below (we just left out dependency updates and internal changes to fit the message length limit).
Major Changes
• API 7.0 (#4034 closes #4033, #4038 by @aelkheir)
Minor Changes
• Fix Type Hint for
filters Parameter of MessageHandler (#4039 by @Palaptin)• Deprecate
filters.CHAT (#4083 closes #4062)• Improve Error Handling in Built-In Webhook Handler (#3987 closes #3979)
New Features
• Add Parameter
pattern to PreCheckoutQueryHandler and filters.SuccessfulPayment (#4005 by @aelkheir closes #3752)• Add Missing Conversions of
type to Corresponding Enum from telegram.constants (#4067)• Add Support for Unix Sockets to
Updater.start_webhook (#3986 closes #3978)• Add
Bot.do_api_request (#4084 closes #4053)• Add
AsyncContextManager as Parent Class to BaseUpdateProcessor (#4001)Documentation Improvements
• Documentation Improvements (#3919)
• Add Docstring to Dunder Methods (#3929 closes #3926)
• Documentation Improvements (#4002, #4079 by @kenjitagawa, #4104 by @xTudoS)
🎉57❤22👍18🔥10🍾10❤🔥5👨💻5⚡2😱2🗿2
We’ve just released v21.0.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This update brings full support for Bot API 7.1. Moreover, it removes backward compatibility for functionality deprecated in API 7.0. This is in line with our stability policy.
Moreover, this update brings a new major version. However, apart from the Bot API related removals, it does not contain any breaking changes and is backwards compatible to v20.x.
The bump of the major version is solely intended to mark that the next step in PTBs development after the introduction of v20.0 in January 2023. Since then, we have been working actively on smoothing out rough edges of v20, which sometimes involved deprecating functionality. To not carry old baggage around forever and ensure that PTB remains maintainable, this deprecated functionality will have to be removed at some point. This version bump brings us closer to that point, while still keeping the promise of a stable user interface that we formalized with our explicit stability policy.
For the full list of changes and improvements, please see below changelog.
Major Changes
• Remove Functionality Deprecated in API 7.0 (#4114 closes #4099)
• API 7.1 (#4118)
New Features
• Add Parameter
• Handle Properties in
Bug Fixes
• Add Missing Slot to
Documentation Improvements
• Improve HTML Download of Documentation (#4146 closes #4050)
• Documentation Improvements (#4109, #4116)
• Update Copyright to 2024 (#4121 by @aelkheir closes #4041)
Internal Changes
• Apply
• Refactor and Overhaul
• Run Unit Tests in PRs on Requirements Changes (#4144)
• Make
Dependency Updates
• Relax Upper Bound for
• Bump
• Update
• Update
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This update brings full support for Bot API 7.1. Moreover, it removes backward compatibility for functionality deprecated in API 7.0. This is in line with our stability policy.
Moreover, this update brings a new major version. However, apart from the Bot API related removals, it does not contain any breaking changes and is backwards compatible to v20.x.
The bump of the major version is solely intended to mark that the next step in PTBs development after the introduction of v20.0 in January 2023. Since then, we have been working actively on smoothing out rough edges of v20, which sometimes involved deprecating functionality. To not carry old baggage around forever and ensure that PTB remains maintainable, this deprecated functionality will have to be removed at some point. This version bump brings us closer to that point, while still keeping the promise of a stable user interface that we formalized with our explicit stability policy.
For the full list of changes and improvements, please see below changelog.
Major Changes
• Remove Functionality Deprecated in API 7.0 (#4114 closes #4099)
• API 7.1 (#4118)
New Features
• Add Parameter
media_write_timeout to HTTPXRequest and Method ApplicationBuilder.media_write_timeout (#4120 closes #3864)• Handle Properties in
TelegramObject.__setstate__ (#4134 closes #4111)Bug Fixes
• Add Missing Slot to
Updater (#4130 closes #4127)Documentation Improvements
• Improve HTML Download of Documentation (#4146 closes #4050)
• Documentation Improvements (#4109, #4116)
• Update Copyright to 2024 (#4121 by @aelkheir closes #4041)
Internal Changes
• Apply
pre-commit Checks More Widely (#4135)• Refactor and Overhaul
test_official (#4087 closes #3874)• Run Unit Tests in PRs on Requirements Changes (#4144)
• Make
Updater.stop Independent of CancelledError (#4126)Dependency Updates
• Relax Upper Bound for
httpx Dependency (#4148)• Bump
test-summary/action from 2.2 to 2.3 (#4142)• Update
cachetools requirement from ~=5.3.2 to ~=5.3.3 (#4141)• Update
httpx requirement from ~=0.26.0 to ~=0.27.0 (#4131)🎉25👍12⚡6❤4🍓3
We’ve just released v21.0.1.
As usual, upgrade using
This is a hotfix release for a faulty package configuration.
Bug Fixes
• Remove
As usual, upgrade using
pip install -U python-telegram-bot.This is a hotfix release for a faulty package configuration.
Bug Fixes
• Remove
docs from Package (#4150)⚡24🤷♂13❤10😁10🆒5
Yesterday the Telegram team released Bot API 7.2. This update brings many changes, which we are already working on implementing.
However there is one major backward incompatible change, which is the removal of the fields
Thank you for understanding and being patient.
However there is one major backward incompatible change, which is the removal of the fields
StickerSet.is_animated/is_video. This unfortunately breaks the method Bot.get_sticker_set and affects all versions of our library. The current workaround for this if you have v20.8+ is to directly callawait bot.do_api_request("get_sticker_set", {"name": sticker_set_name})
and parse the resulting JSON return value. The upcoming version of the library will address this incompatibility.Thank you for understanding and being patient.
❤70👍35👌14😱8❤🔥5🌚5💊4🆒3🤯2🦄2🙏1
We’ve just released v21.1.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This update brings full support for Bot API 7.2. Moreover, it removes backward compatibility for functionality deprecated in API 7.1. This is in line with our stated policy
⚠️ Please note that the Bot API update includes breaking changes for
To integrate the Bot API changes well into the PTB framework, the
Another change for the
For the full list of changes and improvements, please see the below changelog.
Major Changes
• API 7.2 (#4180 closes #4179 and #4181, #4181)
• Make
Minor Changes
• Refactor Debug logging in
New Features
• Make
• Accept Socket Objects for Webhooks (#4161 closes #4078)
• Add
Documentation Improvements
• Documentation Improvements (#4171, #4158 by @teslaedison)
Internal Changes
• Temporarily Mark Tests with
Dependency Updates
•
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This update brings full support for Bot API 7.2. Moreover, it removes backward compatibility for functionality deprecated in API 7.1. This is in line with our stated policy
⚠️ Please note that the Bot API update includes breaking changes for
Bot.set_sticker_set_thumbnail, InputSticker and StickerSet. See also our earlier post and this GitHub thread for additional information.To integrate the Bot API changes well into the PTB framework, the
Message.repl_* methods now also automatically pass the new business_connection_id parameter and the Update.effective_* properties consider the new update types as well.Another change for the
Message.reply_* methods is they now reply in the same topic by default.For the full list of changes and improvements, please see the below changelog.
Major Changes
• API 7.2 (#4180 closes #4179 and #4181, #4181)
• Make
ChatAdministratorRights/ChatMemberAdministrator.can_*_stories Required (API 7.1) (#4192)Minor Changes
• Refactor Debug logging in
Bot to Improve Type Hinting (#4151 closes #4010)New Features
• Make
Message.reply_* Reply in the Same Topic by Default (#4170 by @aelkheir closes #4139)• Accept Socket Objects for Webhooks (#4161 closes #4078)
• Add
Update.effective_sender (#4168 by @aelkheir closes #4085)Documentation Improvements
• Documentation Improvements (#4171, #4158 by @teslaedison)
Internal Changes
• Temporarily Mark Tests with
get_sticker_set as XFAIL due to API 7.2 Update (#4190)Dependency Updates
•
pre-commit autoupdate (#4184)• Bump
dependabot/fetch-metadata from 1.6.0 to 2.0.0 (#4185)🔥25❤10👍4
We’ve just released v21.1.1.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This is a bug fix release. It addresses a bug that was introduced in v21.1 in the new default behavior of the
Bug Fixes
• Fix Bug With Parameter
Minor Changes
• Remove Deprecation Warning in
• Fix Annotation of
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This is a bug fix release. It addresses a bug that was introduced in v21.1 in the new default behavior of the
message_thread_id parameter of the shortcut methods Message.reply_*. Moreover, it’s now ensured that passing message_thread_id=None actually overrides the default behavior.Bug Fixes
• Fix Bug With Parameter
message_thread_id of Message.reply_* (#4207 closes #4205)Minor Changes
• Remove Deprecation Warning in
JobQueue.run_daily (#4206 by @Konano)• Fix Annotation of
EncryptedCredentials.decrypted_secret (#4199 by @marinelay closes #4198)👍44❤15🎉7🥴3
We've just released v21.2.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This release brings full support for the new Bot API 7.3. Moreover, it removes backward compatibility for functionality deprecated in API 7.2. This is in line with our stated policy.
Moreover, it includes improvements for the startup and shutdown behavior of
For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 7.3 (#4246, #4260, #4243, #4248, #4242 closes #4236, #4247 by aelkheir)
• Remove Functionality Deprecated by Bot API 7.2 (#4245)
New Features
• Add Version to
• Handle Exceptions in building
Bug Fixes
• Call
• Handle
• Make
Documentation Improvements
• Documentation Improvements (#4217)
Internal Changes
• Add New Rules to
• Adapt Test Suite to Changes in Error Messages (#4238)
Dependency Updates
• Bump
•
• Bump
• Bump
• Bump
• Bump
• Bump
• Bump
• Bump
• Bump
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This release brings full support for the new Bot API 7.3. Moreover, it removes backward compatibility for functionality deprecated in API 7.2. This is in line with our stated policy.
Moreover, it includes improvements for the startup and shutdown behavior of
Application.For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 7.3 (#4246, #4260, #4243, #4248, #4242 closes #4236, #4247 by aelkheir)
• Remove Functionality Deprecated by Bot API 7.2 (#4245)
New Features
• Add Version to
PTBDeprecationWarning (#4262 closes #4261)• Handle Exceptions in building
CallbackContext (#4222)Bug Fixes
• Call
Application.post_stop Only if Application.stop was called (#4211 closes #4210)• Handle
SystemExit raised in Handlers (#4157 closes #4155 and #4156)• Make
Birthdate.to_date Return a datetime.date Object (#4251)Documentation Improvements
• Documentation Improvements (#4217)
Internal Changes
• Add New Rules to
ruff Config (#4250)• Adapt Test Suite to Changes in Error Messages (#4238)
Dependency Updates
• Bump
furo from 2024.4.27 to 2024.5.6 (#4252)•
pre-commit autoupdate (#4239)• Bump
pytest from 8.1.1 to 8.2.0 (#4231)• Bump
dependabot/fetch-metadata from 2.0.0 to 2.1.0 (#4228)• Bump
pytest-asyncio from 0.21.1 to 0.21.2 (#4232)• Bump
pytest-xdist from 3.6.0 to 3.6.1 (#4233)• Bump
furo from 2024.1.29 to 2024.4.27 (#4230)• Bump
srvaroa/labeler from 1.10.0 to 1.10.1 (#4227)• Bump
pytest from 7.4.4 to 8.1.1 (#4218)• Bump
sphinx from 7.2.6 to 7.3.7 (#4215)• Bump
pytest-xdist from 3.5.0 to 3.6.0 (#4215)🐳26👍17❤12🎉11⚡5💯2👌1
Hi all.
We have decided to deprecate the
In Februrary 2021, we introduced the library python-telegram-bot-raw that provides the telegram module without
Since then, v20 has seen the light of day. With v20,
Since maintaining
What does this mean to you?
Almost nothing. All you have to do is remove that trailing
Thank you for your understanding and your continued usage and support of the
Your PTB Developer Team
We have decided to deprecate the
python-telegram-bot-raw library and no longer provide updates for it.In Februrary 2021, we introduced the library python-telegram-bot-raw that provides the telegram module without
telegram.ext. Back then, we felt this to be right thing to do since the rather new v13 had introduced additional required dependencies for the JobQueue.Since then, v20 has seen the light of day. With v20,
python-telegram-bot only has a single required dependency, httpx, for the networking backend. All other dependencies for opt-in functionality of telegram.ext are purely optional. Moreover, according to the numbers that we are aware of ([1], [2], [3], [4]), the python-telegram-bot-raw library never gained a considerable user base compared to python-telegram-bot.Since maintaining
python-telegram-bot-raw still consumes some resources and is currently also hindering the modernization of PTBs packaging setup, we have therefore made this decision. The next release of PTB will add a corresponding warning to python-telegram-bot-raw. This will be the last update for python-telegram-bot-raw.What does this mean to you?
Almost nothing. All you have to do is remove that trailing
-raw from your requirements file. That's it. No code changes are necessary, since python-telegram-bot-raw is a subset of python-telegram-bot. No additional dependencies will be installed.Thank you for your understanding and your continued usage and support of the
python-telegram-bot library.Your PTB Developer Team
👍85🫡36❤18🎉6🥰3
We've just released v21.3.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This release brings full support for the new Bot API 7.4. Moreover, it removes backward compatibility for functionality deprecated in Bot API 7.3. This is in line with our stability policy.
As announced previously, this is also the last update for the
For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 7.4 (#4286, #4280, #4285, #4276 closes #4275, #4283, #4278, #4279)
• Deprecate
• Remove Functionality Deprecated in Bot API 7.3 (#4266 closes #4244)
New Features
• Add Parameter
Documentation Improvements
• Documentation Improvements (#4264 closes #4240)
Internal Changes
• Add
• Update Settings for pre-commit.ci (#4265)
Dependency Updates
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This release brings full support for the new Bot API 7.4. Moreover, it removes backward compatibility for functionality deprecated in Bot API 7.3. This is in line with our stability policy.
As announced previously, this is also the last update for the
python-telegram-bot-raw library. It will not receive any further updates. Please switch to using python-telegram-bot.For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 7.4 (#4286, #4280, #4285, #4276 closes #4275, #4283, #4278, #4279)
• Deprecate
python-telegram-bot-raw (#4270)• Remove Functionality Deprecated in Bot API 7.3 (#4266 closes #4244)
New Features
• Add Parameter
chat_id to ChatMemberHandler (#4290 by uniquetrij closes #4287)Documentation Improvements
• Documentation Improvements (#4264 closes #4240)
Internal Changes
• Add
setuptools to requirements-dev.txt (#4282)• Update Settings for pre-commit.ci (#4265)
Dependency Updates
• Bump
pytest from 8.2.0 to 8.2.1 (#4272)👍43❤🔥17❤12⚡6☃1🔥1🆒1
We've just released v21.4.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This release brings support for Bot API versions 7.5, 7.6, and 7.7.
Moreover, we have added initial support for Python 3.13 Beta and a new convenience helper for working with
For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for API 7.5 (#4328, #4316, #4315, #4312 closes #4310, #4311)
• Full Support for API 7.6 (#4333 closes #4331, #4344, #4341, #4334, #4335, #4351, #4342, #4348)
• Full Support for API 7.7 (#4356 closes #4355)
• Drop
• Deprecate Inclusion of
New Features
• Add Support for Python 3.13 Beta (#4253)
• Add
• Log Received Data on Deserialization Errors (#4304)
• Add
• Make Argument
Documentation Improvements
• Documentation Improvements (#4303 closes #4301)
• Restructure Readme (#4362)
• Fix Link-Check Workflow (#4332)
Internal Changes
• Automate PyPI Releases (#4364 closes #4318)
• Add
• Use a Composite Action for Testing Type Completeness (#4367)
• Stabilize Some Concurrency Usages in Test Suite (#4360)
• Add a Test Case for
• Extend
• Small Fixes for
• Use Python 3.13 Beta 3 in Test Suite (#4336)
Dependency Updates
• Bump
• Bump
• Add Lower Bound for
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This release brings support for Bot API versions 7.5, 7.6, and 7.7.
Moreover, we have added initial support for Python 3.13 Beta and a new convenience helper for working with
MessageEntity objects containing UTF-16 encoded characters.For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for API 7.5 (#4328, #4316, #4315, #4312 closes #4310, #4311)
• Full Support for API 7.6 (#4333 closes #4331, #4344, #4341, #4334, #4335, #4351, #4342, #4348)
• Full Support for API 7.7 (#4356 closes #4355)
• Drop
python-telegram-bot-raw And Switch to pyproject.toml Based Packaging (#4288 closes #4129 and #4296)• Deprecate Inclusion of
successful_payment in Message.effective_attachment (#4365 closes #4350)New Features
• Add Support for Python 3.13 Beta (#4253)
• Add
filters.PAID_MEDIA (#4357)• Log Received Data on Deserialization Errors (#4304)
• Add
MessageEntity.adjust_message_entities_to_utf_16 Utility Function (#4323 by Antares0982 closes #4319)• Make Argument
bot of TelegramObject.de_json Optional (#4320)Documentation Improvements
• Documentation Improvements (#4303 closes #4301)
• Restructure Readme (#4362)
• Fix Link-Check Workflow (#4332)
Internal Changes
• Automate PyPI Releases (#4364 closes #4318)
• Add
mise-en-place to .gitignore (#4300)• Use a Composite Action for Testing Type Completeness (#4367)
• Stabilize Some Concurrency Usages in Test Suite (#4360)
• Add a Test Case for
MenuButton (#4363)• Extend
SuccessfulPayment Test (#4349)• Small Fixes for
test_stars.py (#4347)• Use Python 3.13 Beta 3 in Test Suite (#4336)
Dependency Updates
• Bump
ruff and Add New Rules (#4329)• Bump
pre-commit Hooks to Latest Versions (#4337)• Add Lower Bound for
flaky Dependency (#4322 by Palaptin)• Bump
pytest from 8.2.1 to 8.2.2 (#4294)👍55❤18🔥6🤩6🐳4☃3✍1😁1🆒1
We've just released v21.5.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This release brings support for Bot API 7.8 and 7.9. The new parameter
Finally, we would like to point out that Python 3.8 will be reaching its end of life some time in October.
For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 7.9 (#4429)
• Full Support for Bot API 7.8 (#4408)
New Features
• Add
• Add Parameter
• Add Parameter
Documentation Improvements
• Bugfix for "Available In" Admonitions (#4413)
• Documentation Improvements (#4400 closes #4446, #4448 by Palaptin)
• Document Return Types of
• Add Introductory Paragraphs to Telegram Types Subsections (#4389 by mohdyusuf2312 closes #4380)
• Start Adapting to RTD Addons (#4386)
Minor and Internal Changes
• Remove Surplus Logging from
• Add Internal Constants for Encodings (#4378 by elpekenin)
• Improve PyPI Automation (#4375 closes #4373)
• Update Test Suite to New Test Channel Setup (#4435)
• Improve Fixture Usage in
• Update Python 3.13 Test Suite to RC1 (#4415)
• Bump
Dependency Updates
• Update
• Bump
• Bump
• Bump
• Bump
• Update
• Bump
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This release brings support for Bot API 7.8 and 7.9. The new parameter
read_file_handle of InputFile was added to support special use cases with local API servers. Moreover, building up on v21.4, additional convenience methods for MessageEntity were added.Finally, we would like to point out that Python 3.8 will be reaching its end of life some time in October.
python-telegram-bot will drop support for Python 3.8 after that. If you're still using Python 3.8, please consider upgrading to a newer version.For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 7.9 (#4429)
• Full Support for Bot API 7.8 (#4408)
New Features
• Add
MessageEntity.shift_entities and MessageEntity.concatenate (#4376 closes #4372)• Add Parameter
game_pattern to CallbackQueryHandler (#4353 by jainamoswal closes #4269)• Add Parameter
read_file_handle to InputFile (#4388 closes #4339)Documentation Improvements
• Bugfix for "Available In" Admonitions (#4413)
• Documentation Improvements (#4400 closes #4446, #4448 by Palaptin)
• Document Return Types of
RequestData Members (#4396)• Add Introductory Paragraphs to Telegram Types Subsections (#4389 by mohdyusuf2312 closes #4380)
• Start Adapting to RTD Addons (#4386)
Minor and Internal Changes
• Remove Surplus Logging from
Updater Network Loop (#4432 by MartinHjelmare)• Add Internal Constants for Encodings (#4378 by elpekenin)
• Improve PyPI Automation (#4375 closes #4373)
• Update Test Suite to New Test Channel Setup (#4435)
• Improve Fixture Usage in
test_message.py (#4431 by Palaptin)• Update Python 3.13 Test Suite to RC1 (#4415)
• Bump
ruff and Add New Rules (#4416)Dependency Updates
• Update
cachetools requirement from <5.5.0,>=5.3.3 to >=5.3.3,<5.6.0 (#4437)• Bump
sphinx from 7.4.7 to 8.0.2 and furo from 2024.7.18 to 2024.8.6 (#4412)• Bump
test-summary/action from 2.3 to 2.4 (#4410)• Bump
pytest from 8.2.2 to 8.3.2 (#4403)• Bump
dependabot/fetch-metadata from 2.1.0 to 2.2.0 (#4411)• Update
cachetools requirement from ~=5.3.3 to >=5.3.3,<5.5.0 (#4390)• Bump
sphinx from 7.3.7 to 7.4.7 (#4395)• Bump
furo from 2024.5.6 to 2024.7.18 (#4392)🔥27👍21❤10🌭5⚡4
We've just released v21.6.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This release brings support for Bot API 7.10 and allows further customization of
For the full list of changes and improvements, please see the below changelog.
New Features
• Full Support for Bot API 7.10 (#4461 closes #4459, #4460, #4463 by aelkheir, #4464)
• Add Parameter
Minor Changes
• Improve Type Completeness (#4466)
Internal Changes
• Update Python 3.13 Test Suite to RC2 (#4471)
• Enforce the
• Make Tests for
• Rename Testing Base Classes (#4453)
Dependency Updates
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This release brings support for Bot API 7.10 and allows further customization of
HTTPXRequest.For the full list of changes and improvements, please see the below changelog.
New Features
• Full Support for Bot API 7.10 (#4461 closes #4459, #4460, #4463 by aelkheir, #4464)
• Add Parameter
httpx_kwargs to HTTPXRequest (#4451 closes #4424)Minor Changes
• Improve Type Completeness (#4466)
Internal Changes
• Update Python 3.13 Test Suite to RC2 (#4471)
• Enforce the
offline_bot Fixture in Test*WithoutRequest (#4465)• Make Tests for
telegram.ext Independent of Networking (#4454)• Rename Testing Base Classes (#4453)
Dependency Updates
• Bump
pytest from 8.3.2 to 8.3.3 (#4475)👍32❤25🔥7🍾4☃3🍌3❤🔥2🐳1🌚1🌭1
We've just released v21.7.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This release brings full support for Bot API 7.11.
Moreover, it removes support for Python 3.8, which reached EOL on September 6th, 2024 and adds stable support for Python 3.13.
This is in line with our stability policy.
For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 7.11 (#4546 closes #4543)
• Add
• Drop Support for Python 3.8 (#4398 by elpekenin)
Minor Changes
• Allow
• Improve Exception Handling in
• Use Stable Python 3.13 Release in Test Suite (#4535)
Documentation Improvements
• Documentation Improvements (#4536 by Ecode2, #4556)
• Fix Linkcheck Workflow (#4545)
• Use
Internal Changes
• Improve Test Instability Caused by
• Stabilize Some Flaky Tests (#4500)
• Reduce Creation of HTTP Clients in Tests (#4493)
• Update
• Fix Failing Tests by Making Them Independent (#4494)
• Introduce Codecov's Test Analysis (#4487)
• Maintenance Work on
• Introduce
• Update Issue Templates to Use Issue Types (#4553)
• Update Automation to Label Changes (#4552)
Dependency Updates
• Bump
• Bump
• Bump
• Bump
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This release brings full support for Bot API 7.11.
Moreover, it removes support for Python 3.8, which reached EOL on September 6th, 2024 and adds stable support for Python 3.13.
This is in line with our stability policy.
For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 7.11 (#4546 closes #4543)
• Add
Message.reply_paid_media (#4551)• Drop Support for Python 3.8 (#4398 by elpekenin)
Minor Changes
• Allow
Sequence in Application.add_handlers (#4531 by roast-lord closes #4530)• Improve Exception Handling in
File.download_* (#4542)• Use Stable Python 3.13 Release in Test Suite (#4535)
Documentation Improvements
• Documentation Improvements (#4536 by Ecode2, #4556)
• Fix Linkcheck Workflow (#4545)
• Use
sphinx-build-compatibility to Keep Sphinx Compatibility (#4492)Internal Changes
• Improve Test Instability Caused by
Message Fixtures (#4507)• Stabilize Some Flaky Tests (#4500)
• Reduce Creation of HTTP Clients in Tests (#4493)
• Update
pytest-xdist Usage (#4491)• Fix Failing Tests by Making Them Independent (#4494)
• Introduce Codecov's Test Analysis (#4487)
• Maintenance Work on
Bot Tests (#4489)• Introduce
conftest.py for File Related Tests (#4488)• Update Issue Templates to Use Issue Types (#4553)
• Update Automation to Label Changes (#4552)
Dependency Updates
• Bump
srvaroa/labeler from 1.11.0 to 1.11.1 (#4549)• Bump
sphinx from 8.0.2 to 8.1.3 (#4532)• Bump
sphinxcontrib-mermaid from 0.9.2 to 1.0.0 (#4529)• Bump
srvaroa/labeler from 1.10.1 to 1.11.0 (#4509)• Bump
Bibo-Joshi/pyright-type-completeness from 1.0.0 to 1.0.1 (#4510)❤🔥24👍13🔥12❤2⚡2🥰2🤝2
We've just released v21.8.
Thank you to everyone who contributed to this release.
As usual, upgrade using
For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 8.0 (#4568, #4566 closes #4567, #4572, #4571, #4570, #4576, #4574)
Documentation Improvements
• Documentation Improvements (#4565 by Snehashish06, #4573)
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 8.0 (#4568, #4566 closes #4567, #4572, #4571, #4570, #4576, #4574)
Documentation Improvements
• Documentation Improvements (#4565 by Snehashish06, #4573)
🔥20❤🔥8👍7🎄1
We've just released v21.9.
Thank you to everyone who contributed to this release.
As usual, upgrade using
For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 8.1 (#4594 closes #4592)
Minor Changes
• Use
• Allow
Dependency Updates
• Update
• Bump
• Bump
• Bump
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 8.1 (#4594 closes #4592)
Minor Changes
• Use
MessageLimit.DEEP_LINK_LENGTH in helpers.create_deep_linked_url (#4597 by nemacysts)• Allow
Sequence Input for allowed_updates in Application and Updater Methods (#4589 by nemacysts)Dependency Updates
• Update
aiolimiter requirement from ~=1.1.0 to >=1.1,<1.3 (#4595)• Bump
pytest from 8.3.3 to 8.3.4 (#4596)• Bump
codecov/codecov-action from 4 to 5 (#4585)• Bump
pylint to v3.3.2 to Improve Python 3.13 Support (#4590 by nemacysts)• Bump
srvaroa/labeler from 1.11.1 to 1.12.0 (#4586)👍28❤9❤🔥4🔥2💅1
We've just released v21.10.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This release brings full support for Bot API 8.2 and includes a bug fix for the deserialization of
Moreover, with the update of the optional
Please switch to using
For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 8.2 (#4633)
• Bump
New Features
• Add Parameter
• Allow Input of Type
Bug Fixes
• Ensure Forward Compatibility of
Documentation Improvements & Internal Changes
• Use Custom Labels for
• Remove Redundant
• Update Copyright to 2025 (#4631)
• Refactor Module Structure and Tests for Star Payments Classes (#4615 closes #4593)
• Unify
• Add Static Security Analysis of GitHub Actions Workflows (#4606)
Dependency Updates
• Bump
• Bump
• Bump
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This release brings full support for Bot API 8.2 and includes a bug fix for the deserialization of
Gift and Gifts.Moreover, with the update of the optional
apscheduler dependency used for the JobQueue, we have deprecated support for pytz timezones.Please switch to using
zoneinfo.ZoneInfo timezones after upgrading.For the full list of changes and improvements, please see the below changelog.
Major Changes
• Full Support for Bot API 8.2 (#4633)
• Bump
apscheduler & Deprecate pytz Support (#4582)New Features
• Add Parameter
pattern to JobQueue.jobs() (#4613 closes #4544)• Allow Input of Type
Sticker for Several Methods (#4616 closes #4580)Bug Fixes
• Ensure Forward Compatibility of
Gift and Gifts (#4634 closes #4637)Documentation Improvements & Internal Changes
• Use Custom Labels for
dependabot PRs (#4621)• Remove Redundant
pylint Suppressions (#4628)• Update Copyright to 2025 (#4631)
• Refactor Module Structure and Tests for Star Payments Classes (#4615 closes #4593)
• Unify
datetime Imports (#4605 by @cuevasrja closes #4577)• Add Static Security Analysis of GitHub Actions Workflows (#4606)
Dependency Updates
• Bump
astral-sh/setup-uv from 4.2.0 to 5.1.0 (#4625)• Bump
codecov/codecov-action from 5.1.1 to 5.1.2 (#4622)• Bump
actions/upload-artifact from 4.4.3 to 4.5.0 (#4623)• Bump
github/codeql-action from 3.27.9 to 3.28.0 (#4624)❤🔥20👍17👾8❤7✍4🤝3🆒3⚡2👏2🔥1👌1
We've just released v21.11.
Thank you to everyone who contributed to this release.
As usual, upgrade using
This release brings full support for Bot API 8.3. It also removes functionality deprecated in Bot API 8.2 and 7.4. This is in line with our stability policy.
The extended customization support for
For the full list of changes and improvements, please see the below changelog.
Major Changes and New Features
• Full Support for Bot API 8.3 (#4676 closes #4677, #4682 by aelkheir, #4690 by aelkheir, #4691 by aelkheir)
• Make
• Remove Deprecated
• Accept
• Extend Customization Support for
• Support
• Add
Minor Changes and Bug Fixes
• Add Bootstrapping Logic to
• Fix a Bug in
• Simplify Handling of Empty Data in
Documentation Improvements
• Documentation Improvements (#4641)
• Overhaul Admonition Insertion in Documentation (#4462 closes #4414)
Internal Changes
• Stabilize Linkcheck Test (#4693)
• Bump
• Refactor Tests for
• Use Fine Grained Permissions for GitHub Actions Workflows (#4668)
Dependency Updates
• Bump
• Bump
• Bump
• Bump
• Bump
Thank you to everyone who contributed to this release.
As usual, upgrade using
pip install -U python-telegram-bot.This release brings full support for Bot API 8.3. It also removes functionality deprecated in Bot API 8.2 and 7.4. This is in line with our stability policy.
The extended customization support for
Bot.base_(file_)url makes it possible to use use Telegrams testing environment with PTB. Moreover, the built-in AIORateLimiter now respects the allow_paid_broadcast parameter.For the full list of changes and improvements, please see the below changelog.
Major Changes and New Features
• Full Support for Bot API 8.3 (#4676 closes #4677, #4682 by aelkheir, #4690 by aelkheir, #4691 by aelkheir)
• Make
provider_token Argument Optional (#4689)• Remove Deprecated
InlineQueryResultArticle.hide_url (#4640 closes #4638)• Accept
datetime.timedelta Input in Bot Method Parameters (#4651)• Extend Customization Support for
Bot.base_(file_)url (#4632 closes #3355)• Support
allow_paid_broadcast in AIORateLimiter (#4627 closes #4578)• Add
BaseUpdateProcessor.current_concurrent_updates (#4626 closes #3984)Minor Changes and Bug Fixes
• Add Bootstrapping Logic to
Application.run_* (#4673 closes #4657)• Fix a Bug in
edit_user_star_subscription (#4681 by vavasik800)• Simplify Handling of Empty Data in
TelegramObject.de_json and Friends (#4617 closes #4614)Documentation Improvements
• Documentation Improvements (#4641)
• Overhaul Admonition Insertion in Documentation (#4462 closes #4414)
Internal Changes
• Stabilize Linkcheck Test (#4693)
• Bump
pre-commit Hooks to Latest Versions (#4643)• Refactor Tests for
TelegramObject Classes with Subclasses (#4654 closes #4652)• Use Fine Grained Permissions for GitHub Actions Workflows (#4668)
Dependency Updates
• Bump
actions/setup-python from 5.3.0 to 5.4.0 (#4665)• Bump
dependabot/fetch-metadata from 2.2.0 to 2.3.0 (#4666)• Bump
actions/stale from 9.0.0 to 9.1.0 (#4667)• Bump
astral-sh/setup-uv from 5.1.0 to 5.2.2 (#4664)• Bump
codecov/test-results-action from 1.0.1 to 1.0.2 (#4663)❤32👍14🤩4
We've just released v21.11.1.
As usual, upgrade using
This is a bug fix release that restores the documentation at https://docs.python-telegram-bot.org.
Documentation Improvements
• Fix ReadTheDocs Build (#4695)
As usual, upgrade using
pip install -U python-telegram-bot.This is a bug fix release that restores the documentation at https://docs.python-telegram-bot.org.
Documentation Improvements
• Fix ReadTheDocs Build (#4695)
🎉21🤣12❤10👍9✍8🆒3🌚2
python-telegram-bot
Unfortunately, our call for maintainers for ptbtest was not successful. We therefore decided that the first person who reaches out to us and wants to take over maintenance of ptbtest will be granted the corresponding access rights and ownerships. We still…
We are happy to announce that
https://t.me/pythontelegrambotchannel/115
ptbtest has found a new maintainer in @AlexPHorta. We wish them the best of luck with their new project!https://t.me/pythontelegrambotchannel/115
❤48👍26🔥10🤝5