diff --git a/CHANGES.rst b/CHANGES.rst index c91190584..7264ea7e3 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,6 +2,201 @@ Changelog ========= +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`` to + ``telegram.error.PassportDecryptionError`` + (`#2621 `__) +- Make ``BasePersistence`` Methods Abstract + (`#2624 `__) +- Remove ``day_is_strict`` argument of ``JobQueue.run_monthly`` + (`#2634 `__ + by `iota-008 `__) +- Move ``Defaults`` to ``telegram.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 with ``TelegramObject`` + (`#2893 `__) + +New Features: +------------- + +- Introduce Builder Pattern + (`#2646 `__) +- Add ``Filters.update.edited`` + (`#2705 `__ + by `PhilippFr `__) +- Introduce ``Enums`` for ``telegram.constants`` + (`#2708 `__) +- Accept File Paths for ``private_key`` + (`#2724 `__) +- Associate ``Jobs`` with ``chat/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`` to ``Dispatcher`` and Persistence + (`#2852 `__) +- Add methods ``ChatPermissions.{all, no}_permissions`` ([#2948] +- Full Support for API 6.0 + (`#2956 `__)(https://github.com/python-telegram-bot/python-telegram-bot/pull/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`` Raise ``ValueError`` + (`#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 `__) + Version 13.11 ============= *Released 2022-02-02* diff --git a/docs/source/conf.py b/docs/source/conf.py index 5a3126615..d7c46faec 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -88,9 +88,9 @@ author = "Leandro Toledo" # built documents. # # The short X.Y version. -version = "13.11" # telegram.__version__[:3] +version = "20.0a0" # telegram.__version__[:3] # The full version, including alpha/beta/rc tags. -release = "13.11" # telegram.__version__ +release = "20.0a0" # telegram.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/telegram/_version.py b/telegram/_version.py index 8048a4801..c263ab4e2 100644 --- a/telegram/_version.py +++ b/telegram/_version.py @@ -18,7 +18,7 @@ # along with this program. If not, see [http://www.gnu.org/licenses/]. # pylint: disable=missing-module-docstring -__version__ = "13.11" +__version__ = "20.0a0" from telegram import constants diff --git a/tests/test_constants.py b/tests/test_constants.py index 9e6927b90..dfe1bbdbe 100644 --- a/tests/test_constants.py +++ b/tests/test_constants.py @@ -103,6 +103,7 @@ class TestConstants: ) @flaky(3, 1) + @pytest.mark.xfail(reason="Telegram apparently changed the limit without documenting it yet.") async def test_max_caption_length(self, bot, chat_id): good_caption = "a" * constants.MessageLimit.CAPTION_LENGTH with data_file("telegram.png").open("rb") as f: