Skip to content

Commit 64e1e1c

Browse files
committed
chore: use vcdiff lib from central pypi
1 parent 833cc1a commit 64e1e1c

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

ably/types/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(self, client_id=None, log_level=0, tls=True, rest_host=None, realti
2222
fallback_retry_timeout=None, disconnected_retry_timeout=None, idempotent_rest_publishing=None,
2323
loop=None, auto_connect=True, suspended_retry_timeout=None, connectivity_check_url=None,
2424
channel_retry_timeout=Defaults.channel_retry_timeout, add_request_ids=False,
25-
vcdiff_decoder=None, **kwargs):
25+
vcdiff_decoder: VCDiffDecoder = None, **kwargs):
2626

2727
super().__init__(**kwargs)
2828

ably/vcdiff/__init__.py

Whitespace-only changes.
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
"""
2-
VCDiff Plugin for Ably Python SDK
2+
VCDiff Decoder for Ably Python SDK
33
4-
This module provides a production-ready VCDiff decoder plugin using the vcdiff library.
4+
This module provides a production-ready VCDiff decoder using the vcdiff-decoder library.
55
It implements the VCDiffDecoder interface.
66
77
Usage:
8-
from ably import VCDiffPlugin, AblyRealtime
8+
from ably.vcdiff import AblyVCDiffDecoder, AblyRealtime
99
10-
# Create VCDiff plugin
11-
plugin = VCDiffPlugin()
10+
# Create VCDiff decoder
11+
vcdiff_decoder = AblyVCDiffDecoder()
1212
13-
# Create client with plugin
14-
client = AblyRealtime(key="your-key", vcdiff_decoder=plugin)
13+
# Create client with decoder
14+
client = AblyRealtime(key="your-key", vcdiff_decoder=vcdiff_decoder)
1515
1616
# Get channel with delta enabled
17-
channel = client.channels.get("test", {"delta": "vcdiff"})
17+
channel = client.channels.get("test", ChannelOptions(params={"delta": "vcdiff"}))
1818
"""
1919

2020
import logging
@@ -25,9 +25,9 @@
2525
log = logging.getLogger(__name__)
2626

2727

28-
class VCDiffPlugin(VCDiffDecoder):
28+
class AblyVCDiffDecoder(VCDiffDecoder):
2929
"""
30-
Production VCDiff decoder plugin using Ably's vcdiff library.
30+
Production VCDiff decoder using Ably's vcdiff-decoder library.
3131
3232
Raises:
3333
ImportError: If vcdiff is not installed
@@ -38,10 +38,10 @@ def __init__(self):
3838
"""Initialize the VCDiff plugin.
3939
4040
Raises:
41-
ImportError: If vcdiff library is not available
41+
ImportError: If vcdiff-decoder library is not available
4242
"""
4343
try:
44-
import vcdiff
44+
import vcdiff_decoder as vcdiff
4545
self._vcdiff = vcdiff
4646
except ImportError as e:
4747
log.error("vcdiff library not found. Install with: pip install ably[vcdiff]")
@@ -79,4 +79,4 @@ def decode(self, delta: bytes, base: bytes) -> bytes:
7979

8080

8181
# Export for easy importing
82-
__all__ = ['VCDiffPlugin']
82+
__all__ = ['AblyVCDiffDecoder']

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ pyee = [
5656
# Optional dependencies
5757
pycrypto = { version = "^2.6.1", optional = true }
5858
pycryptodome = { version = "*", optional = true }
59-
vcdiff = { version = "^0.1.0a2", source = "experimental", optional = true }
59+
vcdiff-decoder = { version = "^0.1.0a1", optional = true }
6060

6161
[tool.poetry.extras]
6262
oldcrypto = ["pycrypto"]
6363
crypto = ["pycryptodome"]
64-
vcdiff = ["vcdiff"]
64+
vcdiff = ["vcdiff-decoder"]
6565

6666
[tool.poetry.dev-dependencies]
6767
pytest = "^7.1"
@@ -82,7 +82,7 @@ pytest-rerunfailures = [
8282
]
8383
async-case = { version = "^10.1.0", python = "~3.7" }
8484
tokenize_rt = "*"
85-
vcdiff = { version = "^0.1.0a2", source = "experimental" }
85+
vcdiff-decoder = { version = "^0.1.0a1" }
8686

8787
[build-system]
8888
requires = ["poetry-core>=1.0.0"]

0 commit comments

Comments
 (0)