From c6bf8d8bd648dd97058a3b3c06ecac548aa1cc27 Mon Sep 17 00:00:00 2001 From: Harshal Sheth Date: Fri, 17 Nov 2023 18:02:57 -0500 Subject: [PATCH] show deprecation warnings in docs --- docs-website/sphinx/apidocs/urns.rst | 2 +- metadata-ingestion/scripts/avro_codegen.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs-website/sphinx/apidocs/urns.rst b/docs-website/sphinx/apidocs/urns.rst index 5f617ac9eaee9..2bd70deb22c7e 100644 --- a/docs-website/sphinx/apidocs/urns.rst +++ b/docs-website/sphinx/apidocs/urns.rst @@ -2,6 +2,6 @@ URNs ====== .. automodule:: datahub.metadata.urns - :exclude-members: LI_DOMAIN, URN_PREFIX, url_encode, validate, get_type, get_entity_id, get_entity_id_as_string, get_domain + :exclude-members: LI_DOMAIN, URN_PREFIX, url_encode, validate, get_type, get_entity_id, get_entity_id_as_string, get_domain, underlying_key_aspect_type :member-order: alphabetical :inherited-members: diff --git a/metadata-ingestion/scripts/avro_codegen.py b/metadata-ingestion/scripts/avro_codegen.py index 7af2ee2fbc664..78beffe7c9f56 100644 --- a/metadata-ingestion/scripts/avro_codegen.py +++ b/metadata-ingestion/scripts/avro_codegen.py @@ -354,11 +354,14 @@ def write_urn_classes(key_aspects: List[dict], urn_dir: Path) -> None: from typing import ClassVar, List, Optional, Type, TYPE_CHECKING -from deprecated import deprecated +import functools +from deprecated.sphinx import deprecated as _sphinx_deprecated from datahub.utilities.urn_encoder import UrnEncoder from datahub.utilities.urns._urn_base import _SpecificUrn, Urn from datahub.utilities.urns.error import InvalidUrnError + +deprecated = functools.partial(_sphinx_deprecated, version="0.12.0.2") """ for aspect in key_aspects: