You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/03 16:15:19 UTC
[GitHub] [beam] kennknowles opened a new issue, #18068: annotations should support custom messages and classes
kennknowles opened a new issue, #18068:
URL: https://github.com/apache/beam/issues/18068
Update https://github.com/apache/incubator-beam/blob/python-sdk/sdks/python/apache_beam/utils/annotations.py to add 2 new features:
1. ability to customize message
2. ability to tag classes (not only functions)
Imported from Jira [BEAM-1081](https://issues.apache.org/jira/browse/BEAM-1081). Original Jira may contain additional context.
Reported by: altay.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] annotations should support custom messages and classes [beam]
Posted by "damccorm (via GitHub) via github" <gi...@beam.apache.org>.
damccorm closed issue #18068: annotations should support custom messages and classes
URL: https://github.com/apache/beam/issues/18068
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] annotations should support custom messages and classes [beam]
Posted by "jonathansudhakar1 (via GitHub) via github" <gi...@beam.apache.org>.
jonathansudhakar1 commented on issue #18068:
URL: https://github.com/apache/beam/issues/18068#issuecomment-6690634626
Both parts of this seem to be done already, by #6670 ("[BEAM-1081] Annotations custom message support and classes tests", merged 2018-10-17):
1. Custom messages: `annotate()` and `deprecated()` in [`apache_beam/utils/annotations.py`](https://github.com/apache/beam/blob/d8eb82acf2c/sdks/python/apache_beam/utils/annotations.py) take `custom_message`, with `%name%`, `%since%`, `%current%` and `%extra%` placeholders.
2. Classes: the decorator patches `__new__` when the target is a class, so creating an instance emits the warning. It also adds the deprecation notice to the class docstring.
`annotations_test.py` covers both, for example `test_deprecated_with_class` and the `custom_message` tests. It passes on master at d8eb82acf2c (10 passed). Leaving this here in case it can be closed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] annotations should support custom messages and classes [beam]
Posted by "damccorm (via GitHub) via github" <gi...@beam.apache.org>.
damccorm commented on issue #18068:
URL: https://github.com/apache/beam/issues/18068#issuecomment-6749168465
Closing as resolved by #6670 (commit 8142643373).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org