Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions blockbuster/blockbuster.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import os
import platform
import sys
import tempfile
from contextlib import contextmanager
from contextvars import ContextVar
from pathlib import Path
Expand Down Expand Up @@ -344,12 +343,13 @@ def _get_os_wrapped_functions(
)

if platform.python_implementation() != "CPython" or sys.version_info >= (3, 9):
functions["os.scandir"] = BlockBusterFunction(
type(os.scandir(tempfile.tempdir)),
"__next__",
scanned_modules=modules,
excluded_modules=excluded_modules,
)
with os.scandir() as scandir_it:
functions["os.scandir"] = BlockBusterFunction(
type(scandir_it),
"__next__",
scanned_modules=modules,
excluded_modules=excluded_modules,
)

for method in (
"ismount",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "blockbuster"
version = "1.5.20"
version = "1.5.21"
description = "Utility to detect blocking calls in the async event loop"
readme = "README.md"
keywords = ["async", "block", "detect", "event loop", "asyncio"]
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

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

Loading