Skip to content

Bump python-telegram-bot from 11.1.0 to 12.0.0#11

Closed
dependabot-preview[bot] wants to merge 1 commit intomasterfrom
dependabot/pip/python-telegram-bot-12.0.0
Closed

Bump python-telegram-bot from 11.1.0 to 12.0.0#11
dependabot-preview[bot] wants to merge 1 commit intomasterfrom
dependabot/pip/python-telegram-bot-12.0.0

Conversation

@dependabot-preview
Copy link
Contributor

Bumps python-telegram-bot from 11.1.0 to 12.0.0.

Release notes

Sourced from python-telegram-bot's releases.

v12.0.0b1

First beta release ever.
It has been so long since last release that we would like to test the impact before a final release.

We do NOT recommend using this beta release in production.

Major changes:

  • Context based callbacks
  • Persistence
  • PrefixHandler added (Handler overhaul)
  • Deprecation of RegexHandler and edited_messages, channel_post, etc. arguments (Filter overhaul)
  • Various ConversationHandler changes and fixes

See the wiki page at https://git.io/fxJuV for a detailed guide on how to migrate from version 11 to version 12.

Context based callbacks (#1100)

  • Use of pass_ in handlers is deprecated.
  • Instead use use_context=True on Updater or Dispatcher and change callback from (bot, update, others...) to (update, context).
  • This also applies to error handlers Dispatcher.add_error_handler and JobQueue jobs (change (bot, job) to (context) here).
  • For users with custom handlers subclassing Handler, this is mostly backwards compatible, but to use the new context based callbacks you need to implement the new collect_additional_context method.
  • Passing bot to JobQueue.__init__ is deprecated. Use JobQueue.set_dispatcher with a dispatcher instead.
  • Dispatcher makes sure to use a single CallbackContext for a entire update. This means that if an update is handled by multiple handlers (by using the group argument), you can add custom arguments to the CallbackContext in a lower group handler and use it in higher group handler. NOTE: Never use with @​run_async, see docs for more info. (#1283)
  • If you have custom handlers they will need to be updated to support the changes in this release.
  • Update all examples to use context based callbacks.

Persistence (#1017)

  • Added PicklePersistence and DictPersistence for adding persistence to your bots.
  • BasePersistence can be subclassed for all your persistence needs.
  • Add a new example that shows a persistent ConversationHandler bot

Handler overhaul (#1114)

  • CommandHandler now only triggers on actual commands as defined by telegram servers (everything that the clients mark as a tabable link).
  • PrefixHandler can be used if you need to trigger on prefixes (like all messages starting with a "/" (old CommandHandler behaviour) or even custom prefixes like "#" or "!").

Filter overhaul (#1221)

  • RegexHandler is deprecated and should be replaced with a MessageHandler with a regex filter.
  • Use update filters to filter update types instead of arguments (message_updates, channel_post_updates and edited_updates) on the handlers.
  • Completely remove allow_edited argument - it has been deprecated for a while.
  • data_filters now exist which allows filters that return data into the callback function. This is how the regex filter is implemented.
  • All this means that it no longer possible to use a list of filters in a handler. Use bitwise operators instead!
... (truncated)
Changelog

Sourced from python-telegram-bot's changelog.

Version 12.0.0

Released 2019-08-29

Well... This felt like decades. But here we are with a new release.

Expect minor releases soon (mainly complete Bot API 4.4 support)

Major and/or breaking changes:

  • Context based callbacks
  • Persistence
  • PrefixHandler added (Handler overhaul)
  • Deprecation of RegexHandler and edited_messages, channel_post, etc. arguments (Filter overhaul)
  • Various ConversationHandler changes and fixes
  • Bot API 4.1, 4.2, 4.3 support
  • Python 3.4 is no longer supported
  • Error Handler now handles all types of exceptions (#1485)
  • Return UTC from from_timestamp() (#1485)

See the wiki page at https://git.io/fxJuV for a detailed guide on how to migrate from version 11 to version 12.

Context based callbacks (#1100)

  • Use of pass_ in handlers is deprecated.
  • Instead use use_context=True on Updater or Dispatcher and change callback from (bot, update, others...) to (update, context).
  • This also applies to error handlers Dispatcher.add_error_handler and JobQueue jobs (change (bot, job) to (context) here).
  • For users with custom handlers subclassing Handler, this is mostly backwards compatible, but to use the new context based callbacks you need to implement the new collect_additional_context method.
  • Passing bot to JobQueue.__init__ is deprecated. Use JobQueue.set_dispatcher with a dispatcher instead.
  • Dispatcher makes sure to use a single CallbackContext for a entire update. This means that if an update is handled by multiple handlers (by using the group argument), you can add custom arguments to the CallbackContext in a lower group handler and use it in higher group handler. NOTE: Never use with @​run_async, see docs for more info. (#1283)
  • If you have custom handlers they will need to be updated to support the changes in this release.
  • Update all examples to use context based callbacks.

Persistence (#1017)

  • Added PicklePersistence and DictPersistence for adding persistence to your bots.
  • BasePersistence can be subclassed for all your persistence needs.
  • Add a new example that shows a persistent ConversationHandler bot

Handler overhaul (#1114)

  • CommandHandler now only triggers on actual commands as defined by telegram servers (everything that the clients mark as a tabable link).
  • PrefixHandler can be used if you need to trigger on prefixes (like all messages starting with a "/" (old CommandHandler behaviour) or even custom prefixes like "#" or "!").

Filter overhaul (#1221)

... (truncated)
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

@dependabot-preview dependabot-preview bot added the dependencies Pull requests that update a dependency file label Aug 29, 2019
@dependabot-preview
Copy link
Contributor Author

Superseded by #12.

@dependabot-preview dependabot-preview bot deleted the dependabot/pip/python-telegram-bot-12.0.0 branch September 13, 2019 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant