Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

---

Expand Down
90 changes: 90 additions & 0 deletions UPDATING.md
Original file line number Diff line number Diff line change
@@ -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).
Expand Down
2 changes: 1 addition & 1 deletion ably/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
logger.addHandler(logging.NullHandler())

api_version = '5'
lib_version = '2.1.3'
lib_version = '3.0.0'
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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 = [
Expand Down
Loading