diff --git a/src/apify_client/consts.py b/src/apify_client/consts.py deleted file mode 100644 index 66a2500c..00000000 --- a/src/apify_client/consts.py +++ /dev/null @@ -1,33 +0,0 @@ -from __future__ import annotations - -import warnings -from typing import Any - -from apify_shared.consts import ActorJobStatus as _ActorJobStatus # noqa: F401 -from apify_shared.consts import ActorSourceType as _ActorSourceType # noqa: F401 -from apify_shared.consts import MetaOrigin as _MetaOrigin # noqa: F401 -from apify_shared.consts import WebhookEventType as _WebhookEventType # noqa: F401 - -DEPRECATED_NAMES = [ - 'ActorJobStatus', - 'ActorSourceType', - 'MetaOrigin', - 'WebhookEventType', -] - - -# The following piece of code is highly inspired by the example in https://peps.python.org/pep-0562. -# The else branch is missing intentionally! Check the following discussion for details: -# https://github.com/apify/apify-client-python/pull/132#discussion_r1277294315. -def __getattr__(name: str) -> Any: - if name in DEPRECATED_NAMES: - warnings.warn( - ( - f'Importing "{name}" from "apify_client.consts" is deprecated and will be removed in the future. ' - 'Please use "apify_shared" library instead.' - ), - category=DeprecationWarning, - stacklevel=2, - ) - return globals()[f'_{name}'] - raise AttributeError(f'module {__name__!r} has no attribute {name!r}') diff --git a/uv.lock b/uv.lock index 4e297b08..26e7a5df 100644 --- a/uv.lock +++ b/uv.lock @@ -23,7 +23,7 @@ wheels = [ [[package]] name = "apify-client" -version = "1.12.2" +version = "1.12.3" source = { editable = "." } dependencies = [ { name = "apify-shared" },