test_no_more_changes_to_proxy_community() — langchain Function Reference
Architecture documentation for the test_no_more_changes_to_proxy_community() function in test_imports.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 259c1875_6b99_3d5e_ea98_57f1d0b4bb46["test_no_more_changes_to_proxy_community()"] 1a4ae21b_d553_aa88_bac6_fd6971a4e02d["test_imports.py"] 259c1875_6b99_3d5e_ea98_57f1d0b4bb46 -->|defined in| 1a4ae21b_d553_aa88_bac6_fd6971a4e02d 97d4d94c_65f3_c42b_7930_3764d443c63a["extract_deprecated_lookup()"] 259c1875_6b99_3d5e_ea98_57f1d0b4bb46 -->|calls| 97d4d94c_65f3_c42b_7930_3764d443c63a style 259c1875_6b99_3d5e_ea98_57f1d0b4bb46 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/test_imports.py lines 78–108
def test_no_more_changes_to_proxy_community() -> None:
"""This test is meant to catch any changes to the proxy community module.
Imports from langchain to community are officially DEPRECATED. Contributors
should not be adding new imports from langchain to community. This test
is meant to catch any new changes to the proxy community module.
"""
library_code = PKG_ROOT / "langchain_classic"
hash_ = 0
for path in library_code.rglob("*.py"):
# Calculate the relative path to the module
if not str(path).endswith("__init__.py"):
continue
deprecated_lookup = extract_deprecated_lookup(str(path))
if deprecated_lookup is None:
continue
# This uses a very simple hash, so it's not foolproof, but it should catch
# most cases.
hash_ += len(str(sorted(deprecated_lookup.items())))
evil_magic_number = 38644
assert hash_ == evil_magic_number, (
"If you're triggering this test, you're likely adding a new import "
"to the langchain package that is importing something from "
"langchain_community. This test is meant to catch such such imports "
"as they are officially DEPRECATED. Please do not add any new imports "
"from langchain_community to the langchain package. "
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_no_more_changes_to_proxy_community() do?
test_no_more_changes_to_proxy_community() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/test_imports.py.
Where is test_no_more_changes_to_proxy_community() defined?
test_no_more_changes_to_proxy_community() is defined in libs/langchain/tests/unit_tests/test_imports.py at line 78.
What does test_no_more_changes_to_proxy_community() call?
test_no_more_changes_to_proxy_community() calls 1 function(s): extract_deprecated_lookup.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free