From b13ee8d503e3e434ea65d590c2fb458fb7f3922c Mon Sep 17 00:00:00 2001 From: evgeny Date: Thu, 22 Jan 2026 11:58:04 +0000 Subject: [PATCH 1/2] chore: bump version for 3.0.0 release --- README.md | 8 ++++---- ably/__init__.py | 2 +- pyproject.toml | 3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 34965aa9..4ee29fd5 100644 --- a/README.md +++ b/README.md @@ -31,15 +31,15 @@ Ably aims to support a wide range of platforms. If you experience any compatibil The following platforms are supported: -| Platform | Support | -|----------|---------| -| Python | Python 3.7+ through 3.13 | +| Platform | Support | +|----------|--------------------------| +| Python | Python 3.7+ through 3.14 | > [!NOTE] > This SDK works across all major operating platforms (Linux, macOS, Windows) as long as Python 3.7+ is available. > [!IMPORTANT] -> SDK versions < 2.0.0-beta.6 will be [deprecated](https://ably.com/docs/platform/deprecate/protocol-v1) from November 1, 2025. +> SDK versions < 2.0.0 are [deprecated](https://ably.com/docs/platform/deprecate/protocol-v1). --- diff --git a/ably/__init__.py b/ably/__init__.py index 2280daa0..5c60ef3b 100644 --- a/ably/__init__.py +++ b/ably/__init__.py @@ -18,4 +18,4 @@ logger.addHandler(logging.NullHandler()) api_version = '5' -lib_version = '2.1.3' +lib_version = '3.0.0' diff --git a/pyproject.toml b/pyproject.toml index 7ea198bc..71214b8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ably" -version = "2.1.3" +version = "3.0.0" description = "Python REST and Realtime client library SDK for Ably realtime messaging service" readme = "LONG_DESCRIPTION.rst" requires-python = ">=3.7" @@ -22,6 +22,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ From 9e4979a89b8d592f2be7c91497ce4680bff5bdbe Mon Sep 17 00:00:00 2001 From: evgeny Date: Thu, 22 Jan 2026 13:32:56 +0000 Subject: [PATCH 2/2] docs: update migration guide and changelog for v3.0.0 release - Added instructions for updating to v3.0.0 in `UPDATING.md` - Detailed breaking changes and enhancements in `CHANGELOG.md` --- CHANGELOG.md | 24 ++++++++++++++ UPDATING.md | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e04dde6..005a6060 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Change Log +## [v3.0.0](https://github.com/ably/ably-python/tree/v3.0.0) + +[Full Changelog](https://github.com/ably/ably-python/compare/v2.1.3...v3.0.0) + +### What's Changed + +- Added realtime publish support for publishing messages to channels over the realtime connection [#648](https://github.com/ably/ably-python/pull/648) +- Added realtime presence support, allowing clients to enter, leave, update presence data, and track presence on channels [#651](https://github.com/ably/ably-python/pull/651) +- Added mutable messages API with support for editing, deleting, and appending to messages [#660](https://github.com/ably/ably-python/pull/660), [#659](https://github.com/ably/ably-python/pull/659) +- Added publish results containing serial of published messages [#660](https://github.com/ably/ably-python/pull/660), [#659](https://github.com/ably/ably-python/pull/659) +- Deprecated `environment`, `rest_host`, and `realtime_host` client options in favor of `endpoint` option [#590](https://github.com/ably/ably-python/pull/590) + +### Breaking change + +The 3.0.0 version of ably-python introduces several breaking changes to improve the realtime experience and align the API with the Ably specification. These include: + +- The realtime channel publish method now uses WebSocket connection instead of REST +- `ably.realtime.realtime_channel` module renamed to `ably.realtime.channel` +- `ChannelOptions` moved to `ably.types.channeloptions` +- REST publish returns publish result with message serials instead of Response object +- Deprecated `environment`, `rest_host`, and `realtime_host` client options in favor of `endpoint` option + +For detailed migration instructions, please refer to the [Upgrading Guide](UPDATING.md). + ## [v2.1.3](https://github.com/ably/ably-python/tree/v2.1.3) [Full Changelog](https://github.com/ably/ably-python/compare/v2.1.2...v2.1.3) diff --git a/UPDATING.md b/UPDATING.md index fff56553..4b4dd719 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -1,5 +1,95 @@ # Upgrade / Migration Guide +## Version 2.x to 3.0.0 + +The 3.0.0 version of ably-python introduces several breaking changes to improve the realtime experience and align the API with the Ably specification. These include: + + - The realtime channel publish method now uses WebSocket connection instead of REST + - `ably.realtime.realtime_channel` module renamed to `ably.realtime.channel` + - `ChannelOptions` moved to `ably.types.channeloptions` + - REST publish returns publish result with message serials instead of Response object + +### The realtime channel publish method now uses WebSocket + +In previous versions, publishing messages on a realtime channel would use the REST API. In version 3.0.0, realtime channels now publish messages over the WebSocket connection, which is more efficient and provides better consistency. + +This change is mostly transparent to users, but you should be aware that: +- Messages are now published through the realtime connection +- You will receive publish results containing message serials +- The behavior is now consistent with other Ably SDKs + +### Module rename: `ably.realtime.realtime_channel` to `ably.realtime.channel` + +If you were importing from `ably.realtime.realtime_channel`, you will need to update your imports: + +Example 2.x code: +```python +from ably.realtime.realtime_channel import RealtimeChannel +``` + +Example 3.0.0 code: +```python +from ably.realtime.channel import RealtimeChannel +``` + +### `ChannelOptions` moved to `ably.types.channeloptions` + +The `ChannelOptions` class has been moved to a new location for better organization. + +Example 2.x code: +```python +from ably.realtime.realtime_channel import ChannelOptions +``` + +Example 3.0.0 code: +```python +from ably.types.channeloptions import ChannelOptions +``` + +### REST publish returns publish result with serials + +The REST `publish` method now returns a publish result object containing the message serial(s) instead of a raw Response object with `status_code`. + +Example 2.x code: +```python +response = await channel.publish('event', 'message') +print(response.status_code) # 201 +``` + +Example 3.0.0 code: +```python +result = await channel.publish('event', 'message') +print(result.serials) # message serials +``` + +### Client options: `endpoint` replaces `environment`, `rest_host`, and `realtime_host` + +The `environment`, `rest_host`, and `realtime_host` client options have been deprecated in favor of a single `endpoint` option for better consistency and simplicity. + +Example 2.x code: +```python +# Using environment +rest_client = AblyRest(key='api:key', environment='custom') + +# Or using rest_host +rest_client = AblyRest(key='api:key', rest_host='custom.ably.net') + +# For realtime +realtime_client = AblyRealtime(key='api:key', realtime_host='custom.ably.net') +``` + +Example 3.0.0 code: +```python +# Using environment +rest_client = AblyRest(key='api:key', endpoint='custom') + +# Using endpoint for REST +rest_client = AblyRest(key='api:key', endpoint='custom.ably.net') + +# Using endpoint for Realtime +realtime_client = AblyRealtime(key='api:key', endpoint='custom.ably.net') +``` + ## Version 1.2.x to 2.x The 2.0 version of ably-python introduces our first Python realtime client. For guidance on how to use the realtime client, refer to the usage examples in the [README](./README.md).