Skip to content

Conversation

@swibi-ttd
Copy link

@swibi-ttd swibi-ttd commented Feb 6, 2026

# Always use .do_not_generate_tokens_for_opted_out(), which applies policy=1. Support for policy=0 will be removed soon.
def do_not_generate_tokens_for_opted_out(self):
self.generate_for_opted_out = False
# DEPRECATED: The optout_check/policy param has been removed from /token/generate
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The official @deprecated decorator was only released in 3.13. So this is only "silently" deprecated, unless we wanted to use the external typing-extensions module?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can use the typing-extensions module. It's better to properly mark this as deprecated!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added typing-extensions to dependencies and marked this func as deprecated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants