Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-azure-eventhub for 
openSUSE:Factory checked in at 2024-04-11 19:41:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-azure-eventhub (Old)
 and      /work/SRC/openSUSE:Factory/.python-azure-eventhub.new.29460 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-azure-eventhub"

Thu Apr 11 19:41:54 2024 rev:23 rq:1166871 version:5.11.7

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-azure-eventhub/python-azure-eventhub.changes  
    2024-04-07 22:06:58.564733988 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-azure-eventhub.new.29460/python-azure-eventhub.changes
   2024-04-11 19:42:20.976416324 +0200
@@ -1,0 +2,8 @@
+Thu Apr 11 10:15:46 UTC 2024 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- New upstream release
+  + Version 5.11.7
+  + For detailed information about changes see the
+    CHANGELOG.md file provided with this package
+
+-------------------------------------------------------------------

Old:
----
  azure-eventhub-5.11.6.tar.gz

New:
----
  azure-eventhub-5.11.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-azure-eventhub.spec ++++++
--- /var/tmp/diff_new_pack.FR5Law/_old  2024-04-11 19:42:21.456434082 +0200
+++ /var/tmp/diff_new_pack.FR5Law/_new  2024-04-11 19:42:21.456434082 +0200
@@ -18,7 +18,7 @@
 
 %{?sle15_python_module_pythons}
 Name:           python-azure-eventhub
-Version:        5.11.6
+Version:        5.11.7
 Release:        0
 Summary:        Azure Event Hubs client library for Python
 License:        MIT

++++++ azure-eventhub-5.11.6.tar.gz -> azure-eventhub-5.11.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-eventhub-5.11.6/CHANGELOG.md 
new/azure-eventhub-5.11.7/CHANGELOG.md
--- old/azure-eventhub-5.11.6/CHANGELOG.md      2024-02-13 00:17:44.000000000 
+0100
+++ new/azure-eventhub-5.11.7/CHANGELOG.md      2024-04-10 20:23:26.000000000 
+0200
@@ -1,13 +1,25 @@
 # Release History
 
+## 5.11.7 (2024-04-10)
+
+### Bugs Fixed
+
+- Fixed a bug where using `EventHubProducerClient` in buffered mode could 
potentially drop a buffered message without actually sending it. 
([#34712](https://github.com/Azure/azure-sdk-for-python/pull/34712))
+
+### Other Changes
+
+- Updated network trace logging to replace `None` values in AMQP connection 
info with empty strings as per the OpenTelemetry specification.
+
 ## 5.11.6 (2024-02-12)
 
 This version and all future versions will require Python 3.8+. Python 3.7 is 
no longer supported.
 
 ### Features Added
+
 - Added `keep_alive` functionality on EventHubProducerClient to allow for 
long-living producers. 
[#33726](https://github.com/Azure/azure-sdk-for-python/issues/33726)
 
 ### Other Changes
+
 - Added support for Python 3.12.
 
 ## 5.11.5 (2023-11-13)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-eventhub-5.11.6/PKG-INFO 
new/azure-eventhub-5.11.7/PKG-INFO
--- old/azure-eventhub-5.11.6/PKG-INFO  2024-02-13 00:18:32.576645100 +0100
+++ new/azure-eventhub-5.11.7/PKG-INFO  2024-04-10 20:25:11.392802000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: azure-eventhub
-Version: 5.11.6
+Version: 5.11.7
 Summary: Microsoft Azure Event Hubs Client Library for Python
 Home-page: 
https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventhub/azure-eventhub
 Author: Microsoft Corporation
@@ -10,6 +10,7 @@
 Classifier: Development Status :: 5 - Production/Stable
 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
@@ -19,7 +20,7 @@
 Requires-Python: >=3.8
 Description-Content-Type: text/markdown
 License-File: LICENSE
-Requires-Dist: azure-core<2.0.0,>=1.14.0
+Requires-Dist: azure-core>=1.14.0
 Requires-Dist: typing-extensions>=4.0.1
 
 # Azure Event Hubs client library for Python
@@ -50,7 +51,7 @@
 
 - Python 3.8 or later.
 - **Microsoft Azure Subscription:**  To use Azure services, including Azure 
Event Hubs, you'll need a subscription.
-If you do not have an existing Azure account, you may sign up for a free trial 
or use your MSDN subscriber benefits when you [create an 
account](https://account.windowsazure.com/Home/Index).
+If you do not have an existing Azure account, you may sign up for a free trial 
or use your MSDN subscriber benefits when you [create an 
account](https://azure.microsoft.com/free/).
 
 - **Event Hubs namespace with an Event Hub:** To interact with Azure Event 
Hubs, you'll also need to have a namespace and Event Hub  available.
 If you are not familiar with creating Azure resources, you may wish to follow 
the step-by-step guide
@@ -515,14 +516,26 @@
 
 # Release History
 
+## 5.11.7 (2024-04-10)
+
+### Bugs Fixed
+
+- Fixed a bug where using `EventHubProducerClient` in buffered mode could 
potentially drop a buffered message without actually sending it. 
([#34712](https://github.com/Azure/azure-sdk-for-python/pull/34712))
+
+### Other Changes
+
+- Updated network trace logging to replace `None` values in AMQP connection 
info with empty strings as per the OpenTelemetry specification.
+
 ## 5.11.6 (2024-02-12)
 
 This version and all future versions will require Python 3.8+. Python 3.7 is 
no longer supported.
 
 ### Features Added
+
 - Added `keep_alive` functionality on EventHubProducerClient to allow for 
long-living producers. 
[#33726](https://github.com/Azure/azure-sdk-for-python/issues/33726)
 
 ### Other Changes
+
 - Added support for Python 3.12.
 
 ## 5.11.5 (2023-11-13)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-eventhub-5.11.6/README.md 
new/azure-eventhub-5.11.7/README.md
--- old/azure-eventhub-5.11.6/README.md 2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/README.md 2024-04-10 20:23:26.000000000 +0200
@@ -26,7 +26,7 @@
 
 - Python 3.8 or later.
 - **Microsoft Azure Subscription:**  To use Azure services, including Azure 
Event Hubs, you'll need a subscription.
-If you do not have an existing Azure account, you may sign up for a free trial 
or use your MSDN subscriber benefits when you [create an 
account](https://account.windowsazure.com/Home/Index).
+If you do not have an existing Azure account, you may sign up for a free trial 
or use your MSDN subscriber benefits when you [create an 
account](https://azure.microsoft.com/free/).
 
 - **Event Hubs namespace with an Event Hub:** To interact with Azure Event 
Hubs, you'll also need to have a namespace and Event Hub  available.
 If you are not familiar with creating Azure resources, you may wish to follow 
the step-by-step guide
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_buffered_producer/_buffered_producer.py
 
new/azure-eventhub-5.11.7/azure/eventhub/_buffered_producer/_buffered_producer.py
--- 
old/azure-eventhub-5.11.6/azure/eventhub/_buffered_producer/_buffered_producer.py
   2024-02-13 00:17:44.000000000 +0100
+++ 
new/azure-eventhub-5.11.7/azure/eventhub/_buffered_producer/_buffered_producer.py
   2024-04-10 20:23:26.000000000 +0200
@@ -105,24 +105,22 @@
             raise OperationTimeoutError(
                 "Failed to enqueue events into buffer due to timeout."
             )
-        try:
-            # add single event into current batch
-            self._cur_batch.add(events)
-        except AttributeError:  # if the input events is a EventDataBatch, put 
the whole into the buffer
-            # if there are events in cur_batch, enqueue cur_batch to the buffer
-            with self._lock:
+        with self._lock:
+            try:
+                # add single event into current batch
+                self._cur_batch.add(events)
+            except AttributeError:  # if the input events is a EventDataBatch, 
put the whole into the buffer
+                # if there are events in cur_batch, enqueue cur_batch to the 
buffer
                 if self._cur_batch:
                     self._buffered_queue.put(self._cur_batch)
                 self._buffered_queue.put(events)
-            # create a new batch for incoming events
-            self._cur_batch = EventDataBatch(self._max_message_size_on_link, 
amqp_transport=self._amqp_transport)
-        except ValueError:
-            # add single event exceeds the cur batch size, create new batch
-            with self._lock:
+                # create a new batch for incoming events
+                self._cur_batch = 
EventDataBatch(self._max_message_size_on_link, 
amqp_transport=self._amqp_transport)
+            except ValueError:
+                # add single event exceeds the cur batch size, create new batch
                 self._buffered_queue.put(self._cur_batch)
-            self._cur_batch = EventDataBatch(self._max_message_size_on_link, 
amqp_transport=self._amqp_transport)
-            self._cur_batch.add(events)
-        with self._lock:
+                self._cur_batch = 
EventDataBatch(self._max_message_size_on_link, 
amqp_transport=self._amqp_transport)
+                self._cur_batch.add(events)
             self._cur_buffered_len += new_events_len
 
     def failsafe_callback(self, callback):
@@ -146,6 +144,7 @@
             _LOGGER.info("Partition: %r started flushing.", self.partition_id)
             if self._cur_batch:  # if there is batch, enqueue it to the buffer 
first
                 self._buffered_queue.put(self._cur_batch)
+                self._cur_batch = 
EventDataBatch(self._max_message_size_on_link, 
amqp_transport=self._amqp_transport)
             while self._buffered_queue.qsize() > 0:
                 remaining_time = timeout_time - time.time() if timeout_time 
else None
                 if (remaining_time and remaining_time > 0) or remaining_time 
is None:
@@ -197,9 +196,6 @@
                     break
             # after finishing flushing, reset cur batch and put it into the 
buffer
             self._last_send_time = time.time()
-            #reset buffered count
-            self._cur_buffered_len = 0
-            self._cur_batch = EventDataBatch(self._max_message_size_on_link, 
amqp_transport=self._amqp_transport)
             _LOGGER.info("Partition %r finished flushing.", self.partition_id)
 
     def check_max_wait_time_worker(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_producer_client.py 
new/azure-eventhub-5.11.7/azure/eventhub/_producer_client.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_producer_client.py        
2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_producer_client.py        
2024-04-10 20:23:26.000000000 +0200
@@ -576,7 +576,8 @@
         :keyword float timeout: The maximum wait time to send the event data 
in non-buffered mode or the
          maximum wait time to enqueue the event data into the buffer in 
buffered mode.
          In non-buffered mode, the default wait time specified when the 
producer
-         was created will be used. In buffered mode, the default wait time is 
None.
+         was created will be used. In buffered mode, the default wait time is 
None indicating that the event will be
+         scheduled to send immediately.
         :keyword str partition_id: The specific partition ID to send to. 
Default is None, in which case the service
          will assign to all partitions using round-robin.
          A `TypeError` will be raised if partition_id is specified and 
event_data_batch is an `EventDataBatch` because
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/_connection.py 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/_connection.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/_connection.py     
2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/_connection.py     
2024-04-10 20:23:26.000000000 +0200
@@ -135,7 +135,7 @@
             custom_endpoint = 
f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}"
         self._container_id = container_id or str(uuid.uuid4())
         self._network_trace = network_trace
-        self._network_trace_params = {"amqpConnection": self._container_id, 
"amqpSession": None, "amqpLink": None}
+        self._network_trace_params = {"amqpConnection": self._container_id, 
"amqpSession": "", "amqpLink": ""}
 
         transport = kwargs.get("transport")
         self._transport_type = transport_type
@@ -337,13 +337,13 @@
 
     def _outgoing_empty(self) -> None:
         """Send an empty frame to prevent the connection from reaching an idle 
timeout."""
-        if self._network_trace:
-            _LOGGER.debug("-> EmptyFrame()", extra=self._network_trace_params)
         if self._error:
             raise self._error
 
         try:
             if self._can_write():
+                if self._network_trace:
+                    _LOGGER.debug("-> EmptyFrame()", 
extra=self._network_trace_params)
                 self._transport.write(EMPTY_FRAME)
                 self._last_frame_sent_time = time.time()
         except (OSError, IOError, SSLError, socket.error) as exc:
@@ -516,7 +516,7 @@
             self._error = AMQPConnectionError(
                 condition=frame[0][0], description=frame[0][1], 
info=frame[0][2]
             )
-            _LOGGER.error(
+            _LOGGER.warning(
                 "Connection closed with error: %r", frame[0],
                 extra=self._network_trace_params
             )
@@ -667,7 +667,10 @@
             ConnectionState.OPEN_SENT,
             ConnectionState.OPENED,
         ]:
-            raise ValueError("Connection not open.")
+            raise AMQPConnectionError(
+                ErrorCondition.SocketError,
+                description="Connection not open."
+            )
         now = time.time()
         if get_local_timeout(
             now,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/_transport.py 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/_transport.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/_transport.py      
2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/_transport.py      
2024-04-10 20:23:26.000000000 +0200
@@ -648,7 +648,11 @@
         """Write a string out to the SSL socket fully.
         :param str s: The string to write.
         """
-        write = self.sock.send
+        try:
+            write = self.sock.send
+        except AttributeError:
+            raise IOError("Socket has already been closed.") from None
+
         while s:
             try:
                 n = write(s)
@@ -659,7 +663,7 @@
                 # None.
                 n = 0
             if not n:
-                raise IOError("Socket closed")
+                raise IOError("Socket closed.")
             s = s[n:]
 
     def negotiate(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/aio/_cbs_async.py 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/aio/_cbs_async.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/aio/_cbs_async.py  
2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/aio/_cbs_async.py  
2024-04-10 20:23:26.000000000 +0200
@@ -63,7 +63,7 @@
         self._network_trace_params = {
             "amqpConnection": self._session._connection._container_id,
             "amqpSession": self._session.name,
-            "amqpLink": None
+            "amqpLink": ""
         }
 
         self._token_status_code: Optional[int] = None
@@ -169,7 +169,7 @@
     async def _update_status(self):
         if self.auth_state in (CbsAuthState.OK, CbsAuthState.REFRESH_REQUIRED):
             is_expired, is_refresh_required = 
check_expiration_and_refresh_status(
-                self._expires_on, self._refresh_window
+                self._expires_on, self._refresh_window # type: ignore
             )
             _LOGGER.debug(
                 "CBS status check: state == %r, expired == %r, refresh 
required == %r",
@@ -235,13 +235,13 @@
         elif isinstance(access_token.token, str):
             self._token = access_token.token
         else:
-            raise ValueError("Token must be either bytes or string.")
+            raise ValueError("Token must be a string or bytes.")
         if isinstance(self._auth.token_type, bytes):
             token_type = self._auth.token_type.decode()
         elif isinstance(self._auth.token_type, str):
             token_type = self._auth.token_type
         else:
-            raise ValueError("Token type must be either bytes or string.")
+            raise ValueError("Token type must be a string or bytes.")
 
         self._token_put_time = int(utc_now().timestamp())
         if self._token and token_type:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/aio/_client_async.py 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/aio/_client_async.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/aio/_client_async.py       
2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/aio/_client_async.py       
2024-04-10 20:23:26.000000000 +0200
@@ -150,11 +150,6 @@
                 current_time = time.time()
                 elapsed_time = current_time - start_time
                 if elapsed_time >= self._keep_alive_interval:
-                    _logger.debug(
-                        "Keeping %r connection alive.",
-                        self.__class__.__name__,
-                        extra=self._network_trace_params
-                    )
                     await 
asyncio.shield(self._connection.listen(wait=self._socket_timeout,
                         batch=self._link.current_link_credit))
                     start_time = current_time
@@ -304,8 +299,8 @@
         if self._keep_alive_thread:
             await self._keep_alive_thread
             self._keep_alive_thread = None
-        self._network_trace_params["amqpConnection"] = None
-        self._network_trace_params["amqpSession"] = None
+        self._network_trace_params["amqpConnection"] = ""
+        self._network_trace_params["amqpSession"] = ""
 
     async def auth_complete_async(self):
         """Whether the authentication handshake is complete during
@@ -723,7 +718,7 @@
         if not self._link:
             self._link = self._session.create_receiver_link(
                 source_address=self.source,
-                link_credit=self._link_credit,
+                link_credit=0,  # link_credit=0 on flow frame sent before 
client is ready
                 send_settle_mode=self._send_settle_mode,
                 rcv_settle_mode=self._receive_settle_mode,
                 max_message_size=self._max_message_size,
@@ -748,7 +743,7 @@
         """
         try:
             if self._link.current_link_credit <= 0:
-                await self._link.flow()
+                await self._link.flow(link_credit=self._link_credit)
             await self._connection.listen(wait=self._socket_timeout, **kwargs)
         except ValueError:
             _logger.info("Timeout reached, closing receiver.", 
extra=self._network_trace_params)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/aio/_connection_async.py 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/aio/_connection_async.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/aio/_connection_async.py   
2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/aio/_connection_async.py   
2024-04-10 20:23:26.000000000 +0200
@@ -116,7 +116,7 @@
             custom_endpoint = 
f"{custom_parsed_url.hostname}:{custom_port}{custom_parsed_url.path}"
         self._container_id: str = container_id or str(uuid.uuid4())
         self._network_trace = network_trace
-        self._network_trace_params = {"amqpConnection": self._container_id, 
"amqpSession": None, "amqpLink": None}
+        self._network_trace_params = {"amqpConnection": self._container_id, 
"amqpSession": "", "amqpLink": ""}
 
         transport = kwargs.get("transport")
         self._transport_type = transport_type
@@ -345,14 +345,13 @@
 
     async def _outgoing_empty(self) -> None:
         """Send an empty frame to prevent the connection from reaching an idle 
timeout."""
-        if self._network_trace:
-            _LOGGER.debug("-> EmptyFrame()", extra=self._network_trace_params)
-
         if self._error:
             raise self._error
 
         try:
             if self._can_write():
+                if self._network_trace:
+                    _LOGGER.debug("-> EmptyFrame()", 
extra=self._network_trace_params)
                 await self._transport.write(EMPTY_FRAME)
                 self._last_frame_sent_time = time.time()
         except (OSError, IOError, SSLError, socket.error) as exc:
@@ -533,7 +532,7 @@
             self._error = AMQPConnectionError(
                 condition=frame[0][0], description=frame[0][1], 
info=frame[0][2]
             )
-            _LOGGER.error(
+            _LOGGER.warning(
                 "Connection closed with error: %r", frame[0],
                 extra=self._network_trace_params
             )
@@ -682,7 +681,10 @@
             ConnectionState.OPEN_SENT,
             ConnectionState.OPENED,
         ]:
-            raise ValueError("Connection not open.")
+            raise AMQPConnectionError(
+                ErrorCondition.SocketError,
+                description="Connection not open."
+            )
         now = time.time()
         if get_local_timeout(
             now,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/aio/_management_operation_async.py
 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/aio/_management_operation_async.py
--- 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/aio/_management_operation_async.py
 2024-02-13 00:17:44.000000000 +0100
+++ 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/aio/_management_operation_async.py
 2024-04-10 20:23:26.000000000 +0200
@@ -31,7 +31,7 @@
         self._network_trace_params = {
             "amqpConnection": self._session._connection._container_id,
             "amqpSession": self._session.name,
-            "amqpLink": None
+            "amqpLink": ""
         }
         self._mgmt_link: ManagementLink = 
self._session.create_request_response_link_pair(
             endpoint=endpoint,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/aio/_session_async.py 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/aio/_session_async.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/aio/_session_async.py      
2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/aio/_session_async.py      
2024-04-10 20:23:26.000000000 +0200
@@ -204,7 +204,7 @@
             self._input_handles[frame[1]] = new_link
         except ValueError as e:
             # Reject Link
-            _LOGGER.error(
+            _LOGGER.debug(
                     "Unable to attach new link: %r",
                     e,
                     extra=self.network_trace_params
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/cbs.py 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/cbs.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/cbs.py     2024-02-13 
00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/cbs.py     2024-04-10 
20:23:26.000000000 +0200
@@ -81,7 +81,7 @@
         self._network_trace_params = {
             "amqpConnection": self._session._connection._container_id,
             "amqpSession": self._session.name,
-            "amqpLink": None
+            "amqpLink": ""
         }
 
         self._token_status_code: Optional[int] = None
@@ -280,7 +280,7 @@
                 utc_from_timestamp(self._expires_on),
             )
 
-    def handle_token(self) -> bool: # pylint: 
disable=inconsistent-return-statements
+    def handle_token(self) -> bool:  # pylint: 
disable=inconsistent-return-statements
         if not self._cbs_link_ready():
             return False
         self._update_status()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/client.py 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/client.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/client.py  2024-02-13 
00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/client.py  2024-04-10 
20:23:26.000000000 +0200
@@ -181,7 +181,7 @@
             "remote_idle_timeout_empty_frame_send_ratio", None
         )
         self._network_trace = kwargs.pop("network_trace", False)
-        self._network_trace_params = {"amqpConnection": None, "amqpSession": 
None, "amqpLink": None}
+        self._network_trace_params = {"amqpConnection": "", "amqpSession": "", 
"amqpLink": ""}
 
         # Session settings
         self._outgoing_window = kwargs.pop("outgoing_window", OUTGOING_WINDOW)
@@ -236,7 +236,6 @@
                 current_time = time.time()
                 elapsed_time = current_time - start_time
                 if elapsed_time >= self._keep_alive_interval:
-                    _logger.debug("Keeping %r connection alive.", 
self.__class__.__name__)
                     self._connection.listen(wait=self._socket_timeout, 
batch=self._link.current_link_credit)
                     start_time = current_time
                 time.sleep(1)
@@ -377,8 +376,8 @@
             except RuntimeError:  # Probably thread failed to start in .open()
                 logging.debug("Keep alive thread failed to join.", 
exc_info=True)
             self._keep_alive_thread = None
-        self._network_trace_params["amqpConnection"] = None
-        self._network_trace_params["amqpSession"] = None
+        self._network_trace_params["amqpConnection"] = ""
+        self._network_trace_params["amqpSession"] = ""
 
     def auth_complete(self):
         """Whether the authentication handshake is complete during
@@ -827,7 +826,7 @@
         if not self._link:
             self._link = self._session.create_receiver_link(
                 source_address=self.source,
-                link_credit=self._link_credit,  # link_credit=0 on flow frame 
sent before client is ready
+                link_credit=0,  # link_credit=0 on flow frame sent before 
client is ready
                 send_settle_mode=self._send_settle_mode,
                 rcv_settle_mode=self._receive_settle_mode,
                 max_message_size=self._max_message_size,
@@ -852,7 +851,7 @@
         """
         try:
             if self._link.current_link_credit <= 0:
-                self._link.flow()
+                self._link.flow(link_credit=self._link_credit)
             self._connection.listen(wait=self._socket_timeout, **kwargs)
         except ValueError:
             _logger.info("Timeout reached, closing receiver.", 
extra=self._network_trace_params)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/management_operation.py 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/management_operation.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/management_operation.py    
2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/management_operation.py    
2024-04-10 20:23:26.000000000 +0200
@@ -31,7 +31,7 @@
         self._network_trace_params = {
             "amqpConnection": self._session._connection._container_id,
             "amqpSession": self._session.name,
-            "amqpLink": None
+            "amqpLink": ""
         }
         self._mgmt_link: ManagementLink = 
self._session.create_request_response_link_pair(
             endpoint=endpoint,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/message.py 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/message.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/message.py 2024-02-13 
00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/message.py 2024-04-10 
20:23:26.000000000 +0200
@@ -62,7 +62,7 @@
         This field contains the relative Message priority. Higher numbers 
indicate higher priority Messages.
         Messages with higher priorities MAY be delivered before those with 
lower priorities. An AMQP intermediary
         implementing distinct priority levels MUST do so in the following 
manner:
-        
+
             - If n distince priorities are implemented and n is less than 10 - 
priorities 0 to (5 - ceiling(n/2))
               MUST be treated equivalently and MUST be the lowest effective 
priority. The priorities (4 + fioor(n/2))
               and above MUST be treated equivalently and MUST be the highest 
effective priority. The priorities
@@ -184,7 +184,7 @@
     delivery_annotations: Optional[Dict[Union[str, bytes], Any]] = None
     message_annotations: Optional[Dict[Union[str, bytes], Any]] = None
     properties: Optional[Properties] = None
-    application_properties: Optional[Dict[Union[str, bytes], Any]] = None   # 
TODO: make not read-only
+    application_properties: Optional[Dict[Union[str, bytes], Any]] = None
     data: Optional[bytes] = None
     sequence: Optional[List[Any]] = None
     value: Optional[Any] = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/session.py 
new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/session.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_pyamqp/session.py 2024-02-13 
00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_pyamqp/session.py 2024-04-10 
20:23:26.000000000 +0200
@@ -230,7 +230,7 @@
             self._input_handles[frame[1]] = new_link
         except ValueError as e:
             # Reject Link
-            _LOGGER.error(
+            _LOGGER.debug(
                     "Unable to attach new link: %r",
                     e,
                     extra=self.network_trace_params
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-eventhub-5.11.6/azure/eventhub/_version.py 
new/azure-eventhub-5.11.7/azure/eventhub/_version.py
--- old/azure-eventhub-5.11.6/azure/eventhub/_version.py        2024-02-13 
00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/_version.py        2024-04-10 
20:23:26.000000000 +0200
@@ -3,4 +3,4 @@
 # Licensed under the MIT License.
 # ------------------------------------
 
-VERSION = "5.11.6"
+VERSION = "5.11.7"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/aio/_buffered_producer/_buffered_producer_async.py
 
new/azure-eventhub-5.11.7/azure/eventhub/aio/_buffered_producer/_buffered_producer_async.py
--- 
old/azure-eventhub-5.11.6/azure/eventhub/aio/_buffered_producer/_buffered_producer_async.py
 2024-02-13 00:17:44.000000000 +0100
+++ 
new/azure-eventhub-5.11.7/azure/eventhub/aio/_buffered_producer/_buffered_producer_async.py
 2024-04-10 20:23:26.000000000 +0200
@@ -105,24 +105,22 @@
             raise OperationTimeoutError(
                 "Failed to enqueue events into buffer due to timeout."
             )
-        try:
-            # add single event into current batch
-            self._cur_batch.add(events)
-        except AttributeError:  # if the input events is a EventDataBatch, put 
the whole into the buffer
-            # if there are events in cur_batch, enqueue cur_batch to the buffer
-            async with self._lock:
+        async with self._lock:
+            try:
+                # add single event into current batch
+                self._cur_batch.add(events)
+            except AttributeError:  # if the input events is a EventDataBatch, 
put the whole into the buffer
+                # if there are events in cur_batch, enqueue cur_batch to the 
buffer
                 if self._cur_batch:
                     self._buffered_queue.put(self._cur_batch)
                 self._buffered_queue.put(events)
-            # create a new batch for incoming events
-            self._cur_batch = EventDataBatch(self._max_message_size_on_link, 
amqp_transport=self._amqp_transport)
-        except ValueError:
-            # add single event exceeds the cur batch size, create new batch
-            async with self._lock:
+                # create a new batch for incoming events
+                self._cur_batch = 
EventDataBatch(self._max_message_size_on_link, 
amqp_transport=self._amqp_transport)
+            except ValueError:
+                # add single event exceeds the cur batch size, create new batch
                 self._buffered_queue.put(self._cur_batch)
-            self._cur_batch = EventDataBatch(self._max_message_size_on_link, 
amqp_transport=self._amqp_transport)
-            self._cur_batch.add(events)
-        async with self._lock:
+                self._cur_batch = 
EventDataBatch(self._max_message_size_on_link, 
amqp_transport=self._amqp_transport)
+                self._cur_batch.add(events)
             self._cur_buffered_len += new_events_len
 
     def failsafe_callback(self, callback):
@@ -200,9 +198,6 @@
                 break
         # after finishing flushing, reset cur batch and put it into the buffer
         self._last_send_time = time.time()
-        #reset curr_buffered
-        self._cur_buffered_len = 0
-        self._cur_batch = EventDataBatch(self._max_message_size_on_link, 
amqp_transport=self._amqp_transport)
         _LOGGER.info("Partition %r finished flushing.", self.partition_id)
 
     async def check_max_wait_time_worker(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure/eventhub/aio/_producer_client_async.py 
new/azure-eventhub-5.11.7/azure/eventhub/aio/_producer_client_async.py
--- old/azure-eventhub-5.11.6/azure/eventhub/aio/_producer_client_async.py      
2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure/eventhub/aio/_producer_client_async.py      
2024-04-10 20:23:26.000000000 +0200
@@ -557,7 +557,8 @@
         :keyword float timeout: The maximum wait time to send the event data 
in non-buffered mode or the
          maximum wait time to enqueue the event data into the buffer in 
buffered mode.
          In non-buffered mode, the default wait time specified when the 
producer
-         was created will be used. In buffered mode, the default wait time is 
None.
+         was created will be used. In buffered mode, the default wait time is 
None indicating that the event will be
+         scheduled to send immediately.
         :keyword str partition_id: The specific partition ID to send to. 
Default is None, in which case the service
          will assign to all partitions using round-robin.
          A `TypeError` will be raised if partition_id is specified and 
event_data_batch is an `EventDataBatch` because
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure_eventhub.egg-info/PKG-INFO 
new/azure-eventhub-5.11.7/azure_eventhub.egg-info/PKG-INFO
--- old/azure-eventhub-5.11.6/azure_eventhub.egg-info/PKG-INFO  2024-02-13 
00:18:32.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure_eventhub.egg-info/PKG-INFO  2024-04-10 
20:25:11.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: azure-eventhub
-Version: 5.11.6
+Version: 5.11.7
 Summary: Microsoft Azure Event Hubs Client Library for Python
 Home-page: 
https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/eventhub/azure-eventhub
 Author: Microsoft Corporation
@@ -10,6 +10,7 @@
 Classifier: Development Status :: 5 - Production/Stable
 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
@@ -19,7 +20,7 @@
 Requires-Python: >=3.8
 Description-Content-Type: text/markdown
 License-File: LICENSE
-Requires-Dist: azure-core<2.0.0,>=1.14.0
+Requires-Dist: azure-core>=1.14.0
 Requires-Dist: typing-extensions>=4.0.1
 
 # Azure Event Hubs client library for Python
@@ -50,7 +51,7 @@
 
 - Python 3.8 or later.
 - **Microsoft Azure Subscription:**  To use Azure services, including Azure 
Event Hubs, you'll need a subscription.
-If you do not have an existing Azure account, you may sign up for a free trial 
or use your MSDN subscriber benefits when you [create an 
account](https://account.windowsazure.com/Home/Index).
+If you do not have an existing Azure account, you may sign up for a free trial 
or use your MSDN subscriber benefits when you [create an 
account](https://azure.microsoft.com/free/).
 
 - **Event Hubs namespace with an Event Hub:** To interact with Azure Event 
Hubs, you'll also need to have a namespace and Event Hub  available.
 If you are not familiar with creating Azure resources, you may wish to follow 
the step-by-step guide
@@ -515,14 +516,26 @@
 
 # Release History
 
+## 5.11.7 (2024-04-10)
+
+### Bugs Fixed
+
+- Fixed a bug where using `EventHubProducerClient` in buffered mode could 
potentially drop a buffered message without actually sending it. 
([#34712](https://github.com/Azure/azure-sdk-for-python/pull/34712))
+
+### Other Changes
+
+- Updated network trace logging to replace `None` values in AMQP connection 
info with empty strings as per the OpenTelemetry specification.
+
 ## 5.11.6 (2024-02-12)
 
 This version and all future versions will require Python 3.8+. Python 3.7 is 
no longer supported.
 
 ### Features Added
+
 - Added `keep_alive` functionality on EventHubProducerClient to allow for 
long-living producers. 
[#33726](https://github.com/Azure/azure-sdk-for-python/issues/33726)
 
 ### Other Changes
+
 - Added support for Python 3.12.
 
 ## 5.11.5 (2023-11-13)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/azure_eventhub.egg-info/requires.txt 
new/azure-eventhub-5.11.7/azure_eventhub.egg-info/requires.txt
--- old/azure-eventhub-5.11.6/azure_eventhub.egg-info/requires.txt      
2024-02-13 00:18:32.000000000 +0100
+++ new/azure-eventhub-5.11.7/azure_eventhub.egg-info/requires.txt      
2024-04-10 20:25:11.000000000 +0200
@@ -1,2 +1,2 @@
-azure-core<2.0.0,>=1.14.0
+azure-core>=1.14.0
 typing-extensions>=4.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/samples/async_samples/iot_hub_connection_string_receive_async.py
 
new/azure-eventhub-5.11.7/samples/async_samples/iot_hub_connection_string_receive_async.py
--- 
old/azure-eventhub-5.11.6/samples/async_samples/iot_hub_connection_string_receive_async.py
  2024-02-13 00:17:44.000000000 +0100
+++ 
new/azure-eventhub-5.11.7/samples/async_samples/iot_hub_connection_string_receive_async.py
  2024-04-10 20:23:26.000000000 +0200
@@ -96,7 +96,7 @@
         )
     except Exception as exp:
         raise ValueError(
-            "{} is not an invalid IoT Hub connection string. The underlying 
exception is {}".format(
+            "{} is an invalid IoT Hub connection string. The underlying 
exception is {}".format(
                 iothub_conn_str,
                 exp,
             )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-eventhub-5.11.6/setup.py 
new/azure-eventhub-5.11.7/setup.py
--- old/azure-eventhub-5.11.6/setup.py  2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/setup.py  2024-04-10 20:23:26.000000000 +0200
@@ -59,6 +59,7 @@
         "Development Status :: 5 - Production/Stable",
         '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',
@@ -70,7 +71,7 @@
     zip_safe=False,
     packages=find_packages(exclude=exclude_packages),
     install_requires=[
-        "azure-core<2.0.0,>=1.14.0",
+        "azure-core>=1.14.0",
         "typing-extensions>=4.0.1",
     ]
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-eventhub-5.11.6/tests/conftest.py 
new/azure-eventhub-5.11.7/tests/conftest.py
--- old/azure-eventhub-5.11.6/tests/conftest.py 2024-02-13 00:17:44.000000000 
+0100
+++ new/azure-eventhub-5.11.7/tests/conftest.py 2024-04-10 20:23:26.000000000 
+0200
@@ -110,8 +110,29 @@
 def fake_span():
     return FakeSpan
 
+
[email protected](scope="session")
+def get_credential():
+    use_pwsh = os.environ.get("AZURE_TEST_USE_PWSH_AUTH", "false")
+    use_cli = os.environ.get("AZURE_TEST_USE_CLI_AUTH", "false")
+
+    # User-based authentication through Azure PowerShell, if requested
+    if use_pwsh.lower() == "true":
+        log.info(
+            "Environment variable AZURE_TEST_USE_PWSH_AUTH set to 'true'. 
Using AzurePowerShellCredential."
+        )
+        from azure.identity import AzurePowerShellCredential
+        return AzurePowerShellCredential()
+    # User-based authentication through Azure CLI, if requested
+    elif use_cli.lower() == "true":
+        log.info("Environment variable AZURE_TEST_USE_CLI_AUTH set to 'true'. 
Using AzureCliCredential.")
+        from azure.identity import AzureCliCredential
+        return AzureCliCredential()
+    return EnvironmentCredential()
+
+
 @pytest.fixture(scope="session")
-def resource_group():
+def resource_group(get_credential):
     try:
         SUBSCRIPTION_ID = os.environ["AZURE_SUBSCRIPTION_ID"]
     except KeyError:
@@ -119,7 +140,7 @@
         return
     base_url = os.environ.get("EVENTHUB_RESOURCE_MANAGER_URL", 
"https://management.azure.com/";)
     credential_scopes = ["{}.default".format(base_url)]
-    resource_client = ResourceManagementClient(EnvironmentCredential(), 
SUBSCRIPTION_ID, base_url=base_url, credential_scopes=credential_scopes)
+    resource_client = ResourceManagementClient(get_credential, 
SUBSCRIPTION_ID, base_url=base_url, credential_scopes=credential_scopes)
     resource_group_name = RES_GROUP_PREFIX + str(uuid.uuid4())
     parameters = {"location": LOCATION}
     expiry = datetime.datetime.now(datetime.timezone.utc) + 
datetime.timedelta(days=1)
@@ -138,7 +159,7 @@
 
 
 @pytest.fixture(scope="session")
-def eventhub_namespace(resource_group):
+def eventhub_namespace(resource_group, get_credential):
     try:
         SUBSCRIPTION_ID = os.environ["AZURE_SUBSCRIPTION_ID"]
     except KeyError:
@@ -146,7 +167,7 @@
         return
     base_url = os.environ.get("EVENTHUB_RESOURCE_MANAGER_URL", 
"https://management.azure.com/";)
     credential_scopes = ["{}.default".format(base_url)]
-    resource_client = EventHubManagementClient(EnvironmentCredential(), 
SUBSCRIPTION_ID, base_url=base_url, credential_scopes=credential_scopes)
+    resource_client = EventHubManagementClient(get_credential, 
SUBSCRIPTION_ID, base_url=base_url, credential_scopes=credential_scopes)
     namespace_name = NAMESPACE_PREFIX + str(uuid.uuid4())
     try:
         namespace = resource_client.namespaces.begin_create_or_update(
@@ -165,7 +186,7 @@
 
 
 @pytest.fixture()
-def live_eventhub(resource_group, eventhub_namespace):  # pylint: 
disable=redefined-outer-name
+def live_eventhub(resource_group, eventhub_namespace, get_credential):  # 
pylint: disable=redefined-outer-name
     try:
         SUBSCRIPTION_ID = os.environ["AZURE_SUBSCRIPTION_ID"]
     except KeyError:
@@ -173,7 +194,7 @@
         return
     base_url = os.environ.get("EVENTHUB_RESOURCE_MANAGER_URL", 
"https://management.azure.com/";)
     credential_scopes = ["{}.default".format(base_url)]
-    resource_client = EventHubManagementClient(EnvironmentCredential(), 
SUBSCRIPTION_ID, base_url=base_url, credential_scopes=credential_scopes)
+    resource_client = EventHubManagementClient(get_credential, 
SUBSCRIPTION_ID, base_url=base_url, credential_scopes=credential_scopes)
     eventhub_name = EVENTHUB_PREFIX + str(uuid.uuid4())
     eventhub_ns_name, connection_string, key_name, primary_key = 
eventhub_namespace
     eventhub_endpoint_suffix = os.environ.get("EVENT_HUB_ENDPOINT_SUFFIX", 
".servicebus.windows.net")
@@ -200,7 +221,7 @@
             warnings.warn(UserWarning("eventhub teardown failed"))
 
 @pytest.fixture()
-def resource_mgmt_client():
+def resource_mgmt_client(get_credential):
     try:
         SUBSCRIPTION_ID = os.environ["AZURE_SUBSCRIPTION_ID"]
     except KeyError:
@@ -208,7 +229,7 @@
         return
     base_url = os.environ.get("EVENTHUB_RESOURCE_MANAGER_URL", 
"https://management.azure.com/";)
     credential_scopes = ["{}.default".format(base_url)]
-    resource_client = EventHubManagementClient(EnvironmentCredential(), 
SUBSCRIPTION_ID, base_url=base_url, credential_scopes=credential_scopes)
+    resource_client = EventHubManagementClient(get_credential, 
SUBSCRIPTION_ID, base_url=base_url, credential_scopes=credential_scopes)
     yield resource_client
 
 @pytest.fixture()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/tests/livetest/asynctests/test_reconnect_async.py 
new/azure-eventhub-5.11.7/tests/livetest/asynctests/test_reconnect_async.py
--- old/azure-eventhub-5.11.6/tests/livetest/asynctests/test_reconnect_async.py 
2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/tests/livetest/asynctests/test_reconnect_async.py 
2024-04-10 20:23:26.000000000 +0200
@@ -169,7 +169,8 @@
                 assert consumer._handler._connection._state == 
uamqp.c_uamqp.ConnectionState.DISCARDING
                 await consumer.receive(batch=False, max_batch_size=1, 
max_wait_time=10)
             else:
-                await consumer._handler.do_work_async()
+                with pytest.raises(error.AMQPConnectionError):
+                    await consumer._handler.do_work_async()
                 assert consumer._handler._connection.state == 
constants.ConnectionState.END
                 try:
                     await asyncio.wait_for(consumer.receive(), timeout=10)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-eventhub-5.11.6/tests/livetest/synctests/test_reconnect.py 
new/azure-eventhub-5.11.7/tests/livetest/synctests/test_reconnect.py
--- old/azure-eventhub-5.11.6/tests/livetest/synctests/test_reconnect.py        
2024-02-13 00:17:44.000000000 +0100
+++ new/azure-eventhub-5.11.7/tests/livetest/synctests/test_reconnect.py        
2024-04-10 20:23:26.000000000 +0200
@@ -164,7 +164,8 @@
                 consumer._handler.do_work()
                 assert consumer._handler._connection._state == 
uamqp.c_uamqp.ConnectionState.DISCARDING
             else:
-                consumer._handler.do_work()
+                with pytest.raises(error.AMQPConnectionError):
+                    consumer._handler.do_work()
                 assert consumer._handler._connection.state == 
constants.ConnectionState.END
 
             duration = 10

Reply via email to