mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-25 08:03:39 +00:00
core: deprecation doc removal (#28553)

This commit is contained in:
parent
482e8a7855
commit
478def8dcc
@ -364,8 +364,15 @@ def deprecated(
|
|||||||
_package or _name.split(".")[0].replace("_", "-") if "." in _name else None
|
_package or _name.split(".")[0].replace("_", "-") if "." in _name else None
|
||||||
)
|
)
|
||||||
since_str = f"{package}=={since}" if package else since
|
since_str = f"{package}=={since}" if package else since
|
||||||
|
if removal:
|
||||||
|
if removal.startswith("1.") and package and package.startswith("langchain"):
|
||||||
|
removal_str = f"It will not be removed until {package}=={removal}."
|
||||||
|
else:
|
||||||
|
removal_str = f"It will be removed in {package}=={removal}."
|
||||||
|
else:
|
||||||
|
removal_str = ""
|
||||||
new_doc = f"""\
|
new_doc = f"""\
|
||||||
.. deprecated:: {since_str} {details}
|
.. deprecated:: {since_str} {details} {removal_str}
|
||||||
|
|
||||||
{old_doc}\
|
{old_doc}\
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user