Skip to content

Conversation

@Bibo-Joshi
Copy link
Member

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

@Bibo-Joshi Bibo-Joshi added bug 🐛 🛠 refactor change type: refactor labels Nov 23, 2022
@Bibo-Joshi Bibo-Joshi changed the title Don't throw error in BP.set_bot if store_cdc=True bot bot.cdc is None Don't throw error in BP.set_bot if store_cdc=True but bot.cdc is None Nov 23, 2022
@Bibo-Joshi Bibo-Joshi merged commit 867f742 into master Nov 24, 2022
@Bibo-Joshi Bibo-Joshi deleted the acd-checking branch November 24, 2022 11:13
@harshil21 harshil21 added this to the v20.0a6 milestone Nov 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2022
@Bibo-Joshi Bibo-Joshi added 🔌 bug pr description: bug and removed bug 🐛 labels Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🔌 bug pr description: bug 🛠 refactor change type: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants