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-06-12 15:39:44 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-azure-eventhub (Old) and /work/SRC/openSUSE:Factory/.python-azure-eventhub.new.19518 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-azure-eventhub" Wed Jun 12 15:39:44 2024 rev:25 rq:1180172 version:5.12.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-azure-eventhub/python-azure-eventhub.changes 2024-05-21 18:35:41.912752185 +0200 +++ /work/SRC/openSUSE:Factory/.python-azure-eventhub.new.19518/python-azure-eventhub.changes 2024-06-12 15:40:35.175107233 +0200 @@ -1,0 +2,8 @@ +Wed Jun 12 08:09:45 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- New upstream release + + Version 5.12.1 + + For detailed information about changes see the + CHANGELOG.md file provided with this package + +------------------------------------------------------------------- Old: ---- azure-eventhub-5.12.0.tar.gz New: ---- azure-eventhub-5.12.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-azure-eventhub.spec ++++++ --- /var/tmp/diff_new_pack.vbuYki/_old 2024-06-12 15:40:35.779129364 +0200 +++ /var/tmp/diff_new_pack.vbuYki/_new 2024-06-12 15:40:35.779129364 +0200 @@ -18,7 +18,7 @@ %{?sle15_python_module_pythons} Name: python-azure-eventhub -Version: 5.12.0 +Version: 5.12.1 Release: 0 Summary: Azure Event Hubs client library for Python License: MIT ++++++ azure-eventhub-5.12.0.tar.gz -> azure-eventhub-5.12.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/CHANGELOG.md new/azure-eventhub-5.12.1/CHANGELOG.md --- old/azure-eventhub-5.12.0/CHANGELOG.md 2024-05-16 01:22:58.000000000 +0200 +++ new/azure-eventhub-5.12.1/CHANGELOG.md 2024-06-11 20:08:17.000000000 +0200 @@ -1,5 +1,11 @@ # Release History +## 5.12.1 (2024-06-11) + +### Bugs Fixed + +- Fixed a bug where the correct URI was not being used for consumer authentication, causing issues when assigning roles at the consumer group level. ([#35337](https://github.com/Azure/azure-sdk-for-python/issues/35337)) + ## 5.12.0 (2024-05-16) ### Features Added diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/PKG-INFO new/azure-eventhub-5.12.1/PKG-INFO --- old/azure-eventhub-5.12.0/PKG-INFO 2024-05-16 01:24:31.902968400 +0200 +++ new/azure-eventhub-5.12.1/PKG-INFO 2024-06-11 20:09:33.013904000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: azure-eventhub -Version: 5.12.0 +Version: 5.12.1 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 @@ -431,7 +431,30 @@ ## Troubleshooting -See the `azure-eventhubs` [troubleshooting guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios. +See the `azure-eventhub` [troubleshooting guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios. + +### Logging + +- Enable `azure.eventhub` logger to collect traces from the library. +- Enable AMQP frame level trace by setting `logging_enable=True` when creating the client. +- Refer to [this guide](https://learn.microsoft.com/azure/developer/python/sdk/azure-sdk-logging) on configuring logging for Azure libraries for Python for additional information. + +```python +import logging +import sys + +handler = logging.StreamHandler(stream=sys.stdout) +logger = logging.getLogger('azure.eventhub') +logger.setLevel(logging.DEBUG) +logger.addHandler(handler) + +... + +from azure.eventhub import EventHubProducerClient, EventHubConsumerClient + +producer = EventHubProducerClient(..., logging_enable=True) +consumer = EventHubConsumerClient(..., logging_enable=True) +``` ## Next steps @@ -514,6 +537,12 @@ # Release History +## 5.12.1 (2024-06-11) + +### Bugs Fixed + +- Fixed a bug where the correct URI was not being used for consumer authentication, causing issues when assigning roles at the consumer group level. ([#35337](https://github.com/Azure/azure-sdk-for-python/issues/35337)) + ## 5.12.0 (2024-05-16) ### Features Added diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/README.md new/azure-eventhub-5.12.1/README.md --- old/azure-eventhub-5.12.0/README.md 2024-05-16 01:22:58.000000000 +0200 +++ new/azure-eventhub-5.12.1/README.md 2024-06-11 20:08:17.000000000 +0200 @@ -408,7 +408,30 @@ ## Troubleshooting -See the `azure-eventhubs` [troubleshooting guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios. +See the `azure-eventhub` [troubleshooting guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios. + +### Logging + +- Enable `azure.eventhub` logger to collect traces from the library. +- Enable AMQP frame level trace by setting `logging_enable=True` when creating the client. +- Refer to [this guide](https://learn.microsoft.com/azure/developer/python/sdk/azure-sdk-logging) on configuring logging for Azure libraries for Python for additional information. + +```python +import logging +import sys + +handler = logging.StreamHandler(stream=sys.stdout) +logger = logging.getLogger('azure.eventhub') +logger.setLevel(logging.DEBUG) +logger.addHandler(handler) + +... + +from azure.eventhub import EventHubProducerClient, EventHubConsumerClient + +producer = EventHubProducerClient(..., logging_enable=True) +consumer = EventHubConsumerClient(..., logging_enable=True) +``` ## Next steps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/azure/eventhub/_client_base.py new/azure-eventhub-5.12.1/azure/eventhub/_client_base.py --- old/azure-eventhub-5.12.0/azure/eventhub/_client_base.py 2024-05-16 01:22:58.000000000 +0200 +++ new/azure-eventhub-5.12.1/azure/eventhub/_client_base.py 2024-06-11 20:08:17.000000000 +0200 @@ -318,7 +318,8 @@ else: self._credential = credential # type: ignore self._auto_reconnect = kwargs.get("auto_reconnect", True) - self._auth_uri = f"sb://{self._address.hostname}{self._address.path}" + self._auth_uri: str + self._eventhub_auth_uri = f"sb://{self._address.hostname}{self._address.path}" self._config = Configuration( amqp_transport=self._amqp_transport, hostname=self._address.hostname, @@ -348,7 +349,7 @@ kwargs["credential"] = EventHubSharedKeyCredential(policy, key) return kwargs - def _create_auth(self) -> Union["uamqp_JWTTokenAuth", JWTTokenAuth]: + def _create_auth(self, *, auth_uri: Optional[str] = None) -> Union["uamqp_JWTTokenAuth", JWTTokenAuth]: """ Create an ~uamqp.authentication.SASTokenAuth instance to authenticate the session. @@ -356,6 +357,9 @@ :return: The auth for the session. :rtype: JWTTokenAuth or uamqp_JWTTokenAuth """ + # if auth_uri is not provided, use the default hub one + entity_auth_uri = auth_uri if auth_uri else self._eventhub_auth_uri + try: # ignore mypy's warning because token_type is Optional token_type = self._credential.token_type # type: ignore @@ -363,14 +367,14 @@ token_type = b"jwt" if token_type == b"servicebus.windows.net:sastoken": return self._amqp_transport.create_token_auth( - self._auth_uri, - functools.partial(self._credential.get_token, self._auth_uri), + entity_auth_uri, + functools.partial(self._credential.get_token, entity_auth_uri), token_type=token_type, config=self._config, update_token=True, ) return self._amqp_transport.create_token_auth( - self._auth_uri, + entity_auth_uri, functools.partial(self._credential.get_token, JWT_TOKEN_SCOPE), token_type=token_type, config=self._config, @@ -563,7 +567,7 @@ if not self.running: if self._handler: self._handler.close() - auth = self._client._create_auth() + auth = self._client._create_auth(auth_uri=self._client._auth_uri) self._create_handler(auth) conn = self._client._conn_manager.get_connection( # pylint: disable=protected-access endpoint=self._client._address.hostname, auth=auth diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/azure/eventhub/_consumer.py new/azure-eventhub-5.12.1/azure/eventhub/_consumer.py --- old/azure-eventhub-5.12.0/azure/eventhub/_consumer.py 2024-05-16 01:22:58.000000000 +0200 +++ new/azure-eventhub-5.12.1/azure/eventhub/_consumer.py 2024-06-11 20:08:17.000000000 +0200 @@ -200,7 +200,7 @@ if not self.running: if self._handler: self._handler.close() - auth = self._client._create_auth() + auth = self._client._create_auth(auth_uri=self._client._auth_uri) self._create_handler(auth) conn = self._client._conn_manager.get_connection( # pylint: disable=protected-access endpoint=self._client._address.hostname, auth=auth diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/azure/eventhub/_consumer_client.py new/azure-eventhub-5.12.1/azure/eventhub/_consumer_client.py --- old/azure-eventhub-5.12.0/azure/eventhub/_consumer_client.py 2024-05-16 01:22:58.000000000 +0200 +++ new/azure-eventhub-5.12.1/azure/eventhub/_consumer_client.py 2024-06-11 20:08:17.000000000 +0200 @@ -178,6 +178,8 @@ network_tracing=network_tracing, **kwargs ) + # consumer auth URI additionally includes consumer group + self._auth_uri = f"sb://{self._address.hostname}{self._address.path}/consumergroups/{self._consumer_group}" self._lock = threading.Lock() self._event_processors: Dict[Tuple[str, str], EventProcessor] = {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/azure/eventhub/_producer_client.py new/azure-eventhub-5.12.1/azure/eventhub/_producer_client.py --- old/azure-eventhub-5.12.0/azure/eventhub/_producer_client.py 2024-05-16 01:22:58.000000000 +0200 +++ new/azure-eventhub-5.12.1/azure/eventhub/_producer_client.py 2024-06-11 20:08:17.000000000 +0200 @@ -201,7 +201,7 @@ network_tracing=kwargs.get("logging_enable"), **kwargs ) - + self._auth_uri = f"sb://{self._address.hostname}{self._address.path}" self._keep_alive = kwargs.get("keep_alive", None) self._producers: Dict[str, Optional[EventHubProducer]] = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/azure/eventhub/_pyamqp/message.py new/azure-eventhub-5.12.1/azure/eventhub/_pyamqp/message.py --- old/azure-eventhub-5.12.0/azure/eventhub/_pyamqp/message.py 2024-05-16 01:22:58.000000000 +0200 +++ new/azure-eventhub-5.12.1/azure/eventhub/_pyamqp/message.py 2024-06-11 20:08:17.000000000 +0200 @@ -5,7 +5,7 @@ #-------------------------------------------------------------------------- # TODO: fix mypy errors for _code/_definition/__defaults__ (issue #26500) -from typing import NamedTuple, Optional, Union, TYPE_CHECKING, Dict, Any, List +from typing import NamedTuple, Optional, Union, TYPE_CHECKING, Dict, Any, List, Iterable from typing_extensions import TypedDict from .types import AMQPTypes, FieldDefinition @@ -23,7 +23,7 @@ message_annotations: Optional[Dict[Union[str, bytes], Any]] properties: Optional["Properties"] application_properties: Optional[Dict[Union[str, bytes], Any]] - data: Optional[bytes] + data: Optional[Union[bytes, Iterable[bytes]]] sequence: Optional[List[Any]] value: Optional[Any] footer: Optional[Dict[Any, Any]] @@ -185,7 +185,7 @@ message_annotations: Optional[Dict[Union[str, bytes], Any]] = None properties: Optional[Properties] = None application_properties: Optional[Dict[Union[str, bytes], Any]] = None - data: Optional[bytes] = None + data: Optional[Union[bytes, Iterable[bytes]]] = None sequence: Optional[List[Any]] = None value: Optional[Any] = None footer: Optional[Dict[Any, Any]] = None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/azure/eventhub/_version.py new/azure-eventhub-5.12.1/azure/eventhub/_version.py --- old/azure-eventhub-5.12.0/azure/eventhub/_version.py 2024-05-16 01:22:58.000000000 +0200 +++ new/azure-eventhub-5.12.1/azure/eventhub/_version.py 2024-06-11 20:08:17.000000000 +0200 @@ -3,4 +3,4 @@ # Licensed under the MIT License. # ------------------------------------ -VERSION = "5.12.0" +VERSION = "5.12.1" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/azure/eventhub/aio/_client_base_async.py new/azure-eventhub-5.12.1/azure/eventhub/aio/_client_base_async.py --- old/azure-eventhub-5.12.0/azure/eventhub/aio/_client_base_async.py 2024-05-16 01:22:58.000000000 +0200 +++ new/azure-eventhub-5.12.1/azure/eventhub/aio/_client_base_async.py 2024-06-11 20:08:17.000000000 +0200 @@ -46,16 +46,14 @@ from .._pyamqp.aio._authentication_async import JWTTokenAuthAsync try: from uamqp import ( - authentication as uamqp_authentication, Message as uamqp_Message, AMQPClientAsync as uamqp_AMQPClientAsync, ) - from uamqp.authentication import JWTTokenAsync + from uamqp.authentication import JWTTokenAsync as uamqp_JWTTokenAsync except ImportError: - uamqp_authentication = None uamqp_Message = None uamqp_AMQPClientAsync = None - JWTTokenAsync = None + uamqp_JWTTokenAsync = None from azure.core.credentials_async import AsyncTokenCredential try: @@ -109,7 +107,7 @@ def running(self, value: bool) -> None: pass - def _create_handler(self, auth: Union["JWTTokenAsync", JWTTokenAuthAsync]) -> None: + def _create_handler(self, auth: Union["uamqp_JWTTokenAsync", JWTTokenAuthAsync]) -> None: pass _MIXIN_BASE = AbstractConsumerProducer @@ -268,15 +266,19 @@ kwargs["credential"] = EventHubSharedKeyCredential(policy, key) return kwargs - async def _create_auth_async(self) -> Union[uamqp_authentication.JWTTokenAsync, JWTTokenAuthAsync]: + async def _create_auth_async( + self, *, auth_uri: Optional[str] = None + ) -> Union["uamqp_JWTTokenAsync", JWTTokenAuthAsync]: """ Create an ~uamqp.authentication.SASTokenAuthAsync instance to authenticate the session. :return: A JWTTokenAuthAsync instance to authenticate the session. :rtype: ~uamqp.authentication.JWTTokenAsync or JWTTokenAuthAsync - """ + # if auth_uri is not provided, use the default hub one + entity_auth_uri = auth_uri if auth_uri else self._eventhub_auth_uri + try: # ignore mypy's warning because token_type is Optional token_type = self._credential.token_type # type: ignore @@ -284,14 +286,14 @@ token_type = b"jwt" if token_type == b"servicebus.windows.net:sastoken": return await self._amqp_transport.create_token_auth_async( - self._auth_uri, - functools.partial(self._credential.get_token, self._auth_uri), + entity_auth_uri, + functools.partial(self._credential.get_token, entity_auth_uri), token_type=token_type, config=self._config, update_token=True, ) return await self._amqp_transport.create_token_auth_async( - self._auth_uri, + entity_auth_uri, functools.partial(self._credential.get_token, JWT_TOKEN_SCOPE), token_type=token_type, config=self._config, @@ -475,7 +477,7 @@ if not self.running: if self._handler: await self._handler.close_async() - auth = await self._client._create_auth_async() + auth = await self._client._create_auth_async(auth_uri=self._client._auth_uri) self._create_handler(auth) conn = await self._client._conn_manager_async.get_connection( endpoint=self._client._address.hostname, auth=auth diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/azure/eventhub/aio/_consumer_client_async.py new/azure-eventhub-5.12.1/azure/eventhub/aio/_consumer_client_async.py --- old/azure-eventhub-5.12.0/azure/eventhub/aio/_consumer_client_async.py 2024-05-16 01:22:58.000000000 +0200 +++ new/azure-eventhub-5.12.1/azure/eventhub/aio/_consumer_client_async.py 2024-06-11 20:08:17.000000000 +0200 @@ -191,6 +191,8 @@ network_tracing=network_tracing, **kwargs, ) + # consumer auth URI additionally includes consumer group + self._auth_uri = f"sb://{self._address.hostname}{self._address.path}/consumergroups/{self._consumer_group}" self._lock = asyncio.Lock(**self._internal_kwargs) self._event_processors: Dict[Tuple[str, str], EventProcessor] = {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/azure/eventhub/aio/_producer_client_async.py new/azure-eventhub-5.12.1/azure/eventhub/aio/_producer_client_async.py --- old/azure-eventhub-5.12.0/azure/eventhub/aio/_producer_client_async.py 2024-05-16 01:22:58.000000000 +0200 +++ new/azure-eventhub-5.12.1/azure/eventhub/aio/_producer_client_async.py 2024-06-11 20:08:17.000000000 +0200 @@ -188,6 +188,7 @@ network_tracing=kwargs.pop("logging_enable", False), **kwargs ) + self._auth_uri = f"sb://{self._address.hostname}{self._address.path}" self._keep_alive = kwargs.get("keep_alive", None) self._producers: Dict[str, Optional[EventHubProducer]] = { ALL_PARTITIONS: self._create_producer() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/azure-eventhub-5.12.0/azure_eventhub.egg-info/PKG-INFO new/azure-eventhub-5.12.1/azure_eventhub.egg-info/PKG-INFO --- old/azure-eventhub-5.12.0/azure_eventhub.egg-info/PKG-INFO 2024-05-16 01:24:31.000000000 +0200 +++ new/azure-eventhub-5.12.1/azure_eventhub.egg-info/PKG-INFO 2024-06-11 20:09:32.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: azure-eventhub -Version: 5.12.0 +Version: 5.12.1 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 @@ -431,7 +431,30 @@ ## Troubleshooting -See the `azure-eventhubs` [troubleshooting guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios. +See the `azure-eventhub` [troubleshooting guide](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/eventhub/azure-eventhub/TROUBLESHOOTING.md) for details on how to diagnose various failure scenarios. + +### Logging + +- Enable `azure.eventhub` logger to collect traces from the library. +- Enable AMQP frame level trace by setting `logging_enable=True` when creating the client. +- Refer to [this guide](https://learn.microsoft.com/azure/developer/python/sdk/azure-sdk-logging) on configuring logging for Azure libraries for Python for additional information. + +```python +import logging +import sys + +handler = logging.StreamHandler(stream=sys.stdout) +logger = logging.getLogger('azure.eventhub') +logger.setLevel(logging.DEBUG) +logger.addHandler(handler) + +... + +from azure.eventhub import EventHubProducerClient, EventHubConsumerClient + +producer = EventHubProducerClient(..., logging_enable=True) +consumer = EventHubConsumerClient(..., logging_enable=True) +``` ## Next steps @@ -514,6 +537,12 @@ # Release History +## 5.12.1 (2024-06-11) + +### Bugs Fixed + +- Fixed a bug where the correct URI was not being used for consumer authentication, causing issues when assigning roles at the consumer group level. ([#35337](https://github.com/Azure/azure-sdk-for-python/issues/35337)) + ## 5.12.0 (2024-05-16) ### Features Added