Skip to content

Commit cd07d50

Browse files
authored
[EH + SB] drop 3.8 + deprecation warning (Azure#40346)
* drop 3.8 + deprecation * update * bump * copilot told me I had a typo * bump * fix * space * pylint * asdd * lint * add * format * bump
1 parent dd390a4 commit cd07d50

File tree

17 files changed

+81
-10
lines changed

17 files changed

+81
-10
lines changed

sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
2020

2121
### Prerequisites
2222

23-
- Python 3.8 or later.
23+
- Python 3.9 or later.
2424
- **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://azure.microsoft.com/).
2525

2626
- **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 for [creating an Event Hub using the Azure portal](https://learn.microsoft.com/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub.

sdk/eventhub/azure-eventhub-checkpointstoreblob-aio/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
'Programming Language :: Python',
5959
'Programming Language :: Python :: 3 :: Only',
6060
'Programming Language :: Python :: 3',
61-
'Programming Language :: Python :: 3.8',
6261
'Programming Language :: Python :: 3.9',
6362
'Programming Language :: Python :: 3.10',
6463
'Programming Language :: Python :: 3.11',

sdk/eventhub/azure-eventhub-checkpointstoreblob/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For
2020

2121
### Prerequisites
2222

23-
- Python 3.8 or later.
23+
- Python 3.9 or later.
2424
- **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://azure.microsoft.com/).
2525

2626
- **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 for [creating an Event Hub using the Azure portal](https://learn.microsoft.com/azure/event-hubs/event-hubs-create). There, you can also find detailed instructions for using the Azure CLI, Azure PowerShell, or Azure Resource Manager (ARM) templates to create an Event Hub.

sdk/eventhub/azure-eventhub-checkpointstoreblob/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
'Programming Language :: Python',
5959
'Programming Language :: Python :: 3 :: Only',
6060
'Programming Language :: Python :: 3',
61-
'Programming Language :: Python :: 3.8',
6261
'Programming Language :: Python :: 3.9',
6362
'Programming Language :: Python :: 3.10',
6463
'Programming Language :: Python :: 3.11',

sdk/eventhub/azure-eventhub/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
- Added support for geo-replication and disaster recovery-enabled Event Hubs. To learn more about geo-replication, refer to this [doc](https://learn.microsoft.com/azure/event-hubs/geo-replication). To enable geo-replication on your Dedicated Event Hubs namespace, refer to [this guide](https://learn.microsoft.com/azure/event-hubs/use-geo-replication).
88
- Added a class method `from bytes` to `EventData` to create from a message payload of bytes. ([#39711](https://github.com/Azure/azure-sdk-for-python/issues/39711))
99

10+
### Other Changes
11+
- Deprecating `uamqp_transport` in favor of pyAMQP transport. The `uamqp_transport` will be removed in the next minor release.
12+
- Dropped support for Python 3.8
13+
1014
### Bugs Fixed
1115

1216
- Fixed a bug where service errors were incorrectly required and expected to have info/description fields.

sdk/eventhub/azure-eventhub/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The Azure Event Hubs client library allows for publishing and consuming of Azure
2424

2525
### Prerequisites
2626

27-
- Python 3.8 or later.
27+
- Python 3.9 or later.
2828
- **Microsoft Azure Subscription:** To use Azure services, including Azure Event Hubs, you'll need a subscription.
2929
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/).
3030

sdk/eventhub/azure-eventhub/azure/eventhub/_consumer_client.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import logging
66
import threading
77
import datetime
8+
import warnings
89
from typing import TYPE_CHECKING, List, Literal, Union, Any, Callable, Optional, Dict, Tuple, overload
910

1011
from ._client_base import ClientBase
@@ -154,7 +155,16 @@ def __init__(
154155
credential: "CredentialTypes",
155156
**kwargs: Any,
156157
) -> None:
157-
158+
# Deprecation of uamqp transport
159+
if kwargs.get("uamqp_transport"):
160+
warnings.warn(
161+
"uAMQP legacy support will be removed in the 5.16.0 minor release. "
162+
"Please remove the use of `uamqp_transport` keyword argument from the client in order "
163+
"to use the pure Python AMQP transport. "
164+
"If you rely on this, please comment on [this issue]"
165+
"(https://github.com/Azure/azure-sdk-for-python/issues/40347) ",
166+
DeprecationWarning, stacklevel=2
167+
)
158168
self._checkpoint_store = kwargs.pop("checkpoint_store", None)
159169
self._load_balancing_interval = kwargs.pop("load_balancing_interval", None)
160170
if self._load_balancing_interval is None:

sdk/eventhub/azure-eventhub/azure/eventhub/_producer_client.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from concurrent.futures import ThreadPoolExecutor
66
import logging
77
import threading
8+
import warnings
89
import time
910
from typing import (
1011
Any,
@@ -200,6 +201,16 @@ def __init__(
200201
network_tracing=kwargs.get("logging_enable"),
201202
**kwargs,
202203
)
204+
# Deprecation of uamqp transport
205+
if kwargs.get("uamqp_transport"):
206+
warnings.warn(
207+
"uAMQP legacy support will be removed in the 5.16.0 minor release. "
208+
"Please remove the use of `uamqp_transport` keyword argument from the client in order "
209+
"to use the pure Python AMQP transport. "
210+
"If you rely on this, please comment on [this issue]"
211+
"(https://github.com/Azure/azure-sdk-for-python/issues/40347) ",
212+
DeprecationWarning, stacklevel=2
213+
)
203214
self._auth_uri = f"sb://{self._address.hostname}{self._address.path}"
204215
self._keep_alive = kwargs.get("keep_alive", None)
205216

sdk/eventhub/azure-eventhub/azure/eventhub/aio/_consumer_client_async.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import asyncio
88
import logging
99
import datetime
10+
import warnings
1011
from typing import (
1112
Any,
1213
Literal,
@@ -166,6 +167,17 @@ def __init__(
166167
credential: "CredentialTypes",
167168
**kwargs: Any,
168169
) -> None:
170+
# Deprecation of uamqp transport
171+
if kwargs.get("uamqp_transport"):
172+
warnings.warn(
173+
"uAMQP legacy support will be removed in the 5.16.0 minor release. "
174+
"Please remove the use of `uamqp_transport` keyword argument from the client in order "
175+
"to use the pure Python AMQP transport. "
176+
"If you rely on this, please comment on [this issue]"
177+
"(https://github.com/Azure/azure-sdk-for-python/issues/40347) ",
178+
DeprecationWarning, stacklevel=2
179+
)
180+
169181
self._checkpoint_store = kwargs.pop("checkpoint_store", None)
170182
self._load_balancing_interval = kwargs.pop("load_balancing_interval", None)
171183
if self._load_balancing_interval is None:

sdk/eventhub/azure-eventhub/azure/eventhub/aio/_producer_client_async.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import asyncio
66
import logging
77
import time
8+
import warnings
89

910
from typing import Any, Union, List, Optional, Dict, Callable, cast
1011
from typing_extensions import TYPE_CHECKING, Literal, Awaitable, overload
@@ -185,6 +186,17 @@ def __init__(
185186
network_tracing=kwargs.pop("logging_enable", False),
186187
**kwargs,
187188
)
189+
# Deprecation of uamqp transport
190+
if kwargs.get("uamqp_transport"):
191+
warnings.warn(
192+
"uAMQP legacy support will be removed in the 5.16.0 minor release. "
193+
"Please remove the use of `uamqp_transport` keyword argument from the client in order "
194+
"to use the pure Python AMQP transport. "
195+
"If you rely on this, please comment on [this issue]"
196+
"(https://github.com/Azure/azure-sdk-for-python/issues/40347) ",
197+
DeprecationWarning, stacklevel=2
198+
)
199+
188200
self._auth_uri = f"sb://{self._address.hostname}{self._address.path}"
189201
self._keep_alive = kwargs.get("keep_alive", None)
190202
self._producers: Dict[str, Optional[EventHubProducer]] = {ALL_PARTITIONS: self._create_producer()}

0 commit comments

Comments
 (0)