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-
CallbackContext
API (#2617) - Remove
__dict__
from__slots__
and drop Python 3.6 (#2619, #2636) - Move and Rename
TelegramDecryptionError
totelegram.error.PassportDecryptionError
(#2621) - Make
BasePersistence
Methods Abstract (#2624) - Remove
day_is_strict
argument ofJobQueue.run_monthly
(#2634 by @iota-008) - Move
Defaults
totelegram.ext
(#2648) - Remove Deprecated Functionality (#2644, #2740, #2745)
- Overhaul of Filters (#2759, #2922)
- Switch to
asyncio
and 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)
- Add
Filters.update.edited
(#2705 by @PhilippFr) - Introduce
Enums
fortelegram.constants
(#2708) - Accept File Paths for
private_key
(#2724) - Associate
Jobs
withchat/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_data
toDispatcher
and Persistence (#2852) - Add methods
ChatPermissions.{all, no}_permissions
([#2948] - Full Support for API 6.0 (#2956)(#2948))
- 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.answer
RaiseValueError
(#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:
- Add User Friendly Type Check For Init Of
{Inline, Reply}KeyboardMarkup
(#2657) - Warnings Overhaul (#2662)
- Clear Up Import Policy (#2671)
- Mark Internal Modules As Private (#2687 by @kencx)
- Handle Filepaths via the
pathlib
Module (#2688 by @eldbud) - Refactor MRO of
InputMedia*
and Some File-Like Classes (#2717 by @eldbud) - Update Exceptions for Immutable Attributes (#2749)
- Refactor Warnings in
ConversationHandler
(#2755, #2784) - Use
__all__
Consistently (#2805)
CI, Code Quality & Test Suite Improvements:
- Add Custom
pytest
Marker to Ease Development (#2628) - Pass Failing Jobs to Error Handlers (#2692)
- Update Notification Workflows (#2695)
- Use Error Messages for
pylint
Instead of Codes (#2700 by @Piraty) - Make Tests Agnostic of the CWD (#2727 by @eldbud)
- Update Code Quality Dependencies (#2748)
- Improve Code Quality (#2783)
- Update
pre-commit
Settings & 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_file
Behavior (#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)
- Replace
git.io
Links (#2872 by @murugu-21) - Overhaul Readmes, Update RTD Startpage & Other Improvements (#2969)