oxarchive 0.3.8__tar.gz → 0.3.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oxarchive
3
- Version: 0.3.8
3
+ Version: 0.3.10
4
4
  Summary: Official Python SDK for 0xarchive - Hyperliquid Historical Data API
5
5
  Project-URL: Homepage, https://0xarchive.io
6
6
  Project-URL: Documentation, https://0xarchive.io/docs/sdks
@@ -24,7 +24,7 @@ Requires-Python: >=3.9
24
24
  Requires-Dist: httpx>=0.25.0
25
25
  Requires-Dist: pydantic>=2.0.0
26
26
  Provides-Extra: all
27
- Requires-Dist: websockets>=12.0; extra == 'all'
27
+ Requires-Dist: websockets>=14.0; extra == 'all'
28
28
  Provides-Extra: dev
29
29
  Requires-Dist: mypy>=1.9.0; extra == 'dev'
30
30
  Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
@@ -32,7 +32,7 @@ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
32
32
  Requires-Dist: pytest>=8.0.0; extra == 'dev'
33
33
  Requires-Dist: ruff>=0.4.0; extra == 'dev'
34
34
  Provides-Extra: websocket
35
- Requires-Dist: websockets>=12.0; extra == 'websocket'
35
+ Requires-Dist: websockets>=14.0; extra == 'websocket'
36
36
  Description-Content-Type: text/markdown
37
37
 
38
38
  # oxarchive
@@ -57,7 +57,7 @@ except ImportError:
57
57
  OxArchiveWs = None # type: ignore
58
58
  WsOptions = None # type: ignore
59
59
 
60
- __version__ = "0.3.8"
60
+ __version__ = "0.3.10"
61
61
 
62
62
  __all__ = [
63
63
  # Client
@@ -31,12 +31,12 @@ from dataclasses import dataclass, field
31
31
  from typing import Any, Callable, Optional, Set, Union
32
32
 
33
33
  try:
34
- import websockets
35
- from websockets.client import WebSocketClientProtocol
34
+ from websockets.asyncio.client import connect as ws_connect, ClientConnection
35
+ from websockets.exceptions import ConnectionClosed
36
36
  from websockets.protocol import State as WsState
37
37
  except ImportError:
38
38
  raise ImportError(
39
- "WebSocket support requires the 'websockets' package. "
39
+ "WebSocket support requires the 'websockets' package (>=14.0). "
40
40
  "Install with: pip install oxarchive[websocket]"
41
41
  )
42
42
 
@@ -257,7 +257,7 @@ class OxArchiveWs:
257
257
  options: WebSocket connection options
258
258
  """
259
259
  self.options = options
260
- self._ws: Optional[WebSocketClientProtocol] = None
260
+ self._ws: Optional[ClientConnection] = None
261
261
  self._state: WsConnectionState = "disconnected"
262
262
  self._subscriptions: Set[str] = set()
263
263
  self._reconnect_attempts = 0
@@ -307,7 +307,7 @@ class OxArchiveWs:
307
307
  url = f"{self.options.ws_url}?apiKey={self.options.api_key}"
308
308
 
309
309
  try:
310
- self._ws = await websockets.connect(url)
310
+ self._ws = await ws_connect(url)
311
311
  self._reconnect_attempts = 0
312
312
  self._set_state("connected")
313
313
 
@@ -651,7 +651,7 @@ class OxArchiveWs:
651
651
  try:
652
652
  message = await self._ws.recv()
653
653
  self._handle_message(message)
654
- except websockets.ConnectionClosed as e:
654
+ except ConnectionClosed as e:
655
655
  logger.info(f"Connection closed: {e.code} {e.reason}")
656
656
  if self._on_close:
657
657
  self._on_close(e.code, e.reason)
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "oxarchive"
7
- version = "0.3.8"
7
+ version = "0.3.10"
8
8
  description = "Official Python SDK for 0xarchive - Hyperliquid Historical Data API"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -33,7 +33,7 @@ dependencies = [
33
33
 
34
34
  [project.optional-dependencies]
35
35
  websocket = [
36
- "websockets>=12.0",
36
+ "websockets>=14.0",
37
37
  ]
38
38
  dev = [
39
39
  "pytest>=8.0.0",
@@ -43,7 +43,7 @@ dev = [
43
43
  "mypy>=1.9.0",
44
44
  ]
45
45
  all = [
46
- "websockets>=12.0",
46
+ "websockets>=14.0",
47
47
  ]
48
48
 
49
49
  [project.urls]
File without changes
File without changes
File without changes
File without changes