Skip to content
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

python deprecation warning for GetPrototype should be a python DeprecationWarning not a python UserWarning #18620

Open
matanox opened this issue Oct 4, 2024 · 0 comments
Assignees
Labels

Comments

@matanox
Copy link

matanox commented Oct 4, 2024

Minor issue.

protobuf 4.25.5, raises a python warning:

/lib/python3.11/site-packages/google/protobuf/symbol_database.py:55: UserWarning:
  
SymbolDatabase.GetPrototype() is deprecated. Please use message_factory.GetMessageClass() instead. SymbolDatabase.GetPrototype() will be removed soon.

since this is a warning about deprecation, why not make it the python warning type dedicated to deprecations, which is called DeprecationWarning? why does it categorize itself as a UserWarning python warning type?

this can help in some scenario where we don't want to see deprecation warnings in our test runner summary.

@matanox matanox added the untriaged auto added to all issues by default when created. label Oct 4, 2024
@matanox matanox changed the title python deprecation warning for GetPrototype should be a not a python DeprecationWarning not a UserWarning python deprecation warning for GetPrototype should be a python DeprecationWarning not a python UserWarning Oct 4, 2024
@JasonLunn JasonLunn added python and removed untriaged auto added to all issues by default when created. labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants