diff --git a/sdk/appconfiguration/azure-appconfiguration/setup.py b/sdk/appconfiguration/azure-appconfiguration/setup.py index 2198cba26ad8..cde22d49f3de 100644 --- a/sdk/appconfiguration/azure-appconfiguration/setup.py +++ b/sdk/appconfiguration/azure-appconfiguration/setup.py @@ -59,7 +59,7 @@ classifiers=[ "Development Status :: 5 - Production/Stable", "Programming Language :: Python", - "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", diff --git a/sdk/identity/azure-identity/conftest.py b/sdk/identity/azure-identity/conftest.py index 4416068398c0..f4a2f5d3f700 100644 --- a/sdk/identity/azure-identity/conftest.py +++ b/sdk/identity/azure-identity/conftest.py @@ -9,6 +9,9 @@ import six from azure.identity._constants import DEVELOPER_SIGN_ON_CLIENT_ID, EnvironmentVariables +if sys.version_info < (3, 5, 3): + collect_ignore_glob = ["*_async.py"] + RECORD_IMDS = "--record-imds" diff --git a/sdk/identity/azure-identity/dev_requirements.txt b/sdk/identity/azure-identity/dev_requirements.txt index 56bb4a6b7a59..414d718794ab 100644 --- a/sdk/identity/azure-identity/dev_requirements.txt +++ b/sdk/identity/azure-identity/dev_requirements.txt @@ -1,5 +1,6 @@ ../../core/azure-core -aiohttp>=3.0 +aiohttp>=3.0; python_version >= '3.5' +mock;python_version<"3.3" typing_extensions>=3.7.2 -e ../../../tools/azure-sdk-tools -e ../../../tools/azure-devtools \ No newline at end of file diff --git a/sdk/identity/azure-identity/setup.cfg b/sdk/identity/azure-identity/setup.cfg new file mode 100644 index 000000000000..3c6e79cf31da --- /dev/null +++ b/sdk/identity/azure-identity/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/sdk/identity/azure-identity/setup.py b/sdk/identity/azure-identity/setup.py index 1dc4634d36da..3509a0780fba 100644 --- a/sdk/identity/azure-identity/setup.py +++ b/sdk/identity/azure-identity/setup.py @@ -15,6 +15,21 @@ package_folder_path = PACKAGE_NAME.replace("-", "/") 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 + 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 if not VERSION: @@ -39,7 +54,10 @@ classifiers=[ "Development Status :: 5 - Production/Stable", "Programming Language :: Python", + "Programming Language :: Python :: 2", + "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", @@ -54,7 +72,6 @@ "azure", ] ), - python_requires=">=3.7", install_requires=[ "azure-core<2.0.0,>=1.11.0", "cryptography>=2.5", @@ -62,4 +79,8 @@ "msal-extensions~=0.3.0", "six>=1.12.0", ], + extras_require={ + ":python_version<'3.0'": ["azure-nspkg"], + ":python_version<'3.5'": ["typing"], + }, ) diff --git a/sdk/synapse/azure-synapse-accesscontrol/setup.py b/sdk/synapse/azure-synapse-accesscontrol/setup.py index 78178fca2ad8..019297e1e574 100644 --- a/sdk/synapse/azure-synapse-accesscontrol/setup.py +++ b/sdk/synapse/azure-synapse-accesscontrol/setup.py @@ -49,7 +49,7 @@ classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python', - 'Programming Language :: Python :: 3', + "Programming Language :: Python :: 3 :: Only", 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', diff --git a/sdk/synapse/azure-synapse-artifacts/setup.py b/sdk/synapse/azure-synapse-artifacts/setup.py index 23a1c6b9af30..f669908d89aa 100644 --- a/sdk/synapse/azure-synapse-artifacts/setup.py +++ b/sdk/synapse/azure-synapse-artifacts/setup.py @@ -49,7 +49,7 @@ classifiers=[ "Development Status :: 5 - Production/Stable", 'Programming Language :: Python', - 'Programming Language :: Python :: 3', + "Programming Language :: Python :: 3 :: Only", 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', diff --git a/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py b/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py index 3d7c1b7eeb5e..f94b764df3a6 100644 --- a/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py +++ b/sdk/synapse/azure-synapse-managedprivateendpoints/setup.py @@ -49,7 +49,7 @@ classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python', - 'Programming Language :: Python :: 3', + "Programming Language :: Python :: 3 :: Only", 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', diff --git a/sdk/synapse/azure-synapse-monitoring/setup.py b/sdk/synapse/azure-synapse-monitoring/setup.py index 4a1d2c87cb84..4314f76d6bbb 100644 --- a/sdk/synapse/azure-synapse-monitoring/setup.py +++ b/sdk/synapse/azure-synapse-monitoring/setup.py @@ -49,7 +49,7 @@ classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python', - 'Programming Language :: Python :: 3', + "Programming Language :: Python :: 3 :: Only", 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', diff --git a/sdk/synapse/azure-synapse-spark/setup.py b/sdk/synapse/azure-synapse-spark/setup.py index f25982560a24..9a5e1f7080e5 100644 --- a/sdk/synapse/azure-synapse-spark/setup.py +++ b/sdk/synapse/azure-synapse-spark/setup.py @@ -49,7 +49,7 @@ classifiers=[ 'Development Status :: 4 - Beta', 'Programming Language :: Python', - 'Programming Language :: Python :: 3', + "Programming Language :: Python :: 3 :: Only", 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9',