diff --git a/sdk/search/azure-search-documents/CHANGELOG.md b/sdk/search/azure-search-documents/CHANGELOG.md index 64d226cdfee9..8b59a70dd583 100644 --- a/sdk/search/azure-search-documents/CHANGELOG.md +++ b/sdk/search/azure-search-documents/CHANGELOG.md @@ -10,6 +10,8 @@ ### Other Changes +- Python 2.7 and 3.6 are no longer supported. Please use Python version 3.7 or later. + ## 11.3.0b6 (2021-11-19) ### Features Added diff --git a/sdk/search/azure-search-documents/README.md b/sdk/search/azure-search-documents/README.md index abc438a29800..c2d09ecbd7bb 100644 --- a/sdk/search/azure-search-documents/README.md +++ b/sdk/search/azure-search-documents/README.md @@ -42,7 +42,7 @@ Use the Azure.Search.Documents client library to: ## _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 @@ -56,7 +56,7 @@ pip install azure-search-documents ### Prerequisites -* Python 2.7, or 3.5 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 [Azure Cognitive Search service][search_resource] to use this package. @@ -304,7 +304,7 @@ print(" Category: {}".format(result["Category"])) ### Async APIs -This library includes a complete async API supported on Python 3.5+. To use it, you must +This library includes a complete async API. To use it, 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/README.md#transport) diff --git a/sdk/search/azure-search-documents/dev_requirements.txt b/sdk/search/azure-search-documents/dev_requirements.txt index 358a869e3d62..b2be1095581b 100644 --- a/sdk/search/azure-search-documents/dev_requirements.txt +++ b/sdk/search/azure-search-documents/dev_requirements.txt @@ -2,4 +2,4 @@ -e ../../../tools/azure-sdk-tools ../../core/azure-core ../../nspkg/azure-search-nspkg -aiohttp>=3.0; python_version >= '3.5' +aiohttp>=3.0 diff --git a/sdk/search/azure-search-documents/samples/README.md b/sdk/search/azure-search-documents/samples/README.md index 5d7ce6d48351..dbfbfc9aa7f7 100644 --- a/sdk/search/azure-search-documents/samples/README.md +++ b/sdk/search/azure-search-documents/samples/README.md @@ -10,9 +10,7 @@ products: # Samples for Azure Cognitive Search client library for Python These code samples show common scenario operations with the Azure Cognitive -Search client library. The async versions of the samples (the python sample -files appended with `_async`) show asynchronous operations with Cognitive Search -and require Python version 3.5 or later. +Search client library. Authenticate the client with a Azure Cognitive Search [API Key Credential](https://docs.microsoft.com/azure/search/search-security-api-keys): @@ -46,7 +44,7 @@ Then for common search index operations: ## Prerequisites -* Python 2.7, or 3.5 or later is required to use this package (3.5 or later if using asyncio) +* Python 3.7 or later is required to use this package * You must have an [Azure subscription](https://azure.microsoft.com/free/) * You must create the "Hotels" sample index [in the Azure Portal](https://docs.microsoft.com/azure/search/search-get-started-portal) diff --git a/sdk/search/azure-search-documents/setup.cfg b/sdk/search/azure-search-documents/setup.cfg deleted file mode 100644 index 3c6e79cf31da..000000000000 --- a/sdk/search/azure-search-documents/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/sdk/search/azure-search-documents/setup.py b/sdk/search/azure-search-documents/setup.py index b3d918a47a86..fd525094fdf0 100644 --- a/sdk/search/azure-search-documents/setup.py +++ b/sdk/search/azure-search-documents/setup.py @@ -21,22 +21,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*[\'"]([^\'"]*)[\'"]', @@ -59,11 +43,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.5', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', @@ -78,15 +59,11 @@ 'azure', 'azure.search', ]), + python_requires=">=3.7", install_requires=[ "azure-core<2.0.0,>=1.19.0", "msrest>=0.6.21", "azure-common~=1.1", "typing-extensions>=3.7.4.3" ], - extras_require={ - ":python_version<'3.0'": ['futures', 'azure-search-nspkg'], - ":python_version<'3.4'": ['enum34>=1.0.4'], - ":python_version<'3.5'": ["typing"] - }, ) diff --git a/sdk/search/azure-search-documents/tests/conftest.py b/sdk/search/azure-search-documents/tests/conftest.py deleted file mode 100644 index d129d1baf24a..000000000000 --- a/sdk/search/azure-search-documents/tests/conftest.py +++ /dev/null @@ -1,14 +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 sys - -import pytest - -# Ignore async tests for Python < 3.5 -collect_ignore = [] -if sys.version_info < (3, 5): - collect_ignore.append("async_tests")