Skip to content

Commit 492abbc

Browse files
swathipilrakshith91
authored andcommitted
drop Python 2.7/3.6 (Azure#22320)
1 parent f046d7c commit 492abbc

File tree

7 files changed

+11
-35
lines changed

7 files changed

+11
-35
lines changed

sdk/servicebus/azure-servicebus/CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 7.5.0 (Unreleased)
44

5+
This version and all future versions will require Python 3.7+. Python 2.7 and 3.6 are no longer supported.
6+
57
### Features Added
68

79
- Added support for fixed (linear) retry backoff:

sdk/servicebus/azure-servicebus/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ of this package please look at our [migration guide to move from Service Bus V0.
1818

1919
## _Disclaimer_
2020

21-
_Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
21+
_Azure SDK Python packages support for Python 2.7 ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
2222

2323
## Getting started
2424

@@ -34,7 +34,7 @@ pip install azure-servicebus
3434
To use this package, you must have:
3535
* Azure subscription - [Create a free account][azure_sub]
3636
* Azure Service Bus - [Namespace and management credentials][service_bus_namespace]
37-
* Python 2.7, 3.6 or later - [Install Python][python]
37+
* Python 3.7 or later - [Install Python][python]
3838

3939

4040
If you need an Azure service bus namespace, you can create it via the [Azure Portal][azure_namespace_creation].
@@ -61,7 +61,7 @@ protocol. There are implementations of the `TokenCredential` protocol available
6161
[azure-identity package][pypi_azure_identity]. The fully qualified namespace is of the format `<yournamespace.servicebus.windows.net>`.
6262
- To use the credential types provided by `azure-identity`, please install the package:
6363
```pip install azure-identity```
64-
- Additionally, to use the async API supported on Python 3.6+, you must first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/):
64+
- Additionally, to use the async API, you must first install an async transport, such as [`aiohttp`](https://pypi.org/project/aiohttp/):
6565
```pip install aiohttp```
6666
- When using Azure Active Directory, your principal must be assigned a role which allows access to Service Bus, such as the
6767
Azure Service Bus Data Owner role. For more information about using Azure Active Directory authorization with Service Bus,

sdk/servicebus/azure-servicebus/conftest.py

-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@
1010

1111
import pytest
1212

13-
# Ignore async tests for Python < 3.5
1413
collect_ignore = []
15-
if sys.version_info < (3, 5):
16-
collect_ignore.append("tests/async_tests")
17-
collect_ignore.append("samples/async_samples")
1814

1915
# Only run stress tests on request.
2016
if not any([arg.startswith('test_stress') or arg.endswith('StressTest') for arg in sys.argv]):

sdk/servicebus/azure-servicebus/dev_requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
-e ../../../tools/azure-devtools
44
-e ../../../tools/azure-sdk-tools
55
azure-mgmt-servicebus~=1.0.0
6-
aiohttp>=3.0; python_version >= '3.5'
6+
aiohttp>=3.0

sdk/servicebus/azure-servicebus/samples/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ urlFragment: servicebus-samples
1414
> which has different APIs than the older version (0.50). Please visit [this link](https://github.com/Azure/azure-sdk-for-python/tree/servicebus_v0.50.3/sdk/servicebus/azure-servicebus/samples) for samples of version 0.50 of this library.
1515
1616
These are code samples that show common scenario operations with the Azure Service Bus client library.
17-
Both [sync version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/servicebus/azure-servicebus/samples/sync_samples) and [async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/servicebus/azure-servicebus/samples/async_samples) of samples are provided, async samples require Python 3.6 or later.
17+
Both [sync version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/servicebus/azure-servicebus/samples/sync_samples) and [async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/servicebus/azure-servicebus/samples/async_samples) of samples are provided, async samples require Python 3.7 or later.
1818

1919
- [send_queue.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/servicebus/azure-servicebus/samples/sync_samples/send_queue.py) ([async version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/servicebus/azure-servicebus/samples/async_samples/send_queue_async.py)) - Examples to send messages to a service bus queue:
2020
- From a connection string
@@ -96,7 +96,7 @@ Both [sync version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/
9696
- [topic_subscription_with_rule_operations.py](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/servicebus/azure-servicebus/samples/sync_samples/topic_subscription_with_rule_operations.py) ([async_version](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/servicebus/azure-servicebus/samples/async_samples/topic_subscription_with_rule_operations_async.py)) - Example to manage rules on topic subscriptions and to explore different forms of subscription filters.
9797

9898
## Prerequisites
99-
- Python 2.7, 3.6 or later.
99+
- Python 3.7 or later.
100100
- **Microsoft Azure Subscription:** To use Azure services, including Azure Service Bus, you'll need a subscription.
101101
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).
102102

sdk/servicebus/azure-servicebus/setup.cfg

-2
This file was deleted.

sdk/servicebus/azure-servicebus/setup.py

+3-23
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,6 @@
2020
# a-b-c => a.b.c
2121
namespace_name = PACKAGE_NAME.replace('-', '.')
2222

23-
# azure v0.x is not compatible with this package
24-
# azure v0.x used to have a __version__ attribute (newer versions don't)
25-
try:
26-
import azure
27-
try:
28-
ver = azure.__version__
29-
raise Exception(
30-
'This package is incompatible with azure=={}. '.format(ver) +
31-
'Uninstall it with "pip uninstall azure".'
32-
)
33-
except AttributeError:
34-
pass
35-
except ImportError:
36-
pass
37-
3823
# Version extraction inspired from 'requests'
3924
with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd:
4025
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
@@ -62,16 +47,14 @@
6247
classifiers=[
6348
"Development Status :: 5 - Production/Stable",
6449
'Programming Language :: Python',
65-
'Programming Language :: Python :: 2',
66-
'Programming Language :: Python :: 2.7',
67-
'Programming Language :: Python :: 3',
68-
'Programming Language :: Python :: 3.6',
50+
'Programming Language :: Python :: 3 :: Only',
6951
'Programming Language :: Python :: 3.7',
7052
'Programming Language :: Python :: 3.8',
7153
'Programming Language :: Python :: 3.9',
7254
'Programming Language :: Python :: 3.10',
7355
'License :: OSI Approved :: MIT License',
7456
],
57+
python_requires=">=3.7",
7558
zip_safe=False,
7659
packages=find_packages(exclude=[
7760
'tests',
@@ -86,8 +69,5 @@
8669
'azure-core<2.0.0,>=1.14.0',
8770
"isodate>=0.6.0",
8871
"six>=1.11.0",
89-
],
90-
extras_require={
91-
":python_version<'3.0'": ['azure-nspkg', 'futures'],
92-
}
72+
]
9373
)

0 commit comments

Comments
 (0)