Skip to content

Commit 677b2a1

Browse files
[metricsadvisor] updates to drop 2.7 support (Azure#22224)
* updates to drop 2.7 support * feedback
1 parent 02ef702 commit 677b2a1

File tree

7 files changed

+10
-46
lines changed

7 files changed

+10
-46
lines changed

sdk/metricsadvisor/azure-ai-metricsadvisor/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
### Bugs Fixed
1010

1111
### Other Changes
12+
- Python 2.7 and 3.6 are no longer supported. Please use Python version 3.7 or later.
1213

1314
## 1.0.0 (2021-07-06)
1415

sdk/metricsadvisor/azure-ai-metricsadvisor/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Metrics Advisor is a scalable real-time time series monitoring, alerting, and ro
1010

1111
## _Disclaimer_
1212

13-
_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_
13+
_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
1414

1515
## Getting started
1616

@@ -19,12 +19,12 @@ _Azure SDK Python packages support for Python 2.7 is ending 01 January 2022. For
1919
Install the Azure Metrics Advisor client library for Python with pip:
2020

2121
```commandline
22-
pip install azure-ai-metricsadvisor --pre
22+
pip install azure-ai-metricsadvisor
2323
```
2424

2525
### Prerequisites
2626

27-
* Python 2.7, or 3.6 or later is required to use this package.
27+
* Python 3.7 or later is required to use this package.
2828
* You need an [Azure subscription][azure_sub], and a [Metrics Advisor serivce][ma_service] to use this package.
2929

3030
### Authenticate the client
@@ -464,7 +464,7 @@ hook = client.create_hook(
464464

465465
### Async APIs
466466

467-
This library includes a complete async API supported on Python 3.6+. To use it, you must
467+
This library includes a complete set of async APIs. To use them, you must
468468
first install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).
469469
See
470470
[azure-core documentation][azure_core_docs]

sdk/metricsadvisor/azure-ai-metricsadvisor/dev_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
-e ../../../tools/azure-devtools
33
-e ../../identity/azure-identity
44
../../core/azure-core
5-
aiohttp>=3.0; python_version >= '3.5'
5+
aiohttp>=3.0

sdk/metricsadvisor/azure-ai-metricsadvisor/samples/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ urlFragment: metricsadvisor-samples
1111
# Samples for Azure Metrics Advisor client library for Python
1212

1313
These code samples show common scenario operations with the Azure Metrics Advisor client library.
14-
The async versions of the samples require Python 3.6 or later.
1514

1615
|**File Name**|**Description**|
1716
|----------------|-------------|
@@ -28,7 +27,7 @@ The async versions of the samples require Python 3.6 or later.
2827

2928
## Prerequisites
3029

31-
* Python 2.7, or 3.6 or later is required to use this package (3.6 or later if using asyncio)
30+
* Python 3.7 or later is required to use this package
3231
* You must have an [Azure subscription][azure_subscription] and an
3332
[Azure Metrics Advisor account][portal_metrics_advisor_account] to run these samples.
3433

@@ -37,7 +36,7 @@ The async versions of the samples require Python 3.6 or later.
3736
1. Install the Azure Metrics Advisor client library for Python with [pip][pip]:
3837

3938
```bash
40-
pip install azure-ai-metricsadvisor --pre
39+
pip install azure-ai-metricsadvisor
4140
```
4241

4342
2. Clone or download this sample repository

sdk/metricsadvisor/azure-ai-metricsadvisor/setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

sdk/metricsadvisor/azure-ai-metricsadvisor/setup.py

Lines changed: 2 additions & 22 deletions
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,10 +47,8 @@
6247
classifiers=[
6348
"Development Status :: 5 - Production/Stable",
6449
'Programming Language :: Python',
65-
'Programming Language :: Python :: 2',
66-
'Programming Language :: Python :: 2.7',
50+
"Programming Language :: Python :: 3 :: Only",
6751
'Programming Language :: Python :: 3',
68-
'Programming Language :: Python :: 3.6',
6952
'Programming Language :: Python :: 3.7',
7053
'Programming Language :: Python :: 3.8',
7154
'Programming Language :: Python :: 3.9',
@@ -79,13 +62,10 @@
7962
'azure',
8063
'azure.ai',
8164
]),
65+
python_requires=">=3.7",
8266
install_requires=[
8367
"azure-core<2.0.0,>=1.6.0",
8468
"msrest>=0.6.21",
8569
'six>=1.11.0',
8670
],
87-
extras_require={
88-
":python_version<'3.0'": ['azure-ai-nspkg'],
89-
":python_version<'3.5'": ['typing'],
90-
}
9171
)

sdk/metricsadvisor/azure-ai-metricsadvisor/tests/conftest.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)