From 05432e997319d4925f7288315373bbce264bb3e4 Mon Sep 17 00:00:00 2001 From: Tom Kirby-Green Date: Mon, 27 Sep 2021 07:11:47 +0100 Subject: [PATCH 1/9] Bump version to 1.2.1 --- ably/__init__.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ably/__init__.py b/ably/__init__.py index 9790a436..578a1537 100644 --- a/ably/__init__.py +++ b/ably/__init__.py @@ -14,4 +14,4 @@ logger.addHandler(logging.NullHandler()) api_version = '1.2' -lib_version = '1.2.0' +lib_version = '1.2.1' diff --git a/setup.py b/setup.py index 44e706d9..7a1fbfa4 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='ably', - version='1.2.0', + version='1.2.1', classifiers=[ 'Development Status :: 6 - Mature', 'Intended Audience :: Developers', From 1b970cc144ce25ac7b0fe392db7e178da5b2d31a Mon Sep 17 00:00:00 2001 From: Tom Kirby-Green Date: Mon, 27 Sep 2021 07:20:15 +0100 Subject: [PATCH 2/9] Update change log --- CHANGELOG.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 51 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e4547ee..2824fa5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ # Change Log -## [v1.2.0](https://github.com/ably/ably-python/tree/v1.2.0) +## [v1.2.1](https://github.com/ably/ably-python/tree/v1.2.1) **Breaking API Changes**: Please see our [Upgrade / Migration Guide](UPDATING.md) for notes on changes you need to make to your code to update it to use the new API introduced by version 1.2.x. -[Full Changelog](https://github.com/ably/ably-python/compare/v1.1.1...v1.2.0) +[Full Changelog](https://github.com/ably/ably-python/compare/v1.1.1...v1.2.1) **Implemented enhancements:** @@ -12,27 +12,74 @@ - Support Async HTTP [\#171](https://github.com/ably/ably-python/issues/171) - Implement RSC7d \(Ably-Agent header\) [\#168](https://github.com/ably/ably-python/issues/168) - Defaults: Generate environment fallbacks [\#155](https://github.com/ably/ably-python/issues/155) +- Clarify string encoding when sending push notifications [\#119](https://github.com/ably/ably-python/issues/119) - Support for environments fallbacks [\#198](https://github.com/ably/ably-python/pull/198) ([d8x](https://github.com/d8x)) -- Add support for TO3m [\#172](https://github.com/ably/ably-python/issues/172) **Fixed bugs:** -- Token issue potential bug [\#54](https://github.com/ably/ably-python/issues/54) - Channel.publish sometimes returns None after exhausting retries [\#160](https://github.com/ably/ably-python/issues/160) +- Token issue potential bug [\#54](https://github.com/ably/ably-python/issues/54) + +**Closed issues:** + +- Conform ReadMe and create Contributing Document [\#199](https://github.com/ably/ably-python/issues/199) +- Add support for DataTypes TokenParams AO2g [\#187](https://github.com/ably/ably-python/issues/187) +- Add support for TO3m [\#172](https://github.com/ably/ably-python/issues/172) +- Create code snippets for homepage \(python\) [\#170](https://github.com/ably/ably-python/issues/170) - Using a clientId should no longer be forcing token auth in the 1.1 spec [\#149](https://github.com/ably/ably-python/issues/149) **Merged pull requests:** +- Simplify chained comparisons [\#241](https://github.com/ably/ably-python/pull/241) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'TestRestChannelPublishIdempotent' fixes missing 'await' on 'send' [\#240](https://github.com/ably/ably-python/pull/240) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'TestRestChannelPublish' fix test name [\#239](https://github.com/ably/ably-python/pull/239) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'README.md' Fix 'GitHub' typo [\#238](https://github.com/ably/ably-python/pull/238) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- Rest Stats tests, remove unused dependency [\#237](https://github.com/ably/ably-python/pull/237) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'http' module, remove unused dependency [\#236](https://github.com/ably/ably-python/pull/236) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'TestRestInit' remove unused dependency [\#235](https://github.com/ably/ably-python/pull/235) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'TestRestHttp' remove unused variables [\#234](https://github.com/ably/ably-python/pull/234) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'TestRestChannelPublishIdempotent' fix unclosed 'AsyncClient' [\#233](https://github.com/ably/ably-python/pull/233) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'TestRestInit' fix unclosed 'AsyncClient' [\#231](https://github.com/ably/ably-python/pull/231) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'TestRequestToken' fix unclosed 'AsyncClient' [\#230](https://github.com/ably/ably-python/pull/230) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'TestRestChannelPublish' fix unclosed 'AsyncClient' [\#228](https://github.com/ably/ably-python/pull/228) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'TestRenewToken' fix unclosed 'AsyncClient' [\#227](https://github.com/ably/ably-python/pull/227) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'TypedBuffer' fix attempt to call a non-callable object [\#226](https://github.com/ably/ably-python/pull/226) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'auth' module, fix possible unbound local variables warning [\#225](https://github.com/ably/ably-python/pull/225) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- '\_\_init\_\_' module, fix PEP8 coding style violation [\#224](https://github.com/ably/ably-python/pull/224) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'TestTextEncodersEncryption' add missing 'tearDown' method [\#223](https://github.com/ably/ably-python/pull/223) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- Refine contributing guide [\#221](https://github.com/ably/ably-python/pull/221) ([QuintinWillison](https://github.com/QuintinWillison)) +- Fix typo in contributing markdown [\#219](https://github.com/ably/ably-python/pull/219) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- rest setup - fix redeclared name without usage [\#217](https://github.com/ably/ably-python/pull/217) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- Fixes mutable-value used as argument default value [\#215](https://github.com/ably/ably-python/pull/215) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- Fixes most of the PEP 8 coding style violations [\#214](https://github.com/ably/ably-python/pull/214) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- Typed Buffer - use preferred dictionary-literal style initialization [\#212](https://github.com/ably/ably-python/pull/212) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- Replace deprecated 'warn' call with 'warning' [\#211](https://github.com/ably/ably-python/pull/211) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'README.md' update to specify Python 3.6 as the min supported version. [\#210](https://github.com/ably/ably-python/pull/210) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- 'Channel' remove unused 'history' parameter 'timeout'. [\#209](https://github.com/ably/ably-python/pull/209) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- '.gitignore' remove duplicate pattern [\#208](https://github.com/ably/ably-python/pull/208) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- Release/1.2.0 [\#207](https://github.com/ably/ably-python/pull/207) ([QuintinWillison](https://github.com/QuintinWillison)) - \[\#187\] Query time parameter for getting current time from Ably system [\#206](https://github.com/ably/ably-python/pull/206) ([d8x](https://github.com/d8x)) +- Conform release process [\#205](https://github.com/ably/ably-python/pull/205) ([QuintinWillison](https://github.com/QuintinWillison)) - \[\#149\] Specifying clientId does not force token auth [\#204](https://github.com/ably/ably-python/pull/204) ([d8x](https://github.com/d8x)) +- Documentation updates according to templates, updating guide [\#203](https://github.com/ably/ably-python/pull/203) ([d8x](https://github.com/d8x)) - Support for async [\#202](https://github.com/ably/ably-python/pull/202) ([d8x](https://github.com/d8x)) +- Add standard "About Ably" info to all public repos [\#201](https://github.com/ably/ably-python/pull/201) ([marklewin](https://github.com/marklewin)) - Support for HTTP/2 Protocol [\#200](https://github.com/ably/ably-python/pull/200) ([d8x](https://github.com/d8x)) - Add missing `modified` property in DeviceDetails [\#196](https://github.com/ably/ably-python/pull/196) ([d8x](https://github.com/d8x)) - RSC7d - Support for Ably-Agent header [\#195](https://github.com/ably/ably-python/pull/195) ([d8x](https://github.com/d8x)) +- Minor fix-up for the 'readme.md'. [\#173](https://github.com/ably/ably-python/pull/173) ([tomkirbygreen](https://github.com/tomkirbygreen)) - fix error message for invalid push data type [\#169](https://github.com/ably/ably-python/pull/169) ([netspencer](https://github.com/netspencer)) +- Conform license and copyright [\#167](https://github.com/ably/ably-python/pull/167) ([QuintinWillison](https://github.com/QuintinWillison)) +- Amend workflow branch name [\#166](https://github.com/ably/ably-python/pull/166) ([owenpearson](https://github.com/owenpearson)) +- Refine matrix strategy configuration [\#165](https://github.com/ably/ably-python/pull/165) ([QuintinWillison](https://github.com/QuintinWillison)) +- Replace Travis with GitHub workflow [\#164](https://github.com/ably/ably-python/pull/164) ([QuintinWillison](https://github.com/QuintinWillison)) +- Remove Coveralls [\#163](https://github.com/ably/ably-python/pull/163) ([QuintinWillison](https://github.com/QuintinWillison)) +- Add maintainers file [\#162](https://github.com/ably/ably-python/pull/162) ([niksilver](https://github.com/niksilver)) - Raise error if all servers reply with a 5xx response [\#161](https://github.com/ably/ably-python/pull/161) ([jdavid](https://github.com/jdavid)) +- Cleanup [\#158](https://github.com/ably/ably-python/pull/158) ([jdavid](https://github.com/jdavid)) - Python 2.7 cleanup [\#157](https://github.com/ably/ably-python/pull/157) ([jdavid](https://github.com/jdavid)) - Support Python 3.5+ [\#156](https://github.com/ably/ably-python/pull/156) ([jdavid](https://github.com/jdavid)) +- Rename master to main [\#154](https://github.com/ably/ably-python/pull/154) ([QuintinWillison](https://github.com/QuintinWillison)) ## [v1.1.1](https://github.com/ably/ably-python/tree/v1.1.1) From 9bd2923ce587bdeb330dfcfadeb18db5027c8fd7 Mon Sep 17 00:00:00 2001 From: Tom Kirby-Green Date: Fri, 25 Feb 2022 15:58:55 +0000 Subject: [PATCH 3/9] Updated release --- CHANGELOG.md | 7 ++++++- UPDATING.md | 15 ++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2824fa5d..5843ac1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,14 @@ ## [v1.2.1](https://github.com/ably/ably-python/tree/v1.2.1) -**Breaking API Changes**: Please see our [Upgrade / Migration Guide](UPDATING.md) for notes on changes you need to make to your code to update it to use the new API introduced by version 1.2.x. +**Breaking API Changes**: Please see our [Upgrade / Migration Guide](UPDATING.md) for notes on changes you need to make to your code to update it to use the new API introduced by version 1.2.1. [Full Changelog](https://github.com/ably/ably-python/compare/v1.1.1...v1.2.1) **Implemented enhancements:** +- Respect content-type with charset [\#256](https://github.com/ably/ably-python/issues/256) +- Release a new version for python 3.10 support [\#249](https://github.com/ably/ably-python/issues/249) - Support HTTP/2 [\#197](https://github.com/ably/ably-python/issues/197) - Support Async HTTP [\#171](https://github.com/ably/ably-python/issues/171) - Implement RSC7d \(Ably-Agent header\) [\#168](https://github.com/ably/ably-python/issues/168) @@ -30,6 +32,9 @@ **Merged pull requests:** +- Add support for Python 3.10, age out 3.6 [\#253](https://github.com/ably/ably-python/pull/253) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- Compat with 'httpx' public API changes. [\#252](https://github.com/ably/ably-python/pull/252) ([tomkirbygreen](https://github.com/tomkirbygreen)) +- Respect content-type with charset [\#248](https://github.com/ably/ably-python/pull/248) ([tomkirbygreen](https://github.com/tomkirbygreen)) - Simplify chained comparisons [\#241](https://github.com/ably/ably-python/pull/241) ([tomkirbygreen](https://github.com/tomkirbygreen)) - 'TestRestChannelPublishIdempotent' fixes missing 'await' on 'send' [\#240](https://github.com/ably/ably-python/pull/240) ([tomkirbygreen](https://github.com/tomkirbygreen)) - 'TestRestChannelPublish' fix test name [\#239](https://github.com/ably/ably-python/pull/239) ([tomkirbygreen](https://github.com/tomkirbygreen)) diff --git a/UPDATING.md b/UPDATING.md index 2f972e6d..f1803e4e 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -1,30 +1,27 @@ # Upgrade / Migration Guide -## Version 1.1.1 to 1.2.0 +## Version 1.1.1 to 1.2.1 We have made **breaking changes** in the version 1.2 release of this SDK. -In this guide we aim to highlight the main differences you will encounter when migrating your code from the interfaces we were offering -prior to the version 1.2.0 release. +In this guide we aim to highlight the main differences you will encounter when migrating your code from the interfaces we were offering prior to the version 1.2.1 release. These include: - - Deprecating Python 3.4 + - Deprecating Python 3.4, 3.5 and 3.6 - Introduction of Asynchronous way of using the SDK ### Using the SDK API in synchronous way This way using it is still possible. In order to use SDK in synchronous way please use the <= 1.1.0 version of this SDK. -### Deprecating Python 3.4 +### Deprecating Python 3.4, 3.5 and 3.6 -This python version is already not supported, hence we decided to drop support of this version. Please upgrade your environment in order -to use the 1.2.x version. +The minimum version of Python has increased from 3.7. At this time we test against 3.7, 3.8, 3.9 and 3.10. Please upgrade your environment in order to use the 1.2.x version. ### Introduction of Asynchronous way of using the SDK -The 1.2.x version introduces breaking change, which aims to change way of interacting with the SDK from Synchronous way to Asynchronous. Because of that -every call that is interacting with the Ably Rest API must be done in asynchronous way. +The 1.2.x version introduces breaking change, which aims to change way of interacting with the SDK from Synchronous way to Asynchronous. Because of that every call that interacts with the Ably Rest API must be done in asynchronous way. #### Synchronous way of using the sdk with publishing sample message From 15f442b34b8544a7e06ee2fd978acee4cc56f02b Mon Sep 17 00:00:00 2001 From: Tom Kirby-Green Date: Tue, 1 Mar 2022 06:09:43 +0000 Subject: [PATCH 4/9] Update release-pr guidance to include tagging senior peers --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2bb6e2bf..112eb86e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,7 @@ The release process must include the following steps: 3. Add a commit to bump the version number, updating [`setup.py`](./setup.py) and [`ably/__init__.py`](./ably/__init__.py) 4. Add a commit to update the change log 5. Push the release branch to GitHub -6. Open a PR for the release against the release branch you just pushed +6. Open a PR for the release against the release branch you just pushed. Ensure you add `@QuintinWillison`, `@AndyNicks` and `@stmoreau` to the release PR 7. Gain approval(s) for the release PR from maintainer(s) 8. Land the release PR to `main` 9. From the `main` branch, run `python setup.py sdist upload -r ably` to build and upload this new package to PyPi From a2198aa2d8dfc63c4caab5efff44d1fe7f362b3b Mon Sep 17 00:00:00 2001 From: Tom Kirby-Green Date: Tue, 1 Mar 2022 09:22:24 +0000 Subject: [PATCH 5/9] Prune the change log. --- CHANGELOG.md | 40 +--------------------------------------- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5843ac1f..cd7c27ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,8 +26,7 @@ - Conform ReadMe and create Contributing Document [\#199](https://github.com/ably/ably-python/issues/199) - Add support for DataTypes TokenParams AO2g [\#187](https://github.com/ably/ably-python/issues/187) -- Add support for TO3m [\#172](https://github.com/ably/ably-python/issues/172) -- Create code snippets for homepage \(python\) [\#170](https://github.com/ably/ably-python/issues/170) +- Add support for TO3m [\#172](https://github.com/ably/ably-python/issues/172 - Using a clientId should no longer be forcing token auth in the 1.1 spec [\#149](https://github.com/ably/ably-python/issues/149) **Merged pull requests:** @@ -35,56 +34,19 @@ - Add support for Python 3.10, age out 3.6 [\#253](https://github.com/ably/ably-python/pull/253) ([tomkirbygreen](https://github.com/tomkirbygreen)) - Compat with 'httpx' public API changes. [\#252](https://github.com/ably/ably-python/pull/252) ([tomkirbygreen](https://github.com/tomkirbygreen)) - Respect content-type with charset [\#248](https://github.com/ably/ably-python/pull/248) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- Simplify chained comparisons [\#241](https://github.com/ably/ably-python/pull/241) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'TestRestChannelPublishIdempotent' fixes missing 'await' on 'send' [\#240](https://github.com/ably/ably-python/pull/240) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'TestRestChannelPublish' fix test name [\#239](https://github.com/ably/ably-python/pull/239) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'README.md' Fix 'GitHub' typo [\#238](https://github.com/ably/ably-python/pull/238) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- Rest Stats tests, remove unused dependency [\#237](https://github.com/ably/ably-python/pull/237) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'http' module, remove unused dependency [\#236](https://github.com/ably/ably-python/pull/236) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'TestRestInit' remove unused dependency [\#235](https://github.com/ably/ably-python/pull/235) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'TestRestHttp' remove unused variables [\#234](https://github.com/ably/ably-python/pull/234) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'TestRestChannelPublishIdempotent' fix unclosed 'AsyncClient' [\#233](https://github.com/ably/ably-python/pull/233) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'TestRestInit' fix unclosed 'AsyncClient' [\#231](https://github.com/ably/ably-python/pull/231) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'TestRequestToken' fix unclosed 'AsyncClient' [\#230](https://github.com/ably/ably-python/pull/230) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'TestRestChannelPublish' fix unclosed 'AsyncClient' [\#228](https://github.com/ably/ably-python/pull/228) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'TestRenewToken' fix unclosed 'AsyncClient' [\#227](https://github.com/ably/ably-python/pull/227) ([tomkirbygreen](https://github.com/tomkirbygreen)) - 'TypedBuffer' fix attempt to call a non-callable object [\#226](https://github.com/ably/ably-python/pull/226) ([tomkirbygreen](https://github.com/tomkirbygreen)) - 'auth' module, fix possible unbound local variables warning [\#225](https://github.com/ably/ably-python/pull/225) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- '\_\_init\_\_' module, fix PEP8 coding style violation [\#224](https://github.com/ably/ably-python/pull/224) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'TestTextEncodersEncryption' add missing 'tearDown' method [\#223](https://github.com/ably/ably-python/pull/223) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- Refine contributing guide [\#221](https://github.com/ably/ably-python/pull/221) ([QuintinWillison](https://github.com/QuintinWillison)) -- Fix typo in contributing markdown [\#219](https://github.com/ably/ably-python/pull/219) ([tomkirbygreen](https://github.com/tomkirbygreen)) - rest setup - fix redeclared name without usage [\#217](https://github.com/ably/ably-python/pull/217) ([tomkirbygreen](https://github.com/tomkirbygreen)) - Fixes mutable-value used as argument default value [\#215](https://github.com/ably/ably-python/pull/215) ([tomkirbygreen](https://github.com/tomkirbygreen)) - Fixes most of the PEP 8 coding style violations [\#214](https://github.com/ably/ably-python/pull/214) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- Typed Buffer - use preferred dictionary-literal style initialization [\#212](https://github.com/ably/ably-python/pull/212) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- Replace deprecated 'warn' call with 'warning' [\#211](https://github.com/ably/ably-python/pull/211) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- 'README.md' update to specify Python 3.6 as the min supported version. [\#210](https://github.com/ably/ably-python/pull/210) ([tomkirbygreen](https://github.com/tomkirbygreen)) - 'Channel' remove unused 'history' parameter 'timeout'. [\#209](https://github.com/ably/ably-python/pull/209) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- '.gitignore' remove duplicate pattern [\#208](https://github.com/ably/ably-python/pull/208) ([tomkirbygreen](https://github.com/tomkirbygreen)) -- Release/1.2.0 [\#207](https://github.com/ably/ably-python/pull/207) ([QuintinWillison](https://github.com/QuintinWillison)) -- \[\#187\] Query time parameter for getting current time from Ably system [\#206](https://github.com/ably/ably-python/pull/206) ([d8x](https://github.com/d8x)) -- Conform release process [\#205](https://github.com/ably/ably-python/pull/205) ([QuintinWillison](https://github.com/QuintinWillison)) - \[\#149\] Specifying clientId does not force token auth [\#204](https://github.com/ably/ably-python/pull/204) ([d8x](https://github.com/d8x)) -- Documentation updates according to templates, updating guide [\#203](https://github.com/ably/ably-python/pull/203) ([d8x](https://github.com/d8x)) - Support for async [\#202](https://github.com/ably/ably-python/pull/202) ([d8x](https://github.com/d8x)) -- Add standard "About Ably" info to all public repos [\#201](https://github.com/ably/ably-python/pull/201) ([marklewin](https://github.com/marklewin)) - Support for HTTP/2 Protocol [\#200](https://github.com/ably/ably-python/pull/200) ([d8x](https://github.com/d8x)) - Add missing `modified` property in DeviceDetails [\#196](https://github.com/ably/ably-python/pull/196) ([d8x](https://github.com/d8x)) - RSC7d - Support for Ably-Agent header [\#195](https://github.com/ably/ably-python/pull/195) ([d8x](https://github.com/d8x)) -- Minor fix-up for the 'readme.md'. [\#173](https://github.com/ably/ably-python/pull/173) ([tomkirbygreen](https://github.com/tomkirbygreen)) - fix error message for invalid push data type [\#169](https://github.com/ably/ably-python/pull/169) ([netspencer](https://github.com/netspencer)) -- Conform license and copyright [\#167](https://github.com/ably/ably-python/pull/167) ([QuintinWillison](https://github.com/QuintinWillison)) -- Amend workflow branch name [\#166](https://github.com/ably/ably-python/pull/166) ([owenpearson](https://github.com/owenpearson)) -- Refine matrix strategy configuration [\#165](https://github.com/ably/ably-python/pull/165) ([QuintinWillison](https://github.com/QuintinWillison)) -- Replace Travis with GitHub workflow [\#164](https://github.com/ably/ably-python/pull/164) ([QuintinWillison](https://github.com/QuintinWillison)) -- Remove Coveralls [\#163](https://github.com/ably/ably-python/pull/163) ([QuintinWillison](https://github.com/QuintinWillison)) -- Add maintainers file [\#162](https://github.com/ably/ably-python/pull/162) ([niksilver](https://github.com/niksilver)) - Raise error if all servers reply with a 5xx response [\#161](https://github.com/ably/ably-python/pull/161) ([jdavid](https://github.com/jdavid)) -- Cleanup [\#158](https://github.com/ably/ably-python/pull/158) ([jdavid](https://github.com/jdavid)) -- Python 2.7 cleanup [\#157](https://github.com/ably/ably-python/pull/157) ([jdavid](https://github.com/jdavid)) -- Support Python 3.5+ [\#156](https://github.com/ably/ably-python/pull/156) ([jdavid](https://github.com/jdavid)) -- Rename master to main [\#154](https://github.com/ably/ably-python/pull/154) ([QuintinWillison](https://github.com/QuintinWillison)) ## [v1.1.1](https://github.com/ably/ably-python/tree/v1.1.1) From 2ed679386faf94fc5da1c020bb12ac3b4294001c Mon Sep 17 00:00:00 2001 From: Tom Kirby-Green Date: Wed, 2 Mar 2022 16:14:50 +0000 Subject: [PATCH 6/9] Change release to '1.2.0' Rather than skip the 1.2.0 tag and go straight to 1.2.1 it has been decided to go ahead with the 1.2.0 designator. --- CHANGELOG.md | 6 +++--- UPDATING.md | 4 ++-- ably/__init__.py | 2 +- setup.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd7c27ec..0fb99af6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,10 @@ # Change Log -## [v1.2.1](https://github.com/ably/ably-python/tree/v1.2.1) +## [v1.2.0](https://github.com/ably/ably-python/tree/v1.2.0) -**Breaking API Changes**: Please see our [Upgrade / Migration Guide](UPDATING.md) for notes on changes you need to make to your code to update it to use the new API introduced by version 1.2.1. +**Breaking API Changes**: Please see our [Upgrade / Migration Guide](UPDATING.md) for notes on changes you need to make to your code to update it to use the new API introduced by version 1.2.0. -[Full Changelog](https://github.com/ably/ably-python/compare/v1.1.1...v1.2.1) +[Full Changelog](https://github.com/ably/ably-python/compare/v1.1.1...v1.2.0) **Implemented enhancements:** diff --git a/UPDATING.md b/UPDATING.md index f1803e4e..c5c2f782 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -1,10 +1,10 @@ # Upgrade / Migration Guide -## Version 1.1.1 to 1.2.1 +## Version 1.1.1 to 1.2.0 We have made **breaking changes** in the version 1.2 release of this SDK. -In this guide we aim to highlight the main differences you will encounter when migrating your code from the interfaces we were offering prior to the version 1.2.1 release. +In this guide we aim to highlight the main differences you will encounter when migrating your code from the interfaces we were offering prior to the version 1.2.0 release. These include: - Deprecating Python 3.4, 3.5 and 3.6 diff --git a/ably/__init__.py b/ably/__init__.py index 578a1537..9790a436 100644 --- a/ably/__init__.py +++ b/ably/__init__.py @@ -14,4 +14,4 @@ logger.addHandler(logging.NullHandler()) api_version = '1.2' -lib_version = '1.2.1' +lib_version = '1.2.0' diff --git a/setup.py b/setup.py index 7a1fbfa4..44e706d9 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='ably', - version='1.2.1', + version='1.2.0', classifiers=[ 'Development Status :: 6 - Mature', 'Intended Audience :: Developers', From 29b1a3e787b9ddb1b38413c848a8231e3fd75881 Mon Sep 17 00:00:00 2001 From: Quintin Willison Date: Thu, 3 Mar 2022 09:57:14 +0000 Subject: [PATCH 7/9] Conform release process in respect of release PR approvals. Aligned with: https://github.com/ably/ably-dotnet/pull/1133 --- CONTRIBUTING.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 112eb86e..5f896533 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,12 +30,10 @@ The release process must include the following steps: 3. Add a commit to bump the version number, updating [`setup.py`](./setup.py) and [`ably/__init__.py`](./ably/__init__.py) 4. Add a commit to update the change log 5. Push the release branch to GitHub -6. Open a PR for the release against the release branch you just pushed. Ensure you add `@QuintinWillison`, `@AndyNicks` and `@stmoreau` to the release PR -7. Gain approval(s) for the release PR from maintainer(s) -8. Land the release PR to `main` -9. From the `main` branch, run `python setup.py sdist upload -r ably` to build and upload this new package to PyPi -10. Create a tag named like `v1.2.3` and push it to GitHub - e.g. `git tag v1.2.3 && git push origin v1.2.3` -11. Create the release on GitHub including populating the release notes +6. Create a release PR (ensure you include an SDK Team Engineering Lead and the SDK Team Product Manager as reviewers) and gain approvals for it, then merge that to `main` +7. From the `main` branch, run `python setup.py sdist upload -r ably` to build and upload this new package to PyPi +8. Create a tag named like `v1.2.3` and push it to GitHub - e.g. `git tag v1.2.3 && git push origin v1.2.3` +9. Create the release on GitHub including populating the release notes We tend to use [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator) to collate the information required for a change log update. Your mileage may vary, but it seems the most reliable method to invoke the generator is something like: From 0bf3ad575cf7653f7d2b3dda665dfb6368cab047 Mon Sep 17 00:00:00 2001 From: Quintin Willison Date: Thu, 3 Mar 2022 10:00:26 +0000 Subject: [PATCH 8/9] Provide link to the migration guide from the root readme, also. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e131d244..54c10dbd 100644 --- a/README.md +++ b/README.md @@ -43,10 +43,10 @@ Or, if you need encryption features: cd ably-python python setup.py install -## Breaking API Changes in Version 1.2.x +## Breaking API Changes in Version 1.2.0 -Please see our Upgrade / Migration Guide for notes on changes you need to make to your code to update it to use the new API -introduced by version 1.2.x +Please see our [Upgrade / Migration Guide](UPDATING.md) for notes on changes you need to make to your code to update it to use the new API +introduced by version 1.2.0. ## Usage From 81b88670044cfd9df905ed15e884ba2c2d102944 Mon Sep 17 00:00:00 2001 From: Quintin Willison Date: Thu, 3 Mar 2022 10:19:38 +0000 Subject: [PATCH 9/9] Refactor and clean up the migration guide. --- UPDATING.md | 70 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 28 deletions(-) diff --git a/UPDATING.md b/UPDATING.md index c5c2f782..7e056ba4 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -7,23 +7,25 @@ We have made **breaking changes** in the version 1.2 release of this SDK. In this guide we aim to highlight the main differences you will encounter when migrating your code from the interfaces we were offering prior to the version 1.2.0 release. These include: - - Deprecating Python 3.4, 3.5 and 3.6 - - Introduction of Asynchronous way of using the SDK -### Using the SDK API in synchronous way + - Deprecation of support for Python versions 3.4, 3.5 and 3.6 + - New, asynchronous API -This way using it is still possible. In order to use SDK in synchronous way please use the <= 1.1.0 version of this SDK. +### Deprecation of Python 3.4, 3.5 and 3.6 -### Deprecating Python 3.4, 3.5 and 3.6 +The minimum version of Python has increased to 3.7. +You may need to upgrade your environment in order to use this newer version of this SDK. +To see which versions of Python we test the SDK against, please look at our +[GitHub workflows](.github/workflows). -The minimum version of Python has increased from 3.7. At this time we test against 3.7, 3.8, 3.9 and 3.10. Please upgrade your environment in order to use the 1.2.x version. +### Asynchronous API +The 1.2.0 version introduces a breaking change, which changes the way of interacting with the SDK from synchronous to asynchronous, using [the `asyncio` foundational library](https://docs.python.org/3.7/library/asyncio.html) to provide support for `async`/`await` syntax. +Because of this breaking change, every call that interacts with the Ably REST API must be refactored to this asynchronous way. -### Introduction of Asynchronous way of using the SDK +#### Publishing Messages -The 1.2.x version introduces breaking change, which aims to change way of interacting with the SDK from Synchronous way to Asynchronous. Because of that every call that interacts with the Ably Rest API must be done in asynchronous way. - -#### Synchronous way of using the sdk with publishing sample message +This old style, synchronous example: ```python from ably import AblyRest @@ -33,12 +35,11 @@ def main(): channel = ably.channels.get("channel_name") channel.publish('event', 'message') - if __name__ == "__main__": main() ``` -#### Asynchronous way +Must now be replaced with this new style, asynchronous form: ```python import asyncio @@ -49,12 +50,13 @@ async def main(): channel = ably.channels.get("channel_name") await channel.publish('event', 'message') - if __name__ == "__main__": asyncio.run(main()) ``` -#### Synchronous way of querying the history +#### Querying History + +This old style, synchronous example: ```python message_page = channel.history() # Returns a PaginatedResult @@ -63,7 +65,7 @@ message_page.has_next() # => True, indicates there is another page message_page.next().items # List with messages from the second page ``` -#### Asynchronous way +Must now be replaced with this new style, asynchronous form: ```python message_page = await channel.history() # Returns a PaginatedResult @@ -73,7 +75,9 @@ next_page = await message_page.next() # Returns a next page next_page.items # List with messages from the second page ``` -#### Synchronous way of querying presence members on a channel +#### Querying Presence Members on a Channel + +This old style, synchronous example: ```python members_page = channel.presence.get() # Returns a PaginatedResult @@ -81,7 +85,7 @@ members_page.items members_page.items[0].client_id # client_id of first member present ``` -#### Asynchronous way +Must now be replaced with this new style, asynchronous form: ```python members_page = await channel.presence.get() # Returns a PaginatedResult @@ -89,7 +93,9 @@ members_page.items members_page.items[0].client_id # client_id of first member present ``` -#### Synchronous way of querying the presence of history +#### Querying Channel Presence History + +This old style, synchronous example: ```python presence_page = channel.presence.history() # Returns a PaginatedResult @@ -97,7 +103,7 @@ presence_page.items presence_page.items[0].client_id # client_id of first member ``` -#### Asynchronous way +Must now be replaced with this new style, asynchronous form: ```python presence_page = await channel.presence.history() # Returns a PaginatedResult @@ -105,7 +111,9 @@ presence_page.items presence_page.items[0].client_id # client_id of first member ``` -#### Synchronous way of generating a token +#### Generating a Token + +This old style, synchronous example: ```python token_details = client.auth.request_token() @@ -113,7 +121,7 @@ token_details.token # => "xVLyHw.CLchevH3hF....MDh9ZC_Q" new_client = AblyRest(token=token_details) ``` -#### Asynchronous way +Must now be replaced with this new style, asynchronous form: ```python token_details = await client.auth.request_token() @@ -122,7 +130,9 @@ new_client = AblyRest(token=token_details) await new_client.close() ``` -#### Synchronous way of generating a TokenRequest +#### Generating a TokenRequest + +This old style, synchronous example: ```python token_request = client.auth.create_token_request( @@ -136,7 +146,7 @@ token_request = client.auth.create_token_request( new_client = AblyRest(token=token_request) ``` -#### Asynchronous way +Must now be replaced with this new style, asynchronous form: ```python token_request = await client.auth.create_token_request( @@ -151,14 +161,16 @@ new_client = AblyRest(token=token_request) await new_client.close() ``` -#### Synchronous way of fetching your application's stats +#### Fetching Application Statistics + +This old style, synchronous example: ```python stats = client.stats() # Returns a PaginatedResult stats.items ``` -#### Asynchronous way +Must now be replaced with this new style, asynchronous form: ```python stats = await client.stats() # Returns a PaginatedResult @@ -166,15 +178,17 @@ stats.items await client.close() ``` -#### Synchronous way of fetching the Ably service time +#### Fetching the Ably Service Time + +This old style, synchronous example: ```python client.time() ``` -#### Asynchronous way +Must now be replaced with this new style, asynchronous form: ```python await client.time() await client.close() -``` \ No newline at end of file +```