Repository navigation
Release v4.0.0 - #744
Release v4.0.0#744
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 55 minutes. View limit details
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Release notes and version values CHANGELOG.md, ably/pubsub/version.py, pyproject.toml |
The changelog records the 4.0.0 release changes. The project and library version values change from 3.1.4 to 4.0.0. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Other
Possibly related PRs
- ably/ably-pubsub-python#743: Changes public exports, server import paths, and synchronous class names documented in this changelog.
- ably/ably-pubsub-python#742: Changes options, timing units, validation, and authentication behavior documented in this changelog.
- ably/ably-pubsub-python#741: Changes channel operations and behavior documented in this changelog.
Suggested reviewers: owenpearson
Merge Risk: 
Minimal · previous review 74c30
-
The release notes and version updates present no identified merge-blocking risk. Merge after normal release checks pass.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 1 files. (2 skipped: 2 unsupported.)
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
I’m a rabbit with release notes bright,
Four point oh is penned tonight,
Version tags now match the page,
New notes mark each release stage,
I thump my paws and hop away!
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 4.0.0 release makes it clear that this is the SDK for code running on a server. It is now published as
ably-pubsub-serverand imported fromably.pubsub.server, a single module that is the whole public API. The package name is also what coding assistants see in the install step and the import line, so they get the choice right too.4.0.0 adds LiveObjects, and batch publish and batch presence on the HTTP client. It also removes the APIs and client options deprecated in 3.x, and makes the client behave as the Ably specification and the other Ably SDKs do where 3.x departed from them.
Below is an overview of the major changes in this release.
Please refer to the migration guide for the full details, including a list of all breaking changes and instructions on how to address them.
New package and imports
This repository no longer publishes
ably. Installably-pubsub-server, which installs into theably.pubsubnamespace:ably.pubsub.server, or fromably.pubsub.server.syncfor the synchronous HTTP client. The packages beneath them, such asably.pubsub.types, are internal and free to move.ably.pubsub.servernow exports every type a client returns, hands to a listener or accepts, including those 3.x left in submodules, such asConnectionStateandPresenceMessage, and the encryption helpersgenerate_random_keyandget_default_params.Client API naming
create_realtime_clientandcreate_http_client. ConstructingAblyRealtimeorAblyRestdirectly raisesTypeError, and the API key is passed askey=, no longer positionally.PubSubRealtimeClientandPubSubHttpClient.Restis renamedHttpacross the public API, for exampleRestAnnotationsis nowHttpAnnotations.Sync, as its other classes already did.New features
channel.object, with the path-based API:PathObject,Instance, typed views, subscriptions and batched writes.batch_publishandbatch_presenceon the HTTP client.echo_messagesclient option.max_message_sizeclient option. HTTP publishes are now checked against it too.Client options
_seconds, for exampledisconnected_retry_timeout_secondsandhttp_request_timeout_seconds. The realtime timing options andfallback_retry_timeoutused to take milliseconds. Passing an old name raises aTypeErrorthat names its replacement and converts the value, and every timing option is validated when the client is created.http_max_retry_countcounts fallback hosts only, so the default of 3 tries one more host than before.http_request_timeout_secondsalso bounds writing a request and waiting for a pooled connection.client.optionsread back their defaults rather thanNone.Auth and tokens
keyno longer overrides anauth_callback,auth_url,tokenortoken_detailsgiven alongside it. The client uses token auth and keeps the key for renewal. Passuse_token_auth=Falseto keep basic auth.auth_urlunder their wire names, for exampleclientIdrather thanclient_id, so update your auth server before or together with the clients.TokenDetails.capabilityis the JSON string the Ably service returned. ATokenDetailsknown only by its token string hasexpires,issuedandcapabilityset toNone.create_token_request()appliesdefault_token_params, and token params given to it or torequest_token()replace the defaults rather than merging with them.client_idbefore it connects.authorize()keeps an explicitclient_id, and atoken_detailswhose client ID conflicts withclient_idis rejected when the client is created.Errors
AblyException, with thehttpxexception as itscause: code 50003 for a timeout and 80000 for other network errors.AblyExceptionraised by anauth_callbackreaches the caller unchanged. A callback error with status 403 fails a realtime connection instead of retrying.push.admin.publishraiseAblyException.codeandstatus_codethe wrong way round now carry them correctly.Channels
channels.release()raises anAblyExceptionwith code 90011 unless the channel isINITIALIZED,DETACHEDorFAILED. Detach the channel before releasing it.attach()andsubscribe()raise when the channel does not reachATTACHED.cipherturn encryption off.channel.optionsis aChannelOptions, and HTTP channels acceptChannelOptionstoo.client.channels.my_channelraisesAttributeError. Usechannels.get(name).%20over HTTP, so it reaches the channel it names rather than one with+in its place.connection.ping()waits for a disconnected connection to reconnect instead of raising.Values and types
PresenceMessage.timestampis milliseconds since the epoch, asMessage.timestampis, rather than adatetime.Stats.interval_timeis a timezone-awaredatetime.PresenceActionis anIntEnum.HttpPaginatedResponse.error_codeis anint, andHttpPaginatedResponse.headersa read-only, case-insensitive mapping.None,PaginatedResultno longer has aresponseattribute, andDeviceDetails.pushis aDevicePushDetails.timedeltatokenttlis sent exact to the millisecond.Removed APIs
environment,rest_hostandrealtime_hostclient options are removed in favour ofendpoint, andauth_tokenin favour oftoken. Passing any of them raisesTypeError.log_leveloption is removed. Configure theably.pubsublogger instead.recoveroption is removed, since connection recovery was never implemented.timeoutargument is removed from request methods, andpaginatedfromstats().Supported platforms changes
Summary by CodeRabbit
Release
Compatibility
Bug Fixes