Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit 735325d

Browse files
committed
Remove keyring as a dependency
1 parent 11a2bf1 commit 735325d

File tree

6 files changed

+19
-8
lines changed

6 files changed

+19
-8
lines changed

README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ To install:
2020
Release History
2121
---------------
2222

23+
2018-04-23 Version 0.4.28
24+
+++++++++++++++++++++++++
25+
26+
**Disclaimer**
27+
28+
Do to some stability issues with "keyring" dependency that highly change from one system to another,
29+
this package is no longer a dependency of this "msrestazure".
30+
If you were using the secured token cache of `ServicePrincipalCredentials` and `UserPassCredentials`,
31+
the feature is still available, but you need to install manually "keyring". The functionnality will activate automatically.
32+
2333
2018-04-18 Version 0.4.27
2434
+++++++++++++++++++++++++
2535

doc/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@
6363
# built documents.
6464
#
6565
# The short X.Y version.
66-
version = '0.4.27'
66+
version = '0.4.28'
6767
# The full version, including alpha/beta/rc tags.
68-
release = '0.4.27'
68+
release = '0.4.28'
6969

7070
# The language for content autogenerated by Sphinx. Refer to documentation
7171
# for a list of supported languages.

msrestazure/azure_active_directory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
_LOGGER = logging.getLogger(__name__)
6363

6464
if not keyring:
65-
_LOGGER.warning("Cannot load keyring on your system: %s", KEYRING_EXCEPTION)
65+
_LOGGER.warning("Cannot load 'keyring' on your system (even not installed, or not configured correctly): %s", KEYRING_EXCEPTION)
6666

6767
def _build_url(uri, paths, scheme):
6868
"""Combine URL parts.

msrestazure/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
# --------------------------------------------------------------------------
2626

2727
#: version of the package. Use msrestazure.__version__ instead.
28-
msrestazure_version = "0.4.27"
28+
msrestazure_version = "0.4.28"

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
setup(
3030
name='msrestazure',
31-
version='0.4.27',
31+
version='0.4.28',
3232
author='Microsoft Corporation',
3333
author_email='azpysdkhelp@microsoft.com',
3434
packages=find_packages(exclude=["tests", "tests.*"]),
@@ -50,7 +50,6 @@
5050
'Topic :: Software Development'],
5151
install_requires=[
5252
"msrest>=0.4.28,<2.0.0",
53-
"keyring>=5.6",
5453
"adal~=0.5.0"
5554
],
5655
)

tests/test_auth.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@ def test_store_token(self, mock_keyring):
136136
str({'token_type':'1', 'access_token':'2'}))
137137

138138
@unittest.skipIf(sys.version_info < (3,4), "assertLogs not supported before 3.4")
139-
@mock.patch('msrestazure.azure_active_directory.keyring.set_password')
139+
@mock.patch('msrestazure.azure_active_directory.keyring')
140140
def test_store_token_boom(self, mock_keyring):
141141

142-
mock_keyring.side_effect = Exception('Boom!')
142+
def boom(*args, **kwargs):
143+
raise Exception("Boom!")
144+
mock_keyring.set_password = boom
143145

144146
mix = AADMixin(None, None)
145147
mix.cred_store = "store_name"

0 commit comments

Comments
 (0)