Skip to content

Commit b0499a9

Browse files
authored
Merge pull request #666 from ably/release/3.0.0
Release/3.0.0
2 parents 8e12d34 + 9e4979a commit b0499a9

File tree

5 files changed

+121
-6
lines changed

5 files changed

+121
-6
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Change Log
22

3+
## [v3.0.0](https://github.com/ably/ably-python/tree/v3.0.0)
4+
5+
[Full Changelog](https://github.com/ably/ably-python/compare/v2.1.3...v3.0.0)
6+
7+
### What's Changed
8+
9+
- Added realtime publish support for publishing messages to channels over the realtime connection [#648](https://github.com/ably/ably-python/pull/648)
10+
- 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)
11+
- 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)
12+
- 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)
13+
- Deprecated `environment`, `rest_host`, and `realtime_host` client options in favor of `endpoint` option [#590](https://github.com/ably/ably-python/pull/590)
14+
15+
### Breaking change
16+
17+
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:
18+
19+
- The realtime channel publish method now uses WebSocket connection instead of REST
20+
- `ably.realtime.realtime_channel` module renamed to `ably.realtime.channel`
21+
- `ChannelOptions` moved to `ably.types.channeloptions`
22+
- REST publish returns publish result with message serials instead of Response object
23+
- Deprecated `environment`, `rest_host`, and `realtime_host` client options in favor of `endpoint` option
24+
25+
For detailed migration instructions, please refer to the [Upgrading Guide](UPDATING.md).
26+
327
## [v2.1.3](https://github.com/ably/ably-python/tree/v2.1.3)
428

529
[Full Changelog](https://github.com/ably/ably-python/compare/v2.1.2...v2.1.3)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ Ably aims to support a wide range of platforms. If you experience any compatibil
3131

3232
The following platforms are supported:
3333

34-
| Platform | Support |
35-
|----------|---------|
36-
| Python | Python 3.7+ through 3.13 |
34+
| Platform | Support |
35+
|----------|--------------------------|
36+
| Python | Python 3.7+ through 3.14 |
3737

3838
> [!NOTE]
3939
> This SDK works across all major operating platforms (Linux, macOS, Windows) as long as Python 3.7+ is available.
4040
4141
> [!IMPORTANT]
42-
> SDK versions < 2.0.0-beta.6 will be [deprecated](https://ably.com/docs/platform/deprecate/protocol-v1) from November 1, 2025.
42+
> SDK versions < 2.0.0 are [deprecated](https://ably.com/docs/platform/deprecate/protocol-v1).
4343
4444
---
4545

UPDATING.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,95 @@
11
# Upgrade / Migration Guide
22

3+
## Version 2.x to 3.0.0
4+
5+
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:
6+
7+
- The realtime channel publish method now uses WebSocket connection instead of REST
8+
- `ably.realtime.realtime_channel` module renamed to `ably.realtime.channel`
9+
- `ChannelOptions` moved to `ably.types.channeloptions`
10+
- REST publish returns publish result with message serials instead of Response object
11+
12+
### The realtime channel publish method now uses WebSocket
13+
14+
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.
15+
16+
This change is mostly transparent to users, but you should be aware that:
17+
- Messages are now published through the realtime connection
18+
- You will receive publish results containing message serials
19+
- The behavior is now consistent with other Ably SDKs
20+
21+
### Module rename: `ably.realtime.realtime_channel` to `ably.realtime.channel`
22+
23+
If you were importing from `ably.realtime.realtime_channel`, you will need to update your imports:
24+
25+
Example 2.x code:
26+
```python
27+
from ably.realtime.realtime_channel import RealtimeChannel
28+
```
29+
30+
Example 3.0.0 code:
31+
```python
32+
from ably.realtime.channel import RealtimeChannel
33+
```
34+
35+
### `ChannelOptions` moved to `ably.types.channeloptions`
36+
37+
The `ChannelOptions` class has been moved to a new location for better organization.
38+
39+
Example 2.x code:
40+
```python
41+
from ably.realtime.realtime_channel import ChannelOptions
42+
```
43+
44+
Example 3.0.0 code:
45+
```python
46+
from ably.types.channeloptions import ChannelOptions
47+
```
48+
49+
### REST publish returns publish result with serials
50+
51+
The REST `publish` method now returns a publish result object containing the message serial(s) instead of a raw Response object with `status_code`.
52+
53+
Example 2.x code:
54+
```python
55+
response = await channel.publish('event', 'message')
56+
print(response.status_code) # 201
57+
```
58+
59+
Example 3.0.0 code:
60+
```python
61+
result = await channel.publish('event', 'message')
62+
print(result.serials) # message serials
63+
```
64+
65+
### Client options: `endpoint` replaces `environment`, `rest_host`, and `realtime_host`
66+
67+
The `environment`, `rest_host`, and `realtime_host` client options have been deprecated in favor of a single `endpoint` option for better consistency and simplicity.
68+
69+
Example 2.x code:
70+
```python
71+
# Using environment
72+
rest_client = AblyRest(key='api:key', environment='custom')
73+
74+
# Or using rest_host
75+
rest_client = AblyRest(key='api:key', rest_host='custom.ably.net')
76+
77+
# For realtime
78+
realtime_client = AblyRealtime(key='api:key', realtime_host='custom.ably.net')
79+
```
80+
81+
Example 3.0.0 code:
82+
```python
83+
# Using environment
84+
rest_client = AblyRest(key='api:key', endpoint='custom')
85+
86+
# Using endpoint for REST
87+
rest_client = AblyRest(key='api:key', endpoint='custom.ably.net')
88+
89+
# Using endpoint for Realtime
90+
realtime_client = AblyRealtime(key='api:key', endpoint='custom.ably.net')
91+
```
92+
393
## Version 1.2.x to 2.x
494

595
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).

ably/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
logger.addHandler(logging.NullHandler())
1919

2020
api_version = '5'
21-
lib_version = '2.1.3'
21+
lib_version = '3.0.0'

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "ably"
3-
version = "2.1.3"
3+
version = "3.0.0"
44
description = "Python REST and Realtime client library SDK for Ably realtime messaging service"
55
readme = "LONG_DESCRIPTION.rst"
66
requires-python = ">=3.7"
@@ -22,6 +22,7 @@ classifiers = [
2222
"Programming Language :: Python :: 3.11",
2323
"Programming Language :: Python :: 3.12",
2424
"Programming Language :: Python :: 3.13",
25+
"Programming Language :: Python :: 3.14",
2526
"Topic :: Software Development :: Libraries :: Python Modules",
2627
]
2728
dependencies = [

0 commit comments

Comments
 (0)