Skip to content

Conversation

@Bibo-Joshi
Copy link
Member

Addresses the second part of and closes #2901.

I double checked: numbers and strings are indeed different things in json, so this won't be a problem. My concerns in #2901 (comment) probably came from my subconscious recalling that keys can only be strings in json, which is why json.dumps({1: '1'}) == '{"1": 1}' and json.loads('{"1": 1}') == {"1": 1}.

This also makes RetryAfter.retry_after an integer b/c that's what TG documents (this is a tiny breaking change) and adds some missing docs to the error module.

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 🛠 refactor change type: refactor 🛠 breaking change type: breaking labels May 20, 2022
@Bibo-Joshi Bibo-Joshi added this to the v20.0a1 milestone May 20, 2022
@Bibo-Joshi Bibo-Joshi merged commit 5e0bcfb into master May 26, 2022
@Bibo-Joshi Bibo-Joshi deleted the drop-type-conversions branch May 26, 2022 17:16
@github-actions github-actions bot locked and limited conversation to collaborators Jun 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

🛠 breaking change type: breaking 🛠 refactor change type: refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handling of constraints and type conversions for Telegram classes and methods

3 participants