Skip to content

Commit 11cfac3

Browse files
committed
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`
1 parent b13ee8d commit 11cfac3

2 files changed

Lines changed: 84 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
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 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+
14+
### Breaking change
15+
16+
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:
17+
18+
- Realtime publish now uses WebSocket connection instead of REST
19+
- `ably.realtime.realtime_channel` module renamed to `ably.realtime.channel`
20+
- `ChannelOptions` moved to `ably.types.channeloptions`
21+
- REST publish returns publish result with message serials instead of Response object
22+
23+
For detailed migration instructions, please refer to the [Upgrading Guide](UPDATING.md).
24+
325
## [v2.1.3](https://github.com/ably/ably-python/tree/v2.1.3)
426

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

UPDATING.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,67 @@
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+
- Realtime publish 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+
### Realtime publish 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+
365
## Version 1.2.x to 2.x
466

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

0 commit comments

Comments
 (0)