Skip to content

Commit

Permalink
[metricsadvisor] updates to drop 2.7 support (Azure#22224)
Browse files Browse the repository at this point in the history
* updates to drop 2.7 support

* feedback
  • Loading branch information
kristapratico authored and rakshith91 committed Apr 10, 2022
1 parent 89814a6 commit db91ab6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 46 deletions.
1 change: 1 addition & 0 deletions sdk/metricsadvisor/azure-ai-metricsadvisor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Bugs Fixed

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

## 1.0.0 (2021-07-06)

Expand Down
8 changes: 4 additions & 4 deletions sdk/metricsadvisor/azure-ai-metricsadvisor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Metrics Advisor is a scalable real-time time series monitoring, alerting, and ro

## _Disclaimer_

_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_
_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_

## Getting started

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

```commandline
pip install azure-ai-metricsadvisor --pre
pip install azure-ai-metricsadvisor
```

### Prerequisites

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

### Authenticate the client
Expand Down Expand Up @@ -464,7 +464,7 @@ hook = client.create_hook(

### Async APIs

This library includes a complete async API supported on Python 3.6+. To use it, you must
This library includes a complete set of async APIs. To use them, you must
first install an async transport, such as [aiohttp](https://pypi.org/project/aiohttp/).
See
[azure-core documentation][azure_core_docs]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
-e ../../../tools/azure-devtools
-e ../../identity/azure-identity
../../core/azure-core
aiohttp>=3.0; python_version >= '3.5'
aiohttp>=3.0
5 changes: 2 additions & 3 deletions sdk/metricsadvisor/azure-ai-metricsadvisor/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ urlFragment: metricsadvisor-samples
# Samples for Azure Metrics Advisor client library for Python

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

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

## Prerequisites

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

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

```bash
pip install azure-ai-metricsadvisor --pre
pip install azure-ai-metricsadvisor
```

2. Clone or download this sample repository
Expand Down
2 changes: 0 additions & 2 deletions sdk/metricsadvisor/azure-ai-metricsadvisor/setup.cfg

This file was deleted.

24 changes: 2 additions & 22 deletions sdk/metricsadvisor/azure-ai-metricsadvisor/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@
# a-b-c => a.b.c
namespace_name = PACKAGE_NAME.replace('-', '.')

# azure v0.x is not compatible with this package
# azure v0.x used to have a __version__ attribute (newer versions don't)
try:
import azure
try:
ver = azure.__version__
raise Exception(
'This package is incompatible with azure=={}. '.format(ver) +
'Uninstall it with "pip uninstall azure".'
)
except AttributeError:
pass
except ImportError:
pass

# Version extraction inspired from 'requests'
with open(os.path.join(package_folder_path, '_version.py'), 'r') as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
Expand Down Expand Up @@ -62,10 +47,8 @@
classifiers=[
"Development Status :: 5 - Production/Stable",
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
"Programming Language :: Python :: 3 :: Only",
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
Expand All @@ -79,13 +62,10 @@
'azure',
'azure.ai',
]),
python_requires=">=3.7",
install_requires=[
"azure-core<2.0.0,>=1.6.0",
"msrest>=0.6.21",
'six>=1.11.0',
],
extras_require={
":python_version<'3.0'": ['azure-ai-nspkg'],
":python_version<'3.5'": ['typing'],
}
)
14 changes: 0 additions & 14 deletions sdk/metricsadvisor/azure-ai-metricsadvisor/tests/conftest.py

This file was deleted.

0 comments on commit db91ab6

Please sign in to comment.