From 5ce15606dd7543e7c71a74feec119d09e7a2919b Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Fri, 23 Sep 2022 18:47:28 +0100 Subject: [PATCH] Warn on using the `:property:` flag with `.. py:method::` (#10852) --- sphinx/domains/python.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 43a845889..6076eb7fb 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -828,6 +828,8 @@ class PyMethod(PyObject): prefix.append(nodes.Text('classmethod')) prefix.append(addnodes.desc_sig_space()) if 'property' in self.options: + logger.warning(_('Using the :property: flag with the py:method directive' + 'is deprecated, use ".. py:property::" instead.')) prefix.append(nodes.Text('property')) prefix.append(addnodes.desc_sig_space()) if 'staticmethod' in self.options: