summaryrefslogtreecommitdiff
path: root/sphinx/util/docfields.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/docfields.py')
-rw-r--r--sphinx/util/docfields.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sphinx/util/docfields.py b/sphinx/util/docfields.py
index 699738888..c07bc7f66 100644
--- a/sphinx/util/docfields.py
+++ b/sphinx/util/docfields.py
@@ -224,12 +224,12 @@ class DocFieldTransformer:
except Exception:
# for 3rd party extensions directly calls this transformer.
warnings.warn('DocFieldTransformer expects given directive object is a subclass '
- 'of ObjectDescription.', RemovedInSphinx40Warning)
+ 'of ObjectDescription.', RemovedInSphinx40Warning, stacklevel=2)
self.typemap = self.preprocess_fieldtypes(directive.__class__.doc_field_types)
def preprocess_fieldtypes(self, types: List[Field]) -> Dict[str, Tuple[Field, bool]]:
warnings.warn('DocFieldTransformer.preprocess_fieldtypes() is deprecated.',
- RemovedInSphinx40Warning)
+ RemovedInSphinx40Warning, stacklevel=2)
typemap = {}
for fieldtype in types:
for name in fieldtype.names: