Skip to content

Commit

Permalink
feat: Bump blockbuster version to 1.5.2 (#5331)
Browse files Browse the repository at this point in the history
Bump blockbuster version to 1.5.2
  • Loading branch information
cbornet authored Dec 18, 2024
1 parent 1cda13d commit 8f6241b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 24 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.5.0,<1.6",
"blockbuster>=1.5.2,<1.6",
"types-aiofiles>=24.1.0.20240626",
]

Expand Down
30 changes: 11 additions & 19 deletions src/backend/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,35 +56,27 @@ def blockbuster(request):
"os.stat",
"os.path.abspath",
]:
bb.functions[func].can_block_functions.append(("settings/service.py", {"initialize"}))
bb.functions[func].can_block_in("settings/service.py", "initialize")
for func in [
"io.BufferedReader.read",
"io.TextIOWrapper.read",
]:
bb.functions[func].can_block_functions.append(("importlib_metadata/__init__.py", {"metadata"}))
bb.functions[func].can_block_in("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"})
)
bb.functions["os.stat"].can_block_in("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_in("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.stat"].can_block_in("rich/traceback.py", "_render_stack")
bb.functions["os.stat"].can_block_in("langchain_core/_api/internal.py", "is_caller_internal")

(
bb.functions["os.path.abspath"]
.can_block_in("loguru/_better_exceptions.py", {"_get_lib_dirs", "_format_exception"})
.can_block_in("sqlalchemy/dialects/sqlite/pysqlite.py", "create_connect_args")
)
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


Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 8f6241b

Please sign in to comment.