Skip to content

Commit dbedecd

Browse files
authored
python312Packages.langchain: fix build - disable some test paths (#367958)
2 parents 371e69d + 1085d73 commit dbedecd

File tree

3 files changed

+30
-1
lines changed

3 files changed

+30
-1
lines changed

pkgs/development/python-modules/langchain-community/default.nix

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ buildPythonPackage rec {
5353
build-system = [ poetry-core ];
5454

5555
pythonRelaxDeps = [
56+
"numpy"
5657
"pydantic-settings"
5758
"tenacity"
5859
];
@@ -107,6 +108,12 @@ buildPythonPackage rec {
107108
# See https://github.com/NixOS/nixpkgs/pull/326337 and https://github.com/wasmerio/wasmer-python/issues/778
108109
"test_table_info"
109110
"test_sql_database_run"
111+
# pydantic.errors.PydanticUserError: `SQLDatabaseToolkit` is not fully defined; you should define `BaseCache`, then call `SQLDatabaseToolkit.model_rebuild()`.
112+
"test_create_sql_agent"
113+
# pydantic.errors.PydanticUserError: `NatBotChain` is not fully defined; you should define `BaseCache`, then call `NatBotChain.model_rebuild()`.
114+
"test_proper_inputs"
115+
# pydantic.errors.PydanticUserError: `NatBotChain` is not fully defined; you should define `BaseCache`, then call `NatBotChain.model_rebuild()`.
116+
"test_variable_key_naming"
110117
];
111118

112119
meta = {

pkgs/development/python-modules/langchain-mongodb/default.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ buildPythonPackage rec {
3636

3737
build-system = [ poetry-core ];
3838

39+
pythonRelaxDeps = [
40+
"numpy"
41+
];
42+
3943
dependencies = [
4044
langchain-core
4145
numpy

pkgs/development/python-modules/langchain/default.nix

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ buildPythonPackage rec {
5959

6060
buildInputs = [ bash ];
6161

62-
pythonRelaxDeps = [ "tenacity" ];
62+
pythonRelaxDeps = [
63+
"numpy"
64+
"tenacity"
65+
];
6366

6467
dependencies = [
6568
aiohttp
@@ -118,6 +121,21 @@ buildPythonPackage rec {
118121
"test_aliases_hidden"
119122
];
120123

124+
disabledTestPaths = [
125+
# pydantic.errors.PydanticUserError: `ConversationSummaryMemory` is not fully defined; you should define `BaseCache`, then call `ConversationSummaryMemory.model_rebuild()`.
126+
"tests/unit_tests/chains/test_conversation.py"
127+
# pydantic.errors.PydanticUserError: `ConversationSummaryMemory` is not fully defined; you should define `BaseCache`, then call `ConversationSummaryMemory.model_rebuild()`.
128+
"tests/unit_tests/chains/test_memory.py"
129+
# pydantic.errors.PydanticUserError: `ConversationSummaryBufferMemory` is not fully defined; you should define `BaseCache`, then call `ConversationSummaryBufferMemory.model_rebuild()`.
130+
"tests/unit_tests/chains/test_summary_buffer_memory.py"
131+
"tests/unit_tests/output_parsers/test_fix.py"
132+
"tests/unit_tests/chains/test_llm_checker.py"
133+
# TypeError: Can't instantiate abstract class RunnableSerializable[RetryOutputParserRetryChainInput, str] without an implementation for abstract method 'invoke'
134+
"tests/unit_tests/output_parsers/test_retry.py"
135+
# pydantic.errors.PydanticUserError: `LLMSummarizationCheckerChain` is not fully defined; you should define `BaseCache`, then call `LLMSummarizationCheckerChain.model_rebuild()`.
136+
"tests/unit_tests/chains/test_llm_summarization_checker.py"
137+
];
138+
121139
pythonImportsCheck = [ "langchain" ];
122140

123141
passthru = {

0 commit comments

Comments
 (0)