Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Azure KeyVault Secrets Py3 only #22192

Merged
merged 3 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion eng/pipelines/templates/variables/globals.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
variables:
PythonVersion: '3.6'
PythonVersion: '3.9'
skipComponentGovernanceDetection: true
AzureSDKCondaChannel: https://azuresdkconda.blob.core.windows.net/channel1/
4 changes: 2 additions & 2 deletions sdk/keyvault/azure-keyvault-secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,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
Expand All @@ -30,7 +30,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
Expand Down
2 changes: 0 additions & 2 deletions sdk/keyvault/azure-keyvault-secrets/setup.cfg

This file was deleted.

26 changes: 2 additions & 24 deletions sdk/keyvault/azure-keyvault-secrets/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,6 @@
# a-b-c => a.b.c
NAMESPACE_NAME = PACKAGE_NAME.replace("-", ".")

# azure v0.x is not compatible with this package
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@scbedd should these changes also be made in azure-template?

# 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)
Expand All @@ -61,11 +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.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
Expand All @@ -82,14 +64,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"],
},
)