Releases: pubnub/python
Releases · pubnub/python
10.6.2
March 26 2026
Fixed
- Ensure
PubNubAsyncioExceptionalways carries a validPNStatuswith error data instead ofNone. - Handle cases where status or
error_dataisNoneinstead of raisingAttributeError. - Match
PubNubAsyncioExceptionwhich is whatrequest_futureactually returns on failure. - Handle
-1 (unlimited)correctly sinceattempts > -1was alwaystrue, causing immediate give-up. - Use delay class defaults instead of config value which could be
NonecausingTypeErroron comparison. - Prevent falling through to start a heartbeat after deciding to give up.
- Set all four timeout fields explicitly instead of a 2-tuple that left write and pool unset.
- On macOS and Linux,
time.monotonic()does not advance during system sleep, causing socket andasynciotimeouts (310s subscribe) to stall for hours of wall-clock time. Addtime.time()-based deadline checks that detect sleep and cancel stale requests within ~5s of wake. - Use
asyncio.wait()with periodictime.time()checks instead of a single monotonic-basedwait_for(), yielding to the event loop between checks. - Persistent single daemon thread monitors
time.time()every 5s and closes thehttpxsession when the wall-clock deadline passes, interrupting the blocking socket read. Tracks deadlines per calling thread so concurrent requests (e.g., subscribe + publish) don't interfere. Only armed for long-timeout requests (>30s). Session is recreated for subsequent requests.
Modified
- Cover both
asyncioand threads paths simulated clock jumps, normal passthrough, clean watchdog shutdown, per-thread deadline isolation, concurrent request independence, cleanup, and exception propagation. - Ensure
pubnub.stop()always runs to prevent non-daemon threads from blocking process exit. - Enable presence heartbeat and use unique channel names so presence registers on the server.
- Restore
cipher_keyafter use insend_fileand pass it explicitly todownload_file. - Avoid collisions with stale data from prior test runs.
10.6.1
February 10 2026
Fixed
- Fix silent serialization failure when publishing non-JSON-serializable objects.
10.6.0
January 29 2026
Added
- Add optional parameters to PNConfiguration.init, allowing developers to set subscribe_key, publish_key, and uuid during initialization. Fixed the following issues reported by @JanluOfficial: #227.
10.5.0
December 02 2025
Added
- Add
limit(default1000) andoffsetparameters forhere_nowto fetch presence in portions. - Add FCM push type support with GCM deprecation, and remove MPNS support due to its end of life.
Fixed
- Fix issue because of which it was possible to add duplicated entries of
channelsandgroupsto thesubscribe,heartbeat, andleaverequests.
10.4.1
June 05 2025
Fixed
- Fixed add_channel_to_push and remove_channel_from_push endpoints.
10.4.0
May 07 2025
Added
- Added pagination to List Files.
10.3.0
April 10 2025
Added
- Additional status emission during subscription.
10.2.0
February 11 2025
Added
- Write protection with
If-MatcheTag header for setting channel and uuid metadata.
10.1.0
January 30 2025
Added
- Extended functionality of Channel Members and User Membership. Now it's possible to use fine-grade includes and set member/membership status and type.
10.0.1
January 29 2025
Fixed
- Fix issue because of which custom message type wasn't set to the parsed subscription response objects.