Conversation
Updating dependencies.
# What this PR does Fix syntax for python-telegram-bot imports after upgrade to 20.0+ version See release notes for [python-telegram-bot 20.0](https://docs.python-telegram-bot.org/en/v20.0/telegram.ext.filters.html) >2. Removed the Filters class. The filters are now directly attributes/classes of the [filters](https://docs.python-telegram-bot.org/en/v21.7/telegram.ext.filters.html#module-telegram.ext.filters) module. >3. The names of all filters has been updated: > - Filter classes which are ready for use, e.g Filters.all are now capitalized, e.g filters.ALL. > - Filters which need to be initialized are now in CamelCase. E.g. filters.User(...). > - Filters which do both (like Filters.text) are now split as ready-to-use version filters.TEXT and class version filters.Text(...). Without this change, the logs of the telegram‑polling container show the following error: ``` ImportError: cannot import name 'Filters' from 'telegram.ext' (/usr/local/lib/python3.12/site-packages/telegram/ext/__init__.py). Did you mean: 'filters'? ``` Signed-off-by: ckaytev <anton-ckayt@mail.ru>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.