Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-azure-servicebus for
openSUSE:Factory checked in at 2025-04-14 12:59:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-azure-servicebus (Old)
and /work/SRC/openSUSE:Factory/.python-azure-servicebus.new.1907 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-azure-servicebus"
Mon Apr 14 12:59:09 2025 rev:39 rq:1269133 version:7.14.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-azure-servicebus/python-azure-servicebus.changes
2025-03-19 22:33:36.633840018 +0100
+++
/work/SRC/openSUSE:Factory/.python-azure-servicebus.new.1907/python-azure-servicebus.changes
2025-04-14 12:59:20.938684820 +0200
@@ -1,0 +2,8 @@
+Thu Apr 10 06:12:34 UTC 2025 - John Paul Adrian Glaubitz
<[email protected]>
+
+- New upstream release
+ + Version 7.14.2
+ + For detailed information about changes see the
+ CHANGELOG.md file provided with this package
+
+-------------------------------------------------------------------
Old:
----
azure_servicebus-7.14.1.tar.gz
New:
----
azure_servicebus-7.14.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-azure-servicebus.spec ++++++
--- /var/tmp/diff_new_pack.BcX9CC/_old 2025-04-14 12:59:21.486707834 +0200
+++ /var/tmp/diff_new_pack.BcX9CC/_new 2025-04-14 12:59:21.490708002 +0200
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-azure-servicebus
-Version: 7.14.1
+Version: 7.14.2
Release: 0
Summary: Microsoft Azure Service Bus Runtime Client Library
License: Apache-2.0
++++++ azure_servicebus-7.14.1.tar.gz -> azure_servicebus-7.14.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure_servicebus-7.14.1/CHANGELOG.md
new/azure_servicebus-7.14.2/CHANGELOG.md
--- old/azure_servicebus-7.14.1/CHANGELOG.md 2025-03-12 18:40:35.000000000
+0100
+++ new/azure_servicebus-7.14.2/CHANGELOG.md 2025-04-09 22:07:29.000000000
+0200
@@ -1,5 +1,18 @@
# Release History
+## 7.14.2 (2025-04-09)
+
+### Bugs Fixed
+
+- Fixed a bug where max number of messages was not being requested when
receiving from the service due to an incorrect link credit calculation.
([#40156](https://github.com/Azure/azure-sdk-for-python/issues/40156))
+-
+### Other Changes
+
+- Added support for handling a C# DateTime.MinValue timestamp, which is
returned by the service as a sentinel for time which is not set.
+- Deprecating `uamqp_transport` in favor of pyAMQP transport. The
`uamqp_transport` will be removed in the next minor release.
+- Fixed aiohttp websocket library showing a deprecation warning due to an
incorrect timeout type
([#40429](https://github.com/Azure/azure-sdk-for-python/issues/40429))
+- Dropped support for Python 3.8
+
## 7.14.1 (2025-03-12)
### Bugs Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure_servicebus-7.14.1/PKG-INFO
new/azure_servicebus-7.14.2/PKG-INFO
--- old/azure_servicebus-7.14.1/PKG-INFO 2025-03-12 18:43:01.904153300
+0100
+++ new/azure_servicebus-7.14.2/PKG-INFO 2025-04-09 22:09:53.918960800
+0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: azure-servicebus
-Version: 7.14.1
+Version: 7.14.2
Summary: Microsoft Azure Service Bus Client Library for Python
Home-page: https://github.com/Azure/azure-sdk-for-python
Author: Microsoft Corporation
@@ -11,7 +11,6 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
@@ -63,7 +62,7 @@
To use this package, you must have:
* Azure subscription - [Create a free account][azure_sub]
* Azure Service Bus - [Namespace and management
credentials][service_bus_namespace]
-* Python 3.8 or later - [Install Python][python]
+* Python 3.9 or later - [Install Python][python]
If you need an Azure service bus namespace, you can create it via the [Azure
Portal][azure_namespace_creation].
@@ -671,6 +670,19 @@
# Release History
+## 7.14.2 (2025-04-09)
+
+### Bugs Fixed
+
+- Fixed a bug where max number of messages was not being requested when
receiving from the service due to an incorrect link credit calculation.
([#40156](https://github.com/Azure/azure-sdk-for-python/issues/40156))
+-
+### Other Changes
+
+- Added support for handling a C# DateTime.MinValue timestamp, which is
returned by the service as a sentinel for time which is not set.
+- Deprecating `uamqp_transport` in favor of pyAMQP transport. The
`uamqp_transport` will be removed in the next minor release.
+- Fixed aiohttp websocket library showing a deprecation warning due to an
incorrect timeout type
([#40429](https://github.com/Azure/azure-sdk-for-python/issues/40429))
+- Dropped support for Python 3.8
+
## 7.14.1 (2025-03-12)
### Bugs Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure_servicebus-7.14.1/README.md
new/azure_servicebus-7.14.2/README.md
--- old/azure_servicebus-7.14.1/README.md 2025-03-12 18:40:35.000000000
+0100
+++ new/azure_servicebus-7.14.2/README.md 2025-04-09 22:07:29.000000000
+0200
@@ -36,7 +36,7 @@
To use this package, you must have:
* Azure subscription - [Create a free account][azure_sub]
* Azure Service Bus - [Namespace and management
credentials][service_bus_namespace]
-* Python 3.8 or later - [Install Python][python]
+* Python 3.9 or later - [Install Python][python]
If you need an Azure service bus namespace, you can create it via the [Azure
Portal][azure_namespace_creation].
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure/servicebus/_common/utils.py
new/azure_servicebus-7.14.2/azure/servicebus/_common/utils.py
--- old/azure_servicebus-7.14.1/azure/servicebus/_common/utils.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure/servicebus/_common/utils.py
2025-04-09 22:07:29.000000000 +0200
@@ -65,9 +65,24 @@
_log = logging.getLogger(__name__)
+TZ_UTC: timezone = timezone.utc
+# Number of seconds between the Unix epoch (1/1/1970) and year 1 CE.
+# This is the lowest value that can be represented by an AMQP timestamp.
+CE_ZERO_SECONDS: int = -62_135_596_800
-def utc_from_timestamp(timestamp):
- return datetime.datetime.fromtimestamp(timestamp, tz=timezone.utc)
+def utc_from_timestamp(timestamp: float) -> datetime.datetime:
+ """
+ :param float timestamp: Timestamp in seconds to be converted to datetime.
+ :rtype: datetime.datetime
+ :returns: A datetime object representing the timestamp in UTC.
+ """
+ # The AMQP timestamp is the number of seconds since the Unix epoch.
+ # AMQP brokers represent the lowest value as -62_135_596_800 (the
+ # number of seconds between the Unix epoch (1/1/1970) and year 1 CE) as
+ # a sentinel for a time which is not set.
+ if timestamp == CE_ZERO_SECONDS:
+ return datetime.datetime.min.replace(tzinfo=TZ_UTC)
+ return datetime.datetime.fromtimestamp(timestamp, tz=TZ_UTC)
def utc_now():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/aio/_client_async.py
new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/aio/_client_async.py
--- old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/aio/_client_async.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/aio/_client_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -147,7 +147,7 @@
elapsed_time = current_time - start_time
if elapsed_time >= self._keep_alive_interval:
await asyncio.shield(
- self._connection.listen(wait=self._socket_timeout,
batch=self._link.total_link_credit)
+ self._connection.listen(wait=self._socket_timeout,
batch=self._link.current_link_credit)
)
start_time = current_time
await asyncio.sleep(1)
@@ -733,7 +733,7 @@
:rtype: bool
"""
try:
- if self._link.total_link_credit <= 0:
+ if self._link.current_link_credit<= 0:
await self._link.flow(link_credit=self._link_credit)
await self._connection.listen(wait=self._socket_timeout, **kwargs)
except ValueError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/aio/_link_async.py
new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/aio/_link_async.py
--- old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/aio/_link_async.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/aio/_link_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -96,7 +96,6 @@
self._on_link_state_change = kwargs.get("on_link_state_change")
self._on_attach = kwargs.get("on_attach")
self._error: Optional[AMQPLinkError] = None
- self.total_link_credit = self.link_credit
async def __aenter__(self) -> "Link":
await self.attach()
@@ -276,19 +275,6 @@
await self._set_state(LinkState.DETACHED)
async def flow(self, *, link_credit: Optional[int] = None, **kwargs) ->
None:
- # Given the desired link credit `link_credit`, the link credit sent via
- # FlowFrame is calculated as follows: The link credit to flow on the
wire
- # `self.current_link_credit` is the desired link credit `link_credit`
- # minus the current link credit on the wire `self.total_link_credit`.
- self.current_link_credit = link_credit - self.total_link_credit if
link_credit is not None else self.link_credit
-
- # If the link credit to flow is greater than 0 (i.e the desired link
credit
- # is greater than the current link credit on the wire), then we will
send a
- # flow to issue more link credit. Otherwise link credit on the wire is
sufficient.
- if self.current_link_credit > 0:
- # Calculate the total link credit on the wire, by adding the credit
- # we will flow to the total link credit.
- self.total_link_credit = (
- self.current_link_credit + self.total_link_credit if
link_credit is not None else self.link_credit
- )
- await self._outgoing_flow(**kwargs)
+ # Reset link credit to the default and flow
+ self.current_link_credit = link_credit if link_credit is not None else
self.link_credit
+ await self._outgoing_flow(**kwargs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/aio/_receiver_async.py
new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/aio/_receiver_async.py
--- old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/aio/_receiver_async.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/aio/_receiver_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -64,7 +64,6 @@
if not frame[5]:
self.delivery_count += 1
self.current_link_credit -= 1
- self.total_link_credit -= 1
if self.received_delivery_id is not None:
self._first_frame = frame
if not self.received_delivery_id and not self._received_payload:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/aio/_transport_async.py
new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/aio/_transport_async.py
---
old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/aio/_transport_async.py
2025-03-12 18:40:35.000000000 +0100
+++
new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/aio/_transport_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -438,6 +438,7 @@
from aiohttp import ( # pylint:
disable=networking-import-outside-azure-core-transport
ClientSession,
ClientConnectorError,
+ ClientWSTimeout,
)
from urllib.parse import urlsplit
except ImportError:
@@ -466,7 +467,7 @@
self.sock = await self.session.ws_connect(
url=url,
- timeout=self.socket_timeout, # timeout for connect
+ timeout=ClientWSTimeout(ws_close=self.socket_timeout),
protocols=[AMQP_WS_SUBPROTOCOL],
autoclose=False,
proxy=http_proxy_host,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/client.py
new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/client.py
--- old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/client.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/client.py
2025-04-09 22:07:29.000000000 +0200
@@ -237,7 +237,7 @@
current_time = time.time()
elapsed_time = current_time - start_time
if elapsed_time >= self._keep_alive_interval:
- self._connection.listen(wait=self._socket_timeout,
batch=self._link.total_link_credit)
+ self._connection.listen(wait=self._socket_timeout,
batch=self._link.current_link_credit)
start_time = current_time
time.sleep(1)
except Exception as e: # pylint: disable=broad-except
@@ -852,7 +852,7 @@
:rtype: bool
"""
try:
- if self._link.total_link_credit <= 0:
+ if self._link.current_link_credit <= 0:
self._link.flow(link_credit=self._link_credit)
self._connection.listen(wait=self._socket_timeout, **kwargs)
except ValueError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/link.py
new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/link.py
--- old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/link.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/link.py
2025-04-09 22:07:29.000000000 +0200
@@ -92,7 +92,6 @@
self._on_link_state_change = kwargs.get("on_link_state_change")
self._on_attach = kwargs.get("on_attach")
self._error: Optional[AMQPLinkError] = None
- self.total_link_credit = self.link_credit
def __enter__(self) -> "Link":
self.attach()
@@ -273,18 +272,5 @@
self._set_state(LinkState.DETACHED)
def flow(self, *, link_credit: Optional[int] = None, **kwargs: Any) ->
None:
- # Given the desired link credit `link_credit`, the link credit sent via
- # FlowFrame is calculated as follows: The link credit to flow on the
wire
- # `self.current_link_credit` is the desired link credit
- # `link_credit` minus the current link credit on the wire
`self.total_link_credit`.
- self.current_link_credit = link_credit - self.total_link_credit if
link_credit is not None else self.link_credit
-
- # If the link credit to flow is greater than 0 (i.e the desired link
credit is greater than
- # the current link credit on the wire), then we will send a flow to
issue more link credit.
- # Otherwise link credit on the wire is sufficient.
- if self.current_link_credit > 0:
- # Calculate the total link credit on the wire, by adding the
credit we will flow to the total link credit.
- self.total_link_credit = (
- self.current_link_credit + self.total_link_credit if
link_credit is not None else self.link_credit
- )
- self._outgoing_flow(**kwargs)
+ self.current_link_credit = link_credit if link_credit is not None else
self.link_credit
+ self._outgoing_flow(**kwargs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/receiver.py
new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/receiver.py
--- old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/receiver.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/receiver.py
2025-04-09 22:07:29.000000000 +0200
@@ -60,7 +60,6 @@
# If more is false --> this is the last frame of the message
if not frame[5]:
self.current_link_credit -= 1
- self.total_link_credit -= 1
self.delivery_count += 1
self.received_delivery_id = frame[1] # delivery_id
if self.received_delivery_id is not None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/utils.py
new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/utils.py
--- old/azure_servicebus-7.14.1/azure/servicebus/_pyamqp/utils.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure/servicebus/_pyamqp/utils.py
2025-04-09 22:07:29.000000000 +0200
@@ -14,9 +14,22 @@
from ._encode import encode_payload
TZ_UTC: timezone = timezone.utc
+# Number of seconds between the Unix epoch (1/1/1970) and year 1 CE.
+# This is the lowest value that can be represented by an AMQP timestamp.
+CE_ZERO_SECONDS: int = -62_135_596_800
-
-def utc_from_timestamp(timestamp):
+def utc_from_timestamp(timestamp: float) -> datetime.datetime:
+ """
+ :param float timestamp: Timestamp in seconds to be converted to datetime.
+ :rtype: datetime.datetime
+ :returns: A datetime object representing the timestamp in UTC.
+ """
+ # The AMQP timestamp is the number of seconds since the Unix epoch.
+ # AMQP brokers represent the lowest value as -62_135_596_800 (the
+ # number of seconds between the Unix epoch (1/1/1970) and year 1 CE) as
+ # a sentinel for a time which is not set.
+ if timestamp == CE_ZERO_SECONDS:
+ return datetime.datetime.min.replace(tzinfo=TZ_UTC)
return datetime.datetime.fromtimestamp(timestamp, tz=TZ_UTC)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure/servicebus/_servicebus_client.py
new/azure_servicebus-7.14.2/azure/servicebus/_servicebus_client.py
--- old/azure_servicebus-7.14.1/azure/servicebus/_servicebus_client.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure/servicebus/_servicebus_client.py
2025-04-09 22:07:29.000000000 +0200
@@ -5,6 +5,7 @@
# pylint: disable=client-method-missing-tracing-decorator
from typing import Any, Union, Optional, TYPE_CHECKING, Type
import logging
+import warnings
from weakref import WeakSet
from typing_extensions import Literal
import certifi
@@ -120,6 +121,15 @@
amqp_transport: Union[Type[PyamqpTransport], Type["UamqpTransport"]] =
PyamqpTransport
if uamqp_transport:
+ # Deprecation of uamqp transport
+ warnings.warn(
+ "uAMQP legacy support will be removed in the 7.15.0 minor
release. "
+ "Please remove the use of `uamqp_transport` keyword argument
from the client in order "
+ "to use the pure Python AMQP transport. "
+ "If you rely on this, please comment on [this issue]"
+ "(https://github.com/Azure/azure-sdk-for-python/issues/40347)
",
+ DeprecationWarning, stacklevel=2
+ )
try:
from ._transport._uamqp_transport import UamqpTransport
amqp_transport = UamqpTransport
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure_servicebus-7.14.1/azure/servicebus/_version.py
new/azure_servicebus-7.14.2/azure/servicebus/_version.py
--- old/azure_servicebus-7.14.1/azure/servicebus/_version.py 2025-03-12
18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure/servicebus/_version.py 2025-04-09
22:07:29.000000000 +0200
@@ -3,4 +3,4 @@
# Licensed under the MIT License.
# ------------------------------------
-VERSION = "7.14.1"
+VERSION = "7.14.2"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure/servicebus/aio/_servicebus_client_async.py
new/azure_servicebus-7.14.2/azure/servicebus/aio/_servicebus_client_async.py
---
old/azure_servicebus-7.14.1/azure/servicebus/aio/_servicebus_client_async.py
2025-03-12 18:40:35.000000000 +0100
+++
new/azure_servicebus-7.14.2/azure/servicebus/aio/_servicebus_client_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -5,6 +5,7 @@
# pylint: disable=client-method-missing-tracing-decorator
from typing import Any, Union, Optional, TYPE_CHECKING, Type
import logging
+import warnings
from weakref import WeakSet
from typing_extensions import Literal
import certifi
@@ -113,6 +114,15 @@
amqp_transport: Union[Type[PyamqpTransportAsync],
Type["UamqpTransportAsync"]] = PyamqpTransportAsync
if uamqp_transport:
+ # Deprecation of uamqp transport
+ warnings.warn(
+ "uAMQP legacy support will be removed in the 7.15.0 minor
release. "
+ "Please remove the use of `uamqp_transport` keyword argument
from the client in order "
+ "to use the pure Python AMQP transport. "
+ "If you rely on this, please comment on [this issue]"
+ "(https://github.com/Azure/azure-sdk-for-python/issues/40347)
",
+ DeprecationWarning, stacklevel=2
+ )
try:
from ._transport._uamqp_transport_async import
UamqpTransportAsync
amqp_transport = UamqpTransportAsync
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure_servicebus.egg-info/PKG-INFO
new/azure_servicebus-7.14.2/azure_servicebus.egg-info/PKG-INFO
--- old/azure_servicebus-7.14.1/azure_servicebus.egg-info/PKG-INFO
2025-03-12 18:43:01.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure_servicebus.egg-info/PKG-INFO
2025-04-09 22:09:53.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: azure-servicebus
-Version: 7.14.1
+Version: 7.14.2
Summary: Microsoft Azure Service Bus Client Library for Python
Home-page: https://github.com/Azure/azure-sdk-for-python
Author: Microsoft Corporation
@@ -11,7 +11,6 @@
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
@@ -63,7 +62,7 @@
To use this package, you must have:
* Azure subscription - [Create a free account][azure_sub]
* Azure Service Bus - [Namespace and management
credentials][service_bus_namespace]
-* Python 3.8 or later - [Install Python][python]
+* Python 3.9 or later - [Install Python][python]
If you need an Azure service bus namespace, you can create it via the [Azure
Portal][azure_namespace_creation].
@@ -671,6 +670,19 @@
# Release History
+## 7.14.2 (2025-04-09)
+
+### Bugs Fixed
+
+- Fixed a bug where max number of messages was not being requested when
receiving from the service due to an incorrect link credit calculation.
([#40156](https://github.com/Azure/azure-sdk-for-python/issues/40156))
+-
+### Other Changes
+
+- Added support for handling a C# DateTime.MinValue timestamp, which is
returned by the service as a sentinel for time which is not set.
+- Deprecating `uamqp_transport` in favor of pyAMQP transport. The
`uamqp_transport` will be removed in the next minor release.
+- Fixed aiohttp websocket library showing a deprecation warning due to an
incorrect timeout type
([#40429](https://github.com/Azure/azure-sdk-for-python/issues/40429))
+- Dropped support for Python 3.8
+
## 7.14.1 (2025-03-12)
### Bugs Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/azure_servicebus.egg-info/SOURCES.txt
new/azure_servicebus-7.14.2/azure_servicebus.egg-info/SOURCES.txt
--- old/azure_servicebus-7.14.1/azure_servicebus.egg-info/SOURCES.txt
2025-03-12 18:43:01.000000000 +0100
+++ new/azure_servicebus-7.14.2/azure_servicebus.egg-info/SOURCES.txt
2025-04-09 22:09:53.000000000 +0200
@@ -186,6 +186,7 @@
samples/sync_samples/session_pool_receive.py
samples/sync_samples/session_send_receive.py
samples/sync_samples/topic_subscription_with_rule_operations.py
+tests/conftest.py
tests/mocks.py
tests/sb_env_loader.py
tests/servicebus_preparer.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure_servicebus-7.14.1/setup.py
new/azure_servicebus-7.14.2/setup.py
--- old/azure_servicebus-7.14.1/setup.py 2025-03-12 18:40:35.000000000
+0100
+++ new/azure_servicebus-7.14.2/setup.py 2025-04-09 22:07:29.000000000
+0200
@@ -49,7 +49,6 @@
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/async_tests/test_queues_async.py
new/azure_servicebus-7.14.2/tests/async_tests/test_queues_async.py
--- old/azure_servicebus-7.14.1/tests/async_tests/test_queues_async.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/async_tests/test_queues_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -59,7 +59,7 @@
OperationTimeoutError,
)
from devtools_testutils import AzureMgmtRecordedTestCase,
AzureRecordedTestCase, get_credential
-from tests.servicebus_preparer import (
+from servicebus_preparer import (
SERVICEBUS_ENDPOINT_SUFFIX,
CachedServiceBusNamespacePreparer,
CachedServiceBusQueuePreparer,
@@ -67,7 +67,7 @@
CachedServiceBusResourceGroupPreparer,
)
from mocks_async import MockReceivedMessage, MockReceiver
-from tests.utilities import (
+from utilities import (
get_logger,
print_message,
sleep_until_expired,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/async_tests/test_sb_client_async.py
new/azure_servicebus-7.14.2/tests/async_tests/test_sb_client_async.py
--- old/azure_servicebus-7.14.1/tests/async_tests/test_sb_client_async.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/async_tests/test_sb_client_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -28,7 +28,7 @@
ServiceBusConnectionError,
)
from devtools_testutils import AzureMgmtRecordedTestCase, get_credential
-from tests.servicebus_preparer import (
+from servicebus_preparer import (
CachedServiceBusNamespacePreparer,
ServiceBusTopicPreparer,
ServiceBusQueuePreparer,
@@ -40,7 +40,7 @@
CachedServiceBusResourceGroupPreparer,
SERVICEBUS_ENDPOINT_SUFFIX,
)
-from tests.utilities import (
+from utilities import (
get_logger,
uamqp_transport as get_uamqp_transport,
ArgPasserAsync,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/async_tests/test_sessions_async.py
new/azure_servicebus-7.14.2/tests/async_tests/test_sessions_async.py
--- old/azure_servicebus-7.14.1/tests/async_tests/test_sessions_async.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/async_tests/test_sessions_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -34,7 +34,7 @@
AutoLockRenewTimeout,
)
from devtools_testutils import AzureMgmtRecordedTestCase, get_credential
-from tests.servicebus_preparer import (
+from servicebus_preparer import (
SERVICEBUS_ENDPOINT_SUFFIX,
CachedServiceBusNamespacePreparer,
CachedServiceBusQueuePreparer,
@@ -43,7 +43,7 @@
ServiceBusSubscriptionPreparer,
CachedServiceBusResourceGroupPreparer,
)
-from tests.utilities import get_logger, print_message, uamqp_transport as
get_uamqp_transport, ArgPasserAsync
+from utilities import get_logger, print_message, uamqp_transport as
get_uamqp_transport, ArgPasserAsync
uamqp_transport_params, uamqp_transport_ids = get_uamqp_transport()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/async_tests/test_subscriptions_async.py
new/azure_servicebus-7.14.2/tests/async_tests/test_subscriptions_async.py
--- old/azure_servicebus-7.14.1/tests/async_tests/test_subscriptions_async.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/async_tests/test_subscriptions_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -19,7 +19,7 @@
from azure.servicebus._common.constants import ServiceBusSubQueue
from devtools_testutils import AzureMgmtRecordedTestCase,
RandomNameResourceGroupPreparer, get_credential
-from tests.servicebus_preparer import (
+from servicebus_preparer import (
CachedServiceBusNamespacePreparer,
CachedServiceBusTopicPreparer,
CachedServiceBusSubscriptionPreparer,
@@ -28,7 +28,7 @@
CachedServiceBusResourceGroupPreparer,
SERVICEBUS_ENDPOINT_SUFFIX,
)
-from tests.utilities import get_logger, print_message, uamqp_transport as
get_uamqp_transport, ArgPasserAsync
+from utilities import get_logger, print_message, uamqp_transport as
get_uamqp_transport, ArgPasserAsync
uamqp_transport_params, uamqp_transport_ids = get_uamqp_transport()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/async_tests/test_topic_async.py
new/azure_servicebus-7.14.2/tests/async_tests/test_topic_async.py
--- old/azure_servicebus-7.14.1/tests/async_tests/test_topic_async.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/async_tests/test_topic_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -17,7 +17,7 @@
from azure.servicebus.aio import ServiceBusClient
from azure.servicebus.aio._base_handler_async import
ServiceBusSharedKeyCredential
from azure.servicebus._common.message import ServiceBusMessage
-from tests.servicebus_preparer import (
+from servicebus_preparer import (
ServiceBusNamespacePreparer,
ServiceBusTopicPreparer,
CachedServiceBusNamespacePreparer,
@@ -25,7 +25,7 @@
CachedServiceBusResourceGroupPreparer,
SERVICEBUS_ENDPOINT_SUFFIX,
)
-from tests.utilities import get_logger, print_message, uamqp_transport as
get_uamqp_transport, ArgPasserAsync
+from utilities import get_logger, print_message, uamqp_transport as
get_uamqp_transport, ArgPasserAsync
uamqp_transport_params, uamqp_transport_ids = get_uamqp_transport()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure_servicebus-7.14.1/tests/conftest.py
new/azure_servicebus-7.14.2/tests/conftest.py
--- old/azure_servicebus-7.14.1/tests/conftest.py 1970-01-01
01:00:00.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/conftest.py 2025-04-09
22:07:29.000000000 +0200
@@ -0,0 +1,32 @@
+# ------------------------------------------------------------------------
+# Copyright (c) Microsoft Corporation. All rights reserved.
+# Licensed under the MIT License. See License.txt in the project root for
+# license information.
+# -------------------------------------------------------------------------
+import pytest
+from devtools_testutils.sanitizers import (
+ add_remove_header_sanitizer,
+ add_general_regex_sanitizer,
+ add_oauth_response_sanitizer,
+)
+
+collect_ignore = []
+
+
[email protected](scope="session", autouse=True)
+def add_sanitizers(test_proxy):
+ add_remove_header_sanitizer(headers="aeg-sas-key")
+ add_remove_header_sanitizer(headers="aeg-sas-token")
+ add_remove_header_sanitizer(headers="ServiceBusSupplementaryAuthorization")
+
add_remove_header_sanitizer(headers="ServiceBusDlqSupplementaryAuthorization")
+ add_general_regex_sanitizer(value="fakeresource",
regex="(?<=\\/\\/)[a-z-]+(?=\\.servicebus\\.windows\\.net)")
+ add_oauth_response_sanitizer()
+
+
+# Note: This is duplicated between here and the basic conftest, so that it
does not throw warnings if you're
+# running locally to this SDK. (Everything works properly, pytest just makes a
bit of noise.)
+def pytest_configure(config):
+ # register an additional marker
+ config.addinivalue_line("markers", "liveTest: mark test to be a live test
only")
+ config.addinivalue_line("markers", "live_test_only: mark test to be a live
test only")
+ config.addinivalue_line("markers", "playback_test_only: mark test to be a
playback test only")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/mgmt_tests/async/test_mgmt_namespaces_async.py
new/azure_servicebus-7.14.2/tests/mgmt_tests/async/test_mgmt_namespaces_async.py
---
old/azure_servicebus-7.14.1/tests/mgmt_tests/async/test_mgmt_namespaces_async.py
2025-03-12 18:40:35.000000000 +0100
+++
new/azure_servicebus-7.14.2/tests/mgmt_tests/async/test_mgmt_namespaces_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -9,7 +9,7 @@
from devtools_testutils import AzureMgmtRecordedTestCase, get_credential
from devtools_testutils.aio import recorded_by_proxy_async
-from tests.sb_env_loader import ServiceBusPreparer
+from sb_env_loader import ServiceBusPreparer
class TestServiceBusManagementClientNamespaceAsync(AzureMgmtRecordedTestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/mgmt_tests/async/test_mgmt_queues_async.py
new/azure_servicebus-7.14.2/tests/mgmt_tests/async/test_mgmt_queues_async.py
---
old/azure_servicebus-7.14.1/tests/mgmt_tests/async/test_mgmt_queues_async.py
2025-03-12 18:40:35.000000000 +0100
+++
new/azure_servicebus-7.14.2/tests/mgmt_tests/async/test_mgmt_queues_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -15,8 +15,8 @@
from devtools_testutils import AzureMgmtRecordedTestCase, get_credential
from devtools_testutils.aio import recorded_by_proxy_async
-from tests.sb_env_loader import ServiceBusPreparer
-from tests.servicebus_preparer import SERVICEBUS_ENDPOINT_SUFFIX
+from sb_env_loader import ServiceBusPreparer
+from servicebus_preparer import SERVICEBUS_ENDPOINT_SUFFIX
from mgmt_test_utilities_async import (
AsyncMgmtQueueListTestHelper,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/mgmt_tests/async/test_mgmt_rules_async.py
new/azure_servicebus-7.14.2/tests/mgmt_tests/async/test_mgmt_rules_async.py
--- old/azure_servicebus-7.14.1/tests/mgmt_tests/async/test_mgmt_rules_async.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/mgmt_tests/async/test_mgmt_rules_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -17,7 +17,7 @@
SqlRuleAction,
)
from azure.servicebus.management._constants import INT32_MAX_VALUE
-from tests.utilities import get_logger
+from utilities import get_logger
from azure.core.exceptions import HttpResponseError, ResourceExistsError
from devtools_testutils import (
@@ -27,7 +27,7 @@
get_credential,
)
from devtools_testutils.aio import recorded_by_proxy_async
-from tests.sb_env_loader import ServiceBusPreparer
+from sb_env_loader import ServiceBusPreparer
from mgmt_test_utilities_async import async_pageable_to_list, clear_topics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/mgmt_tests/async/test_mgmt_subscriptions_async.py
new/azure_servicebus-7.14.2/tests/mgmt_tests/async/test_mgmt_subscriptions_async.py
---
old/azure_servicebus-7.14.1/tests/mgmt_tests/async/test_mgmt_subscriptions_async.py
2025-03-12 18:40:35.000000000 +0100
+++
new/azure_servicebus-7.14.2/tests/mgmt_tests/async/test_mgmt_subscriptions_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -9,13 +9,13 @@
from azure.servicebus.aio.management import ServiceBusAdministrationClient
from azure.servicebus.management import SubscriptionProperties
-from tests.utilities import get_logger
+from utilities import get_logger
from azure.core.exceptions import HttpResponseError, ResourceExistsError
from devtools_testutils import AzureMgmtRecordedTestCase,
CachedResourceGroupPreparer, get_credential
from devtools_testutils.aio import recorded_by_proxy_async
-from tests.sb_env_loader import ServiceBusPreparer
-from tests.servicebus_preparer import SERVICEBUS_ENDPOINT_SUFFIX
+from sb_env_loader import ServiceBusPreparer
+from servicebus_preparer import SERVICEBUS_ENDPOINT_SUFFIX
from mgmt_test_utilities_async import async_pageable_to_list, clear_topics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/mgmt_tests/async/test_mgmt_topics_async.py
new/azure_servicebus-7.14.2/tests/mgmt_tests/async/test_mgmt_topics_async.py
---
old/azure_servicebus-7.14.1/tests/mgmt_tests/async/test_mgmt_topics_async.py
2025-03-12 18:40:35.000000000 +0100
+++
new/azure_servicebus-7.14.2/tests/mgmt_tests/async/test_mgmt_topics_async.py
2025-04-09 22:07:29.000000000 +0200
@@ -13,12 +13,12 @@
from azure.servicebus.management import TopicProperties, AccessRights,
AuthorizationRule
from azure.servicebus.aio._base_handler_async import
ServiceBusSharedKeyCredential
from azure.servicebus.management import ApiVersion
-from tests.utilities import get_logger
+from utilities import get_logger
from azure.core.exceptions import HttpResponseError, ResourceExistsError
from devtools_testutils import AzureMgmtRecordedTestCase,
CachedResourceGroupPreparer, get_credential
from devtools_testutils.aio import recorded_by_proxy_async
-from tests.sb_env_loader import ServiceBusPreparer
+from sb_env_loader import ServiceBusPreparer
from mgmt_test_utilities_async import async_pageable_to_list, clear_topics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/mgmt_tests/test_mgmt_namespaces.py
new/azure_servicebus-7.14.2/tests/mgmt_tests/test_mgmt_namespaces.py
--- old/azure_servicebus-7.14.1/tests/mgmt_tests/test_mgmt_namespaces.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/mgmt_tests/test_mgmt_namespaces.py
2025-04-09 22:07:29.000000000 +0200
@@ -8,7 +8,7 @@
from azure.servicebus.management import ServiceBusAdministrationClient
from devtools_testutils import AzureMgmtRecordedTestCase,
CachedResourceGroupPreparer, recorded_by_proxy, get_credential
-from tests.sb_env_loader import ServiceBusPreparer
+from sb_env_loader import ServiceBusPreparer
class TestServiceBusManagementClientNamespace(AzureMgmtRecordedTestCase):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/mgmt_tests/test_mgmt_queues.py
new/azure_servicebus-7.14.2/tests/mgmt_tests/test_mgmt_queues.py
--- old/azure_servicebus-7.14.1/tests/mgmt_tests/test_mgmt_queues.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/mgmt_tests/test_mgmt_queues.py
2025-04-09 22:07:29.000000000 +0200
@@ -14,15 +14,15 @@
from azure.servicebus.management import ServiceBusAdministrationClient,
QueueProperties, ApiVersion, AuthorizationRule, AccessRights
from azure.servicebus._common.utils import utc_now
-from tests.utilities import get_logger
+from utilities import get_logger
from azure.core.exceptions import HttpResponseError, ResourceNotFoundError,
ResourceExistsError
from azure.servicebus._base_handler import ServiceBusSharedKeyCredential
from devtools_testutils import AzureMgmtRecordedTestCase,
CachedResourceGroupPreparer, recorded_by_proxy, get_credential
-from tests.sb_env_loader import (
+from sb_env_loader import (
ServiceBusPreparer,
)
-from tests.servicebus_preparer import SERVICEBUS_ENDPOINT_SUFFIX
+from servicebus_preparer import SERVICEBUS_ENDPOINT_SUFFIX
from mgmt_test_utilities import (
MgmtQueueListTestHelper,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/mgmt_tests/test_mgmt_rules.py
new/azure_servicebus-7.14.2/tests/mgmt_tests/test_mgmt_rules.py
--- old/azure_servicebus-7.14.1/tests/mgmt_tests/test_mgmt_rules.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/mgmt_tests/test_mgmt_rules.py
2025-04-09 22:07:29.000000000 +0200
@@ -17,7 +17,7 @@
SqlRuleAction,
)
from azure.servicebus.management._constants import INT32_MAX_VALUE
-from tests.utilities import get_logger
+from utilities import get_logger
from azure.core.exceptions import HttpResponseError, ResourceExistsError
from devtools_testutils import (
@@ -27,7 +27,7 @@
set_bodiless_matcher,
get_credential,
)
-from tests.sb_env_loader import ServiceBusPreparer
+from sb_env_loader import ServiceBusPreparer
from mgmt_test_utilities import clear_topics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/mgmt_tests/test_mgmt_subscriptions.py
new/azure_servicebus-7.14.2/tests/mgmt_tests/test_mgmt_subscriptions.py
--- old/azure_servicebus-7.14.1/tests/mgmt_tests/test_mgmt_subscriptions.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/mgmt_tests/test_mgmt_subscriptions.py
2025-04-09 22:07:29.000000000 +0200
@@ -8,12 +8,12 @@
import datetime
from azure.servicebus.management import ServiceBusAdministrationClient,
SubscriptionProperties
-from tests.utilities import get_logger
+from utilities import get_logger
from azure.core.exceptions import HttpResponseError, ResourceExistsError
from devtools_testutils import AzureMgmtRecordedTestCase,
CachedResourceGroupPreparer, recorded_by_proxy, get_credential
-from tests.sb_env_loader import ServiceBusPreparer
-from tests.servicebus_preparer import SERVICEBUS_ENDPOINT_SUFFIX
+from sb_env_loader import ServiceBusPreparer
+from servicebus_preparer import SERVICEBUS_ENDPOINT_SUFFIX
from mgmt_test_utilities import clear_topics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/azure_servicebus-7.14.1/tests/mgmt_tests/test_mgmt_topics.py
new/azure_servicebus-7.14.2/tests/mgmt_tests/test_mgmt_topics.py
--- old/azure_servicebus-7.14.1/tests/mgmt_tests/test_mgmt_topics.py
2025-03-12 18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/mgmt_tests/test_mgmt_topics.py
2025-04-09 22:07:29.000000000 +0200
@@ -9,11 +9,11 @@
from azure.servicebus.management import ServiceBusAdministrationClient,
TopicProperties, ApiVersion
from azure.servicebus._base_handler import ServiceBusSharedKeyCredential
-from tests.utilities import get_logger
+from utilities import get_logger
from azure.core.exceptions import HttpResponseError, ResourceExistsError
from devtools_testutils import AzureMgmtRecordedTestCase,
CachedResourceGroupPreparer, recorded_by_proxy, get_credential
-from tests.sb_env_loader import ServiceBusPreparer
+from sb_env_loader import ServiceBusPreparer
from mgmt_test_utilities import clear_topics
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/azure_servicebus-7.14.1/tests/test_message.py
new/azure_servicebus-7.14.2/tests/test_message.py
--- old/azure_servicebus-7.14.1/tests/test_message.py 2025-03-12
18:40:35.000000000 +0100
+++ new/azure_servicebus-7.14.2/tests/test_message.py 2025-04-09
22:07:29.000000000 +0200
@@ -7,7 +7,7 @@
from azure.servicebus._transport._uamqp_transport import UamqpTransport
except (ModuleNotFoundError, ImportError):
uamqp = None
-from datetime import datetime, timedelta
+from datetime import datetime, timedelta, timezone
from azure.servicebus import (
ServiceBusClient,
ServiceBusMessage,
@@ -20,6 +20,10 @@
_X_OPT_PARTITION_KEY,
_X_OPT_VIA_PARTITION_KEY,
_X_OPT_SCHEDULED_ENQUEUE_TIME,
+ _X_OPT_ENQUEUED_TIME,
+)
+from azure.servicebus._common.utils import (
+ CE_ZERO_SECONDS,
)
from azure.servicebus.amqp import AmqpAnnotatedMessage, AmqpMessageBodyType,
AmqpMessageProperties, AmqpMessageHeader
from azure.servicebus._pyamqp.message import Message
@@ -69,6 +73,15 @@
in message.__repr__()
)
+def test_servicebus_message_min_timestamp():
+ received_message = Message(
+ data=[b"data"],
+ message_annotations={
+ _X_OPT_ENQUEUED_TIME: CE_ZERO_SECONDS*1000,
+ },
+ )
+ received_message = ServiceBusReceivedMessage(received_message,
receiver=None)
+ assert received_message.enqueued_time_utc ==
datetime.min.replace(tzinfo=timezone.utc)
@pytest.mark.parametrize("uamqp_transport", uamqp_transport_params,
ids=uamqp_transport_ids)
def test_servicebus_received_message_repr(uamqp_transport):
@@ -80,6 +93,7 @@
_X_OPT_PARTITION_KEY: b"r_key",
_X_OPT_VIA_PARTITION_KEY: b"r_via_key",
_X_OPT_SCHEDULED_ENQUEUE_TIME: 123424566,
+ _X_OPT_ENQUEUED_TIME: CE_ZERO_SECONDS * 1000,
},
properties={},
)