Changelog¶
22.5¶
2025-09-27
Breaking Changes¶
Move param
ReplyParameters.checklist_task_idto last position.Hint
This change addresses a breaking change accidentally introduced in version 22.4 where the introduction of the new parameter was not done in a backward compatible way.
Existing code using keyword arguments is unaffected. Only code using positional arguments (and based on version 22.4) may need updates.
New Features¶
Bug Fixes¶
Fix Handling of Infinite Bootstrap Retries in
Application.run_*andUpdater.start_*(#4973 by @Bibo-Joshi closes #4966)
Other Changes¶
Bump Version to v22.5 (#4979 by @Bibo-Joshi)
Documentation¶
Documentation Improvemennts (#4974 by @Bibo-Joshi)
Internal Changes¶
Lock file maintenance (#4938 by @renovate[bot])
Update astral-sh/setup-uv digest to b75a909 (#4943 by @renovate[bot])
Update codecov/codecov-action action to v5.5.1 (#4944 by @renovate[bot])
Update dependency astral-sh/uv to v0.8.17 (#4945 by @renovate[bot])
Update github/codeql-action action to v3.30.3 (#4946 by @renovate[bot])
Update Pylint to v3.3.8 (#4947 by @renovate[bot])
Update Chango to v0.5.0 (#4948 by @renovate[bot])
Update Mypy to v1.18.1 (#4949 by @renovate[bot])
Align pre-commit hook APScheduler to with
pyproject.toml(#4950 by @renovate[bot], @Bibo-Joshi)Align pre-commit hook cachetools to with
pyproject.toml(#4951 by @renovate[bot], @Bibo-Joshi)Update pypa/gh-action-pypi-publish action to v1.13.0 (#4952 by @renovate[bot])
Renovate: No README updates, label behaviour change, automerge lockfiles (#4953 by @harshil21)
Lock file maintenance (#4954 by @renovate[bot])
Lock file maintenance (#4955 by @renovate[bot])
Update astral-sh/setup-uv digest to 208b0c0 (#4958 by @renovate[bot])
Update dependency astral-sh/uv to v0.8.19 (#4959 by @renovate[bot])
Update Mypy to v1.18.2 (#4960 by @renovate[bot])
Update astral-sh/setup-uv action to v6.7.0 (#4961 by @renovate[bot])
Update Ruff to v0.13.1 (#4962 by @renovate[bot])
Update actions/stale action to v10 (#4964 by @renovate[bot])
Properly Pin Dependency to
astral/setup-uvin Copilot Setup Steps (#4965 by @Bibo-Joshi)Lock file maintenance (#4967 by @renovate[bot])
Tune Renovate Configuration (#4968 by @harshil21)
Update dependency astral-sh/uv to v0.8.22 (#4975 by @renovate[bot])
Update github/codeql-action action to v3.30.5 (#4976 by @renovate[bot])
Update Ruff to v0.13.2 (#4977 by @renovate[bot])
Update dependency furo to v2025.9.25 (#4978 by @renovate[bot])
22.4¶
2025-09-13
New Features¶
Extend
telegram.Message.delete()shortcut to support business message deletion (#4869 by @jainamoswal closes #4867)Add convenience properties for
firstname,lastname, andusernametoSharedUserandChatShared(#4881 by @aelkheir; #4713 by @david-shiko)Add
filters.FORUMto filter messages from forum topic chats (#4906 by @harshil21)Full Support for Bot API 9.2 (#4911 by @aelkheir closes #4910; #4918 by @Poolitzer; #4917 by @Poolitzer; #4914 by @harshil21; #4916 by @harshil21; #4912 by @aelkheir; #4921 by @aelkheir; #4936 by @Bibo-Joshi; #4935 by @Bibo-Joshi; #4931 by @aelkheir)
Bug Fixes¶
Adapt logic on getting the event loop in
Application.run_polling/webhookto Python 3.14 (#4875 by @harshil21 closes #4874)Fix
ResourceWarningwhen passingpathlib.Pathobjects to methods which accept file input (#4908 by @harshil21 closes #4907)
Dependencies¶
Update cachetools requirement from <6.2.0,>=5.3.3 to >=5.3.3,<6.3.0 (#4923 by @dependabot[bot])
Other Changes¶
Set the default connection pool size for
HTTPXRequestto 256 to allow more concurrent requests by default. Drop thehttpxparametermax_keepalive_connections. This way, thehttpxdefault of 20 is used, leading to a smaller number of idle connections in large connection pools.Hint
If you manually build the
HTTPXRequestobjects, please be aware that these changes also applies to you. Kindly double check your settings. To specify custom limits, you can set them via the parameterhttpx_kwargsofHTTPXRequest. See also the httpx documentation for more details on these settings.”(#4882 by @Poolitzer)
Bump Version to v22.4 (#4939 by @Bibo-Joshi)
Documentation¶
Documentation Improvements (#4878 by @Bibo-Joshi; #4872 by @Ca5parAD)
Bump
furofrom 2024.8.6 to 2025.7.19 (#4894 by @dependabot)
Internal Changes¶
Address Failing Unit Test for
send_paid_media(#4879 by @Bibo-Joshi)Improve Internal Logic for Network Retries (#4880 by @Bibo-Joshi closes #4871)
Introduce utility module
_utils.usernamesrefactoring convenience properties around Telegram Objects’firstname,lastname, andusername(#4881 by @aelkheir; #4713 by @david-shiko)Add Copilot Instructions and Setup Steps (#4884 by @harshil21)
Remove
black,isort,flake8, andpyupgradein favor ofruff(#4886 by @harshil21)Use Renovate to Keep Dependencies Up-To-Date (#4887 by @renovate[bot])
Add and use a
uv.locklockfile when setting up the development environment usinguv. (#4890 by @harshil21 closes #4796)Bump
pytestfrom 8.4.0 to 8.4.1 (#4892 by @dependabot)Bump
pytest-xdistfrom 3.6.1 to 3.8.0 (#4893 by @dependabot)Bump
astral-sh/setup-uvfrom 6.3.1 to 6.4.3 (#4895 by @dependabot)Bump
github/codeql-actionfrom 3.29.2 to 3.29.5 (#4896 by @dependabot)Don’t update
uv.lockin copilot runtime environment (#4915 by @harshil21)Bump actions/checkout from 4.2.2 to 5.0.0 (#4925 by @dependabot)
Bump codecov/codecov-action from 5.4.3 to 5.5.0 (#4926 by @dependabot)
Bump actions/download-artifact from 4.3.0 to 5.0.0 (#4927 by @dependabot)
Bump astral-sh/setup-uv from 6.4.3 to 6.6.1 (#4928 by @dependabot)
Bump github/codeql-action from 3.29.7 to 3.30.0 (#4929 by @dependabot)
Bump pytest from 8.4.1 to 8.4.2 (#4933 by @dependabot)
Use Tagged Release of pydantic in Development Dependencies (#4934 by @harshil21 closes #4932)
22.3¶
2025-07-20
Highlights¶
Full Support for Bot API 9.1 (#4847 by @Bibo-Joshi closes #4845; #4848 by @Bibo-Joshi; #4849 by @harshil21; #4851 by @harshil21; #4857 by @aelkheir)
Breaking Changes¶
Remove Functionality Deprecated in API 9.0
Remove deprecated argument and attribute
BusinessConnection.can_reply.Remove deprecated argument and attribute
ChatFullInfo.can_send_giftRemove deprecated class
constants.StarTransactions. Please instead usetelegram.constants.Nanostar.VALUE.Remove deprecated attributes
constants.StarTransactionsLimit.NANOSTAR_MIN_AMOUNTandconstants.StarTransactionsLimit.NANOSTAR_MAX_AMOUNT. Please instead usetelegram.constants.NanostarLimit.MIN_AMOUNTandtelegram.constants.NanostarLimit.MAX_AMOUNT.
New Features¶
New filters based on Bot API 9.1:
filters.StatusUpdate.DIRECT_MESSAGE_PRICE_CHANGEDforMessage.direct_message_price_changedfilters.StatusUpdate.CHECKLIST_TASKS_ADDEDforMessage.checklist_tasks_addedfilters.StatusUpdate.CHECKLIST_TASKS_DONEforMessage.checklist_tasks_donefilters.CHECKLISTforMessage.checklist
(#4847 by @Bibo-Joshi closes #4845; #4848 by @Bibo-Joshi; #4849 by @harshil21; #4851 by @harshil21; #4857 by @aelkheir)
Other Changes¶
Make Gender Input Case-Insensitive in
conversationbot.py(#4855 by @fengxiaohu closes #4846)Bump Version to v22.3 (#4870 by @Bibo-Joshi)
Documentation¶
Internal Changes¶
Update API Token for Local Testing Bot (#4837 by @Bibo-Joshi)
Bump stefanzweifel/git-auto-commit-action from 5.2.0 to 6.0.1 (#4840 by @dependabot)
Bump github/codeql-action from 3.28.18 to 3.29.2 (#4841 by @dependabot)
Bump astral-sh/setup-uv from 5.4.1 to 6.3.1 (#4842 by @dependabot)
Bump sigstore/gh-action-sigstore-python from 3.0.0 to 3.0.1 (#4843 by @dependabot)
Bump pre-commit Hooks to Latest Versions (#4858 by @pre-commit-ci)
22.2¶
2025-06-29
Deprecations¶
In this release, we’re migrating attributes of Telegram objects that represent durations/time periods from having
inttype to Python’s nativedatetime.timedelta. This change is opt-in for now to allow for a smooth transition phase. It will become opt-out in future releases.Set
PTB_TIMEDELTA=trueorPTB_TIMEDELTA=1as an environment variable to make these attributes returndatetime.timedeltaobjects instead of integers. Support forintvalues is deprecated and will be removed in a future major version.Affected Attributes:
New Features¶
Bug Fixes¶
Fixed a bug where calling
Application.remove/add_handlerduring update handling can cause aRuntimeErrorinApplication.process_update.Hint
Calling
Application.add/remove_handlernow has no influence on calls toprocess_update()that arealready in progress. The same holds for
Application.add/remove_error_handlerandApplication.process_error, respectively.Warning
This behavior should currently be considered an implementation detail and not as guaranteed behavior.
(#4802 by @Bibo-Joshi closes #4803)
Allow for pattern matching empty inline queries (#4817 by @locobott)
Correctly parse parameter
allow_sending_without_replyinMessage.reply_*when used in combination withdo_quote=True.Hint
Using
dictvalued input fordo_quotealong with passingallow_sending_without_replyis not supported and will raise an error.(#4818 by @Bibo-Joshi closes #4807)
Dependencies¶
Implement PEP 735 Dependency Groups for Development Dependencies (#4800 by @harshil21 closes #4795)
Update cachetools requirement from <5.6.0,>=5.3.3 to >=5.3.3,<6.1.0 (#4801 by @dependabot)
Bump
httpxfrom ~=0.27 to >=0.27,<0.29 (#4820 by @Bibo-Joshi closes #4819)Update
cachetoolsrequirement from <6.1.0,>=5.3.3 to >=5.3.3,<6.2.0 (#4830 by @dependabot)
Other Changes¶
Improve Informativeness of Network Errors Raised by
BaseRequest.post/retrieve(#4822 by @Bibo-Joshi)Add Python 3.14 Beta To Test Matrix. Python 3.14 is not officially supported by PTB yet! (#4825 by @harshil21)
Bump Version to v22.2 (#4834 by @Bibo-Joshi)
Documentation¶
Documentation Improvements. Among other things
mention alternative package managers in README and contribution guide
remove
furo-sphinx-search
(#4810 by @Bibo-Joshi; #4824 by @Aweryc closes #4823; #4826 by @harshil21)
Internal Changes¶
Modify test_official to handle time periods as timedelta automatically. (#4750 by @aelkheir closes #4575)
Fix Bug in Automated Channel Announcement (#4792 by @Bibo-Joshi)
Fix a Failing Test Case (#4793 by @Bibo-Joshi)
Rework Repository to src Layout (#4798 by @Bibo-Joshi closes #4797)
Bump github/codeql-action from 3.28.16 to 3.28.18 (#4811 by @dependabot)
Bump actions/setup-python from 5.5.0 to 5.6.0 (#4812 by @dependabot)
Bump dependabot/fetch-metadata from 2.3.0 to 2.4.0 (#4813 by @dependabot)
Bump codecov/codecov-action from 5.4.2 to 5.4.3 (#4814 by @dependabot)
Bump codecov/test-results-action from 1.1.0 to 1.1.1 (#4815 by @dependabot)
Fix Typo in TelegramObject._get_attrs (#4816 by @harshil21)
22.1¶
2025-05-15
Breaking Changes¶
Drop backward compatibility for
user_idinsend_giftby updating the order of parameters. Please adapt your code accordingly or use keyword arguments. (#4692 by @Bibo-Joshi)
Deprecations¶
This release comes with several deprecations, in line with our stability policy.
This includes the following:
Deprecated
telegram.constants.StarTransactionsLimit.NANOSTAR_MIN_AMOUNTandtelegram.constants.StarTransactionsLimit.NANOSTAR_MAX_AMOUNT. These members will be replaced bytelegram.constants.NanostarLimit.MIN_AMOUNTandtelegram.constants.NanostarLimit.MAX_AMOUNT.Deprecated the class
telegram.constants.StarTransactions. Its only membertelegram.constants.StarTransactions.NANOSTAR_VALUEwill be replaced bytelegram.constants.Nanostar.VALUE.Bot API 9.0 deprecated
BusinessConnection.can_replyin favor ofBusinessConnection.rightsBot API 9.0 deprecated
ChatFullInfo.can_send_giftin favor ofChatFullInfo.accepted_gift_types.Bot API 9.0 introduced these new required fields to existing classes:
TransactionPartnerUser.transaction_typeChatFullInfo.accepted_gift_types
Passing these values as positional arguments is deprecated. We encourage you to use keyword arguments instead, as the the signature will be updated in a future release.
These deprecations are backward compatible, but we strongly recommend to update your code to use the new members.
(#4756 by @Bibo-Joshi closes #4754; #4757 by @Bibo-Joshi; #4759 by @Bibo-Joshi; #4763 by @aelkheir; #4766 by @Bibo-Joshi; #4769 by @aelkheir; #4773 by @aelkheir; #4781 by @aelkheir; #4782 by @Bibo-Joshi)
New Features¶
Full Support for Bot API 9.0 (#4756 by @Bibo-Joshi closes #4754; #4757 by @Bibo-Joshi; #4759 by @Bibo-Joshi; #4763 by @aelkheir; #4766 by @Bibo-Joshi; #4769 by @aelkheir; #4773 by @aelkheir; #4781 by @aelkheir; #4782 by @Bibo-Joshi)
Bug Fixes¶
Ensure execution of
Bot.shutdown()even ifBot.get_me()fails inBot.initialize()(#4733 by @Poolitzer)Fix Handling of
DefaultsforInputPaidMedia(#4761 by @ngrogolev closes #4753)
Other Changes¶
Bump Version to v22.1 (#4791 by @Bibo-Joshi)
Documentation¶
Documentation Improvements. Among others, add missing
Returnsfield inUser.get_profile_photos(#4730 by @Bibo-Joshi; #4740 by @aelkheir)Update
AUTHORS.rst, Adding @aelkheir to Active Development Team (#4747 by @Bibo-Joshi)Clarify Documentation and Type Hints of
InputMediaandInputPaidMedia. Note that themediaparameter accepts only objects of typestrandInputFile. The respective subclasses ofInput(Paid)Mediaeach accept a broader range of input type for themediaparameter. (#4762 by @Bibo-Joshi)
Internal Changes¶
Bump codecov/test-results-action from 1.0.2 to 1.1.0 (#4741 by @dependabot)
Bump actions/setup-python from 5.4.0 to 5.5.0 (#4742 by @dependabot)
Bump github/codeql-action from 3.28.10 to 3.28.13 (#4743 by @dependabot)
Bump astral-sh/setup-uv from 5.3.1 to 5.4.1 (#4744 by @dependabot)
Bump actions/download-artifact from 4.1.8 to 4.2.1 (#4745 by @dependabot)
Reenable
test_officialBlocked by Debug Remnant (#4746 by @aelkheir)Bump pre-commit Hooks to Latest Versions (#4748 by @pre-commit-ci)
Fine-tune
changoand release workflows (#4758 by @Bibo-Joshi closes #4720)Bump codecov/codecov-action from 5.1.2 to 5.4.2 (#4775 by @dependabot)
Bump actions/upload-artifact from 4.5.0 to 4.6.2 (#4776 by @dependabot)
Bump stefanzweifel/git-auto-commit-action from 5.1.0 to 5.2.0 (#4777 by @dependabot)
Bump github/codeql-action from 3.28.13 to 3.28.16 (#4778 by @dependabot)
Bump actions/download-artifact from 4.2.1 to 4.3.0 (#4779 by @dependabot)
22.0¶
2025-03-15
Breaking Changes¶
This release removes all functionality that was deprecated in v20.x. This is in line with our stability policy.
This includes the following changes:
Removed
filters.CHAT(all messages have an associated chat) andfilters.StatusUpdate.USER_SHARED(usefilters.StatusUpdate.USERS_SHAREDinstead).Removed
Defaults.disable_web_page_previewandDefaults.quote. UseDefaults.link_preview_optionsandDefaults.do_quoteinstead.Removed
ApplicationBuilder.(get_updates_)proxy_urlandHTTPXRequest.proxy_url. UseApplicationBuilder.(get_updates_)proxyandHTTPXRequest.proxyinstead.Removed the
*_timeoutarguments ofApplication.run_pollingandUpdater.start_webhook. Instead, specify the values viaApplicationBuilder.get_updates_*_timeout.Removed
constants.InlineQueryLimit.MIN_SWITCH_PM_TEXT_LENGTH. Useconstants.InlineQueryResultsButtonLimit.MAX_START_PARAMETER_LENGTHinstead.Removed the argument
quoteofMessage.reply_*. Usedo_quoteinstead.Removed the superfluous
EncryptedPassportElement.credentialswithout replacement.Changed attribute value of
PassportFile.file_datefrominttodatetime.datetime. Make sure to adjust your code accordingly.Changed the attribute value of
PassportElementErrors.file_hashesfromlisttotuple. Make sure to adjust your code accordingly.Make
BaseRequest.read_timeoutan abstract property. If you subclassBaseRequest, you need to implement this property.The default value for
write_timeoutnow defaults toDEFAULT_NONEalso for bot methods that send media. Previously, it was20. If you subclassBaseRequest, make sure to use your desired write timeout ifRequestData.multipart_datais set.
(#4671 by @Bibo-Joshi closes #4659)
Documentation¶
Add chango As Changelog Management Tool (#4672 by @Bibo-Joshi closes #4321)
Internal Changes¶
Bump github/codeql-action from 3.28.8 to 3.28.10 (#4697 by @dependabot)
Bump srvaroa/labeler from 1.12.0 to 1.13.0 (#4698 by @dependabot)
Bump astral-sh/setup-uv from 5.2.2 to 5.3.1 (#4699 by @dependabot)
Bump Bibo-Joshi/chango from 0.3.1 to 0.3.2 (#4700 by @dependabot)
Bump pypa/gh-action-pypi-publish from 1.12.3 to 1.12.4 (#4701 by @dependabot)
Bump pytest from 8.3.4 to 8.3.5 (#4709 by @dependabot)
Bump sphinx from 8.1.3 to 8.2.3 (#4710 by @dependabot)
Bump Bibo-Joshi/chango from 0.3.2 to 0.4.0 (#4712 by @Bibo-Joshi)
Bump Version to v22.0 (#4719 by @Bibo-Joshi)
Version 21.11.1¶
Released 2025-03-01
This is the technical changelog for version 21.11. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Documentation Improvements¶
Fix ReadTheDocs Build (#4695)
Version 21.11¶
Released 2025-03-01
This is the technical changelog for version 21.11. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
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_tokenArgument Optional (#4689)Remove Deprecated
InlineQueryResultArticle.hide_url(#4640 closes #4638)Accept
datetime.timedeltaInput inBotMethod Parameters (#4651)Extend Customization Support for
Bot.base_(file_)url(#4632 closes #3355)Support
allow_paid_broadcastinAIORateLimiter(#4627 closes #4578)Add
BaseUpdateProcessor.current_concurrent_updates(#4626 closes #3984)
Minor Changes and Bug Fixes¶
Documentation Improvements¶
Internal Changes¶
Dependency Updates¶
Version 21.10¶
Released 2025-01-03
This is the technical changelog for version 21.10. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
New Features¶
Bug Fixes¶
Documentation Improvements & Internal Changes¶
Dependency Updates¶
Version 21.9¶
Released 2024-12-07
This is the technical changelog for version 21.9. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
Minor Changes¶
Dependency Updates¶
Version 21.8¶
Released 2024-12-01
This is the technical changelog for version 21.8. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
Documentation Improvements¶
Version 21.7¶
Released 2024-11-04
This is the technical changelog for version 21.7. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
Minor Changes¶
Allow
SequenceinApplication.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¶
Internal Changes¶
Improve Test Instability Caused by
MessageFixtures (#4507)Stabilize Some Flaky Tests (#4500)
Reduce Creation of HTTP Clients in Tests (#4493)
Update
pytest-xdistUsage (#4491)Fix Failing Tests by Making Them Independent (#4494)
Introduce Codecov’s Test Analysis (#4487)
Maintenance Work on
BotTests (#4489)Introduce
conftest.pyfor File Related Tests (#4488)Update Issue Templates to Use Issue Types (#4553)
Update Automation to Label Changes (#4552)
Dependency Updates¶
Version 21.6¶
Released 2024-09-19
This is the technical changelog for version 21.6. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
New Features¶
Minor Changes¶
Improve Type Completeness (#4466)
Internal Changes¶
Dependency Updates¶
Bump
pytestfrom 8.3.2 to 8.3.3 (#4475)
Version 21.5¶
Released 2024-09-01
This is the technical changelog for version 21.5. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
New Features¶
Documentation Improvements¶
Minor and Internal Changes¶
Dependency Updates¶
Update
cachetoolsrequirement from <5.5.0,>=5.3.3 to >=5.3.3,<5.6.0 (#4437)Bump
sphinxfrom 7.4.7 to 8.0.2 andfurofrom 2024.7.18 to 2024.8.6 (#4412)Bump
test-summary/actionfrom 2.3 to 2.4 (#4410)Bump
pytestfrom 8.2.2 to 8.3.2 (#4403)Bump
dependabot/fetch-metadatafrom 2.1.0 to 2.2.0 (#4411)Update
cachetoolsrequirement from ~=5.3.3 to >=5.3.3,<5.5.0 (#4390)Bump
sphinxfrom 7.3.7 to 7.4.7 (#4395)Bump
furofrom 2024.5.6 to 2024.7.18 (#4392)
Version 21.4¶
Released 2024-07-12
This is the technical changelog for version 21.4. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
Full Support for Bot API 7.5 (#4328, #4316, #4315, #4312 closes #4310, #4311)
Full Support for Bot API 7.6 (#4333 closes #4331, #4344, #4341, #4334, #4335, #4351, #4342, #4348)
Drop
python-telegram-bot-rawAnd Switch topyproject.tomlBased Packaging (#4288 closes #4129 and #4296)Deprecate Inclusion of
successful_paymentinMessage.effective_attachment(#4365 closes #4350)
New Features¶
Documentation Improvements¶
Internal Changes¶
Add
mise-en-placeto.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
SuccessfulPaymentTest (#4349)Small Fixes for
test_stars.py(#4347)Use Python 3.13 Beta 3 in Test Suite (#4336)
Dependency Updates¶
Version 21.3¶
Released 2024-06-07
This is the technical changelog for version 21.3. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
New Features¶
Add Parameter
chat_idtoChatMemberHandler(#4290 by uniquetrij closes #4287)
Documentation Improvements¶
Internal Changes¶
Dependency Updates¶
Bump
pytestfrom 8.2.0 to 8.2.1 (#4272)
Version 21.2¶
Released 2024-05-20
This is the technical changelog for version 21.2. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
New Features¶
Bug Fixes¶
Documentation Improvements¶
Documentation Improvements (#4217)
Internal Changes¶
Dependency Updates¶
Bump
furofrom 2024.4.27 to 2024.5.6 (#4252)pre-commitautoupdate (#4239)Bump
pytestfrom 8.1.1 to 8.2.0 (#4231)Bump
dependabot/fetch-metadatafrom 2.0.0 to 2.1.0 (#4228)Bump
pytest-asynciofrom 0.21.1 to 0.21.2 (#4232)Bump
pytest-xdistfrom 3.6.0 to 3.6.1 (#4233)Bump
furofrom 2024.1.29 to 2024.4.27 (#4230)Bump
srvaroa/labelerfrom 1.10.0 to 1.10.1 (#4227)Bump
pytestfrom 7.4.4 to 8.1.1 (#4218)Bump
sphinxfrom 7.2.6 to 7.3.7 (#4215)Bump
pytest-xdistfrom 3.5.0 to 3.6.0 (#4215)
Version 21.1.1¶
Released 2024-04-15
This is the technical changelog for version 21.1.1. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Bug Fixes¶
Minor Changes¶
Remove Deprecation Warning in
JobQueue.run_daily(#4206 by @Konano)Fix Annotation of
EncryptedCredentials.decrypted_secret(#4199 by @marinelay closes #4198)
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.
Major Changes¶
Minor Changes¶
New Features¶
Documentation Improvements¶
Documentation Improvements (#4171, #4158 by @teslaedison)
Internal Changes¶
Temporarily Mark Tests with
get_sticker_setas XFAIL due to API 7.2 Update (#4190)
Dependency Updates¶
Version 21.0.1¶
Released 2024-03-06
This is the technical changelog for version 21.0.1. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Bug Fixes¶
Remove
docsfrom Package (#4150)
Version 21.0¶
Released 2024-03-06
This is the technical changelog for version 21.0. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
New Features¶
Bug Fixes¶
Documentation Improvements¶
Internal Changes¶
Dependency Updates¶
Version 20.8¶
Released 2024-02-08
This is the technical changelog for version 20.8. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
Minor Changes¶
New Features¶
Add Parameter
patterntoPreCheckoutQueryHandlerandfilters.SuccessfulPayment(#4005 by @aelkheir closes #3752)Add Missing Conversions of
typeto Corresponding Enum fromtelegram.constants(#4067)Add Support for Unix Sockets to
Updater.start_webhook(#3986 closes #3978)Add
AsyncContextManageras Parent Class toBaseUpdateProcessor(#4001)
Documentation Improvements¶
Internal Changes¶
Drop Usage of DeepSource (#4100)
Improve Type Completeness & Corresponding Workflow (#4035)
Bump
ruffand Removesort-all(#4075)Move Handler Files to
_handlersSubdirectory (#4064 by @lucasmolinari closes #4060)Introduce
sort-allHook forpre-commit(#4052)Use Recommended
pre-commitMirror forblack(#4051)Remove Unused
DEFAULT_20(#3997)Migrate From
setup.cfgtopyproject.tomlWhere Possible (#4088)
Dependency Updates¶
Bump
blackandruff(#4089)Bump
srvaroa/labelerfrom 1.8.0 to 1.10.0 (#4048)Update
tornadorequirement from ~=6.3.3 to ~=6.4 (#3992)Bump
actions/stalefrom 8 to 9 (#4046)Bump
actions/setup-pythonfrom 4 to 5 (#4047)pre-commitautoupdate (#4101)Bump
actions/upload-artifactfrom 3 to 4 (#4045)pre-commitautoupdate (#3996)Bump
furofrom 2023.9.10 to 2024.1.29 (#4094)pre-commitautoupdate (#4043)Bump
codecov/codecov-actionfrom 3 to 4 (#4091)Bump
EndBug/add-and-commitfrom 9.1.3 to 9.1.4 (#4090)Update
httpxrequirement from ~=0.25.2 to ~=0.26.0 (#4024)Bump
pytestfrom 7.4.3 to 7.4.4 (#4056)Bump
srvaroa/labelerfrom 1.7.0 to 1.8.0 (#3993)Bump
test-summary/actionfrom 2.1 to 2.2 (#4044)Bump
dessant/lock-threadsfrom 4.0.1 to 5.0.1 (#3994)
Version 20.7¶
Released 2023-11-27
This is the technical changelog for version 20.7. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
New Features¶
Add
JobQueue.scheduler_configurationand Corresponding Warnings (#3913 closes #3837)Add Parameter
socket_optionstoHTTPXRequest(#3935 closes #2965)Add
ApplicationBuilder.(get_updates_)socket_options(#3943)Improve
write_timeoutHandling for Media Methods (#3952)Rename
proxy_urltoproxyand Allowhttpx.{Proxy, URL}as Input (#3939 closes #3844)
Bug Fixes & Changes¶
Documentation Improvements¶
Internal Changes¶
Adjust Tests to New Error Messages (#3970)
Dependency Updates¶
Bump
pytest-xdistfrom 3.3.1 to 3.4.0 (#3975)pre-commitautoupdate (#3967)Update
httpxrequirement from ~=0.25.1 to ~=0.25.2 (#3983)Bump
pytest-xdistfrom 3.4.0 to 3.5.0 (#3982)Update
httpxrequirement from ~=0.25.0 to ~=0.25.1 (#3961)Bump
srvaroa/labelerfrom 1.6.1 to 1.7.0 (#3958)Update
cachetoolsrequirement from ~=5.3.1 to ~=5.3.2 (#3954)Bump
pytestfrom 7.4.2 to 7.4.3 (#3953)
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¶
New Features¶
Minor Changes¶
Internal Changes¶
Verify Type Hints for Bot Method & Telegram Class Parameters (#3868)
Move Bot API Tests to Separate Workflow File (#3912)
Fix Failing
file_sizeTests (#3906)Set Threshold for DeepSource’s PY-R1000 to High (#3888)
One-Time Code Formatting Improvement via
--previewFlag ofblack(#3882)Move Dunder Methods to the Top of Class Bodies (#3883)
Remove Superfluous
Defaults.__ne__(#3884)
Dependency Updates¶
pre-commitautoupdate (#3876)Update
pre-commitDependencies (#3916)Bump
actions/checkoutfrom 3 to 4 (#3914)Update
httpxrequirement from ~=0.24.1 to ~=0.25.0 (#3891)Bump
furofrom 2023.8.19 to 2023.9.10 (#3890)Bump
sphinxfrom 7.2.5 to 7.2.6 (#3892)Update
tornadorequirement from ~=6.2 to ~=6.3.3 (#3675)Bump
pytestfrom 7.4.0 to 7.4.2 (#3881)
Version 20.5¶
Released 2023-09-03
This is the technical changelog for version 20.5. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
New Features¶
Minor Changes¶
Documentation Improvements¶
Dependency Updates¶
pre-commitautoupdate (#3824)Bump
srvaroa/labelerfrom 1.6.0 to 1.6.1 (#3870)Bump
sphinxfrom 7.0.1 to 7.1.1 (#3818)Bump
sphinxfrom 7.2.3 to 7.2.5 (#3869)Bump
furofrom 2023.5.20 to 2023.7.26 (#3817)Update
apschedulerrequirement from ~=3.10.3 to ~=3.10.4 (#3862)Bump
sphinxfrom 7.2.2 to 7.2.3 (#3861)Bump
pytest-asynciofrom 0.21.0 to 0.21.1 (#3801)Bump
sphinx-paramlinksfrom 0.5.4 to 0.6.0 (#3840)Update
apschedulerrequirement from ~=3.10.1 to ~=3.10.3 (#3851)Bump
furofrom 2023.7.26 to 2023.8.19 (#3850)Bump
sphinxfrom 7.1.2 to 7.2.2 (#3852)Bump
sphinxfrom 7.1.1 to 7.1.2 (#3827)
Version 20.4¶
Released 2023-07-09
This is the technical changelog for version 20.4. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
New Features¶
Minor Changes¶
Fix Inconsistent Type Hints for
timeoutParameter ofBot.get_updates(#3709 by @revolter)Use Explicit Optionals (#3692 by @MiguelX413)
Bug Fixes¶
Fix Wrong Warning Text in
KeyboardButton.__eq__(#3768)
Documentation Improvements¶
Explicitly set
allowed_updatesin Examples (#3741 by @Trifase closes #3726)Bump
furoandsphinx(#3719)Documentation Improvements (#3698, #3708 by @revolter, #3767)
Add Quotes for Installation Instructions With Optional Dependencies (#3780)
Exclude Type Hints from Stability Policy (#3712)
Set
httpxLogging Level to Warning in Examples (#3746 closes #3743)
Internal Changes¶
Drop a Legacy
pre-commit.ciConfiguration (#3697)Add Python 3.12 Beta to the Test Matrix (#3751)
Use Temporary Files for Testing File Downloads (#3777)
Auto-Update Changed Version in Other Files After Dependabot PRs (#3716)
Add More
ruffRules (#3763)Rename
_handler.pyto_basehandler.py(#3761)Automatically Label
pre-commit-ciPRs (#3713)Rework
pytestIntegration into GitHub Actions (#3776)Fix Two Bugs in GitHub Actions Workflows (#3739)
Dependency Updates¶
Update
cachetoolsrequirement from ~=5.3.0 to ~=5.3.1 (#3738)Update
aiolimiterrequirement from ~=1.0.0 to ~=1.1.0 (#3707)pre-commitautoupdate (#3791)Bump
sphinxcontrib-mermaidfrom 0.8.1 to 0.9.2 (#3737)Bump
pytest-xdistfrom 3.2.1 to 3.3.0 (#3705)Bump
srvaroa/labelerfrom 1.5.0 to 1.6.0 (#3786)Bump
dependabot/fetch-metadatafrom 1.5.1 to 1.6.0 (#3787)Bump
dessant/lock-threadsfrom 4.0.0 to 4.0.1 (#3785)Bump
pytestfrom 7.3.2 to 7.4.0 (#3774)Update
httpxrequirement from ~=0.24.0 to ~=0.24.1 (#3715)Bump
pytest-xdistfrom 3.3.0 to 3.3.1 (#3714)Bump
pytestfrom 7.3.1 to 7.3.2 (#3758)pre-commitautoupdate (#3747)
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.
Major Changes¶
New Features¶
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)
Dependencies¶
Version 20.2¶
Released 2023-03-25
This is the technical changelog for version 20.2. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
Minor Changes, Documentation Improvements and CI¶
Dependencies¶
Bump
pytest-asynciofrom 0.20.3 to 0.21.0 (#3624)Bump
furofrom 2022.12.7 to 2023.3.23 (#3625)Bump
pytest-xdistfrom 3.2.0 to 3.2.1 (#3606)pre-commitautoupdate (#3577)Update
apschedulerrequirement from ~=3.10.0 to ~=3.10.1 (#3572)Bump
pytestfrom 7.2.1 to 7.2.2 (#3573)Bump
pytest-xdistfrom 3.1.0 to 3.2.0 (#3550)Bump
sphinxcontrib-mermaidfrom 0.7.1 to 0.8 (#3549)
Version 20.1¶
Released 2023-02-09
This is the technical changelog for version 20.1. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
Full Support for Bot API 6.5 (#3530)
New Features¶
Documentation Improvements¶
Minor Changes, Documentation Improvements and CI¶
Update Copyright to 2023 (#3459)
Stabilize Tests on Closing and Hiding the General Forum Topic (#3460)
Fix Dependency Warning Typo (#3474)
Cache Dependencies on
GitHubActions (#3469)Store Documentation Builts as
GitHubActions Artifacts (#3468)Add
rufftopre-commitHooks (#3488)Improve Warning for
daysParameter ofJobQueue.run_daily(#3503)Improve Error Message for
NetworkError(#3505)Lock Inactive Threads Only Once Each Day (#3510)
Bump
pytestfrom 7.2.0 to 7.2.1 (#3513)Check for 3D Arrays in
check_keyboard_type(#3514)Explicit Type Annotations (#3508)
Increase Verbosity of Type Completeness CI Job (#3531)
Fix CI on Python 3.11 + Windows (#3547)
Dependencies¶
Bump
actions/stalefrom 6 to 7 (#3461)Bump
dessant/lock-threadsfrom 3.0.0 to 4.0.0 (#3462)pre-commitautoupdate (#3470)Update
httpxrequirement from ~=0.23.1 to ~=0.23.3 (#3489)Update
cachetoolsrequirement from ~=5.2.0 to ~=5.2.1 (#3502)Improve Config for
ruffand Bump tov0.0.222(#3507)Update
cachetoolsrequirement from ~=5.2.1 to ~=5.3.0 (#3520)Bump
isortto 5.12.0 (#3525)Update
apschedulerrequirement from ~=3.9.1 to ~=3.10.0 (#3532)pre-commitautoupdate (#3537)Update
cryptographyrequirement to >=39.0.1 to address Vulnerability (#3539)
Version 20.0¶
Released 2023-01-01
This is the technical changelog for version 20.0. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
Full Support For Bot API 6.4 (#3449)
Minor Changes, Documentation Improvements and CI¶
Documentation Improvements (#3428, #3423, #3429, #3441, #3404, #3443)
Allow
SequenceInput for Bot Methods (#3412)Update Link-Check CI and Replace a Dead Link (#3456)
Freeze Classes Without Arguments (#3453)
Add New Constants (#3444)
Override
Bot.__deepcopy__to RaiseTypeError(#3446)Add Log Decorator to
Bot.get_webhook_info(#3442)Add Documentation On Verifying Releases (#3436)
Drop Undocumented
Job.__lt__(#3432)
Dependencies¶
Version 20.0b0¶
Released 2022-12-15
This is the technical changelog for version 20.0b0. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
Make
TelegramObjectImmutable (#3249)
Minor Changes, Documentation Improvements and CI¶
Dependencies¶
Version 20.0a6¶
Released 2022-11-24
This is the technical changelog for version 20.0a6. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Bug Fixes¶
Version 20.0a5¶
Released 2022-11-22
This is the technical changelog for version 20.0a5. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
New Features¶
Add Properties for API Settings of
Bot(#3247)Add
chat_idandusernameParameters toChatJoinRequestHandler(#3261)Introduce
TelegramObject.api_kwargs(#3233)Add Two Constants Related to Local Bot API Servers (#3296)
Add
recursiveParameter toTelegramObject.to_dict()(#3276)Overhaul String Representation of
TelegramObject(#3234)Add Methods
Chat.mention_{html, markdown, markdown_v2}(#3308)Add
constants.MessageLimit.DEEP_LINK_LENGTH(#3315)Add Shortcut Parameters
caption,parse_modeandcaption_entitiestoBot.send_media_group(#3295)Add Several New Enums To Constants (#3351)
Bug Fixes¶
Documentation Improvements¶
Update PR Template (#3361)
Document Dunder Methods of
TelegramObject(#3319)Add Several References to Wiki pages (#3306)
Overhaul Search bar (#3218)
Unify Documentation of Arguments and Attributes of Telegram Classes (#3217, #3292, #3303, #3312, #3314)
Several Smaller Improvements (#3214, #3271, #3289, #3326, #3370, #3376, #3366)
Minor Changes, Documentation Improvements and CI¶
Improve Warning About Unknown
ConversationHandlerStates (#3242)Switch from Stale Bot to
GitHubActions (#3243)Bump Python 3.11 to RC2 in Test Matrix (#3246)
Make
Job.joba Property and MakeJobsHashable (#3250)Skip
JobQueueTests on Windows Again (#3280)Read-Only
CallbackDataCache(#3266)Type Hinting Fix for
Message.effective_attachment(#3294)Run Unit Tests in Parallel (#3283)
Update Test Matrix to Use Stable Python 3.11 (#3313)
Don’t Edit Objects In-Place When Inserting
ext.Defaults(#3311)Add a Test for
MessageAttachmentType(#3335)Add Three New Test Bots (#3347)
Improve Unit Tests Regarding
ChatMemberUpdated.difference(#3352)Flaky Unit Tests: Use
pytestMarker (#3354)Fix
DeepSourceIssues (#3357)Handle Lists and Tuples and Datetimes Directly in
TelegramObject.to_dict(#3353)Update Meta Config (#3365)
Merge
ChatDescriptionLimitEnum IntoChatLimit(#3377)
Dependencies¶
Bump
pytestfrom 7.1.2 to 7.1.3 (#3228)pre-commitUpdates (#3221)Bump
sphinxfrom 5.1.1 to 5.2.3 (#3269)Bump
furofrom 2022.6.21 to 2022.9.29 (#3268)Bump
actions/stalefrom 5 to 6 (#3277)pre-commitautoupdate (#3282)Bump
sphinxfrom 5.2.3 to 5.3.0 (#3300)Bump
pytest-asynciofrom 0.19.0 to 0.20.1 (#3299)Bump
pytestfrom 7.1.3 to 7.2.0 (#3318)Bump
pytest-xdistfrom 2.5.0 to 3.0.2 (#3317)pre-commitautoupdate (#3325)Bump
pytest-asynciofrom 0.20.1 to 0.20.2 (#3359)Update
httpxrequirement from ~=0.23.0 to ~=0.23.1 (#3373)
Version 20.0a4¶
Released 2022-08-27
This is the technical changelog for version 20.0a4. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Hot Fixes¶
Fix a Bug in
setup.pyRegarding Optional Dependencies (#3209)
Version 20.0a3¶
Released 2022-08-27
This is the technical changelog for version 20.0a3. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
Full Support for API 6.2 (#3195)
New Features¶
Bug Fixes¶
Minor Changes, Documentation Improvements and CI¶
Add Python 3.11 to Test Suite & Adapt Enum Behaviour (#3168)
Drop Manual Token Validation (#3167)
Simplify Unit Tests for
Bot.send_chat_action(#3151)Drop
pre-commitDependencies fromrequirements-dev.txt(#3120)Change Default Values for
concurrent_updatesandconnection_pool_size(#3127)Type Hinting Fixes (#3202)
Dependencies¶
Version 20.0a2¶
Released 2022-06-27
This is the technical changelog for version 20.0a2. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes¶
Full Support for API 6.1 (#3112)
New Features¶
Minor Changes, Documentation Improvements and CI¶
Version 20.0a1¶
Released 2022-06-09
This is the technical changelog for version 20.0a1. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes:¶
Drop Support for
ujsonand insteadBaseRequest.parse_json_payload(#3037, #3072)Drop
InputFile.is_image(#3053)Drop Explicit Type conversions in
__init__s (#3056)Handle List-Valued Attributes More Consistently (#3057)
Split
{Command, Prefix}HandlerAnd Make Attributes Immutable (#3045)Align Behavior Of
JobQueue.run_dailyWithcron(#3046)Make PTB Specific Keyword-Only Arguments for PTB Specific in Bot methods (#3035)
Adjust Equality Comparisons to Fit Bot API 6.0 (#3033)
Add Tuple Based Version Info (#3030)
Improve Type Annotations for
CallbackContextand Move Default Type Alias toContextTypes.DEFAULT_TYPE(#3017, #3023)Rename
Job.contexttoJob.data(#3028)Rename
HandlertoBaseHandler(#3019)
New Features:¶
Bug Fixes:¶
Dependencies:¶
Minor Changes, Documentation Improvements and CI:¶
Move Examples To Documentation (#3089)
Documentation Improvements and Update Dependencies (#3010, #3007, #3012, #3067, #3081, #3082)
Improve Some Unit Tests (#3026)
Update Code Quality dependencies (#3070, #3032,:pr:2998, #2999)
Don’t Set Signal Handlers On Windows By Default (#3065)
Split
{Command, Prefix}HandlerAnd Make Attributes Immutable (#3045)Apply
isortand Updatepre-commit.ciConfiguration (#3049)Adjust
pre-commitSettings forisort(#3043)Add Version Check to Examples (#3036)
Use
CollectionInstead ofListandTuple(#3025)Remove Client-Side Parameter Validation (#3024)
Don’t Pass Default Values of Optional Parameters to Telegram (#2978)
Stabilize
Application.run_*on Python 3.7 (#3009)Ignore Code Style Commits in
git blame(#3003)Adjust Tests to Changed API Behavior (#3002)
Version 20.0a0¶
Released 2022-05-06
This is the technical changelog for version 20.0a0. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes:¶
Refactor Initialization of Persistence Classes (#2604)
Drop Non-
CallbackContextAPI (#2617)Remove
__dict__from__slots__and drop Python 3.6 (#2619, #2636)Move and Rename
TelegramDecryptionErrortotelegram.error.PassportDecryptionError(#2621)Make
BasePersistenceMethods Abstract (#2624)Remove
day_is_strictargument ofJobQueue.run_monthly(#2634 by iota-008)Move
Defaultstotelegram.ext(#2648)Switch to
asyncioand Refactor PTBs Architecture (#2731)Improve
Job.__getattr__(#2832)Remove
telegram.ReplyMarkup(#2870)Persistence of
Bots: Refactor Automatic Replacement and Integration withTelegramObject(#2893)
New Features:¶
Introduce Builder Pattern (#2646)
Introduce
Enumsfortelegram.constants(#2708)Accept File Paths for
private_key(#2724)Associate
Jobswithchat/user_id(#2731)Convenience Functionality for
ChatInviteLinks(#2782)Add
Dispatcher.add_handlers(#2823)Improve Error Messages in
CommandHandler.__init__(#2837)Defaults.protect_content(#2840)Add
Dispatcher.migrate_chat_data(#2848 by DonalDuck004)Add Method
drop_chat/user_datatoDispatcherand Persistence (#2852)Add methods
ChatPermissions.{all, no}_permissions(#2948)Full Support for API 6.0 (#2956)
Add Python 3.10 to Test Suite (#2968)
Bug Fixes & Minor Changes:¶
Improve Type Hinting for
CallbackContext(#2587 by revolter)Fix Signatures and Improve
test_official(#2643)Refine
Dispatcher.dispatch_error(#2660)Make
InlineQuery.answerRaiseValueError(#2675)Improve Signature Inspection for Bot Methods (#2686)
Introduce
TelegramObject.set/get_bot(#2712 by zpavloudis)Improve Subscription of
TelegramObject(#2719 by SimonDamberg)Use Enums for Dynamic Types & Rename Two Attributes in
ChatMember(#2817)Return Plain Dicts from
BasePersistence.get_*_data(#2873)Fix a Bug in
ChatMemberUpdated.difference(#2947)Update Dependency Policy (#2958)
Internal Restructurings & Improvements:¶
CI, Code Quality & Test Suite Improvements:¶
Add Custom
pytestMarker to Ease Development (#2628)Pass Failing Jobs to Error Handlers (#2692)
Update Notification Workflows (#2695)
Use Error Messages for
pylintInstead of Codes (#2700 by Piraty)Update Code Quality Dependencies (#2748)
Improve Code Quality (#2783)
Update
pre-commitSettings & Improve a Test (#2796)Improve Code Quality & Test Suite (#2843)
Fix failing animation tests (#2865)
Update and Expand Tests & pre-commit Settings and Improve Code Quality (#2925)
Extend Code Formatting With Black (#2972)
Update Workflow Permissions (#2984)
Adapt Tests to Changed
Bot.get_fileBehavior (#2995)
Documentation Improvements:¶
Doc Fixes (#2597)
Add Code Comment Guidelines to Contribution Guide (#2612)
Add Cross-References to External Libraries & Other Documentation Improvements (#2693, #2691 by joesinghh, #2739 by eldbud)
Use Furo Theme, Make Parameters Referenceable, Add Documentation Building to CI, Improve Links to Source Code & Other Improvements (#2856, #2798, #2854, #2841)
Documentation Fixes & Improvements (#2822)
Overhaul Readmes, Update RTD Startpage & Other Improvements (#2969)
Version 13.11¶
Released 2022-02-02
This is the technical changelog for version 13.11. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes:
Full Support for Bot API 5.7 (#2881)
Version 13.10¶
Released 2022-01-03
This is the technical changelog for version 13.10. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes:
Full Support for API 5.6 (#2835)
Minor Changes & Doc fixes:
Version 13.9¶
Released 2021-12-11
This is the technical changelog for version 13.9. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes:
Full Support for Api 5.5 (#2809)
Minor Changes
Adjust Automated Locking of Inactive Issues (#2775)
Version 13.8.1¶
Released 2021-11-08
This is the technical changelog for version 13.8.1. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Doc fixes:
Add
ChatJoinRequest(Handler)to Docs (#2771)
Version 13.8¶
Released 2021-11-08
This is the technical changelog for version 13.8. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes:
Full support for API 5.4 (#2767)
Minor changes, CI improvements, Doc fixes and Type hinting:
Version 13.7¶
Released 2021-07-01
This is the technical changelog for version 13.7. More elaborate release notes can be found in the news channel @pythontelegrambotchannel.
Major Changes:
Full support for Bot API 5.3 (#2572)
Bug Fixes:
Fix Bug in
BasePersistence.insert/replace_botfor Objects with__dict__in their slots (#2561)Remove Incorrect Warning About
DefaultsandExtBot(#2553)
Minor changes, CI improvements, Doc fixes and Type hinting:
Version 13.6¶
Released 2021-06-06
New Features:
Arbitrary
callback_data(#1844)Add
ContextTypes&BasePersistence.refresh_user/chat/bot_data(#2262)Add
Filters.attachment(#2528)Add
patternArgument toChosenInlineResultHandler(#2517)
Major Changes:
Add
slots(#2345)
Minor changes, CI improvements, Doc fixes and Type hinting:
Add
max_connectionsParameter toUpdater.start_webhook(#2547)Fix for
Promise.done_callback(#2544)Increase Test Coverage of
CallbackQueryHandler(#2520)Fix
send_phone_number_to_providerargument forBot.send_invoice(#2527)Handle Classes as Input for
BasePersistence.replace/insert_bot(#2523)Bump Tornado Version and Remove Workaround from #2067 (#2494)
Version 13.5¶
Released 2021-04-30
Major Changes:
Full support of Bot API 5.2 (#2489).
Note
The
start_parameterargument ofBot.send_invoiceand the corresponding shortcuts is now optional, so the order of parameters had to be changed. Make sure to update your method calls accordingly.Update
ChatActions, DeprecatingChatAction.RECORD_AUDIOandChatAction.UPLOAD_AUDIO(#2460)
New Features:
Convenience Utilities & Example for Handling
ChatMemberUpdated(#2490)Filters.forwarded_from(#2446)
Minor changes, CI improvements, Doc fixes and Type hinting:
Version 13.4.1¶
Released 2021-03-14
Hot fix release:
Fixed a bug in
setup.py(#2431)
Version 13.4¶
Released 2021-03-14
Major Changes:
Full support of Bot API 5.1 (#2424)
Minor changes, CI improvements, doc fixes and type hinting:
Version 13.3¶
Released 2021-02-19
Major Changes:
Make
cryptographyDependency Optional & Refactor Some Tests (#2386, #2370)Deprecate
MessageQueue(#2393)
Bug Fixes:
Minor changes:
Doc Fixes (#2359)
Version 13.2¶
Released 2021-02-02
Major Changes:
New Features:
Add Missing Shortcuts to
Message(#2330)Rich Comparison for
Bot(#2320)Add
run_asyncParameter toConversationHandler(#2292)Add New Shortcuts to
Chat(#2291)Add New Constant
MAX_ANSWER_CALLBACK_QUERY_TEXT_LENGTH(#2282)Allow Passing Custom Filename For All Media (#2249)
Handle Bytes as File Input (#2233)
Bug Fixes:
Fix Escaping in Nested Entities in
MessageProperties (#2312)Adjust Calling of
Dispatcher.update_persistence(#2285)Add
quotekwarg toMessage.reply_copy(#2232)ConversationHandler: Docs &edited_channel_postbehavior (#2339)
Minor changes, CI improvements, doc fixes and type hinting:
Reduce Usage of
typing.Any(#2321)Extend Deeplinking Example (#2335)
Add pyupgrade to pre-commit Hooks (#2301)
Add PR Template (#2299)
Drop Nightly Tests & Update Badges (#2323)
Change Order of Class DocStrings (#2256)
Add macOS to Test Matrix (#2266)
Start Using Versioning Directives in Docs (#2252)
Improve Annotations & Docs of Handlers (#2243)
Version 13.1¶
Released 2020-11-29
Major Changes:
Full support of Bot API 5.0 (#2181, #2186, #2190, #2189, #2183, #2184, #2188, #2185, #2192, #2196, #2193, #2223, #2199, #2187, #2147, #2205)
New Features:
Add
Defaults.run_async(#2210)Improve and Expand
CallbackQueryShortcuts (#2172)Add XOR Filters and make
Filters.namea Property (#2179)Add
Filters.document.file_extension(#2169)Add
Filters.caption_regex(#2163)Add
Filters.chat_type(#2128)Handle Non-Binary File Input (#2202)
Bug Fixes:
Improve Handling of Custom Objects in
BasePersistence.insert/replace_bot(#2151)Fix bugs in
replace/insert_bot(#2218)
Minor changes, CI improvements, doc fixes and type hinting:
Use F-Strings Where Possible (#2222)
Rename kwargs to _kwargs where possible (#2182)
Comply with PEP561 (#2168)
Improve Code Quality (#2131)
Update Wheel Settings (#2142)
Update
timerbot.pytov13.0(#2149)Overhaul Constants (#2137)
Add Python 3.9 to Test Matrix (#2132)
Switch Codecov to
GitHubAction (#2127)Specify Required pytz Version (#2121)
Version 13.0¶
Released 2020-10-07
For a detailed guide on how to migrate from v12 to v13, see this wiki page.
Major Changes:
Deprecate old-style callbacks, i.e. set
use_context=Trueby default (#2050)Refactor Handling of Message VS Update Filters (#2032)
Deprecate
Message.default_quote(#1965)Refactor persistence of Bot instances (#1994)
Refactor
JobQueue(#1981)Refactor handling of kwargs in Bot methods (#1924)
Refactor
Dispatcher.run_async, deprecating the@run_asyncdecorator (#2051)
New Features:
Type Hinting (#1920)
Automatic Pagination for
answer_inline_query(#2072)Defaults.tzinfo(#2042)Extend rich comparison of objects (#1724)
Add
Filters.via_bot(#2009)Add missing shortcuts (#2043)
Allow
DispatcherHandlerStopinConversationHandler(#2059)Make Errors picklable (#2106)
Minor changes, CI improvements, doc fixes or bug fixes:
Fix Webhook not working on Windows with Python 3.8+ (#2067)
Fix setting thumbs with
send_media_group(#2093)Make
MessageHandlerfilter forFilters.updatefirst (#2085)Fix
PicklePersistence.flush()with onlybot_data(#2017)Add test for clean argument of
Updater.start_polling/webhook(#2002)Doc fixes, refinements and additions (#2005, #2008, #2089, #2094, #2090)
Refine
pollbot.pyexample (#2047)Refine Filters in examples (#2027)
Rename
echobotexamples (#2025)Use Lock-Bot to lock old threads (#2048, #2052, #2049, #2053)
Version 12.8¶
Released 2020-06-22
Major Changes:
Remove Python 2 support (#1715)
Bot API 4.9 support (#1980)
IDs/Usernames of
Filters.userandFilters.chatcan now be updated (#1757)
Minor changes, CI improvements, doc fixes or bug fixes:
Version 12.7¶
Released 2020-05-02
Major Changes:
Bot API 4.8 support. Note: The
Diceobject now has a second positional argumentemoji. This is relevant, if you instantiateDiceobjects manually. (#1917)Added
tzinfoargument tohelpers.from_timestamp. It now returns an timezone aware object. This is relevant forMessage.{date,forward_date,edit_date},Poll.close_dateandChatMember.until_date(#1621)
New Features:
New method
run_monthlyfor theJobQueue(#1705)Job.next_tnow gives the datetime of the jobs next execution (#1685)
Minor changes, CI improvements, doc fixes or bug fixes:
Version 12.6.1¶
Released 2020-04-11
Bug fixes:
Fix serialization of
reply_markupin media messages (#1889)
Version 12.6¶
Released 2020-04-10
Major Changes:
Bot API 4.7 support. Note: In
Bot.create_new_sticker_setandBot.add_sticker_to_set, the order of the parameters had be changed, as thepng_stickerparameter is now optional. (#1858)
Minor changes, CI improvements or bug fixes:
Add tests for
swtich_inline_query(_current_chat)with empty string (#1635)Update issue templates (#1880)
Favor concrete types over “Iterable” (#1882)
Pass last valid
CallbackContexttoTIMEOUThandlers ofConversationHandler(#1826)Tweak handling of persistence and update persistence after job calls (#1827)
Use checkout@v2 for GitHub actions (#1887)
Version 12.5.1¶
Released 2020-03-30
Minor changes, doc fixes or bug fixes:
Add missing docs for PollHandler and PollAnswerHandler (#1853)
Fix wording in Filters docs (#1855)
Reorder tests to make them more stable (#1835)
Make ConversationHandler attributes immutable (#1756)
Make PrefixHandler attributes command and prefix editable (#1636)
Fix UTC as default tzinfo for Job (#1696)
Version 12.5¶
Released 2020-03-29
New Features:
Bot.link gives the t.me link of the bot (#1770)
Major Changes:
Minor changes, CI improvements or bug fixes:
Update pre-commit config file (#1787)
Remove builtin names (#1792)
Use stale bot for auto closing stale issues (#1820, #1829, #1840)
Fix typo in edit_message_media (#1779)
In examples, answer CallbackQueries and use edit_message_text shortcut (#1721)
Revert accidental change in vendored urllib3 (#1775)
Version 12.4.2¶
Released 2020-02-10
Bug Fixes
Version 12.4.1¶
Released 2020-02-08
This is a quick release for #1744 which was accidently left out of v12.4.0 though mentioned in the release notes.
Version 12.4.0¶
Released 2020-02-08
New features:
Set default values for arguments appearing repeatedly. We also have a wiki page for the new defaults. (#1490)
Store data in
CallbackContext.bot_datato access it in every callback. Also persists. (#1325)Filters.pollallows only messages containing a poll (#1673)
Major changes:
Filters.textnow accepts messages that start with a slash, becauseCommandHandlerchecks forMessageEntity.BOT_COMMANDsince v12. This might lead to your MessageHandlers receiving more updates than before (#1680).Filters.commandnew checks forMessageEntity.BOT_COMMANDinstead of just a leading slash. Also byFilters.command(False)you can now filters for messages containing a command anywhere in the text (#1744).
Minor changes, CI improvements or bug fixes:
Add
disptacherargument toUpdaterto allow passing a customizedDispatcher(#1484)Add missing names for
Filters(#1632)Documentation fixes (#1624, #1647, #1669, #1703, #1718, #1734, #1740, #1642, #1739, #1746)
CI improvements (#1716, #1731, #1738, #1748, #1749, #1750, #1752)
Fix spelling issue for
encode_conversations_to_json(#1661)Remove double assignement of
Dispatcher.job_queue(#1698)Expose dispatcher as property for
CallbackContext(#1684)Fix
Nonecheck inJobQueue._put()(#1707)Log datetimes correctly in
JobQueue(#1714)Fix false
Message.linkcreation for private groups (#1741)Add option
--with-upstream-urllib3to setup.py to allow using non-vendored version (#1725)Fix persistence for nested
ConversationHandlers(#1679)Improve handling of non-decodable server responses (#1623)
Fix download for files without
file_path(#1591)test_webhook_invalid_posts is now considered flaky and retried on failure (#1758)
Version 12.3.0¶
Released 2020-01-11
New features:
Filters.caption allows only messages with caption (#1631).
Filter for exact messages/captions with new capability of Filters.text and Filters.caption. Especially useful in combination with ReplyKeyboardMarkup. (#1631).
Major changes:
Fix inconsistent handling of naive datetimes (#1506).
Minor changes, CI improvements or bug fixes:
Documentation fixes (#1558, #1569, #1579, #1572, #1566, #1577, #1656).
Add mutex protection on ConversationHandler (#1533).
Add MAX_PHOTOSIZE_UPLOAD constant (#1560).
Add args and kwargs to Message.forward() (#1574).
Transfer to GitHub Actions CI (#1555, #1556, #1605, #1606, #1607, #1612, #1615, #1645).
Fix deprecation warning with Py3.8 by vendored urllib3 (#1618).
Simplify assignements for optional arguments (#1600)
Allow private groups for Message.link (#1619).
Fix wrong signature call for ConversationHandler.TIMEOUT handlers (#1653).
Version 12.2.0¶
Released 2019-10-14
New features:
Nested ConversationHandlers (#1512).
Minor changes, CI improvments or bug fixes:
Fix CI failures due to non-backward compat attrs depndency (#1540).
travis.yaml: TEST_OFFICIAL removed from allowed_failures.
Fix typos in examples (#1537).
Fix Bot.to_dict to use proper first_name (#1525).
Refactor
test_commandhandler.py(#1408).Add Python 3.8 (RC version) to Travis testing matrix (#1543).
test_bot.py: Add to_dict test (#1544).
Flake config moved into setup.cfg (#1546).
Version 12.1.1¶
Released 2019-09-18
Hot fix release
Fixed regression in the vendored urllib3 (#1517).
Version 12.1.0¶
Released 2019-09-13
Major changes:
Add get_file method to Animation & ChatPhoto. Add, get_small_file & get_big_file methods to ChatPhoto (#1489)
Tools for deep linking (#1049)
Minor changes and/or bug fixes:
Version 12.0.0¶
Released 2019-08-29
Well… This felt like decades. But here we are with a new release.
Expect minor releases soon (mainly complete Bot API 4.4 support)
Major and/or breaking changes:
Context based callbacks
Persistence
PrefixHandler added (Handler overhaul)
Deprecation of RegexHandler and edited_messages, channel_post, etc. arguments (Filter overhaul)
Various ConversationHandler changes and fixes
Bot API 4.1, 4.2, 4.3 support
Python 3.4 is no longer supported
Error Handler now handles all types of exceptions (#1485)
Return UTC from from_timestamp() (#1485)
See the wiki page at https://github.com/python-telegram-bot/python-telegram-bot/wiki/Transition-guide-to-Version-12.0 for a detailed guide on how to migrate from version 11 to version 12.
Context based callbacks (#1100)¶
Use of
pass_in handlers is deprecated.Instead use
use_context=TrueonUpdaterorDispatcherand change callback from (bot, update, others…) to (update, context).This also applies to error handlers
Dispatcher.add_error_handlerand JobQueue jobs (change (bot, job) to (context) here).For users with custom handlers subclassing Handler, this is mostly backwards compatible, but to use the new context based callbacks you need to implement the new collect_additional_context method.
Passing bot to
JobQueue.__init__is deprecated. Use JobQueue.set_dispatcher with a dispatcher instead.Dispatcher makes sure to use a single CallbackContext for a entire update. This means that if an update is handled by multiple handlers (by using the group argument), you can add custom arguments to the CallbackContext in a lower group handler and use it in higher group handler. NOTE: Never use with @run_async, see docs for more info. (#1283)
If you have custom handlers they will need to be updated to support the changes in this release.
Update all examples to use context based callbacks.
Persistence (#1017)¶
Added PicklePersistence and DictPersistence for adding persistence to your bots.
BasePersistence can be subclassed for all your persistence needs.
Add a new example that shows a persistent ConversationHandler bot
Handler overhaul (#1114)¶
CommandHandler now only triggers on actual commands as defined by telegram servers (everything that the clients mark as a tabable link).
PrefixHandler can be used if you need to trigger on prefixes (like all messages starting with a “/” (old CommandHandler behaviour) or even custom prefixes like “#” or “!”).
Filter overhaul (#1221)¶
RegexHandler is deprecated and should be replaced with a MessageHandler with a regex filter.
Use update filters to filter update types instead of arguments (message_updates, channel_post_updates and edited_updates) on the handlers.
Completely remove allow_edited argument - it has been deprecated for a while.
data_filters now exist which allows filters that return data into the callback function. This is how the regex filter is implemented.
All this means that it no longer possible to use a list of filters in a handler. Use bitwise operators instead!
ConversationHandler¶
Remove
run_async_timeoutandtimed_out_behaviorarguments (#1344)Replace with
WAITINGconstant and behavior from states (#1344)Only emit one warning for multiple CallbackQueryHandlers in a ConversationHandler (#1319)
Use warnings.warn for ConversationHandler warnings (#1343)
Fix unresolvable promises (#1270)
Bug fixes & improvements¶
Handlers should be faster due to deduped logic.
Avoid compiling compiled regex in regex filter. (#1314)
Add missing
left_chat_memberto Message.MESSAGE_TYPES (#1336)Make custom timeouts actually work properly (#1330)
Add convenience classmethods (from_button, from_row and from_column) to InlineKeyboardMarkup
Small typo fix in setup.py (#1306)
Add Conflict error (HTTP error code 409) (#1154)
Change MAX_CAPTION_LENGTH to 1024 (#1262)
Allow filenames without dots in them when sending files (#1228)
Fix uploading files with unicode filenames (#1214)
Replace http.server with Tornado (#1191)
Allow SOCKSConnection to parse username and password from URL (#1211)
Fix for arguments in passport/data.py (#1213)
Improve message entity parsing by adding text_mention (#1206)
Merged filters short-circuit (#1350)
Fix webhook listen with tornado (#1383)
Call task_done() on update queue after update processing finished (#1428)
Fix send_location() - latitude may be 0 (#1437)
Make MessageEntity objects comparable (#1465)
Add prefix to thread names (#1358)
Buf fixes since v12.0.0b1¶
Fix setting bot on ShippingQuery (#1355)
Fix _trigger_timeout() missing 1 required positional argument: ‘job’ (#1367)
Add missing message.text check in PrefixHandler check_update (#1375)
Make updates persist even on DispatcherHandlerStop (#1463)
Dispatcher force updating persistence object’s chat data attribute(#1462)
Internal improvements¶
Finally fix our CI builds mostly (too many commits and PRs to list)
Use multiple bots for CI to improve testing times significantly.
Allow pypy to fail in CI.
Remove the last CamelCase CheckUpdate methods from the handlers we missed earlier.
test_official is now executed in a different job
Version 11.1.0¶
Released 2018-09-01
Fixes and updates for Telegram Passport: (#1198)
Fix passport decryption failing at random times
Added support for middle names.
Added support for translations for documents
Add errors for translations for documents
Added support for requesting names in the language of the user’s country of residence
Replaced the payload parameter with the new parameter nonce
Add hash to EncryptedPassportElement
Version 11.0.0¶
Released 2018-08-29
Fully support Bot API version 4.0! (also some bugfixes :))
Telegram Passport (#1174):
- Add full support for telegram passport.
New types: PassportData, PassportFile, EncryptedPassportElement, EncryptedCredentials, PassportElementError, PassportElementErrorDataField, PassportElementErrorFrontSide, PassportElementErrorReverseSide, PassportElementErrorSelfie, PassportElementErrorFile and PassportElementErrorFiles.
New bot method: set_passport_data_errors
New filter: Filters.passport_data
Field passport_data field on Message
PassportData can be easily decrypted.
PassportFiles are automatically decrypted if originating from decrypted PassportData.
See new passportbot.py example for details on how to use, or go to our telegram passport wiki page for more info
NOTE: Passport decryption requires new dependency cryptography.
Inputfile rework (#1184):
Change how Inputfile is handled internally
This allows support for specifying the thumbnails of photos and videos using the thumb= argument in the different send_ methods.
Also allows Bot.send_media_group to actually finally send more than one media.
Add thumb to Audio, Video and Videonote
Add Bot.edit_message_media together with InputMediaAnimation, InputMediaAudio, and inputMediaDocument.
Other Bot API 4.0 changes:
Add forusquare_type to Venue, InlineQueryResultVenue, InputVenueMessageContent, and Bot.send_venue. (#1170)
Add vCard support by adding vcard field to Contact, InlineQueryResultContact, InputContactMessageContent, and Bot.send_contact. (#1166)
- Support new message entities: CASHTAG and PHONE_NUMBER. (#1179)
Cashtag seems to be things like $USD and $GBP, but it seems telegram doesn’t currently send them to bots.
Phone number also seems to have limited support for now
Add Bot.send_animation, add width, height, and duration to Animation, and add Filters.animation. (#1172)
Non Bot API 4.0 changes:
Version 10.1.0¶
Released 2018-05-02
Fixes changing previous behaviour:
Fixes:
Version 10.0.2¶
Released 2018-04-17
Important fix:
Handle utf8 decoding errors (#1076)
New features:
Added Filter.regex (#1028)
Filters for Category and file types (#1046)
Added video note filter (#1067)
Fixes:
Fix in telegram.Message (#1042)
Make chat_id a positional argument inside shortcut methods of Chat and User classes (#1050)
Make Bot.full_name return a unicode object. (#1063)
CommandHandler faster check (#1074)
Correct documentation of Dispatcher.add_handler (#1071)
Various small fixes to documentation.
Version 10.0.1¶
Released 2018-03-05
Fixes:
Version 10.0.0¶
Released 2018-03-02
Non backward compatabile changes and changed defaults
JobQueue: Remove deprecated prevent_autostart & put() (PR #1012)
Bot, Updater: Remove deprecated network_delay (PR #1012)
Remove deprecated Message.new_chat_member (PR #1012)
Retry bootstrap phase indefinitely (by default) on network errors (PR #1018)
New Features
Support v3.6 API (PR #1006)
User.full_name convinience property (PR #949)
Add send_phone_number_to_provider and send_email_to_provider arguments to send_invoice (PR #986)
Bot: Add shortcut methods reply_{markdown,html} (PR #827)
Bot: Add shortcut method reply_media_group (PR #994)
Added utils.helpers.effective_message_type (PR #826)
Bot.get_file now allows passing a file in addition to file_id (PR #963)
Add .get_file() to Audio, Document, PhotoSize, Sticker, Video, VideoNote and Voice (PR #963)
Add .send_*() methods to User and Chat (PR #963)
Get jobs by name (PR #1011)
Add Message caption html/markdown methods (PR #1013)
File.download_as_bytearray - new method to get a d/led file as bytearray (PR #1019)
File.download(): Now returns a meaningful return value (PR #1019)
Added conversation timeout in ConversationHandler (PR #895)
Changes
Store bot in PreCheckoutQuery (PR #953)
Updater: Issue INFO log upon received signal (PR #951)
JobQueue: Thread safety fixes (PR #977)
WebhookHandler: Fix exception thrown during error handling (PR #985)
Explicitly check update.effective_chat in ConversationHandler.check_update (PR #959)
Updater: Better handling of timeouts during get_updates (PR #1007)
Remove unnecessary to_dict() (PR #834)
CommandHandler - ignore strings in entities and “/” followed by whitespace (PR #1020)
Documentation & style fixes (PR #942, PR #956, PR #962, PR #980, PR #983)
Version 9.0.0¶
Released 2017-12-08
Breaking changes (possibly)
Drop support for python 3.3 (PR #930)
New Features
Support Bot API 3.5 (PR #920)
Changes
Version 8.1.1¶
Released 2017-10-15
Fix Commandhandler crashing on single character messages (PR #873).
Version 8.1.0¶
Released 2017-10-14
New features - Support Bot API 3.4 (PR #865).
Changes - MessageHandler & RegexHandler now consider channel_updates. - Fix command not recognized if it is directly followed by a newline (PR #869). - Removed Bot._message_wrapper (PR #822). - Unitests are now also running on AppVeyor (Windows VM). - Various unitest improvements. - Documentation fixes.
Version 8.0.0¶
Released 2017-09-01
New features
Fully support Bot Api 3.3 (PR #806).
DispatcherHandlerStop (see docs).
Regression fix for text_html & text_markdown (PR #777).
Added effective_attachment to message (PR #766).
Non backward compatible changes
Removed Botan support from the library (PR #776).
Fully support Bot Api 3.3 (PR #806).
Remove de_json() (PR #789).
Changes
Sane defaults for tcp socket options on linux (PR #754).
Add RESTRICTED as constant to ChatMember (PR #761).
Add rich comparison to CallbackQuery (PR #764).
Fix get_game_high_scores (PR #771).
Warn on small con_pool_size during custom initalization of Updater (PR #793).
Catch exceptions in error handlerfor errors that happen during polling (PR #810).
For testing we switched to pytest (PR #788).
Lots of small improvements to our tests and documentation.
Version 7.0.1¶
Released 2017-07-28
Fix TypeError exception in RegexHandler (PR #751).
Small documentation fix (PR #749).
Version 7.0.0¶
Released 2017-07-25
Fully support Bot API 3.2.
New filters for handling messages from specific chat/user id (PR #677).
Add the possibility to add objects as arguments to send_* methods (PR #742).
Fixed download of URLs with UTF-8 chars in path (PR #688).
Fixed URL parsing for
Messagetext properties (PR #689).Fixed args dispatching in
MessageQueue’s decorator (PR #705).Fixed regression preventing IPv6 only hosts from connnecting to Telegram servers (Issue #720).
ConvesationHandler - check if a user exist before using it (PR #699).
Removed deprecated
telegram.Emoji.Removed deprecated
Botanimport fromutils(Botanis still available throughcontrib).Removed deprecated
ReplyKeyboardHide.Removed deprecated
edit_messageargument ofbot.set_game_score.Internal restructure of files.
Improved documentation.
Improved unitests.
Pre-version 7.0¶
2017-06-18
Released 6.1.0
Fully support Bot API 3.0
Add more fine-grained filters for status updates
Bug fixes and other improvements
2017-05-29
Released 6.0.3
Faulty PyPI release
2017-05-29
Released 6.0.2
Avoid confusion with user’s
urllib3by renaming vendoredurllib3toptb_urllib3
2017-05-19
Released 6.0.1
Add support for
User.language_codeFix
Message.text_htmlandMessage.text_markdownfor messages with emoji
2017-05-19
Released 6.0.0
Add support for Bot API 2.3.1
Add support for
deleteMessageAPI methodNew, simpler API for
JobQueue- #484Download files into file-like objects - #459
Use vendor
urllib3to address issues with timeouts - The default timeout for messages is now 5 seconds. For sending media, the default timeout is now 20 seconds.String attributes that are not set are now
Noneby default, instead of empty stringsAdd
text_markdownandtext_htmlproperties toMessage- #507Add support for Socks5 proxy - #518
Add support for filters in
CommandHandler- #536Add the ability to invert (not) filters - #552
Add
Filters.groupandFilters.privateCompatibility with GAE via
urllib3.contribpackage - #583Add equality rich comparision operators to telegram objects - #604
Several bugfixes and other improvements
Remove some deprecated code
2017-04-17
Released 5.3.1
Hotfix release due to bug introduced by urllib3 version 1.21
2016-12-11
Released 5.3
Implement API changes of November 21st (Bot API 2.3)
JobQueuenow supportsdatetime.timedeltain addition to secondsJobQueuenow supports running jobs only on certain daysNew
Filters.replyfilterBugfix for
Message.edit_reply_markupOther bugfixes
2016-10-25
Released 5.2
Implement API changes of October 3rd (games update)
Add
Message.edit_*methodsFilters for the
MessageHandlercan now be combined using bitwise operators (& and |)Add a way to save user- and chat-related data temporarily
Other bugfixes and improvements
2016-09-24
Released 5.1
Drop Python 2.6 support
Deprecate
telegram.EmojiUse
ujsonif availableAdd instance methods to
Message,Chat,User,InlineQueryandCallbackQueryRegEx filtering for
CallbackQueryHandlerandInlineQueryHandlerNew
MessageHandlerfilters:forwardedandentityAdd
Message.get_entityto correctly handle UTF-16 codepoints andMessageEntityoffsetsFix bug in
ConversationHandlerwhen first handler ends the conversationAllow multiple
DispatcherinstancesAdd
ChatMigratedExceptionProperly split and handle arguments in
CommandHandler
2016-07-15
Released 5.0
Rework
JobQueueIntroduce
ConversationHandlerIntroduce
telegram.constants- #342
2016-07-12
Released 4.3.4
Fix proxy support with
urllib3when proxy requires auth
2016-07-08
Released 4.3.3
Fix proxy support with
urllib3
2016-07-04
Released 4.3.2
Fix: Use
timeoutparameter in all API methods
2016-06-29
Released 4.3.1
Update wrong requirement:
urllib3>=1.10
2016-06-28
Released 4.3
Use
urllib3.PoolManagerfor connection re-useRewrite
run_asyncdecorator to re-use threadsNew requirements:
urllib3andcertifi
2016-06-10
Released 4.2.1
Fix
CallbackQuery.to_dict()bug (thanks to @jlmadurga)Fix
editMessageTextexception when receiving aCallbackQuery
2016-05-28
Released 4.2
Implement Bot API 2.1
Move
botanmodule totelegram.contribNew exception type:
BadRequest
2016-05-22
Released 4.1.2
Fix
MessageEntitydecoding with Bot API 2.1 changes
2016-05-16
Released 4.1.1
Fix deprecation warning in
Dispatcher
2016-05-15
Released 4.1
Implement API changes from May 6, 2016
Fix bug when
start_pollingwithclean=TrueMethods now have snake_case equivalent, for example
telegram.Bot.send_messageis the same astelegram.Bot.sendMessage
2016-05-01
Released 4.0.3
Add missing attribute
locationtoInlineQuery
2016-04-29
Released 4.0.2
Bugfixes
KeyboardReplyMarkupnow acceptsstragain
2016-04-27
Released 4.0.1
Implement Bot API 2.0
Almost complete recode of
DispatcherPlease read the Transition Guide to 4.0
- Changes from 4.0rc1
The syntax of filters for
MessageHandler(upper/lower cases)Handler groups are now identified by
intonly, and ordered
Note: v4.0 has been skipped due to a PyPI accident
2016-04-22
Released 4.0rc1
Implement Bot API 2.0
Almost complete recode of
DispatcherPlease read the Transistion Guide to 4.0
2016-03-22
Released 3.4
Move
Updater,DispatcherandJobQueueto newtelegram.extsubmodule (thanks to @rahiel)Add
disable_notificationparameter (thanks to @aidarbiktimirov)Fix bug where commands sent by Telegram Web would not be recognized (thanks to @shelomentsevd)
Add option to skip old updates on bot startup
Send files from
BufferedReader
2016-02-28
Released 3.3
Inline bots
Send any file by URL
Specialized exceptions:
Unauthorized,InvalidToken,NetworkErrorandTimedOutIntegration for botan.io (thanks to @ollmer)
HTML Parsemode (thanks to @jlmadurga)
Bugfixes and under-the-hood improvements
Very special thanks to Noam Meltzer (@tsnoam) for all of his work!
2016-01-09
Released 3.3b1
Implement inline bots (beta)
2016-01-05
Released 3.2.0
Introducing
JobQueue(original author: @franciscod)Streamlining all exceptions to
TelegramError(Special thanks to @tsnoam)Proper locking of
UpdaterandDispatcherstartandstopmethodsSmall bugfixes
2015-12-29
Released 3.1.2
Fix custom path for file downloads
Don’t stop the dispatcher thread on uncaught errors in handlers
2015-12-21
Released 3.1.1
Fix a bug where asynchronous handlers could not have additional arguments
Add
groupsandgroupdictas additional arguments for regex-based handlers
2015-12-16
Released 3.1.0
The
chat-field inMessageis now of typeChat. (API update Oct 8 2015)Messagenow contains the optional fieldssupergroup_chat_created,migrate_to_chat_id,migrate_from_chat_idandchannel_chat_created. (API update Nov 2015)
2015-12-08
Released 3.0.0
Introducing the
UpdaterandDispatcherclasses
2015-11-11
Released 2.9.2
Error handling on request timeouts has been improved
2015-11-10
Released 2.9.1
Add parameter
network_delayto Bot.getUpdates for slow connections
2015-11-10
Released 2.9
Emoji class now uses
bytes_to_native_strfromfuture3rd party libMake
user_fromoptional to work with channelsRaise exception if Telegram times out on long-polling
Special thanks to @jh0ker for all hard work
2015-10-08
Released 2.8.7
Type as optional for
GroupChatclass
2015-10-08
Released 2.8.6
Adds type to
UserandGroupChatclasses (pre-release Telegram feature)
2015-09-24
Released 2.8.5
Handles HTTP Bad Gateway (503) errors on request
Fixes regression on
AudioandDocumentfor unicode fields
2015-09-20
Released 2.8.4
getFileandFile.downloadis now fully supported
2015-09-10
Released 2.8.3
Moved
Bot._requestURLto its own class (telegram.utils.request)Much better, such wow, Telegram Objects tests
Add consistency for
strproperties on Telegram ObjectsBetter design to test if
chat_idis invalidAdd ability to set custom filename on
Bot.sendDocument(..,filename='')Fix Sticker as
InputFileSend JSON requests over urlencoded post data
Markdown support for
Bot.sendMessage(..., parse_mode=ParseMode.MARKDOWN)Refactor of
TelegramErrorclass (no more handlingIOErrororURLError)
2015-09-05
Released 2.8.2
Fix regression on Telegram ReplyMarkup
Add certificate to
is_inputfilemethod
2015-09-05
Released 2.8.1
Fix regression on Telegram objects with thumb properties
2015-09-04
Released 2.8
TelegramError when
chat_idis empty for send* methodssetWebhooknow supports sending self-signed certificateHuge redesign of existing Telegram classes
Added support for PyPy
Added docstring for existing classes
2015-08-19
Released 2.7.1
Fixed JSON serialization for
message
2015-08-17
Released 2.7
Added support for
Voiceobject andsendVoicemethodDue backward compatibility performer or/and title will be required for
sendAudioFixed JSON serialization when forwarded message
2015-08-15
Released 2.6.1
Fixed parsing image header issue on < Python 2.7.3
2015-08-14
Released 2.6.0
Depreciation of
require_authenticationandclearCredentialsmethodsGiving
AUTHORSthe proper credits for their contribution for this projectMessage.dateandMessage.forward_dateare nowdatetimeobjects
2015-08-12
Released 2.5.3
telegram.Botnow supports to be unpickled
2015-08-11
Released 2.5.2
New changes from Telegram Bot API have been applied
telegram.Botnow supports to be pickledReturn empty
strinsteadNonewhenmessage.textis empty
2015-08-10
Released 2.5.1
Moved from GPLv2 to LGPLv3
2015-08-09
Released 2.5
Fixes logging calls in API
2015-08-08
Released 2.4
Fixes
Emojiclass for Python 3PEP8improvements
2015-08-08
Released 2.3
Fixes
ForceReplyclassRemove
logging.basicConfigfrom library
2015-07-25
Released 2.2
Allows
debug=Truewhen initializingtelegram.Bot
2015-07-20
Released 2.1
Fix
to_dictforDocumentandVideo
2015-07-19
Released 2.0
Fixes bugs
Improves
__str__overto_json()Creates abstract class
TelegramObject
2015-07-15
Released 1.9
Python 3 officially supported
PEP8improvements
2015-07-12
Released 1.8
Fixes crash when replying an unicode text message (special thanks to JRoot3D)
2015-07-11
Released 1.7
Fixes crash when
usernameis not defined onchat(special thanks to JRoot3D)
2015-07-10
Released 1.6
Improvements for GAE support
2015-07-10
Released 1.5
Fixes randomly unicode issues when using
InputFile
2015-07-10
Released 1.4
requestslib is no longer requiredGoogle App Engine (GAE) is supported
2015-07-10
Released 1.3
Added support to
setWebhook(special thanks to macrojames)
2015-07-09
Released 1.2
CustomKeyboardclasses now availableEmojis available
PEP8improvements
2015-07-08
Released 1.1
PyPi package now available
2015-07-08
Released 1.0
Initial checkin of python-telegram-bot