Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[metricsadvisor] updates to drop 2.7 support #22224

Merged
merged 2 commits into from
Dec 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 async API supported on Python 3.7+. To use it, 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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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.
The async versions of the samples require Python 3.7 or later.

|**File Name**|**Description**|
|----------------|-------------|
Expand All @@ -28,7 +28,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 +37,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'],
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,3 @@
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -------------------------------------------------------------------------

kristapratico marked this conversation as resolved.
Show resolved Hide resolved
import sys

import pytest

# Ignore async tests for Python < 3.5
collect_ignore = []
if sys.version_info < (3, 5):
collect_ignore.append("async_tests")