feat: Bump blockbuster version to 1.5.0 (#5292)
* Bump blockbuster version to 1.5.0 * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
201d6c7639
commit
c3f36b69a2
5 changed files with 36 additions and 9 deletions
|
|
@ -180,7 +180,7 @@ dev-dependencies = [
|
|||
"asgi-lifespan>=2.1.0",
|
||||
"pytest-github-actions-annotate-failures>=0.2.0",
|
||||
"pytest-codspeed>=3.0.0",
|
||||
"blockbuster>=1.3.2,<1.4",
|
||||
"blockbuster>=1.5.0,<1.6",
|
||||
"types-aiofiles>=24.1.0.20240626",
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
import asyncio
|
||||
|
||||
from loguru import logger
|
||||
|
||||
from langflow.custom.directory_reader import DirectoryReader
|
||||
|
|
@ -83,7 +85,7 @@ def build_custom_component_list_from_path(path: str):
|
|||
|
||||
async def abuild_custom_component_list_from_path(path: str):
|
||||
"""Build a list of custom components for the langchain from a given path."""
|
||||
file_list = load_files_from_path(path)
|
||||
file_list = await asyncio.to_thread(load_files_from_path, path)
|
||||
reader = DirectoryReader(path, compress_code_field=False)
|
||||
|
||||
valid_components, invalid_components = await abuild_and_validate_all_files(reader, file_list)
|
||||
|
|
|
|||
|
|
@ -52,6 +52,9 @@ def blockbuster(request):
|
|||
"io.BufferedWriter.write",
|
||||
"io.TextIOWrapper.read",
|
||||
"io.TextIOWrapper.write",
|
||||
"os.mkdir",
|
||||
"os.stat",
|
||||
"os.path.abspath",
|
||||
]:
|
||||
bb.functions[func].can_block_functions.append(("settings/service.py", {"initialize"}))
|
||||
for func in [
|
||||
|
|
@ -59,6 +62,29 @@ def blockbuster(request):
|
|||
"io.TextIOWrapper.read",
|
||||
]:
|
||||
bb.functions[func].can_block_functions.append(("importlib_metadata/__init__.py", {"metadata"}))
|
||||
|
||||
# TODO: make set_class_code async
|
||||
bb.functions["os.stat"].can_block_functions.append(
|
||||
("langflow/custom/custom_component/component.py", {"set_class_code"})
|
||||
)
|
||||
|
||||
# TODO: follow discussion in https://github.com/encode/httpx/discussions/3456
|
||||
bb.functions["os.stat"].can_block_functions.append(("httpx/_client.py", {"_init_transport"}))
|
||||
|
||||
bb.functions["os.stat"].can_block_functions.append(("linecache.py", {"checkcache", "updatecache"}))
|
||||
bb.functions["os.stat"].can_block_functions.append(("rich/traceback.py", {"_render_stack"}))
|
||||
bb.functions["os.stat"].can_block_functions.append(
|
||||
("langchain_core/_api/internal.py", {"is_caller_internal"})
|
||||
)
|
||||
bb.functions["os.path.abspath"].can_block_functions.extend(
|
||||
[
|
||||
("loguru/_better_exceptions.py", {"_get_lib_dirs", "_format_exception"}),
|
||||
("sqlalchemy/dialects/sqlite/pysqlite.py", {"create_connect_args"}),
|
||||
("_pytest/assertion/rewrite.py", {"_should_rewrite"}),
|
||||
]
|
||||
)
|
||||
bb.functions["os.mkdir"].can_block_functions.append(("_pytest/assertion/rewrite.py", {"try_makedirs"}))
|
||||
bb.functions["os.replace"].can_block_functions.append(("_pytest/assertion/rewrite.py", {"_write_pyc"}))
|
||||
yield bb
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import tempfile
|
||||
|
||||
import aiofiles
|
||||
import anyio
|
||||
import pytest
|
||||
|
||||
|
|
@ -17,7 +16,7 @@ async def test_webhook_endpoint(client, added_webhook_test):
|
|||
endpoint_name = added_webhook_test["endpoint_name"]
|
||||
endpoint = f"api/v1/webhook/{endpoint_name}"
|
||||
# Create a temporary file
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
async with aiofiles.tempfile.TemporaryDirectory() as tmp:
|
||||
file_path = anyio.Path(tmp) / "test_file.txt"
|
||||
|
||||
payload = {"path": str(file_path)}
|
||||
|
|
|
|||
8
uv.lock
generated
8
uv.lock
generated
|
|
@ -520,14 +520,14 @@ wheels = [
|
|||
|
||||
[[package]]
|
||||
name = "blockbuster"
|
||||
version = "1.3.2"
|
||||
version = "1.5.0"
|
||||
source = { registry = "https://pypi.org/simple" }
|
||||
dependencies = [
|
||||
{ name = "forbiddenfruit" },
|
||||
]
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/e4/0b/e61888f0510374e2fc3c86f8edff5f56c28b896c080af7732ed3e6b2f205/blockbuster-1.3.2.tar.gz", hash = "sha256:196a5f8fef3f22c718fd8e547dafc75a1936b87ff2b5a1f73ea233b00cff0d6a", size = 9463 }
|
||||
sdist = { url = "https://files.pythonhosted.org/packages/f1/5d/1999e1a4a204b7a0b72662b8b1390a162b32a601f9a7fbe7549f1e77b3fe/blockbuster-1.5.0.tar.gz", hash = "sha256:f647638413f99fc6a6e47923ce3fa7ff3b9c078b458ed00e6131941db5540fac", size = 10431 }
|
||||
wheels = [
|
||||
{ url = "https://files.pythonhosted.org/packages/9a/c1/745a22df92431b878be1949015164c228a523f97d978ea7f2c7e277e2fc8/blockbuster-1.3.2-py3-none-any.whl", hash = "sha256:57fd9fcc51933cb421400f2b2c708c6fee22269a8691a10a9dbfb671638cfdc7", size = 8153 },
|
||||
{ url = "https://files.pythonhosted.org/packages/7e/06/c9103025eb2e58a2853fbea4be184db4342c37510b09131af9d7b1218e3f/blockbuster-1.5.0-py3-none-any.whl", hash = "sha256:24c2923980a17fe4231b16942d45a117278b8939eeeba64dec3e7b92a91867c6", size = 8475 },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4015,7 +4015,7 @@ requires-dist = [
|
|||
[package.metadata.requires-dev]
|
||||
dev = [
|
||||
{ name = "asgi-lifespan", specifier = ">=2.1.0" },
|
||||
{ name = "blockbuster", specifier = ">=1.3.2,<1.4" },
|
||||
{ name = "blockbuster", specifier = ">=1.5.0,<1.6" },
|
||||
{ name = "dictdiffer", specifier = ">=0.9.0" },
|
||||
{ name = "httpx", specifier = ">=0.27.0" },
|
||||
{ name = "ipykernel", specifier = ">=6.29.0" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue