-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Make provider_token
Argument Optional
#4689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
damn that's wild that it went unnoticed for so long
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (6)
examples/paymentbot.py:66
- [nitpick] The example now uses the 'provider_token' as a keyword argument with a default value. Please consider adding an inline comment in the example to clarify that the parameter is optional and should be passed by keyword.
provider_token=PAYMENT_PROVIDER_TOKEN,
tests/test_official/exceptions.py:209
- The removal of 'provider_token' from the backwards compatibility kwargs appears intentional. Ensure that additional test cases verify the new optional behavior of 'provider_token' so that regressions are caught.
BACKWARDS_COMPAT_KWARGS: dict[str, set[str]] = {}
telegram/_inline/inputinvoicemessagecontent.py:38
- The equality comparison now excludes 'provider_token' per the updated docs. Please confirm that all consumers relying on equality for InputInvoiceMessageContent are updated and that corresponding tests reflect this change.
:attr:`currency` and :attr:`prices` are equal.
telegram/_bot.py:5182
- The function signature now defaults 'provider_token' to None to reflect Bot API 7.4 changes. Verify that any downstream logic correctly handles a None value for this parameter.
provider_token: Optional[str] = None,
telegram/_chat.py:1581
- The update makes 'provider_token' optional in the send_invoice method. Ensure that the associated docstrings and any logic expecting a non-empty token are revised accordingly.
provider_token: Optional[str] = None,
telegram/ext/_extbot.py:1200
- The updated function signature now sets the provider_token default to None. Please double-check that no deprecated annotations or legacy logic still assume a required provider_token.
provider_token: Optional[str] = None,
The forgotton follow-up for #4275
Carries out deprecations from API 7.4. This is in line with our stability policy.