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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]