From 9fbe42cb6c25fc993ef23eb220d5a1a8ae7f041c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?McCoy=20Pati=C3=B1o?= <39780829+mccoyp@users.noreply.github.com> Date: Thu, 6 Jan 2022 14:36:02 -0800 Subject: [PATCH] [Key Vault] Drop 2.7, 3.6 support (#22367) --- .../CHANGELOG.md | 1 + .../azure-keyvault-administration/README.md | 4 +-- .../azure-keyvault-administration/conftest.py | 8 ------ .../dev_requirements.txt | 2 +- .../azure-keyvault-administration/setup.cfg | 2 -- .../azure-keyvault-administration/setup.py | 25 ++----------------- .../azure-keyvault-certificates/CHANGELOG.md | 1 + .../azure-keyvault-certificates/README.md | 6 ++--- .../azure-keyvault-certificates/conftest.py | 11 -------- .../dev_requirements.txt | 2 +- .../azure-keyvault-certificates/setup.cfg | 2 -- .../azure-keyvault-certificates/setup.py | 25 ++----------------- sdk/keyvault/azure-keyvault-keys/CHANGELOG.md | 1 + sdk/keyvault/azure-keyvault-keys/README.md | 6 ++--- sdk/keyvault/azure-keyvault-keys/conftest.py | 6 ----- .../azure-keyvault-keys/dev_requirements.txt | 2 +- sdk/keyvault/azure-keyvault-keys/setup.cfg | 2 -- sdk/keyvault/azure-keyvault-keys/setup.py | 25 ++----------------- .../azure-keyvault-secrets/CHANGELOG.md | 1 + sdk/keyvault/azure-keyvault-secrets/README.md | 2 +- .../azure-keyvault-secrets/conftest.py | 12 --------- .../dev_requirements.txt | 2 +- 22 files changed, 23 insertions(+), 125 deletions(-) delete mode 100644 sdk/keyvault/azure-keyvault-administration/conftest.py delete mode 100644 sdk/keyvault/azure-keyvault-administration/setup.cfg delete mode 100644 sdk/keyvault/azure-keyvault-certificates/conftest.py delete mode 100644 sdk/keyvault/azure-keyvault-certificates/setup.cfg delete mode 100644 sdk/keyvault/azure-keyvault-keys/setup.cfg delete mode 100644 sdk/keyvault/azure-keyvault-secrets/conftest.py diff --git a/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md b/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md index 813384996c87..aaf1fd345b6e 100644 --- a/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-administration/CHANGELOG.md @@ -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. ## 4.1.0b2 (2021-11-11) diff --git a/sdk/keyvault/azure-keyvault-administration/README.md b/sdk/keyvault/azure-keyvault-administration/README.md index 4f1089e1fdb4..0db7c4127d7e 100644 --- a/sdk/keyvault/azure-keyvault-administration/README.md +++ b/sdk/keyvault/azure-keyvault-administration/README.md @@ -18,7 +18,7 @@ create, manage, and deploy public and private SSL/TLS certificates ## _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 ### Install packages @@ -32,7 +32,7 @@ authentication as demonstrated below. ### Prerequisites * An [Azure subscription][azure_sub] -* Python 2.7 or a recent version of Python 3 (this library doesn't support end-of-life versions) +* Python 3.7 or later * A [managed HSM][managed_hsm]. If you need to create one, see the final two steps in the next section for details on creating the managed HSM with the Azure CLI. ### Authenticate the client diff --git a/sdk/keyvault/azure-keyvault-administration/conftest.py b/sdk/keyvault/azure-keyvault-administration/conftest.py deleted file mode 100644 index 445dcb60c7d2..000000000000 --- a/sdk/keyvault/azure-keyvault-administration/conftest.py +++ /dev/null @@ -1,8 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ -import sys - -if sys.version_info < (3, 5, 3): - collect_ignore_glob = ["*_async.py"] diff --git a/sdk/keyvault/azure-keyvault-administration/dev_requirements.txt b/sdk/keyvault/azure-keyvault-administration/dev_requirements.txt index cccdd9811306..d39d2884d151 100644 --- a/sdk/keyvault/azure-keyvault-administration/dev_requirements.txt +++ b/sdk/keyvault/azure-keyvault-administration/dev_requirements.txt @@ -5,6 +5,6 @@ -e ../azure-keyvault-keys -e ../azure-mgmt-keyvault ../../nspkg/azure-keyvault-nspkg -aiohttp>=3.0; python_version >= '3.5' +aiohttp>=3.0 azure-storage-blob==12.6.0 parameterized>=0.7.3 \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-administration/setup.cfg b/sdk/keyvault/azure-keyvault-administration/setup.cfg deleted file mode 100644 index 3c6e79cf31da..000000000000 --- a/sdk/keyvault/azure-keyvault-administration/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/sdk/keyvault/azure-keyvault-administration/setup.py b/sdk/keyvault/azure-keyvault-administration/setup.py index 9016754edd4b..c3d63d310ae7 100644 --- a/sdk/keyvault/azure-keyvault-administration/setup.py +++ b/sdk/keyvault/azure-keyvault-administration/setup.py @@ -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__ # type: ignore - 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*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) # type: ignore @@ -61,10 +46,8 @@ classifiers=[ "Development Status :: 4 - Beta", "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", @@ -81,10 +64,6 @@ "azure.keyvault", ] ), + python_requires=">=3.7", install_requires=["azure-common~=1.1", "azure-core<2.0.0,>=1.15.0", "msrest>=0.6.21", "six>=1.11.0"], - extras_require={ - ":python_version<'3.0'": ["azure-keyvault-nspkg"], - ":python_version<'3.4'": ["enum34>=1.0.4"], - ":python_version<'3.5'": ["typing"], - }, ) diff --git a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md index c2b886e91b44..00108d06da82 100644 --- a/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-certificates/CHANGELOG.md @@ -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. ## 4.4.0b2 (2021-11-11) diff --git a/sdk/keyvault/azure-keyvault-certificates/README.md b/sdk/keyvault/azure-keyvault-certificates/README.md index ed21c6c5cf4a..a9d9c4ef1c1b 100644 --- a/sdk/keyvault/azure-keyvault-certificates/README.md +++ b/sdk/keyvault/azure-keyvault-certificates/README.md @@ -13,7 +13,7 @@ and other secrets ## _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 ### Install the package @@ -27,7 +27,7 @@ authentication as demonstrated below. ### Prerequisites * An [Azure subscription][azure_sub] -* Python 2.7, 3.5.3, or later +* Python 3.7 or later * A Key Vault. If you need to create one, you can use the [Azure Cloud Shell][azure_cloud_shell] to create one with these commands (replace `"my-resource-group"` and `"my-key-vault"` with your own, unique @@ -266,7 +266,7 @@ for certificate in certificates: ``` ### Async operations -This library includes a complete async API supported on Python 3.5+. 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](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport) diff --git a/sdk/keyvault/azure-keyvault-certificates/conftest.py b/sdk/keyvault/azure-keyvault-certificates/conftest.py deleted file mode 100644 index 940bfd06b844..000000000000 --- a/sdk/keyvault/azure-keyvault-certificates/conftest.py +++ /dev/null @@ -1,11 +0,0 @@ -# ------------------------------------ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. -# ------------------------------------ -import sys -import os - -# Ignore async tests for Python < 3.5 -collect_ignore_glob = [] -if sys.version_info < (3, 5): - collect_ignore_glob.append("tests/*_async.py") diff --git a/sdk/keyvault/azure-keyvault-certificates/dev_requirements.txt b/sdk/keyvault/azure-keyvault-certificates/dev_requirements.txt index bbda2911d856..a026c09dde7d 100644 --- a/sdk/keyvault/azure-keyvault-certificates/dev_requirements.txt +++ b/sdk/keyvault/azure-keyvault-certificates/dev_requirements.txt @@ -4,5 +4,5 @@ -e ../../identity/azure-identity -e ../azure-mgmt-keyvault ../../nspkg/azure-keyvault-nspkg -aiohttp>=3.0; python_version >= '3.5' +aiohttp>=3.0 parameterized>=0.7.3 \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-certificates/setup.cfg b/sdk/keyvault/azure-keyvault-certificates/setup.cfg deleted file mode 100644 index 3c6e79cf31da..000000000000 --- a/sdk/keyvault/azure-keyvault-certificates/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/sdk/keyvault/azure-keyvault-certificates/setup.py b/sdk/keyvault/azure-keyvault-certificates/setup.py index 5eeceb33b647..18746aa8acd6 100644 --- a/sdk/keyvault/azure-keyvault-certificates/setup.py +++ b/sdk/keyvault/azure-keyvault-certificates/setup.py @@ -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__ # type: ignore - 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*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -61,11 +46,9 @@ classifiers=[ "Development Status :: 4 - Beta", "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.5", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", @@ -82,14 +65,10 @@ "azure.keyvault", ] ), + python_requires=">=3.7", install_requires=[ "azure-core<2.0.0,>=1.15.0", "msrest>=0.6.21", "azure-common~=1.1", ], - extras_require={ - ":python_version<'3.0'": ["azure-keyvault-nspkg"], - ":python_version<'3.4'": ["enum34>=1.0.4"], - ":python_version<'3.5'": ["typing"], - }, ) diff --git a/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md b/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md index 1038b825a690..075fa2df522a 100644 --- a/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-keys/CHANGELOG.md @@ -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. ## 4.5.0b5 (2021-11-11) diff --git a/sdk/keyvault/azure-keyvault-keys/README.md b/sdk/keyvault/azure-keyvault-keys/README.md index 395e2b19ac8a..0b4303459002 100644 --- a/sdk/keyvault/azure-keyvault-keys/README.md +++ b/sdk/keyvault/azure-keyvault-keys/README.md @@ -15,7 +15,7 @@ create, manage, and deploy public and private SSL/TLS certificates ## _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 ### Install packages @@ -29,7 +29,7 @@ authentication as demonstrated below. ### Prerequisites * An [Azure subscription][azure_sub] -* Python 2.7 or a recent version of Python 3 (this library doesn't support end-of-life versions) +* Python 3.7 or later * A Key Vault. If you need to create one, you can use the [Azure Cloud Shell][azure_cloud_shell] to create one with these commands (replace `"my-resource-group"` and `"my-key-vault"` with your own, unique @@ -310,7 +310,7 @@ See the for more details of the cryptography API. ### Async API -This library includes a complete async API supported on Python 3. 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](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport) diff --git a/sdk/keyvault/azure-keyvault-keys/conftest.py b/sdk/keyvault/azure-keyvault-keys/conftest.py index 4f632e541bd8..26725f58eb72 100644 --- a/sdk/keyvault/azure-keyvault-keys/conftest.py +++ b/sdk/keyvault/azure-keyvault-keys/conftest.py @@ -3,12 +3,6 @@ # Licensed under the MIT License. See LICENSE.txt in the project root for # license information. # ------------------------------------------------------------------------- -import sys import os os.environ['PYTHONHASHSEED'] = '0' - -# Ignore async tests for Python < 3.5 -collect_ignore_glob = [] -if sys.version_info < (3, 5): - collect_ignore_glob.append("tests/*_async.py") diff --git a/sdk/keyvault/azure-keyvault-keys/dev_requirements.txt b/sdk/keyvault/azure-keyvault-keys/dev_requirements.txt index e2d675cd6101..6c1063b99b9e 100644 --- a/sdk/keyvault/azure-keyvault-keys/dev_requirements.txt +++ b/sdk/keyvault/azure-keyvault-keys/dev_requirements.txt @@ -3,6 +3,6 @@ -e ../azure-mgmt-keyvault -e ../../../tools/azure-sdk-tools ../../nspkg/azure-keyvault-nspkg -aiohttp>=3.0; python_version >= '3.5' +aiohttp>=3.0 azure-identity parameterized>=0.7.3 \ No newline at end of file diff --git a/sdk/keyvault/azure-keyvault-keys/setup.cfg b/sdk/keyvault/azure-keyvault-keys/setup.cfg deleted file mode 100644 index 3c6e79cf31da..000000000000 --- a/sdk/keyvault/azure-keyvault-keys/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/sdk/keyvault/azure-keyvault-keys/setup.py b/sdk/keyvault/azure-keyvault-keys/setup.py index 400544558a44..28a3e5155a79 100644 --- a/sdk/keyvault/azure-keyvault-keys/setup.py +++ b/sdk/keyvault/azure-keyvault-keys/setup.py @@ -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__ # type: ignore - 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*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -61,10 +46,8 @@ classifiers=[ "Development Status :: 4 - Beta", "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", @@ -81,6 +64,7 @@ "azure.keyvault", ] ), + python_requires=">=3.7", install_requires=[ "azure-core<2.0.0,>=1.15.0", "cryptography>=2.1.4", @@ -88,9 +72,4 @@ "azure-common~=1.1", "six>=1.12.0" ], - extras_require={ - ":python_version<'3.0'": ["azure-keyvault-nspkg"], - ":python_version<'3.4'": ["enum34>=1.0.4"], - ":python_version<'3.5'": ["typing"], - }, ) diff --git a/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md b/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md index 78a95e48a8d6..dfceaa67d776 100644 --- a/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md +++ b/sdk/keyvault/azure-keyvault-secrets/CHANGELOG.md @@ -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. ## 4.4.0b2 (2021-11-11) diff --git a/sdk/keyvault/azure-keyvault-secrets/README.md b/sdk/keyvault/azure-keyvault-secrets/README.md index 6c15249802f7..dec538bba4cd 100644 --- a/sdk/keyvault/azure-keyvault-secrets/README.md +++ b/sdk/keyvault/azure-keyvault-secrets/README.md @@ -262,7 +262,7 @@ for secret_property in secret_properties: ``` ### Async API -This library includes a complete async API supported on Python 3.5+. 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](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/core/azure-core/CLIENT_LIBRARY_DEVELOPER.md#transport) diff --git a/sdk/keyvault/azure-keyvault-secrets/conftest.py b/sdk/keyvault/azure-keyvault-secrets/conftest.py deleted file mode 100644 index ec07bfd31051..000000000000 --- a/sdk/keyvault/azure-keyvault-secrets/conftest.py +++ /dev/null @@ -1,12 +0,0 @@ -# ------------------------------------------------------------------------ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See LICENSE.txt in the project root for -# license information. -# ------------------------------------------------------------------------- -import os -import sys - -# Ignore async tests for Python < 3.5 -collect_ignore_glob = [] -if sys.version_info < (3, 5): - collect_ignore_glob.append("tests/*_async.py") diff --git a/sdk/keyvault/azure-keyvault-secrets/dev_requirements.txt b/sdk/keyvault/azure-keyvault-secrets/dev_requirements.txt index c25850507dd7..382bf81c402f 100644 --- a/sdk/keyvault/azure-keyvault-secrets/dev_requirements.txt +++ b/sdk/keyvault/azure-keyvault-secrets/dev_requirements.txt @@ -4,5 +4,5 @@ -e ../azure-mgmt-keyvault -e ../../../tools/azure-sdk-tools ../../nspkg/azure-keyvault-nspkg -aiohttp>=3.0; python_version >= '3.5' +aiohttp>=3.0 parameterized>=0.7.3