mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-02 03:26:17 +00:00
core: use qualname in beta message (#20361)
This commit is contained in:
@@ -35,7 +35,8 @@ from langchain_core.pydantic_v1 import BaseModel
|
||||
"obj_type": "",
|
||||
"addendum": "Please migrate your code.",
|
||||
},
|
||||
"`SomeFunction` is in beta. It is actively being worked on, so the API may "
|
||||
"`SomeFunction` is in beta. It is actively being worked on, "
|
||||
"so the API may "
|
||||
"change. Please migrate your code.",
|
||||
),
|
||||
],
|
||||
@@ -106,7 +107,8 @@ def test_beta_function() -> None:
|
||||
assert len(warning_list) == 1
|
||||
warning = warning_list[0].message
|
||||
assert str(warning) == (
|
||||
"The function `beta_function` is in beta. It is actively being worked on, "
|
||||
"The function `beta_function` is in beta. It is actively being "
|
||||
"worked on, "
|
||||
"so the API may change."
|
||||
)
|
||||
|
||||
@@ -146,7 +148,8 @@ def test_beta_method() -> None:
|
||||
assert len(warning_list) == 1
|
||||
warning = warning_list[0].message
|
||||
assert str(warning) == (
|
||||
"The function `beta_method` is in beta. It is actively being worked on, so "
|
||||
"The method `ClassWithBetaMethods.beta_method` is in beta. It is actively "
|
||||
"being worked on, so "
|
||||
"the API may change."
|
||||
)
|
||||
|
||||
@@ -167,7 +170,7 @@ async def test_beta_async_method() -> None:
|
||||
assert len(warning_list) == 1
|
||||
warning = warning_list[0].message
|
||||
assert str(warning) == (
|
||||
"The function `beta_async_method` is in beta. "
|
||||
"The method `ClassWithBetaMethods.beta_async_method` is in beta. "
|
||||
"It is actively being worked on, so the API may change."
|
||||
)
|
||||
|
||||
@@ -186,8 +189,8 @@ def test_beta_classmethod() -> None:
|
||||
assert len(warning_list) == 1
|
||||
warning = warning_list[0].message
|
||||
assert str(warning) == (
|
||||
"The function `beta_classmethod` is in beta. It is actively being worked "
|
||||
"on, so the API may change."
|
||||
"The method `ClassWithBetaMethods.beta_classmethod` is in beta. "
|
||||
"It is actively being worked on, so the API may change."
|
||||
)
|
||||
|
||||
doc = ClassWithBetaMethods.beta_classmethod.__doc__
|
||||
@@ -206,8 +209,8 @@ def test_beta_staticmethod() -> None:
|
||||
warning = warning_list[0].message
|
||||
|
||||
assert str(warning) == (
|
||||
"The function `beta_staticmethod` is in beta. It is actively being worked "
|
||||
"on, so the API may change."
|
||||
"The method `ClassWithBetaMethods.beta_staticmethod` is in beta. "
|
||||
"It is actively being worked on, so the API may change."
|
||||
)
|
||||
doc = ClassWithBetaMethods.beta_staticmethod.__doc__
|
||||
assert isinstance(doc, str)
|
||||
@@ -226,8 +229,8 @@ def test_beta_property() -> None:
|
||||
warning = warning_list[0].message
|
||||
|
||||
assert str(warning) == (
|
||||
"The function `beta_property` is in beta. It is actively being worked on, "
|
||||
"so the API may change."
|
||||
"The method `ClassWithBetaMethods.beta_property` is in beta. "
|
||||
"It is actively being worked on, so the API may change."
|
||||
)
|
||||
doc = ClassWithBetaMethods.beta_property.__doc__
|
||||
assert isinstance(doc, str)
|
||||
@@ -257,13 +260,15 @@ def test_whole_class_beta() -> None:
|
||||
assert len(warning_list) == 2
|
||||
warning = warning_list[0].message
|
||||
assert str(warning) == (
|
||||
"The class `BetaClass` is in beta. It is actively being worked on, so the "
|
||||
"The class `test_whole_class_beta.<locals>.BetaClass` is in beta. "
|
||||
"It is actively being worked on, so the "
|
||||
"API may change."
|
||||
)
|
||||
|
||||
warning = warning_list[1].message
|
||||
assert str(warning) == (
|
||||
"The function `beta_method` is in beta. It is actively being worked on, so "
|
||||
"The method `test_whole_class_beta.<locals>.BetaClass.beta_method` "
|
||||
"is in beta. It is actively being worked on, so "
|
||||
"the API may change."
|
||||
)
|
||||
|
||||
@@ -299,13 +304,15 @@ def test_whole_class_inherited_beta() -> None:
|
||||
assert len(warning_list) == 2
|
||||
warning = warning_list[0].message
|
||||
assert str(warning) == (
|
||||
"The class `BetaClass` is in beta. It is actively being worked on, so the "
|
||||
"The class `test_whole_class_inherited_beta.<locals>.BetaClass` "
|
||||
"is in beta. It is actively being worked on, so the "
|
||||
"API may change."
|
||||
)
|
||||
|
||||
warning = warning_list[1].message
|
||||
assert str(warning) == (
|
||||
"The function `beta_method` is in beta. It is actively being worked on, so "
|
||||
"The method `test_whole_class_inherited_beta.<locals>.BetaClass."
|
||||
"beta_method` is in beta. It is actively being worked on, so "
|
||||
"the API may change."
|
||||
)
|
||||
|
||||
@@ -318,14 +325,16 @@ def test_whole_class_inherited_beta() -> None:
|
||||
assert len(warning_list) == 2
|
||||
warning = warning_list[0].message
|
||||
assert str(warning) == (
|
||||
"The class `InheritedBetaClass` is in beta. "
|
||||
"The class `test_whole_class_inherited_beta.<locals>.InheritedBetaClass` "
|
||||
"is in beta. "
|
||||
"It is actively being worked on, so the "
|
||||
"API may change."
|
||||
)
|
||||
|
||||
warning = warning_list[1].message
|
||||
assert str(warning) == (
|
||||
"The function `beta_method` is in beta. "
|
||||
"The method `test_whole_class_inherited_beta.<locals>.InheritedBetaClass."
|
||||
"beta_method` is in beta. "
|
||||
"It is actively being worked on, so "
|
||||
"the API may change."
|
||||
)
|
||||
@@ -352,7 +361,8 @@ def test_beta_method_pydantic() -> None:
|
||||
assert len(warning_list) == 1
|
||||
warning = warning_list[0].message
|
||||
assert str(warning) == (
|
||||
"The function `beta_method` is in beta. It is actively being worked on, so "
|
||||
"The method `MyModel.beta_method` is in beta. It is actively being "
|
||||
"worked on, so "
|
||||
"the API may change."
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user