Skip to content

Bulk asynchronous downloader for multiple file hosts

refactor: do not re-export dataclass utils

NTFSvolume2cef26cb2dc5
diff --git a/cyberdrop_dl/crawlers/_chibisafe.py b/cyberdrop_dl/crawlers/_chibisafe.py
index 355e3cbb1..21086de06 100644
--- a/cyberdrop_dl/crawlers/_chibisafe.py
+++ b/cyberdrop_dl/crawlers/_chibisafe.py
@@ -17,7 +17,8 @@ from pydantic import Field
from cyberdrop_dl.crawlers.crawler import Crawler
from cyberdrop_dl.models import DeferedModel
-from cyberdrop_dl.utils import DictDataclass, error_handling_wrapper
+from cyberdrop_dl.utils import error_handling_wrapper
+from cyberdrop_dl.utils.dataclass import DictDataclass
from cyberdrop_dl.utils.dates import to_timestamp
if TYPE_CHECKING:
diff --git a/cyberdrop_dl/crawlers/acast.py b/cyberdrop_dl/crawlers/acast.py
index 45c9e390f..fcfe87807 100644
--- a/cyberdrop_dl/crawlers/acast.py
+++ b/cyberdrop_dl/crawlers/acast.py
@@ -6,7 +6,7 @@ from typing import TYPE_CHECKING, ClassVar
from cyberdrop_dl.crawlers.crawler import API, Crawler, SupportedPaths
from cyberdrop_dl.url_objects import AbsoluteHttpURL, ScrapeItem
from cyberdrop_dl.utils import error_handling_wrapper
-from cyberdrop_dl.utils._dataclasses import DictDataclass
+from cyberdrop_dl.utils.dataclass import DictDataclass
if TYPE_CHECKING:
from collections.abc import Iterable
diff --git a/cyberdrop_dl/crawlers/archive_org.py b/cyberdrop_dl/crawlers/archive_org.py
index 668b3da82..6edf951e8 100644
--- a/cyberdrop_dl/crawlers/archive_org.py
+++ b/cyberdrop_dl/crawlers/archive_org.py
@@ -12,7 +12,8 @@ from typing import TYPE_CHECKING, Any, ClassVar
from cyberdrop_dl.crawlers.crawler import API, Crawler, RateLimit, SupportedPaths
from cyberdrop_dl.exceptions import ScrapeError
from cyberdrop_dl.url_objects import AbsoluteHttpURL
-from cyberdrop_dl.utils import DictDataclass, error_handling_wrapper
+from cyberdrop_dl.utils import error_handling_wrapper
+from cyberdrop_dl.utils.dataclass import DictDataclass
if TYPE_CHECKING:
from collections.abc import Generator, Iterable
diff --git a/cyberdrop_dl/crawlers/beeg.py b/cyberdrop_dl/crawlers/beeg.py
index 8ed265ac3..5e5b56712 100644
--- a/cyberdrop_dl/crawlers/beeg.py
+++ b/cyberdrop_dl/crawlers/beeg.py
@@ -6,7 +6,8 @@ from typing import TYPE_CHECKING, Any, ClassVar, Literal
from cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths
from cyberdrop_dl.url_objects import AbsoluteHttpURL
-from cyberdrop_dl.utils import DictDataclass, error_handling_wrapper
+from cyberdrop_dl.utils import error_handling_wrapper
+from cyberdrop_dl.utils.dataclass import DictDataclass
if TYPE_CHECKING:
from collections.abc import Generator
diff --git a/cyberdrop_dl/crawlers/dropbox.py b/cyberdrop_dl/crawlers/dropbox.py
index 40f984536..e2e86eddf 100644
--- a/cyberdrop_dl/crawlers/dropbox.py
+++ b/cyberdrop_dl/crawlers/dropbox.py
@@ -6,7 +6,8 @@ from typing import TYPE_CHECKING, Any, ClassVar
from cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths
from cyberdrop_dl.exceptions import LoginError, ScrapeError
from cyberdrop_dl.url_objects import AbsoluteHttpURL
-from cyberdrop_dl.utils import DictDataclass, error_handling_wrapper
+from cyberdrop_dl.utils import error_handling_wrapper
+from cyberdrop_dl.utils.dataclass import DictDataclass
if TYPE_CHECKING:
from collections.abc import AsyncGenerator
diff --git a/cyberdrop_dl/crawlers/hitomi_la.py b/cyberdrop_dl/crawlers/hitomi_la.py
index 2eb467ea0..148a3e436 100644
--- a/cyberdrop_dl/crawlers/hitomi_la.py
+++ b/cyberdrop_dl/crawlers/hitomi_la.py
@@ -15,7 +15,8 @@ from cyberdrop_dl.crawlers.crawler import API, Crawler, SupportedPaths
from cyberdrop_dl.exceptions import ScrapeError
from cyberdrop_dl.filepath import get_filename_and_ext
from cyberdrop_dl.url_objects import AbsoluteHttpURL
-from cyberdrop_dl.utils import DictDataclass, error_handling_wrapper
+from cyberdrop_dl.utils import error_handling_wrapper
+from cyberdrop_dl.utils.dataclass import DictDataclass
if TYPE_CHECKING:
from collections.abc import AsyncGenerator, Generator, Iterable, Mapping
diff --git a/cyberdrop_dl/crawlers/livestreamfails.py b/cyberdrop_dl/crawlers/livestreamfails.py
index b98781a04..38a14b55a 100644
--- a/cyberdrop_dl/crawlers/livestreamfails.py
+++ b/cyberdrop_dl/crawlers/livestreamfails.py
@@ -5,7 +5,8 @@ from typing import TYPE_CHECKING, Any, ClassVar
from cyberdrop_dl.crawlers.crawler import API, Crawler, RateLimit, SupportedPaths
from cyberdrop_dl.url_objects import AbsoluteHttpURL
-from cyberdrop_dl.utils import deserialize, error_handling_wrapper
+from cyberdrop_dl.utils import error_handling_wrapper
+from cyberdrop_dl.utils.dataclass import deserialize
if TYPE_CHECKING:
from collections.abc import AsyncGenerator
diff --git a/cyberdrop_dl/crawlers/mediafire.py b/cyberdrop_dl/crawlers/mediafire.py
index 2d6e158b0..aedb39f2e 100644
--- a/cyberdrop_dl/crawlers/mediafire.py
+++ b/cyberdrop_dl/crawlers/mediafire.py
@@ -11,7 +11,8 @@ from typing import TYPE_CHECKING, Any, ClassVar, Literal
from cyberdrop_dl.crawlers.crawler import API, Crawler, SupportedPaths, auto_task_id
from cyberdrop_dl.exceptions import ScrapeError
from cyberdrop_dl.url_objects import AbsoluteHttpURL
-from cyberdrop_dl.utils import DictDataclass, css, error_handling_wrapper, is_blob_or_svg
+from cyberdrop_dl.utils import css, error_handling_wrapper, is_blob_or_svg
+from cyberdrop_dl.utils.dataclass import DictDataclass
if TYPE_CHECKING:
from collections.abc import AsyncGenerator
diff --git a/cyberdrop_dl/crawlers/pmvhaven.py b/cyberdrop_dl/crawlers/pmvhaven.py
index d31f0287f..8dfd5097c 100644
--- a/cyberdrop_dl/crawlers/pmvhaven.py
+++ b/cyberdrop_dl/crawlers/pmvhaven.py
@@ -8,7 +8,8 @@ from typing import TYPE_CHECKING, Any, ClassVar
from cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths
from cyberdrop_dl.mediaprops import Resolution
from cyberdrop_dl.url_objects import AbsoluteHttpURL
-from cyberdrop_dl.utils import DictDataclass, error_handling_wrapper, nuxt
+from cyberdrop_dl.utils import error_handling_wrapper, nuxt
+from cyberdrop_dl.utils.dataclass import DictDataclass
if TYPE_CHECKING:
from collections.abc import AsyncGenerator, Generator, Iterable
diff --git a/cyberdrop_dl/crawlers/rule34vault.py b/cyberdrop_dl/crawlers/rule34vault.py
index 47e43164f..4fa782574 100644
--- a/cyberdrop_dl/crawlers/rule34vault.py
+++ b/cyberdrop_dl/crawlers/rule34vault.py
@@ -5,7 +5,8 @@ from typing import TYPE_CHECKING, Any, ClassVar
from cyberdrop_dl.crawlers.crawler import API, Crawler, SupportedPaths
from cyberdrop_dl.url_objects import AbsoluteHttpURL
-from cyberdrop_dl.utils import DictDataclass, error_handling_wrapper
+from cyberdrop_dl.utils import error_handling_wrapper
+from cyberdrop_dl.utils.dataclass import DictDataclass
if TYPE_CHECKING:
from collections.abc import AsyncGenerator, Iterable
diff --git a/cyberdrop_dl/crawlers/tiktok.py b/cyberdrop_dl/crawlers/tiktok.py
index 1d572061d..c45afecdb 100644
--- a/cyberdrop_dl/crawlers/tiktok.py
+++ b/cyberdrop_dl/crawlers/tiktok.py
@@ -7,7 +7,8 @@ from typing import TYPE_CHECKING, Any, ClassVar, Self
from cyberdrop_dl.crawlers.crawler import Crawler, RateLimit, SupportedPaths, auto_task_id
from cyberdrop_dl.exceptions import ScrapeError
from cyberdrop_dl.url_objects import AbsoluteHttpURL, MediaItem
-from cyberdrop_dl.utils import DictDataclass, error_handling_wrapper
+from cyberdrop_dl.utils import error_handling_wrapper
+from cyberdrop_dl.utils.dataclass import DictDataclass
if TYPE_CHECKING:
from collections.abc import AsyncGenerator, Mapping
diff --git a/cyberdrop_dl/crawlers/whyp_it.py b/cyberdrop_dl/crawlers/whyp_it.py
index 29fef6f9b..55ef024a6 100644
--- a/cyberdrop_dl/crawlers/whyp_it.py
+++ b/cyberdrop_dl/crawlers/whyp_it.py
@@ -5,7 +5,8 @@ from typing import TYPE_CHECKING, Any, ClassVar
from cyberdrop_dl.crawlers.crawler import API, Crawler, RateLimit, SupportedPaths
from cyberdrop_dl.url_objects import AbsoluteHttpURL
-from cyberdrop_dl.utils import deserialize, error_handling_wrapper, parse_url
+from cyberdrop_dl.utils import error_handling_wrapper, parse_url
+from cyberdrop_dl.utils.dataclass import deserialize
if TYPE_CHECKING:
from collections.abc import AsyncGenerator, Iterable
diff --git a/cyberdrop_dl/crawlers/yandex_disk.py b/cyberdrop_dl/crawlers/yandex_disk.py
index 19c0abaa3..de7564924 100644
--- a/cyberdrop_dl/crawlers/yandex_disk.py
+++ b/cyberdrop_dl/crawlers/yandex_disk.py
@@ -8,7 +8,8 @@ from typing import TYPE_CHECKING, Any, ClassVar, Literal, Self
from cyberdrop_dl.crawlers.crawler import Crawler, SupportedDomains, SupportedPaths
from cyberdrop_dl.exceptions import DDOSGuardError, DownloadError, ScrapeError
from cyberdrop_dl.url_objects import AbsoluteHttpURL
-from cyberdrop_dl.utils import DictDataclass, css, error_handling_wrapper
+from cyberdrop_dl.utils import css, error_handling_wrapper
+from cyberdrop_dl.utils.dataclass import DictDataclass
if TYPE_CHECKING:
from collections.abc import Generator
diff --git a/cyberdrop_dl/crawlers/yurivan.py b/cyberdrop_dl/crawlers/yurivan.py
index f61a10c51..d3f82b379 100644
--- a/cyberdrop_dl/crawlers/yurivan.py
+++ b/cyberdrop_dl/crawlers/yurivan.py
@@ -7,7 +7,8 @@ from pydantic import dataclasses
from cyberdrop_dl.crawlers.crawler import Crawler, SupportedPaths
from cyberdrop_dl.exceptions import ScrapeError
from cyberdrop_dl.url_objects import AbsoluteHttpURL
-from cyberdrop_dl.utils import css, deserialize, error_handling_wrapper, next_js
+from cyberdrop_dl.utils import css, error_handling_wrapper, next_js
+from cyberdrop_dl.utils.dataclass import deserialize
if TYPE_CHECKING:
from bs4 import BeautifulSoup
diff --git a/cyberdrop_dl/ffmpeg.py b/cyberdrop_dl/ffmpeg.py
index 26b1c0b40..abda7a066 100644
--- a/cyberdrop_dl/ffmpeg.py
+++ b/cyberdrop_dl/ffmpeg.py
@@ -15,7 +15,7 @@ from typing import TYPE_CHECKING, Any, Literal, Self, TypedDict
from multidict import CIMultiDict, CIMultiDictProxy
from cyberdrop_dl import aio
-from cyberdrop_dl.utils import DictDataclass
+from cyberdrop_dl.utils.dataclass import DictDataclass
if TYPE_CHECKING:
from collections.abc import Generator, Iterable, Iterator, Mapping, Sequence
diff --git a/cyberdrop_dl/utils/__init__.py b/cyberdrop_dl/utils/__init__.py
index bc9632160..53b5dbbf1 100644
--- a/cyberdrop_dl/utils/__init__.py
+++ b/cyberdrop_dl/utils/__init__.py
@@ -9,7 +9,6 @@ import sys
from typing import TYPE_CHECKING, Any, cast
from cyberdrop_dl.constants import MISSING
-from cyberdrop_dl.utils._dataclasses import DictDataclass, deserialize, filter_data # noqa: F401
from cyberdrop_dl.utils._errors import error_handling_context, error_handling_wrapper # noqa: F401
from cyberdrop_dl.utils._url import parse_http_url as parse_url # noqa: F401
from cyberdrop_dl.utils._url import remove_trailing_slash # noqa: F401
diff --git a/cyberdrop_dl/utils/_dataclasses.py b/cyberdrop_dl/utils/dataclass.py
similarity index 100%
rename from cyberdrop_dl/utils/_dataclasses.py
rename to cyberdrop_dl/utils/dataclass.py
diff --git a/pyproject.toml b/pyproject.toml
index 7c690bda8..7a5b03c2d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -171,6 +171,7 @@ banned-from = [
"base64",
"cyberdrop_dl.aio",
"cyberdrop_dl.stats",
+ "dataclasses",
"datetime",
"functools",
"hashlib",