Bibo-Joshi · GitHub

Changes some behavior introduced in #3266 .

Issue was reported at https://t.me/pythontelegrambotgroup/639987.

This change allows ExtBot.callback_data_cache to be None even if store_arbitrary_callback_data is True. Reasoning:

  • We want to keep the default of store_arbitrary_callback_data such that integrating persistence is as easy as possible
  • using arbitrary callback_data must stay opt-in

So instead of reasing an error, this PR changes the behavior such that Application.update_persistence just doesn't call update_callback_data if bot.cdc is None.

Checklist for PRs

  • [ ] Added .. versionadded:: version, .. versionchanged:: version or .. deprecated:: version to the docstrings for user facing changes (for methods/class descriptions, arguments and attributes)
  • Created new or adapted existing unit tests
  • Documented code changes according to the CSI standard
  • [ ] Added myself alphabetically to AUTHORS.rst (optional)
  • [ ] Added new classes & modules to the docs and all suitable __all__ s

Read the original on github.com ↗