Post content
We've just released v21.5. 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)