From 8818a5fd57a628f8c33687cc181212ca49fda63b Mon Sep 17 00:00:00 2001 From: Andreas Maier Date: Wed, 12 Jun 2024 18:23:18 +0200 Subject: [PATCH] Release 1.16.0 Signed-off-by: Andreas Maier --- changes/1498.feature.rst | 5 -- changes/1499.cleanup.rst | 3 -- changes/1499.notshown.rst | 1 - changes/1502.feature.rst | 40 --------------- changes/1502.incompatible.rst | 22 -------- changes/1503.cleanup.rst | 2 - changes/1511.feature.rst | 3 -- changes/noissue.1.feature.rst | 2 - docs/changes.rst | 96 +++++++++++++++++++++++++++++++++++ zhmcclient/_version.py | 2 +- 10 files changed, 97 insertions(+), 79 deletions(-) delete mode 100644 changes/1498.feature.rst delete mode 100644 changes/1499.cleanup.rst delete mode 100644 changes/1499.notshown.rst delete mode 100644 changes/1502.feature.rst delete mode 100644 changes/1502.incompatible.rst delete mode 100644 changes/1503.cleanup.rst delete mode 100644 changes/1511.feature.rst delete mode 100644 changes/noissue.1.feature.rst diff --git a/changes/1498.feature.rst b/changes/1498.feature.rst deleted file mode 100644 index 327ed903..00000000 --- a/changes/1498.feature.rst +++ /dev/null @@ -1,5 +0,0 @@ -Added a class 'StompRetryTimeoutConfig' for defining retry, timeout and -keepalive/heartbeat parameters for the STOMP connection for HMC -notifications. Added new 'stomp_rt_config' init parameters to the -'NotificationReceiver' and 'AutoUpdater' classes, to specify these config -parameters. Added default values for the configuration in zhmcclient constants. diff --git a/changes/1499.cleanup.rst b/changes/1499.cleanup.rst deleted file mode 100644 index ac87ec40..00000000 --- a/changes/1499.cleanup.rst +++ /dev/null @@ -1,3 +0,0 @@ -Removed the pinning of stomp.py to <7.0.0 and increased its minimum version -to 8.1.1 (for Python>=3.7) to pick up fixes, and adjusted to the changed -interface of the stomp event listener methods and the 'stomp.Connection()' call. diff --git a/changes/1499.notshown.rst b/changes/1499.notshown.rst deleted file mode 100644 index 1b82c692..00000000 --- a/changes/1499.notshown.rst +++ /dev/null @@ -1 +0,0 @@ -Fixed checking for whether stomp.py uses Frames. diff --git a/changes/1502.feature.rst b/changes/1502.feature.rst deleted file mode 100644 index 435d0147..00000000 --- a/changes/1502.feature.rst +++ /dev/null @@ -1,40 +0,0 @@ -Improved the notification support in several ways: - -- Replaced the event-based handover of a single item from the notification - listener thread to the caller's thread with a Python Queue, for better - reliability. It turned out that messages could have been lost in some cases - with the previous design. - -- The 'NotificationReceiver.notifications()' method now continues running - when there are no notifications, and only ever returns when - 'NotificationReceiver.close()' is called (by some other thread). - -- Added methods 'connect()' and 'is_connected()' to the 'NotificationReceiver' - class. The init method of 'NotificationReceiver' no longer connects, - but the 'notifications()' method now calls 'connect()', so overall this is - compatible with the prior behavior. - -- Added new exceptions 'NotificationConnectionError' and - 'NotificationSubscriptionError' that may be raised by some - 'NotificationReceiver' methods. - -- Documented the stomp-py exceptions that can be raised from - 'NotificationReceiver' methods. - -- Added proper detection of STOMP connection loss if STOMP heartbeating is - enabled. The connection loss is surfaced by raising - 'NotificationConnectionError' in 'NotificationReceiver.notifications()'. - This allows users to retry 'NotificationReceiver.notifications()' upon - connection loss. - -- Added a new public constant 'STOMP_MIN_CONNECTION_CHECK_TIME' that defines - the minimum time between checks for STOMP connection loss. The actual check - time is determined by the heartbeat receive time and is bound by this minimum - time. - -- Added the missing event methods to the internal '_NotificationListener' class - in case they are ever invoked (needed due to lazy importing of stomp-py). - -- Added more log messages around STOMP connect / disconnect. - -Issue: diff --git a/changes/1502.incompatible.rst b/changes/1502.incompatible.rst deleted file mode 100644 index 7fa28f18..00000000 --- a/changes/1502.incompatible.rst +++ /dev/null @@ -1,22 +0,0 @@ -Incompatible changes in the notification support: - -- The 'NotificationReceiver.notifications()' method now continues running when - there are no notifications, and only ever returns when - 'NotificationReceiver.close()' is called (in some other thread). - Before this change, the method returned when there were no notifications, so - it had to be invoked by the user in a loop. Such user code should be adjusted - to remove the loop and deal with the return indicating a close of the - receiver. - -- In addition, the 'NotificationReceiver.notifications()' method can now raise - the new exceptions 'zhmcclient.NotificationConnectionError' and - 'zhmcclient.NotificationSubscriptionError'. - -- The 'NotificationReceiver.subscribe/unsubscribe()' methods can now raise the - new exception 'zhmcclient.NotificationSubscriptionError'. - -- Note that the 'NotificationReceiver.close()' method can raise - 'stomp.exception.StompException'. This could already be raised before this - change, but had not been documented before. - -Issue: diff --git a/changes/1503.cleanup.rst b/changes/1503.cleanup.rst deleted file mode 100644 index 275e25b1..00000000 --- a/changes/1503.cleanup.rst +++ /dev/null @@ -1,2 +0,0 @@ -Test: Upgraded Github Actions plugin actions/setup-python to v5 to no longer -use the deprecated node version 16. diff --git a/changes/1511.feature.rst b/changes/1511.feature.rst deleted file mode 100644 index 3a98781a..00000000 --- a/changes/1511.feature.rst +++ /dev/null @@ -1,3 +0,0 @@ -Added support for getting new z16 environmental metrics about CPC and LPAR -or partitions by adding 'get_sustainability_data()' methods to Cpc, Lpar, -and Partition. diff --git a/changes/noissue.1.feature.rst b/changes/noissue.1.feature.rst deleted file mode 100644 index b601ffef..00000000 --- a/changes/noissue.1.feature.rst +++ /dev/null @@ -1,2 +0,0 @@ -Test: Relaxed the verification of log messages in test_auto_updater.py -to tolerate additional log messages. diff --git a/docs/changes.rst b/docs/changes.rst index 4989432d..5df573a4 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -20,6 +20,102 @@ Change log ---------- .. towncrier start +Version 1.16.0 +^^^^^^^^^^^^^^ + +Released: 2024-06-12 + +**Incompatible changes:** + +* Incompatible changes in the notification support: + + - The 'NotificationReceiver.notifications()' method now continues running when + there are no notifications, and only ever returns when + 'NotificationReceiver.close()' is called (in some other thread). + Before this change, the method returned when there were no notifications, so + it had to be invoked by the user in a loop. Such user code should be adjusted + to remove the loop and deal with the return indicating a close of the + receiver. + + - In addition, the 'NotificationReceiver.notifications()' method can now raise + the new exceptions 'zhmcclient.NotificationConnectionError' and + 'zhmcclient.NotificationSubscriptionError'. + + - The 'NotificationReceiver.subscribe/unsubscribe()' methods can now raise the + new exception 'zhmcclient.NotificationSubscriptionError'. + + - Note that the 'NotificationReceiver.close()' method can raise + 'stomp.exception.StompException'. This could already be raised before this + change, but had not been documented before. + + Issue: (`#1502 `_) + +**Enhancements:** + +* Test: Relaxed the verification of log messages in test_auto_updater.py + to tolerate additional log messages. + +* Added a class 'StompRetryTimeoutConfig' for defining retry, timeout and + keepalive/heartbeat parameters for the STOMP connection for HMC + notifications. Added new 'stomp_rt_config' init parameters to the + 'NotificationReceiver' and 'AutoUpdater' classes, to specify these config + parameters. Added default values for the configuration in zhmcclient constants. (`#1498 `_) + +* Improved the notification support in several ways: + + - Replaced the event-based handover of a single item from the notification + listener thread to the caller's thread with a Python Queue, for better + reliability. It turned out that messages could have been lost in some cases + with the previous design. + + - The 'NotificationReceiver.notifications()' method now continues running + when there are no notifications, and only ever returns when + 'NotificationReceiver.close()' is called (by some other thread). + + - Added methods 'connect()' and 'is_connected()' to the 'NotificationReceiver' + class. The init method of 'NotificationReceiver' no longer connects, + but the 'notifications()' method now calls 'connect()', so overall this is + compatible with the prior behavior. + + - Added new exceptions 'NotificationConnectionError' and + 'NotificationSubscriptionError' that may be raised by some + 'NotificationReceiver' methods. + + - Documented the stomp-py exceptions that can be raised from + 'NotificationReceiver' methods. + + - Added proper detection of STOMP connection loss if STOMP heartbeating is + enabled. The connection loss is surfaced by raising + 'NotificationConnectionError' in 'NotificationReceiver.notifications()'. + This allows users to retry 'NotificationReceiver.notifications()' upon + connection loss. + + - Added a new public constant 'STOMP_MIN_CONNECTION_CHECK_TIME' that defines + the minimum time between checks for STOMP connection loss. The actual check + time is determined by the heartbeat receive time and is bound by this minimum + time. + + - Added the missing event methods to the internal '_NotificationListener' class + in case they are ever invoked (needed due to lazy importing of stomp-py). + + - Added more log messages around STOMP connect / disconnect. + + Issue: (`#1502 `_) + +* Added support for getting new z16 environmental metrics about CPC and LPAR + or partitions by adding 'get_sustainability_data()' methods to Cpc, Lpar, + and Partition. (`#1511 `_) + +**Cleanup:** + +* Removed the pinning of stomp.py to <7.0.0 and increased its minimum version + to 8.1.1 (for Python>=3.7) to pick up fixes, and adjusted to the changed + interface of the stomp event listener methods and the 'stomp.Connection()' call. (`#1499 `_) + +* Test: Upgraded Github Actions plugin actions/setup-python to v5 to no longer + use the deprecated node version 16. (`#1503 `_) + + Version 1.15.0 ^^^^^^^^^^^^^^ diff --git a/zhmcclient/_version.py b/zhmcclient/_version.py index f5b32dc9..2dc98956 100644 --- a/zhmcclient/_version.py +++ b/zhmcclient/_version.py @@ -27,7 +27,7 @@ #: #: * "M.N.P.dev1": A not yet released version M.N.P #: * "M.N.P": A released version M.N.P -__version__ = '1.16.0.dev1' +__version__ = '1.16.0' # Check supported Python versions # Keep these Python versions in sync with: