==============
*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 <https://t.me/pythontelegrambotchannel>`_.
Major Changes:
--------------
- Refactor Initialization of Persistence Classes
(:pr:`2604`)
- Drop Non-``CallbackContext`` API
(:pr:`2617`)
- Remove ``__dict__`` from ``__slots__`` and drop Python 3.6
(:pr:`2619`,
:pr:`2636`)
- Move and Rename ``TelegramDecryptionError`` to
``telegram.error.PassportDecryptionError``
(:pr:`2621`)
- Make ``BasePersistence`` Methods Abstract
(:pr:`2624`)
- Remove ``day_is_strict`` argument of ``JobQueue.run_monthly``
(:pr:`2634`
by `iota-008 <https://github.com/iota-008>`__)
- Move ``Defaults`` to ``telegram.ext``
(:pr:`2648`)
- Remove Deprecated Functionality
(:pr:`2644`,
:pr:`2740`,
:pr:`2745`)
- Overhaul of Filters
(:pr:`2759`,
:pr:`2922`)
- Switch to ``asyncio`` and Refactor PTBs Architecture
(:pr:`2731`)
- Improve ``Job.__getattr__``
(:pr:`2832`)
- Remove ``telegram.ReplyMarkup``
(:pr:`2870`)
- Persistence of ``Bots``: Refactor Automatic Replacement and
Integration with ``TelegramObject``
(:pr:`2893`)
New Features:
-------------
- Introduce Builder Pattern
(:pr:`2646`)
- Add ``Filters.update.edited``
(:pr:`2705`
by `PhilippFr <https://github.com/PhilippFr>`__)
- Introduce ``Enums`` for ``telegram.constants``
(:pr:`2708`)
- Accept File Paths for ``private_key``
(:pr:`2724`)
- Associate ``Jobs`` with ``chat/user_id``
(:pr:`2731`)
- Convenience Functionality for ``ChatInviteLinks``
(:pr:`2782`)
- Add ``Dispatcher.add_handlers``
(:pr:`2823`)
- Improve Error Messages in ``CommandHandler.__init__``
(:pr:`2837`)
- ``Defaults.protect_content``
(:pr:`2840`)
- Add ``Dispatcher.migrate_chat_data``
(:pr:`2848`
by `DonalDuck004 <https://github.com/DonalDuck004>`__)
- Add Method ``drop_chat/user_data`` to ``Dispatcher`` and Persistence
(:pr:`2852`)
- Add methods ``ChatPermissions.{all, no}_permissions`` (:pr:`2948`)
- Full Support for API 6.0
(:pr:`2956`)
- Add Python 3.10 to Test Suite
(:pr:`2968`)
Bug Fixes & Minor Changes:
--------------------------
- Improve Type Hinting for ``CallbackContext``
(:pr:`2587`
by `revolter <https://github.com/revolter>`__)
- Fix Signatures and Improve ``test_official``
(:pr:`2643`)
- Refine ``Dispatcher.dispatch_error``
(:pr:`2660`)
- Make ``InlineQuery.answer`` Raise ``ValueError``
(:pr:`2675`)
- Improve Signature Inspection for Bot Methods
(:pr:`2686`)
- Introduce ``TelegramObject.set/get_bot``
(:pr:`2712`
by `zpavloudis <https://github.com/zpavloudis>`__)
- Improve Subscription of ``TelegramObject``
(:pr:`2719`
by `SimonDamberg <https://github.com/SimonDamberg>`__)
- Use Enums for Dynamic Types & Rename Two Attributes in ``ChatMember``
(:pr:`2817`)
- Return Plain Dicts from ``BasePersistence.get_*_data``
(:pr:`2873`)
- Fix a Bug in ``ChatMemberUpdated.difference``
(:pr:`2947`)
- Update Dependency Policy
(:pr:`2958`)
Internal Restructurings & Improvements:
---------------------------------------
- Add User Friendly Type Check For Init Of
``{Inline, Reply}KeyboardMarkup``
(:pr:`2657`)
- Warnings Overhaul
(:pr:`2662`)
- Clear Up Import Policy
(:pr:`2671`)
- Mark Internal Modules As Private
(:pr:`2687`
by `kencx <https://github.com/kencx>`__)
- Handle Filepaths via the ``pathlib`` Module
(:pr:`2688`
by `eldbud <https://github.com/eldbud>`__)
- Refactor MRO of ``InputMedia*`` and Some File-Like Classes
(:pr:`2717`
by `eldbud <https://github.com/eldbud>`__)
- Update Exceptions for Immutable Attributes
(:pr:`2749`)
- Refactor Warnings in ``ConversationHandler``
(:pr:`2755`,
:pr:`2784`)
- Use ``__all__`` Consistently
(:pr:`2805`)
CI, Code Quality & Test Suite Improvements:
-------------------------------------------
- Add Custom ``pytest`` Marker to Ease Development
(:pr:`2628`)
- Pass Failing Jobs to Error Handlers
(:pr:`2692`)
- Update Notification Workflows
(:pr:`2695`)
- Use Error Messages for ``pylint`` Instead of Codes
(:pr:`2700`
by `Piraty <https://github.com/Piraty>`__)
- Make Tests Agnostic of the CWD
(:pr:`2727`
by `eldbud <https://github.com/eldbud>`__)
- Update Code Quality Dependencies
(:pr:`2748`)
- Improve Code Quality
(:pr:`2783`)
- Update ``pre-commit`` Settings & Improve a Test
(:pr:`2796`)
- Improve Code Quality & Test Suite
(:pr:`2843`)
- Fix failing animation tests
(:pr:`2865`)
- Update and Expand Tests & pre-commit Settings and Improve Code
Quality
(:pr:`2925`)
- Extend Code Formatting With Black
(:pr:`2972`)
- Update Workflow Permissions
(:pr:`2984`)
- Adapt Tests to Changed ``Bot.get_file`` Behavior
(:pr:`2995`)
Documentation Improvements:
---------------------------
- Doc Fixes
(:pr:`2597`)
- Add Code Comment Guidelines to Contribution Guide
(:pr:`2612`)
- Add Cross-References to External Libraries & Other Documentation
Improvements
(:pr:`2693`,
:pr:`2691`
by `joesinghh <https://github.com/joesinghh>`__,
:pr:`2739`
by `eldbud <https://github.com/eldbud>`__)
- Use Furo Theme, Make Parameters Referenceable, Add Documentation
Building to CI, Improve Links to Source Code & Other Improvements
(:pr:`2856`,
:pr:`2798`,
:pr:`2854`,
:pr:`2841`)
- Documentation Fixes & Improvements
(:pr:`2822`)
- Replace ``git.io`` Links
(:pr:`2872`
by `murugu-21 <https://github.com/murugu-21>`__)
- Overhaul Readmes, Update RTD Startpage & Other Improvements
(:pr:`2969`)