Skip to content

Commit 1d2eccb

Browse files
authored
enable identity for py27 (Azure#22341)
* enable identity for py27 * update
1 parent 3694201 commit 1d2eccb

File tree

10 files changed

+35
-8
lines changed

10 files changed

+35
-8
lines changed

sdk/appconfiguration/azure-appconfiguration/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
classifiers=[
6060
"Development Status :: 5 - Production/Stable",
6161
"Programming Language :: Python",
62-
"Programming Language :: Python :: 3",
62+
"Programming Language :: Python :: 3 :: Only",
6363
"Programming Language :: Python :: 3.7",
6464
"Programming Language :: Python :: 3.8",
6565
"Programming Language :: Python :: 3.9",

sdk/identity/azure-identity/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
import six
1010
from azure.identity._constants import DEVELOPER_SIGN_ON_CLIENT_ID, EnvironmentVariables
1111

12+
if sys.version_info < (3, 5, 3):
13+
collect_ignore_glob = ["*_async.py"]
14+
1215

1316
RECORD_IMDS = "--record-imds"
1417

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
../../core/azure-core
2-
aiohttp>=3.0
2+
aiohttp>=3.0; python_version >= '3.5'
3+
mock;python_version<"3.3"
34
typing_extensions>=3.7.2
45
-e ../../../tools/azure-sdk-tools
56
-e ../../../tools/azure-devtools
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[bdist_wheel]
2+
universal=1

sdk/identity/azure-identity/setup.py

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,21 @@
1515
package_folder_path = PACKAGE_NAME.replace("-", "/")
1616
namespace_name = PACKAGE_NAME.replace("-", ".")
1717

18+
# azure v0.x is not compatible with this package
19+
# azure v0.x used to have a __version__ attribute (newer versions don't)
20+
try:
21+
import azure
22+
23+
try:
24+
ver = azure.__version__ # type: ignore
25+
raise Exception(
26+
"This package is incompatible with azure=={}. ".format(ver) + 'Uninstall it with "pip uninstall azure".'
27+
)
28+
except AttributeError:
29+
pass
30+
except ImportError:
31+
pass
32+
1833
with open(os.path.join(package_folder_path, "_version.py"), "r") as fd:
1934
VERSION = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) # type: ignore
2035
if not VERSION:
@@ -39,7 +54,10 @@
3954
classifiers=[
4055
"Development Status :: 5 - Production/Stable",
4156
"Programming Language :: Python",
57+
"Programming Language :: Python :: 2",
58+
"Programming Language :: Python :: 2.7",
4259
"Programming Language :: Python :: 3",
60+
"Programming Language :: Python :: 3.6",
4361
"Programming Language :: Python :: 3.7",
4462
"Programming Language :: Python :: 3.8",
4563
"Programming Language :: Python :: 3.9",
@@ -54,12 +72,15 @@
5472
"azure",
5573
]
5674
),
57-
python_requires=">=3.7",
5875
install_requires=[
5976
"azure-core<2.0.0,>=1.11.0",
6077
"cryptography>=2.5",
6178
"msal<2.0.0,>=1.12.0",
6279
"msal-extensions~=0.3.0",
6380
"six>=1.12.0",
6481
],
82+
extras_require={
83+
":python_version<'3.0'": ["azure-nspkg"],
84+
":python_version<'3.5'": ["typing"],
85+
},
6586
)

sdk/synapse/azure-synapse-accesscontrol/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
classifiers=[
5050
'Development Status :: 4 - Beta',
5151
'Programming Language :: Python',
52-
'Programming Language :: Python :: 3',
52+
"Programming Language :: Python :: 3 :: Only",
5353
'Programming Language :: Python :: 3.7',
5454
'Programming Language :: Python :: 3.8',
5555
'Programming Language :: Python :: 3.9',

sdk/synapse/azure-synapse-artifacts/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
classifiers=[
5050
"Development Status :: 5 - Production/Stable",
5151
'Programming Language :: Python',
52-
'Programming Language :: Python :: 3',
52+
"Programming Language :: Python :: 3 :: Only",
5353
'Programming Language :: Python :: 3.7',
5454
'Programming Language :: Python :: 3.8',
5555
'Programming Language :: Python :: 3.9',

sdk/synapse/azure-synapse-managedprivateendpoints/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
classifiers=[
5050
'Development Status :: 4 - Beta',
5151
'Programming Language :: Python',
52-
'Programming Language :: Python :: 3',
52+
"Programming Language :: Python :: 3 :: Only",
5353
'Programming Language :: Python :: 3.7',
5454
'Programming Language :: Python :: 3.8',
5555
'Programming Language :: Python :: 3.9',

sdk/synapse/azure-synapse-monitoring/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
classifiers=[
5050
'Development Status :: 4 - Beta',
5151
'Programming Language :: Python',
52-
'Programming Language :: Python :: 3',
52+
"Programming Language :: Python :: 3 :: Only",
5353
'Programming Language :: Python :: 3.7',
5454
'Programming Language :: Python :: 3.8',
5555
'Programming Language :: Python :: 3.9',

sdk/synapse/azure-synapse-spark/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
classifiers=[
5050
'Development Status :: 4 - Beta',
5151
'Programming Language :: Python',
52-
'Programming Language :: Python :: 3',
52+
"Programming Language :: Python :: 3 :: Only",
5353
'Programming Language :: Python :: 3.7',
5454
'Programming Language :: Python :: 3.8',
5555
'Programming Language :: Python :: 3.9',

0 commit comments

Comments
 (0)