diff --git a/.vscode/cspell.json b/.vscode/cspell.json index fc87ff5f3782..18730c12fbb2 100644 --- a/.vscode/cspell.json +++ b/.vscode/cspell.json @@ -126,6 +126,7 @@ "azcmagent", "azsdk", "azuremgmtcore", + "azuremgmtcommunication", "bdist", "byref", "cdll", diff --git a/sdk/communication/azure-communication-chat/CHANGELOG.md b/sdk/communication/azure-communication-chat/CHANGELOG.md index f67b4dd8f705..1ac145c46cd7 100644 --- a/sdk/communication/azure-communication-chat/CHANGELOG.md +++ b/sdk/communication/azure-communication-chat/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.1 (Unreleased) +## 1.2.0 (Unreleased) ### Features Added @@ -9,6 +9,7 @@ ### Bugs Fixed ### Other Changes +Python 2.7 is no longer supported. Please use Python version 3.6 or later. ## 1.1.0 (2021-09-15) - Updated `azure-communication-chat` version. diff --git a/sdk/communication/azure-communication-chat/README.md b/sdk/communication/azure-communication-chat/README.md index 10162e1f6989..268aa2e7ecaf 100644 --- a/sdk/communication/azure-communication-chat/README.md +++ b/sdk/communication/azure-communication-chat/README.md @@ -5,11 +5,15 @@ Read more about Azure Communication Services [here](https://docs.microsoft.com/a [Source code](https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/communication/azure-communication-chat) | [Package (Pypi)](https://pypi.org/project/azure-communication-chat/) | [API reference documentation](https://azuresdkdocs.blob.core.windows.net/$web/python/azure-communication-chat/1.0.0b5/index.html) | [Product documentation](https://docs.microsoft.com/azure/communication-services/) +## _Disclaimer_ + +_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 ## Prerequisites -- Python 2.7, or 3.6 or later is required to use this package. +- Python 3.6 or later is required to use this package. - A deployed Communication Services resource. You can use the [Azure Portal](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp) or the [Azure PowerShell](https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice) to set it up. ## Install the package @@ -25,7 +29,7 @@ pip install --pre azure-communication-chat User access tokens enable you to build client applications that directly authenticate to Azure Communication Services. You can generate these tokens with azure.communication.identity module, and then use them to initialize the Communication Services SDKs. Example of using azure.communication.identity: ```bash -pip install --pre azure-communication-identity +pip install azure-communication-identity ``` ```python @@ -536,8 +540,7 @@ for read_receipt_page in read_receipts.by_page(): ## Sample Code These are code samples that show common scenario operations with the Azure Communication Chat client library. -The async versions of the samples (the python sample files appended with `_async`) show asynchronous operations, -and require Python 3.6 or later. +The async versions of the samples (the python sample files appended with `_async`) show asynchronous operations. Before run the sample code, refer to Prerequisites to create a resource, then set some Environment Variables diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_client.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_client.py index 68a37522ef97..85831a03ce4c 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_client.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_client.py @@ -5,10 +5,7 @@ # -------------------------------------------------------------------------- from typing import TYPE_CHECKING from uuid import uuid4 -try: - from urllib.parse import urlparse -except ImportError: - from urlparse import urlparse # type: ignore +from urllib.parse import urlparse from azure.core.tracing.decorator import distributed_trace from azure.core.pipeline.policies import BearerTokenCredentialPolicy diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_thread_client.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_thread_client.py index 71aeb1b7f6f7..1e9e99782aeb 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_thread_client.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_chat_thread_client.py @@ -5,10 +5,7 @@ # -------------------------------------------------------------------------- from typing import TYPE_CHECKING -try: - from urllib.parse import urlparse -except ImportError: - from urlparse import urlparse # type: ignore +from urllib.parse import urlparse from azure.core.tracing.decorator import distributed_trace from azure.core.pipeline.policies import BearerTokenCredentialPolicy diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/_version.py b/sdk/communication/azure-communication-chat/azure/communication/chat/_version.py index 6e48f85111f3..bdc2fd38447d 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/_version.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/_version.py @@ -4,6 +4,6 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "1.1.1" +VERSION = "1.2.0" SDK_MONIKER = "communication-chat/{}".format(VERSION) # type: str diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_client_async.py b/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_client_async.py index 18c5582ab310..ce937cf7a559 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_client_async.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_client_async.py @@ -3,10 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -try: - from urllib.parse import urlparse -except ImportError: - from urlparse import urlparse # type: ignore +from urllib.parse import urlparse # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union diff --git a/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py b/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py index 7c5b4e5fb4c3..3bdc44fdb225 100644 --- a/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py +++ b/sdk/communication/azure-communication-chat/azure/communication/chat/aio/_chat_thread_client_async.py @@ -3,10 +3,7 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -try: - from urllib.parse import urlparse -except ImportError: - from urlparse import urlparse # type: ignore +from urllib.parse import urlparse # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, List, Optional, TypeVar, Union, Tuple diff --git a/sdk/communication/azure-communication-chat/dev_requirements.txt b/sdk/communication/azure-communication-chat/dev_requirements.txt index 665a5973a5dd..69df41a279ef 100644 --- a/sdk/communication/azure-communication-chat/dev_requirements.txt +++ b/sdk/communication/azure-communication-chat/dev_requirements.txt @@ -1,6 +1,5 @@ -e ../../../tools/azure-sdk-tools -../../nspkg/azure-communication-nspkg -e ../azure-communication-identity -aiohttp>=3.0; python_version >= '3.5' +aiohttp>=3.0 -e ../../../tools/azure-devtools -python-dateutil>=2.8.1; python_version >= '3.5' \ No newline at end of file +python-dateutil>=2.8.1 \ No newline at end of file diff --git a/sdk/communication/azure-communication-chat/setup.cfg b/sdk/communication/azure-communication-chat/setup.cfg deleted file mode 100644 index 3c6e79cf31da..000000000000 --- a/sdk/communication/azure-communication-chat/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/sdk/communication/azure-communication-chat/setup.py b/sdk/communication/azure-communication-chat/setup.py index d66cc8e14215..d3cdb2d6c28a 100644 --- a/sdk/communication/azure-communication-chat/setup.py +++ b/sdk/communication/azure-communication-chat/setup.py @@ -8,7 +8,7 @@ # your package. # this setup.py is set up in a specific way to keep the azure* and azure-mgmt-* namespaces WORKING all the way -# up from python 2.7. Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging +# up from python 3.6. Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging PACKAGE_NAME = "azure-communication-chat" PACKAGE_PPRINT_NAME = "Communication Chat" @@ -41,8 +41,7 @@ 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', @@ -56,14 +55,13 @@ 'azure', 'azure.communication' ]), + python_requires=">=3.6", install_requires=[ "msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1", 'six>=1.11.0' ], extras_require={ - ":python_version<'3.0'": ['azure-communication-nspkg'], - ":python_version<'3.5'": ["typing"], ":python_version<'3.8'": ["typing-extensions"] } ) diff --git a/sdk/communication/azure-communication-chat/tests/conftest.py b/sdk/communication/azure-communication-chat/tests/conftest.py deleted file mode 100644 index 9f69fcac8bdc..000000000000 --- a/sdk/communication/azure-communication-chat/tests/conftest.py +++ /dev/null @@ -1,11 +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 - -# Ignore collection of async tests for Python 2 -collect_ignore_glob = [] -if sys.version_info < (3, 5): - collect_ignore_glob.append("*_async.py") diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_client.py b/sdk/communication/azure-communication-chat/tests/test_chat_client.py index 2c1f7803ace7..8506b241730f 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_client.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_client.py @@ -22,10 +22,7 @@ from datetime import datetime import calendar -try: - from unittest.mock import Mock, patch -except ImportError: # python < 3.3 - from mock import Mock, patch # type: ignore +from unittest.mock import Mock, patch def _convert_datetime_to_utc_int(input): return int(calendar.timegm(input.utctimetuple())) diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_client_async.py b/sdk/communication/azure-communication-chat/tests/test_chat_client_async.py index ae8669b04d1f..a4684f7ef59f 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_client_async.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_client_async.py @@ -17,10 +17,7 @@ from datetime import datetime from msrest.serialization import TZ_UTC -try: - from unittest.mock import Mock, patch -except ImportError: # python < 3.3 - from mock import Mock, patch # type: ignore +from unittest.mock import Mock, patch import pytest import time diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client.py b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client.py index b545e4f50a8a..6197913ffa31 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client.py @@ -21,10 +21,7 @@ ) from unittest_helpers import mock_response -try: - from unittest.mock import Mock, patch -except ImportError: # python < 3.3 - from mock import Mock, patch # type: ignore +from unittest.mock import Mock, patch def _convert_datetime_to_utc_int(input): return int(calendar.timegm(input.utctimetuple())) diff --git a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_async.py b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_async.py index cbb01a312c60..f718be3ab1e8 100644 --- a/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_async.py +++ b/sdk/communication/azure-communication-chat/tests/test_chat_thread_client_async.py @@ -17,10 +17,7 @@ from unittest_helpers import mock_response from azure.core.exceptions import HttpResponseError -try: - from unittest.mock import Mock, patch -except ImportError: # python < 3.3 - from mock import Mock, patch # type: ignore +from unittest.mock import Mock, patch import pytest import time diff --git a/sdk/communication/azure-communication-chat/tests/unittest_helpers.py b/sdk/communication/azure-communication-chat/tests/unittest_helpers.py index 4729767aee8d..45142b807611 100644 --- a/sdk/communication/azure-communication-chat/tests/unittest_helpers.py +++ b/sdk/communication/azure-communication-chat/tests/unittest_helpers.py @@ -5,10 +5,7 @@ # -------------------------------------------------------------------------- import json -try: - from unittest import mock -except ImportError: # python < 3.3 - import mock # type: ignore +from unittest import mock def mock_response(status_code=200, headers=None, json_payload=None): diff --git a/sdk/communication/azure-communication-identity/CHANGELOG.md b/sdk/communication/azure-communication-identity/CHANGELOG.md index 07f170020251..bbc96fbd5e9b 100644 --- a/sdk/communication/azure-communication-identity/CHANGELOG.md +++ b/sdk/communication/azure-communication-identity/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.1.0b2 (Unreleased) +## 1.2.0 (Unreleased) ### Features Added @@ -9,6 +9,7 @@ ### Bugs Fixed ### Other Changes +- Python 2.7 is no longer supported. Please use Python version 3.6 or later. ## 1.1.0b1 (2021-11-09) ### Features Added diff --git a/sdk/communication/azure-communication-identity/README.md b/sdk/communication/azure-communication-identity/README.md index ee0e0fe025b1..d023b1c3cb65 100644 --- a/sdk/communication/azure-communication-identity/README.md +++ b/sdk/communication/azure-communication-identity/README.md @@ -4,10 +4,13 @@ Azure Communication Identity client package is intended to be used to setup the [Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/communication/azure-communication-identity) | [Package (Pypi)](https://pypi.org/project/azure-communication-identity/) | [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/communication/azure-communication-identity) | [Product documentation](https://docs.microsoft.com/azure/communication-services/quickstarts/access-tokens?pivots=programming-language-python) +## _Disclaimer_ + +_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 ### Prerequisites -- Python 2.7, or 3.6 or later is required to use this package. +- Python 3.6 or later is required to use this package. - You must have an [Azure subscription](https://azure.microsoft.com/free/) - A deployed Communication Services resource. You can use the [Azure Portal](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp) or the [Azure PowerShell](https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice) to set it up. ### Install the package diff --git a/sdk/communication/azure-communication-identity/azure/communication/identity/_version.py b/sdk/communication/azure-communication-identity/azure/communication/identity/_version.py index fac699b2663b..e84ad6f44478 100644 --- a/sdk/communication/azure-communication-identity/azure/communication/identity/_version.py +++ b/sdk/communication/azure-communication-identity/azure/communication/identity/_version.py @@ -4,6 +4,6 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "1.1.0b2" +VERSION = "1.2.0" SDK_MONIKER = "communication-identity/{}".format(VERSION) # type: str diff --git a/sdk/communication/azure-communication-identity/dev_requirements.txt b/sdk/communication/azure-communication-identity/dev_requirements.txt index e785380701b9..e563f6685969 100644 --- a/sdk/communication/azure-communication-identity/dev_requirements.txt +++ b/sdk/communication/azure-communication-identity/dev_requirements.txt @@ -1,7 +1,6 @@ -e ../../../tools/azure-sdk-tools -e ../../identity/azure-identity ../../core/azure-core -../../nspkg/azure-communication-nspkg ../azure-mgmt-communication aiohttp>=3.0; python_version >= '3.5' -e ../../../tools/azure-devtools \ No newline at end of file diff --git a/sdk/communication/azure-communication-identity/setup.cfg b/sdk/communication/azure-communication-identity/setup.cfg deleted file mode 100644 index 3480374bc2f2..000000000000 --- a/sdk/communication/azure-communication-identity/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 \ No newline at end of file diff --git a/sdk/communication/azure-communication-identity/setup.py b/sdk/communication/azure-communication-identity/setup.py index 62ec5b6f2756..39181b6eb78a 100644 --- a/sdk/communication/azure-communication-identity/setup.py +++ b/sdk/communication/azure-communication-identity/setup.py @@ -8,7 +8,7 @@ # your package. # this setup.py is set up in a specific way to keep the azure* and azure-mgmt-* namespaces WORKING all the way -# up from python 2.7. Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging +# up from python 3.6. Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging PACKAGE_NAME = "azure-communication-identity" PACKAGE_PPRINT_NAME = "Communication Identity Service" @@ -46,8 +46,7 @@ "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', @@ -60,12 +59,12 @@ 'azure', 'azure.communication' ]), + python_requires=">=3.6", install_requires=[ "msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1" ], extras_require={ - ":python_version<'3.0'": ['azure-communication-nspkg'], ":python_version<'3.8'": ["typing-extensions"] }, project_urls={ diff --git a/sdk/communication/azure-communication-identity/tests/_shared/helper.py b/sdk/communication/azure-communication-identity/tests/_shared/helper.py index b89a9c548f18..146d94b649b0 100644 --- a/sdk/communication/azure-communication-identity/tests/_shared/helper.py +++ b/sdk/communication/azure-communication-identity/tests/_shared/helper.py @@ -5,10 +5,7 @@ # -------------------------------------------------------------------------- import re from azure_devtools.scenario_tests import RecordingProcessor -try: - from urllib.parse import urlparse -except ImportError: - from urlparse import urlparse +from urllib.parse import urlparse class URIIdentityReplacer(RecordingProcessor): """Replace the identity in request uri""" diff --git a/sdk/communication/azure-communication-identity/tests/conftest.py b/sdk/communication/azure-communication-identity/tests/conftest.py deleted file mode 100644 index 9f69fcac8bdc..000000000000 --- a/sdk/communication/azure-communication-identity/tests/conftest.py +++ /dev/null @@ -1,11 +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 - -# Ignore collection of async tests for Python 2 -collect_ignore_glob = [] -if sys.version_info < (3, 5): - collect_ignore_glob.append("*_async.py") diff --git a/sdk/communication/azure-communication-networktraversal/CHANGELOG.md b/sdk/communication/azure-communication-networktraversal/CHANGELOG.md index 6df2f5c2291c..37e58ae6baeb 100644 --- a/sdk/communication/azure-communication-networktraversal/CHANGELOG.md +++ b/sdk/communication/azure-communication-networktraversal/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0b3 (Unreleased) +## 1.1.0 (Unreleased) ### Features Added @@ -9,6 +9,7 @@ ### Bugs Fixed ### Other Changes +Python 2.7 is no longer supported. Please use Python version 3.6 or later. ## 1.0.0b2 (2021-11-18) diff --git a/sdk/communication/azure-communication-networktraversal/README.md b/sdk/communication/azure-communication-networktraversal/README.md index b661e58a929a..69d5c2d5ae81 100644 --- a/sdk/communication/azure-communication-networktraversal/README.md +++ b/sdk/communication/azure-communication-networktraversal/README.md @@ -6,11 +6,15 @@ It will provide TURN credentials to a user. [Source code](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/communication) | [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/communication) +## _Disclaimer_ + +_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 ### Prerequisites -- Python 2.7, or 3.6 or later is required to use this package. +- Python 3.6 or later is required to use this package. - You must have an [Azure subscription](https://azure.microsoft.com/free/) - A deployed Communication Services resource. You can use the [Azure Portal](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp) or the [Azure PowerShell](https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice) to set it up. diff --git a/sdk/communication/azure-communication-networktraversal/azure/communication/networktraversal/_version.py b/sdk/communication/azure-communication-networktraversal/azure/communication/networktraversal/_version.py index 1ecbe23f1c15..8d7e4d2c787d 100644 --- a/sdk/communication/azure-communication-networktraversal/azure/communication/networktraversal/_version.py +++ b/sdk/communication/azure-communication-networktraversal/azure/communication/networktraversal/_version.py @@ -4,6 +4,6 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "1.0.0b3" +VERSION = "1.1.0" SDK_MONIKER = "communication-networktraversal/{}".format(VERSION) # type: str diff --git a/sdk/communication/azure-communication-networktraversal/dev_requirements.txt b/sdk/communication/azure-communication-networktraversal/dev_requirements.txt index 82a79d424024..09382560255e 100644 --- a/sdk/communication/azure-communication-networktraversal/dev_requirements.txt +++ b/sdk/communication/azure-communication-networktraversal/dev_requirements.txt @@ -2,5 +2,5 @@ -e ../../identity/azure-identity -e ../azure-communication-identity ../../core/azure-core -aiohttp>=3.0; python_version >= '3.5' +aiohttp>=3.0 -e ../../../tools/azure-devtools \ No newline at end of file diff --git a/sdk/communication/azure-communication-networktraversal/setup.cfg b/sdk/communication/azure-communication-networktraversal/setup.cfg deleted file mode 100644 index 3480374bc2f2..000000000000 --- a/sdk/communication/azure-communication-networktraversal/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 \ No newline at end of file diff --git a/sdk/communication/azure-communication-networktraversal/setup.py b/sdk/communication/azure-communication-networktraversal/setup.py index d5ce687447bc..0ac780ab24e2 100644 --- a/sdk/communication/azure-communication-networktraversal/setup.py +++ b/sdk/communication/azure-communication-networktraversal/setup.py @@ -8,7 +8,7 @@ # your package. # this setup.py is set up in a specific way to keep the azure* and azure-mgmt-* -# # namespaces WORKING all the way up from python 2.7. +# # namespaces WORKING all the way up from python 3.6. # Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging PACKAGE_NAME = "azure-communication-networktraversal" @@ -47,8 +47,7 @@ "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', @@ -61,12 +60,12 @@ 'azure', 'azure.communication' ]), + python_requires=">=3.6", install_requires=[ "msrest>=0.6.21", "azure-core<2.0.0,>=1.19.1" ], extras_require={ - ":python_version<'3.0'": ['azure-communication-nspkg'], ":python_version<'3.8'": ["typing-extensions"] }, project_urls={ diff --git a/sdk/communication/azure-communication-networktraversal/tests/_shared/helper.py b/sdk/communication/azure-communication-networktraversal/tests/_shared/helper.py index 5613decf331d..2f415d7f7f51 100644 --- a/sdk/communication/azure-communication-networktraversal/tests/_shared/helper.py +++ b/sdk/communication/azure-communication-networktraversal/tests/_shared/helper.py @@ -5,10 +5,7 @@ # -------------------------------------------------------------------------- import re from azure_devtools.scenario_tests import RecordingProcessor -try: - from urllib.parse import urlparse -except ImportError: - from urlparse import urlparse +from urllib.parse import urlparse class URIIdentityReplacer(RecordingProcessor): """Replace the identity in request uri""" diff --git a/sdk/communication/azure-communication-networktraversal/tests/conftest.py b/sdk/communication/azure-communication-networktraversal/tests/conftest.py deleted file mode 100644 index 9f69fcac8bdc..000000000000 --- a/sdk/communication/azure-communication-networktraversal/tests/conftest.py +++ /dev/null @@ -1,11 +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 - -# Ignore collection of async tests for Python 2 -collect_ignore_glob = [] -if sys.version_info < (3, 5): - collect_ignore_glob.append("*_async.py") diff --git a/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md index c29fa0609538..d4f08250f8e2 100644 --- a/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md +++ b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md @@ -1,5 +1,16 @@ # Release History +## 1.2.0 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes +Python 2.7 is no longer supported. Please use Python version 3.6 or later. + ## 1.1.0b1 (2022-01-24) - Users can now purchase United Kingdom (GB) toll free and geographic phone numbers for PSTN Calling diff --git a/sdk/communication/azure-communication-phonenumbers/README.md b/sdk/communication/azure-communication-phonenumbers/README.md index 81b6201d498a..254035e63162 100644 --- a/sdk/communication/azure-communication-phonenumbers/README.md +++ b/sdk/communication/azure-communication-phonenumbers/README.md @@ -2,9 +2,13 @@ Azure Communication Phone Numbers client package is used to administer Phone Numbers. +## _Disclaimer_ + +_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 ### Prerequisites -- Python 2.7, or 3.6 or later is required to use this package. +- Python 3.6 or later is required to use this package. - You must have an [Azure subscription](https://azure.microsoft.com/free/) - A deployed Communication Services resource. You can use the [Azure Portal](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp) or the [Azure PowerShell](https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice) to set it up. ### Install the package diff --git a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_version.py b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_version.py index 32a809117cb4..633b51122804 100644 --- a/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_version.py +++ b/sdk/communication/azure-communication-phonenumbers/azure/communication/phonenumbers/_version.py @@ -4,6 +4,6 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "1.1.0b1" +VERSION = "1.2.0" SDK_MONIKER = "communication-phonenumbers/{}".format(VERSION) # type: str diff --git a/sdk/communication/azure-communication-phonenumbers/dev_requirements.txt b/sdk/communication/azure-communication-phonenumbers/dev_requirements.txt index 2100e0a23224..3b53170909f2 100644 --- a/sdk/communication/azure-communication-phonenumbers/dev_requirements.txt +++ b/sdk/communication/azure-communication-phonenumbers/dev_requirements.txt @@ -1,7 +1,6 @@ -e ../../../tools/azure-sdk-tools -e ../../identity/azure-identity ../../core/azure-core -../../nspkg/azure-communication-nspkg ../azure-mgmt-communication -aiohttp>=3.0; python_version >= '3.5' +aiohttp>=3.0 -e ../../../tools/azure-devtools diff --git a/sdk/communication/azure-communication-phonenumbers/setup.cfg b/sdk/communication/azure-communication-phonenumbers/setup.cfg deleted file mode 100644 index 3480374bc2f2..000000000000 --- a/sdk/communication/azure-communication-phonenumbers/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 \ No newline at end of file diff --git a/sdk/communication/azure-communication-phonenumbers/setup.py b/sdk/communication/azure-communication-phonenumbers/setup.py index 13a9880fe1ab..371aebf8c414 100644 --- a/sdk/communication/azure-communication-phonenumbers/setup.py +++ b/sdk/communication/azure-communication-phonenumbers/setup.py @@ -8,7 +8,7 @@ # your package. # this setup.py is set up in a specific way to keep the azure* and azure-mgmt-* namespaces WORKING all the way -# up from python 2.7. Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging +# up from python 3.6. Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging PACKAGE_NAME = "azure-communication-phonenumbers" PACKAGE_PPRINT_NAME = "Communication Phone Numbers" @@ -46,8 +46,7 @@ "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', @@ -60,12 +59,12 @@ 'azure', 'azure.communication' ]), + python_requires=">=3.6", install_requires=[ "msrest>=0.6.21", 'azure-core<2.0.0,>=1.20.0', ], extras_require={ - ":python_version<'3.0'": ['azure-communication-nspkg'], ":python_version<'3.8'": ["typing-extensions"] }, project_urls={ diff --git a/sdk/communication/azure-communication-phonenumbers/test/conftest.py b/sdk/communication/azure-communication-phonenumbers/test/conftest.py deleted file mode 100644 index 9f69fcac8bdc..000000000000 --- a/sdk/communication/azure-communication-phonenumbers/test/conftest.py +++ /dev/null @@ -1,11 +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 - -# Ignore collection of async tests for Python 2 -collect_ignore_glob = [] -if sys.version_info < (3, 5): - collect_ignore_glob.append("*_async.py") diff --git a/sdk/communication/azure-communication-sms/CHANGELOG.md b/sdk/communication/azure-communication-sms/CHANGELOG.md index 03c2bd859e21..c9ebba5e89d4 100644 --- a/sdk/communication/azure-communication-sms/CHANGELOG.md +++ b/sdk/communication/azure-communication-sms/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.2 (Unreleased) +## 1.1.0 (Unreleased) ### Features Added @@ -9,6 +9,7 @@ ### Bugs Fixed ### Other Changes +Python 2.7 is no longer supported. Please use Python version 3.6 or later. ## 1.0.1 (2021-06-08) ### Bug Fixes diff --git a/sdk/communication/azure-communication-sms/README.md b/sdk/communication/azure-communication-sms/README.md index 14f45968aa07..95e3a889fbe5 100644 --- a/sdk/communication/azure-communication-sms/README.md +++ b/sdk/communication/azure-communication-sms/README.md @@ -5,13 +5,15 @@ Read more about Azure Communication Services [here](https://docs.microsoft.com/a [Source code](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/communication/azure-communication-sms) | [Package (Pypi)](https://pypi.org/project/azure-communication-sms/) | [API reference documentation](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/communication/azure-communication-sms) | [Product documentation](https://docs.microsoft.com/azure/communication-services/quickstarts/telephony-sms/send?pivots=programming-language-python) +## _Disclaimer_ +_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 ### Prerequisites -- Python 2.7, or 3.6 or later is required to use this package. +- Python 3.6 or later is required to use this package. - A deployed Communication Services resource. You can use the [Azure Portal](https://docs.microsoft.com/azure/communication-services/quickstarts/create-communication-resource?tabs=windows&pivots=platform-azp) or the [Azure PowerShell](https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice) to set it up. - You must have a phone number configured that is associated with an Azure subscription diff --git a/sdk/communication/azure-communication-sms/azure/communication/sms/_version.py b/sdk/communication/azure-communication-sms/azure/communication/sms/_version.py index e73a1b30f3b5..28a041a8fbd4 100644 --- a/sdk/communication/azure-communication-sms/azure/communication/sms/_version.py +++ b/sdk/communication/azure-communication-sms/azure/communication/sms/_version.py @@ -4,6 +4,6 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "1.0.2" +VERSION = "1.1.0" SDK_MONIKER = "communication-sms/{}".format(VERSION) # type: str diff --git a/sdk/communication/azure-communication-sms/dev_requirements.txt b/sdk/communication/azure-communication-sms/dev_requirements.txt index 6d48032d274b..fdae4a50e982 100644 --- a/sdk/communication/azure-communication-sms/dev_requirements.txt +++ b/sdk/communication/azure-communication-sms/dev_requirements.txt @@ -2,6 +2,5 @@ -e ../../../tools/azure-devtools -e ../../identity/azure-identity ../../core/azure-core -../../nspkg/azure-communication-nspkg -aiohttp>=3.0; python_version >= '3.5' -aiounittest>=1.4; python_version >= '3.5' \ No newline at end of file +aiohttp>=3.0 +aiounittest>=1.4 \ No newline at end of file diff --git a/sdk/communication/azure-communication-sms/setup.cfg b/sdk/communication/azure-communication-sms/setup.cfg deleted file mode 100644 index 3c6e79cf31da..000000000000 --- a/sdk/communication/azure-communication-sms/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal=1 diff --git a/sdk/communication/azure-communication-sms/setup.py b/sdk/communication/azure-communication-sms/setup.py index 028bc8a9b626..7a2efdc40d6a 100644 --- a/sdk/communication/azure-communication-sms/setup.py +++ b/sdk/communication/azure-communication-sms/setup.py @@ -8,7 +8,7 @@ # your package. # this setup.py is set up in a specific way to keep the azure* and azure-mgmt-* namespaces WORKING all the way -# up from python 2.7. Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging +# up from python 3.6. Reference here: https://github.com/Azure/azure-sdk-for-python/wiki/Azure-packaging PACKAGE_NAME = "azure-communication-sms" PACKAGE_PPRINT_NAME = "Communication SMS" @@ -46,8 +46,7 @@ "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', @@ -60,14 +59,13 @@ 'azure', 'azure.communication' ]), + python_requires=">=3.6", install_requires=[ 'azure-core<2.0.0,>=1.15.0', 'msrest>=0.6.21', 'six>=1.11.0' ], extras_require={ - ":python_version<'3.0'": ['azure-communication-nspkg'], - ":python_version<'3.5'": ["typing"], ":python_version<'3.8'": ["typing-extensions"] } ) \ No newline at end of file diff --git a/sdk/communication/azure-communication-sms/tests/conftest.py b/sdk/communication/azure-communication-sms/tests/conftest.py deleted file mode 100644 index e09cf6874c2a..000000000000 --- a/sdk/communication/azure-communication-sms/tests/conftest.py +++ /dev/null @@ -1,11 +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 - -# Ignore collection of async tests for Python 2 -collect_ignore_glob = [] -if sys.version_info < (3, 5): - collect_ignore_glob.append("*_async.py") \ No newline at end of file diff --git a/sdk/communication/azure-communication-sms/tests/test_sms_client.py b/sdk/communication/azure-communication-sms/tests/test_sms_client.py index 5048420de3ad..3719af6b4492 100644 --- a/sdk/communication/azure-communication-sms/tests/test_sms_client.py +++ b/sdk/communication/azure-communication-sms/tests/test_sms_client.py @@ -9,10 +9,7 @@ from azure.communication.sms import SmsClient from unittest_helpers import mock_response -try: - from unittest.mock import Mock, patch -except ImportError: # python < 3.3 - from mock import Mock, patch # type: ignore +from unittest.mock import Mock, patch class FakeTokenCredential(object): def __init__(self): diff --git a/sdk/communication/azure-communication-sms/tests/test_sms_client_async.py b/sdk/communication/azure-communication-sms/tests/test_sms_client_async.py index ebef0e5fc157..b78d25d441ed 100644 --- a/sdk/communication/azure-communication-sms/tests/test_sms_client_async.py +++ b/sdk/communication/azure-communication-sms/tests/test_sms_client_async.py @@ -9,10 +9,7 @@ from azure.communication.sms.aio import SmsClient from unittest_helpers import mock_response -try: - from unittest.mock import Mock, patch -except ImportError: # python < 3.3 - from mock import Mock, patch # type: ignore +from unittest.mock import Mock, patch class FakeTokenCredential(object): def __init__(self): diff --git a/sdk/communication/azure-communication-sms/tests/unittest_helpers.py b/sdk/communication/azure-communication-sms/tests/unittest_helpers.py index c78f24cde637..9d24a0aa86eb 100644 --- a/sdk/communication/azure-communication-sms/tests/unittest_helpers.py +++ b/sdk/communication/azure-communication-sms/tests/unittest_helpers.py @@ -5,10 +5,7 @@ # -------------------------------------------------------------------------- import json -try: - from unittest import mock -except ImportError: # python < 3.3 - import mock # type: ignore +from unittest import mock def mock_response(status_code=200, headers=None, json_payload=None): response = mock.Mock(status_code=status_code, headers=headers or {}) diff --git a/sdk/communication/azure-mgmt-communication/CHANGELOG.md b/sdk/communication/azure-mgmt-communication/CHANGELOG.md index 9adc01863331..fdf603e7d83d 100644 --- a/sdk/communication/azure-mgmt-communication/CHANGELOG.md +++ b/sdk/communication/azure-mgmt-communication/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.1 (Unreleased) +## 1.1.0 (Unreleased) ### Features Added @@ -9,6 +9,7 @@ ### Bugs Fixed ### Other Changes +Python 2.7 is no longer supported. Please use Python version 3.6 or later. ## 1.0.0 (2021-03-29) diff --git a/sdk/communication/azure-mgmt-communication/README.md b/sdk/communication/azure-mgmt-communication/README.md index 099d34ea6872..26033e03a37f 100644 --- a/sdk/communication/azure-mgmt-communication/README.md +++ b/sdk/communication/azure-mgmt-communication/README.md @@ -1,7 +1,7 @@ # Microsoft Azure SDK for Python This is the Microsoft Azure Communication Management Client Library. -This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +This package has been tested with Python 3.6, 3.7 and 3.8. For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all). diff --git a/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/_version.py b/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/_version.py index 961c76eb77c1..59deb8c7263b 100644 --- a/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/_version.py +++ b/sdk/communication/azure-mgmt-communication/azure/mgmt/communication/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "1.0.1" +VERSION = "1.1.0" diff --git a/sdk/communication/azure-mgmt-communication/setup.py b/sdk/communication/azure-mgmt-communication/setup.py index deac19c51623..ca010780da4c 100644 --- a/sdk/communication/azure-mgmt-communication/setup.py +++ b/sdk/communication/azure-mgmt-communication/setup.py @@ -51,7 +51,6 @@ 'Programming Language :: Python', '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', @@ -65,10 +64,10 @@ 'azure', 'azure.mgmt', ]), + python_requires=">=3.6", install_requires=[ 'msrest>=0.6.21', 'azure-common~=1.1', 'azure-mgmt-core>=1.3.0,<2.0.0', - ], - python_requires=">=3.6", + ] ) diff --git a/sdk/communication/ci.yml b/sdk/communication/ci.yml index 4e46e4b69fd7..40619c505859 100644 --- a/sdk/communication/ci.yml +++ b/sdk/communication/ci.yml @@ -30,8 +30,6 @@ extends: template: ../../eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: communication - MatrixFilters: - - PythonVersion=^(?!pypy3|2.7|3.6).* Artifacts: - name: azure-communication-identity safeName: azurecommunicationidentity