Use warnings.warn for deprecations.
Shows in log as follows:
DEBUGWARNING - Python warning (16:47:09.529) - MainThread (1772):
source\globalCommands.py:2307: DeprecationWarning: NVDAObject.detailsSummary is deprecated. Use NVDAObject.annotations instead.
if objAtStart.detailsSummary: