diff --git a/MANIFEST.in b/MANIFEST.in index a51b874d..2580a3d7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -7,9 +7,9 @@ include README.md LICENSE pyproject.toml graft kraken +prune .cache +prune .github prune doc prune examples prune tests prune venv -prune .github -prune .cache diff --git a/kraken/spot/websocket_v1.py b/kraken/spot/websocket_v1.py index f745bee7..6aad3165 100644 --- a/kraken/spot/websocket_v1.py +++ b/kraken/spot/websocket_v1.py @@ -13,6 +13,7 @@ import asyncio import json +import warnings from copy import deepcopy from typing import Any, Callable, Optional @@ -24,6 +25,8 @@ class KrakenSpotWSClientV1(KrakenSpotWSClientBase): """ + .. deprecated:: v2.2.0 + Class to access public and private/authenticated websocket connections. **This client only supports the Kraken Websocket API v1.** @@ -164,6 +167,13 @@ def __init__( no_public: bool = False, beta: bool = False, ): + warnings.warn( + "The Kraken websocket API v1 is marked as deprecated and " + "its support could be removed in the future. " + "Please migrate to websocket API v2.", + category=DeprecationWarning, + stacklevel=2, + ) super().__init__( key=key, secret=secret, diff --git a/pyproject.toml b/pyproject.toml index 1c76ed6b..b53b7352 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -83,6 +83,10 @@ junit_family = "xunit2" testpaths = ["tests"] [tool.pytest.ini_options] +filterwarnings = [ + "ignore:The Kraken websocket API v1 is marked as deprecated*:DeprecationWarning", +] + cache_dir = ".cache/pytest" markers = [ "wip: Used to run a specific test by hand.", @@ -107,7 +111,6 @@ markers = [ "futures_funding: … Futures Funding endpoint.", "futures_websocket: … Futures Websocket endpoint.", ] - [tool.coverage.run] source = ["kraken"] omit = ["*tests*"] @@ -120,6 +123,7 @@ skip_empty = true skip = "CHANGELOG.md,examples/market_client_example.ipynb" check-filenames = true + # ========= T Y P I N G ======================================================== # [tool.mypy] diff --git a/tests/spot/test_spot_orderbook_v1.py b/tests/spot/test_spot_orderbook_v1.py index c4ba8a6f..47cc7432 100644 --- a/tests/spot/test_spot_orderbook_v1.py +++ b/tests/spot/test_spot_orderbook_v1.py @@ -30,9 +30,7 @@ @pytest.mark.spot_websocket() @pytest.mark.spot_orderbook() def test_create_public_bot(caplog: Any) -> None: - """ - Checks if the websocket client can be instantiated. - """ + """Checks if the websocket client can be instantiated.""" async def create_bot() -> None: orderbook: OrderbookClientV1Wrapper = OrderbookClientV1Wrapper()