danielgtaylor / danielgtaylor/python-betterproto
warnings package not imported for deprecated warning.
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 234
- PR merge metrics
- No merged PRs in 30d
Description
Hi there, thanks for the great project!
My environment:
betterproto: v2.0.0b3
python: v3.8.5
OS: Ubuntu 20.04
I use `deprecated` option in a message definition. betterproto generates a `warnings.warn` properly, but the `warnings` package is not imported, so it throws `NameError: name 'warnings' is not defined`. I manually add the line for now, but it'd be great if it can be fixed in the package.
Thanks!
Contributor guide
Research direction
Reproduce the deprecated option with betterproto v2.0.0b3 and inspect the generated Python output. Done means generated code imports the warnings package and emits the deprecation warning without raising NameError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100