Hello community,
here is the log from the commit of package python-keyring for openSUSE:Factory checked in at 2016-09-08 17:37:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-keyring (Old)
and /work/SRC/openSUSE:Factory/.python-keyring.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-keyring"
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-keyring/python-keyring.changes 2016-06-12 18:53:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-keyring.new/python-keyring.changes 2016-09-08 17:37:21.000000000 +0200
@@ -1,0 +2,36 @@
+Fri Aug 12 21:41:15 UTC 2016 - michael@stroeder.com
+
+- update to 9.3.1:
+ * Link to the new Gitter chat room is now in the
+ readme.
+ * Issue #235: ``kwallet`` backend now returns
+ string objects instead of ``dbus.String`` objects,
+ for less surprising reprs.
+ * Minor doc fixes.
+
+-------------------------------------------------------------------
+Wed Jun 29 13:34:12 UTC 2016 - tbechtold@suse.com
+
+- update to 9.3:
+9.3
+---
+* Pull Request #226: In SecretService backend, unlock
+ individual entries.
+9.2.1
+-----
+* Issue #230: Don't rely on dbus-python and instead
+ defer to SecretStorage to describe the installation
+ requirements.
+9.2
+---
+* Issue #231 via #233: On Linux, ``secretstorage``
+ is now a declared dependency, allowing recommended
+ keyring to work simply after installation.
+9.1
+---
+* Issue #83 via #229: ``kwallet`` backend now stores
+ the service name as a folder name in the backend rather
+ than storing all passwords in a Python folder.
+- Adjust Requires
+- Use pypi.io for Source url
+-------------------------------------------------------------------
Old:
----
keyring-9.0.tar.gz
New:
----
keyring-9.3.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-keyring.spec ++++++
--- /var/tmp/diff_new_pack.JZnDZA/_old 2016-09-08 17:37:21.000000000 +0200
+++ /var/tmp/diff_new_pack.JZnDZA/_new 2016-09-08 17:37:21.000000000 +0200
@@ -17,13 +17,13 @@
Name: python-keyring
-Version: 9.0
+Version: 9.3.1
Release: 0
Url: https://bitbucket.org/kang/python-keyring-lib
Summary: Store and access your passwords safely
License: Python-2.0 and MIT
Group: Development/Languages/Python
-Source: https://pypi.python.org/packages/source/k/keyring/keyring-%{version}.tar.gz
+Source: https://pypi.io/packages/source/k/keyring/keyring-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel >= 2.7
BuildRequires: python-setuptools
@@ -35,6 +35,7 @@
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires: python-unittest2
%endif
+Requires: python-SecretStorage
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
++++++ keyring-9.0.tar.gz -> keyring-9.3.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/.hgignore new/keyring-9.3.1/.hgignore
--- old/keyring-9.0/.hgignore 2016-04-10 21:46:45.000000000 +0200
+++ new/keyring-9.3.1/.hgignore 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-build
-dist
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/.hgtags new/keyring-9.3.1/.hgtags
--- old/keyring-9.0/.hgtags 2016-04-10 21:46:45.000000000 +0200
+++ new/keyring-9.3.1/.hgtags 2016-07-14 16:12:11.000000000 +0200
@@ -110,3 +110,8 @@
45a70dfe822cbdc889142e1d984a5074396ba711 8.6
87d6d34cdea1b3b40bb60c3286b672c69ec49223 8.6.1
d8633f6d4baf8abcffa80c456a89bf0ff09ff706 8.7
+a17bfebdf428e42ff31b71beee3e700b8329acdf 9.0
+e0adabb76d3d729c55c9211d9f5314fcce210149 9.1
+074f2c9cade6bc89372133e6d2674cfcff4b4194 9.2
+3cc50ae65bc4ceef0ce7d06f8b455d3e655396f3 9.2.1
+94e5cb8fd63b71ed9f711d3c3abeaaf9b7fd0e1d 9.3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/CHANGES.rst new/keyring-9.3.1/CHANGES.rst
--- old/keyring-9.0/CHANGES.rst 2016-04-10 21:46:45.000000000 +0200
+++ new/keyring-9.3.1/CHANGES.rst 2016-07-14 16:12:11.000000000 +0200
@@ -1,6 +1,43 @@
CHANGES
=======
+9.3.1
+-----
+
+* Link to the new Gitter chat room is now in the
+ readme.
+* Issue #235: ``kwallet`` backend now returns
+ string objects instead of ``dbus.String`` objects,
+ for less surprising reprs.
+* Minor doc fixes.
+
+9.3
+---
+
+* Issue #161: In SecretService backend, unlock
+ individual entries.
+
+9.2.1
+-----
+
+* Issue #230: Don't rely on dbus-python and instead
+ defer to SecretStorage to describe the installation
+ requirements.
+
+9.2
+---
+
+* Issue #231 via #233: On Linux, ``secretstorage``
+ is now a declared dependency, allowing recommended
+ keyring to work simply after installation.
+
+9.1
+---
+
+* Issue #83 via #229: ``kwallet`` backend now stores
+ the service name as a folder name in the backend rather
+ than storing all passwords in a Python folder.
+
9.0
---
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/PKG-INFO new/keyring-9.3.1/PKG-INFO
--- old/keyring-9.0/PKG-INFO 2016-04-10 21:47:14.000000000 +0200
+++ new/keyring-9.3.1/PKG-INFO 2016-07-14 16:12:52.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: keyring
-Version: 9.0
+Version: 9.3.1
Summary: Store and access your passwords safely.
Home-page: https://github.com/jaraco/keyring
Author: Jason R. Coombs
@@ -26,8 +26,9 @@
* Mac OS X `Keychain
https://en.wikipedia.org/wiki/Keychain_%28software%29`_
- * Linux Secret Service (requires `secretstorage
- https://pypi.python.org/pypi/secretstorage`_)
+ * Freedesktop `Secret Service
+ http://standards.freedesktop.org/secret-service/`_ (requires
+ `secretstorage https://pypi.python.org/pypi/secretstorage`_)
* `KWallet https://en.wikipedia.org/wiki/KWallet`_
(requires `dbus https://pypi.python.org/pypi/dbus-python`_)
* `Windows Credential Vault
@@ -40,20 +41,21 @@
Installation Instructions
-------------------------
- easy_install or pip
- ===================
+ Install from Index
+ ==================
- Run easy_install or pip::
+ Install using your favorite installer. For example:
- $ easy_install keyring
$ pip install keyring
- Source installation
- ===================
-
- Download the source tarball from https://pypi.python.org/pypi/keyring,
- uncompress it, and then run "setup.py install".
+ Linux
+ -----
+ On Linux, the recommended keyring relies on SecretStorage, which in
+ turn relies on dbus-python, but dbus-python does not install correctly
+ when using the Python installers, so dbus-python must be installed
+ as a system package. See `SecretStorage
+ https://github.com/mitya57/secretstorage`_ for details.
-------------
Using Keyring
@@ -187,6 +189,30 @@
print("failed to store password")
print("password", keyring.get_password("demo-service", "tarek"))
+
+ Using Keyring on Ubuntu 16.04
+ =============================
+
+ The following is a complete transcript for installing keyring in a
+ virtual environment on Ubuntu 16.04. No config file was used.::
+
+ $ sudo apt install python3-venv libdbus-glib-1-dev
+ $ cd /tmp
+ $ pyvenv py3
+ $ source py3/bin/activate
+ $ pip install -U pip
+ $ pip install secretstorage dbus-python
+ $ pip install keyring
+ $ python
+ >>> import keyring
+ >>> keyring.get_keyring()
+
+ >>> keyring.set_password("system", "username", "password")
+ >>> keyring.get_password("system", "username")
+ 'password'
+
+
+
Using Keyring on headless Linux systems
=======================================
@@ -269,7 +295,7 @@
-------------------
Keyring is instrumented with `pytest runner
- https://bitbucket.org/jaraco/pytest-runner`_. Thus, you may invoke the tests
+ https://github.com/pytest-dev/pytest-runner`_. Thus, you may invoke the tests
from any supported Python (with setuptools installed) using this command::
python setup.py test
@@ -319,6 +345,11 @@
.. _this post: http://tarekziade.wordpress.com/2009/03/27/pycon-hallway-session-1-a-keyring...
.. _Google Summer of Code: http://socghop.appspot.com/
+
+ .. image:: https://badges.gitter.im/jaraco/keyring.svg
+ :alt: Join the chat at https://gitter.im/jaraco/keyring
+ :target: https://gitter.im/jaraco/keyring?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
+
Keywords: keyring Keychain GnomeKeyring Kwallet password storage
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/README.rst new/keyring-9.3.1/README.rst
--- old/keyring-9.0/README.rst 2016-04-10 21:46:45.000000000 +0200
+++ new/keyring-9.3.1/README.rst 2016-07-14 16:12:11.000000000 +0200
@@ -18,8 +18,9 @@
* Mac OS X `Keychain
https://en.wikipedia.org/wiki/Keychain_%28software%29`_
-* Linux Secret Service (requires `secretstorage
- https://pypi.python.org/pypi/secretstorage`_)
+* Freedesktop `Secret Service
+ http://standards.freedesktop.org/secret-service/`_ (requires
+ `secretstorage https://pypi.python.org/pypi/secretstorage`_)
* `KWallet https://en.wikipedia.org/wiki/KWallet`_
(requires `dbus https://pypi.python.org/pypi/dbus-python`_)
* `Windows Credential Vault
@@ -32,20 +33,21 @@
Installation Instructions
-------------------------
-easy_install or pip
-===================
+Install from Index
+==================
-Run easy_install or pip::
+Install using your favorite installer. For example:
- $ easy_install keyring
$ pip install keyring
-Source installation
-===================
-
-Download the source tarball from https://pypi.python.org/pypi/keyring,
-uncompress it, and then run "setup.py install".
+Linux
+-----
+On Linux, the recommended keyring relies on SecretStorage, which in
+turn relies on dbus-python, but dbus-python does not install correctly
+when using the Python installers, so dbus-python must be installed
+as a system package. See `SecretStorage
+https://github.com/mitya57/secretstorage`_ for details.
-------------
Using Keyring
@@ -179,6 +181,30 @@
print("failed to store password")
print("password", keyring.get_password("demo-service", "tarek"))
+
+Using Keyring on Ubuntu 16.04
+=============================
+
+The following is a complete transcript for installing keyring in a
+virtual environment on Ubuntu 16.04. No config file was used.::
+
+ $ sudo apt install python3-venv libdbus-glib-1-dev
+ $ cd /tmp
+ $ pyvenv py3
+ $ source py3/bin/activate
+ $ pip install -U pip
+ $ pip install secretstorage dbus-python
+ $ pip install keyring
+ $ python
+ >>> import keyring
+ >>> keyring.get_keyring()
+
+ >>> keyring.set_password("system", "username", "password")
+ >>> keyring.get_password("system", "username")
+ 'password'
+
+
+
Using Keyring on headless Linux systems
=======================================
@@ -261,7 +287,7 @@
-------------------
Keyring is instrumented with `pytest runner
-https://bitbucket.org/jaraco/pytest-runner`_. Thus, you may invoke the tests
+https://github.com/pytest-dev/pytest-runner`_. Thus, you may invoke the tests
from any supported Python (with setuptools installed) using this command::
python setup.py test
@@ -310,3 +336,8 @@
.. _this post: http://tarekziade.wordpress.com/2009/03/27/pycon-hallway-session-1-a-keyring...
.. _Google Summer of Code: http://socghop.appspot.com/
+
+
+.. image:: https://badges.gitter.im/jaraco/keyring.svg
+ :alt: Join the chat at https://gitter.im/jaraco/keyring
+ :target: https://gitter.im/jaraco/keyring?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/hook-keyring.backend.py new/keyring-9.3.1/hook-keyring.backend.py
--- old/keyring-9.0/hook-keyring.backend.py 2016-04-10 21:46:45.000000000 +0200
+++ new/keyring-9.3.1/hook-keyring.backend.py 2016-07-14 16:12:11.000000000 +0200
@@ -7,3 +7,10 @@
'keyring.backends.' + mod_name
for mod_name in _backend_mod_names
]
+
+import pkg_resources
+
+hiddenimports.extend(
+ ep.module_name
+ for ep in pkg_resources.iter_entry_points('keyring.backends')
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/keyring/backends/SecretService.py new/keyring-9.3.1/keyring/backends/SecretService.py
--- old/keyring-9.0/keyring/backends/SecretService.py 2016-04-10 21:46:45.000000000 +0200
+++ new/keyring-9.3.1/keyring/backends/SecretService.py 2016-07-14 16:12:11.000000000 +0200
@@ -52,6 +52,9 @@
items = collection.search_items(
{"username": username, "service": service})
for item in items:
+ if hasattr(item, 'unlock'):
+ if item.is_locked() and item.unlock()[0]:
+ raise InitError('failed to unlock item')
return item.get_secret().decode('utf-8')
def set_password(self, service, username, password):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/keyring/backends/kwallet.py new/keyring-9.3.1/keyring/backends/kwallet.py
--- old/keyring-9.0/keyring/backends/kwallet.py 2016-04-10 21:46:45.000000000 +0200
+++ new/keyring-9.3.1/keyring/backends/kwallet.py 2016-07-14 16:12:11.000000000 +0200
@@ -14,7 +14,6 @@
class DBusKeyring(KeyringBackend):
"""KDE KWallet via D-Bus"""
- folder = 'Python'
appid = 'Python program'
@properties.ClassProperty
@@ -36,7 +35,29 @@
super(DBusKeyring, self).__init__(*arg, **kw)
self.handle = -1
- def connected(self):
+ def _migrate(self, service):
+ old_folder = 'Python'
+ entry_list = []
+ if self.iface.hasFolder(self.handle, old_folder, self.appid):
+ entry_list = self.iface.readPasswordList(
+ self.handle, old_folder, '*@*', self.appid)
+
+ for entry in entry_list.items():
+ key = entry[0]
+ password = entry[1]
+
+ username, service = key.rsplit('@', 1)
+ ret = self.iface.writePassword(
+ self.handle, service, username, password, self.appid)
+ if ret == 0:
+ self.iface.removeEntry(self.handle, old_folder, key, self.appid)
+
+ entry_list = self.iface.readPasswordList(
+ self.handle, old_folder, '*', self.appid)
+ if not entry_list:
+ self.iface.removeFolder(self.handle, old_folder, self.appid)
+
+ def connected(self, service):
if self.handle >= 0:
return True
bus = dbus.SessionBus()
@@ -50,39 +71,36 @@
self.handle = -1
if self.handle < 0:
return False
- if not self.iface.hasFolder(self.handle, self.folder, self.appid):
- self.iface.createFolder(self.handle, self.folder, self.appid)
+ self._migrate(service)
return True
def get_password(self, service, username):
"""Get password of the username for the service
"""
- key = username + '@' + service
- if not self.connected():
+ if not self.connected(service):
# the user pressed "cancel" when prompted to unlock their keyring.
return None
- if not self.iface.hasEntry(self.handle, self.folder, key, self.appid):
+ if not self.iface.hasEntry(self.handle, service, username, self.appid):
return None
- return self.iface.readPassword(
- self.handle, self.folder, key, self.appid)
+ password = self.iface.readPassword(
+ self.handle, service, username, self.appid)
+ return str(password)
def set_password(self, service, username, password):
"""Set password for the username of the service
"""
- key = username + '@' + service
- if not self.connected():
+ if not self.connected(service):
# the user pressed "cancel" when prompted to unlock their keyring.
raise PasswordSetError("Cancelled by user")
self.iface.writePassword(
- self.handle, self.folder, key, password, self.appid)
+ self.handle, service, username, password, self.appid)
def delete_password(self, service, username):
"""Delete the password for the username of the service.
"""
- key = username + '@' + service
- if not self.connected():
+ if not self.connected(service):
# the user pressed "cancel" when prompted to unlock their keyring.
raise PasswordDeleteError("Cancelled by user")
- if not self.iface.hasEntry(self.handle, self.folder, key, self.appid):
+ if not self.iface.hasEntry(self.handle, service, username, self.appid):
raise PasswordDeleteError("Password not found")
- self.iface.removeEntry(self.handle, self.folder, key, self.appid)
+ self.iface.removeEntry(self.handle, service, username, self.appid)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/keyring/core.py new/keyring-9.3.1/keyring/core.py
--- old/keyring-9.0/keyring/core.py 2016-04-10 21:46:45.000000000 +0200
+++ new/keyring-9.3.1/keyring/core.py 2016-07-14 16:12:11.000000000 +0200
@@ -62,7 +62,6 @@
"""
Load a keyring specified in the config file or infer the best available.
"""
- _load_library_extensions()
keyrings = filter(limit, backend.get_all_keyring())
set_keyring(
@@ -146,40 +145,5 @@
except (configparser.NoOptionError, configparser.NoSectionError):
pass
-@once
-def _load_library_extensions():
- """
- Locate all setuptools entry points by the name 'keyring backends'
- and initialize them.
-
- Any third-party library may register an entry point by adding the
- following to their setup.py::
-
- entry_points = {
- 'keyring backends': [
- 'plugin name = mylib.mymodule:initialize_func',
- ],
- },
-
- `plugin name` can be anything.
- `initialize_func` is optional and will be invoked by keyring on startup.
-
- Most plugins will simply provide or import a KeyringBackend in `mymodule`.
- """
- group = 'keyring backends'
- try:
- pkg_resources = __import__('pkg_resources')
- except ImportError:
- return
- entry_points = pkg_resources.iter_entry_points(group=group)
- for ep in entry_points:
- try:
- log.info('Loading keyring backends from %s', ep.name)
- init_func = ep.load()
- if callable(init_func):
- init_func()
- except Exception as exc:
- log.exception("Error initializing plugin %s (%s).", ep, exc)
-
# init the _keyring_backend
init_backend()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/keyring/tests/backends/test_kwallet.py new/keyring-9.3.1/keyring/tests/backends/test_kwallet.py
--- old/keyring-9.0/keyring/tests/backends/test_kwallet.py 2016-04-10 21:46:45.000000000 +0200
+++ new/keyring-9.3.1/keyring/tests/backends/test_kwallet.py 2016-07-14 16:12:11.000000000 +0200
@@ -1,11 +1,68 @@
+import string
import unittest
from keyring.backends import kwallet
+from ..util import random_string
from ..test_backend import BackendBasicTests
-
@unittest.skipUnless(kwallet.DBusKeyring.viable, "Need DBus")
class DBusKWalletTestCase(BackendBasicTests, unittest.TestCase):
+ # Remove '@' from service name as this is not supported in service names
+ # '@' will cause troubles during migration of kwallet entries
+ DIFFICULT_CHARS = BackendBasicTests.DIFFICULT_CHARS.replace('@', '')
+
def init_keyring(self):
return kwallet.DBusKeyring()
+
+ def tearDown(self):
+ for item in self.credentials_created:
+ # Suppress errors, as only one pre/post migration item will be present
+ try:
+ self.keyring.delete_password(*item)
+ except:
+ pass
+
+ # TODO Remove empty folders created during tests
+
+ def set_password(self, service, username, password, old_format=False):
+ # set the password and save the result so the test runner can clean
+ # up after if necessary.
+ self.credentials_created.add((service, username))
+
+ if old_format:
+ username = username+'@'+service
+ service = 'Python'
+
+ super(DBusKWalletTestCase, self).set_password(service, username, password)
+
+ def check_set_get(self, service, username, password):
+ keyring = self.keyring
+
+ # for the non-existent password
+ self.assertEqual(keyring.get_password(service, username), None)
+
+ # common usage
+ self.set_password(service, username, password, True)
+ # re-init keyring to force migration
+ self.keyring = keyring = self.init_keyring()
+ ret_password = keyring.get_password(service, username)
+ self.assertEqual(
+ ret_password, password,
+ "Incorrect password for username: '%s' on service: '%s'. '%s' != '%s'"
+ % (service, username, ret_password, password))
+
+ # for the empty password
+ self.set_password(service, username, "", True)
+ # re-init keyring to force migration
+ self.keyring = keyring = self.init_keyring()
+ ret_password = keyring.get_password(service, username)
+ self.assertEqual(
+ ret_password, "",
+ "Incorrect password for username: '%s' on service: '%s'. '%s' != '%s'"
+ % (service, username, ret_password, ""))
+ ret_password = keyring.get_password('Python', username+'@'+service)
+ self.assertEqual(
+ ret_password, None,
+ "Not 'None' password returned for username: '%s' on service: '%s'. '%s' != '%s'. Passwords from old folder should be deleted during migration."
+ % (service, username, ret_password, None))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/keyring/tests/test_backend.py new/keyring-9.3.1/keyring/tests/test_backend.py
--- old/keyring-9.0/keyring/tests/test_backend.py 2016-04-10 21:46:45.000000000 +0200
+++ new/keyring-9.3.1/keyring/tests/test_backend.py 2016-07-14 16:12:11.000000000 +0200
@@ -14,7 +14,6 @@
from .util import random_string
from keyring import errors
-DIFFICULT_CHARS = string.whitespace + string.punctuation
# unicode only characters
# Sourced from The Quick Brown Fox... Pangrams
# http://www.columbia.edu/~fdc/utf8/
@@ -32,6 +31,8 @@
"""Test for the keyring's basic functions. password_set and password_get
"""
+ DIFFICULT_CHARS = string.whitespace + string.punctuation
+
def setUp(self):
self.keyring = self.init_keyring()
self.credentials_created = set()
@@ -67,30 +68,30 @@
self.check_set_get(service, username, password)
def test_difficult_chars(self):
- password = random_string(20, DIFFICULT_CHARS)
- username = random_string(20, DIFFICULT_CHARS)
- service = random_string(20, DIFFICULT_CHARS)
+ password = random_string(20, self.DIFFICULT_CHARS)
+ username = random_string(20, self.DIFFICULT_CHARS)
+ service = random_string(20, self.DIFFICULT_CHARS)
self.check_set_get(service, username, password)
def test_delete_present(self):
- password = random_string(20, DIFFICULT_CHARS)
- username = random_string(20, DIFFICULT_CHARS)
- service = random_string(20, DIFFICULT_CHARS)
+ password = random_string(20, self.DIFFICULT_CHARS)
+ username = random_string(20, self.DIFFICULT_CHARS)
+ service = random_string(20, self.DIFFICULT_CHARS)
self.keyring.set_password(service, username, password)
self.keyring.delete_password(service, username)
self.assertIsNone(self.keyring.get_password(service, username))
def test_delete_not_present(self):
- username = random_string(20, DIFFICULT_CHARS)
- service = random_string(20, DIFFICULT_CHARS)
+ username = random_string(20, self.DIFFICULT_CHARS)
+ service = random_string(20, self.DIFFICULT_CHARS)
self.assertRaises(errors.PasswordDeleteError,
self.keyring.delete_password, service, username)
def test_delete_one_in_group(self):
- username1 = random_string(20, DIFFICULT_CHARS)
- username2 = random_string(20, DIFFICULT_CHARS)
- password = random_string(20, DIFFICULT_CHARS)
- service = random_string(20, DIFFICULT_CHARS)
+ username1 = random_string(20, self.DIFFICULT_CHARS)
+ username2 = random_string(20, self.DIFFICULT_CHARS)
+ password = random_string(20, self.DIFFICULT_CHARS)
+ service = random_string(20, self.DIFFICULT_CHARS)
self.keyring.set_password(service, username1, password)
self.set_password(service, username2, password)
self.keyring.delete_password(service, username1)
@@ -105,7 +106,7 @@
def test_unicode_and_ascii_chars(self):
source = (random_string(10, UNICODE_CHARS) + random_string(10) +
- random_string(10, DIFFICULT_CHARS))
+ random_string(10, self.DIFFICULT_CHARS))
password = random_string(20, source)
username = random_string(20, source)
service = random_string(20, source)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/keyring.egg-info/PKG-INFO new/keyring-9.3.1/keyring.egg-info/PKG-INFO
--- old/keyring-9.0/keyring.egg-info/PKG-INFO 2016-04-10 21:47:14.000000000 +0200
+++ new/keyring-9.3.1/keyring.egg-info/PKG-INFO 2016-07-14 16:12:52.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: keyring
-Version: 9.0
+Version: 9.3.1
Summary: Store and access your passwords safely.
Home-page: https://github.com/jaraco/keyring
Author: Jason R. Coombs
@@ -26,8 +26,9 @@
* Mac OS X `Keychain
https://en.wikipedia.org/wiki/Keychain_%28software%29`_
- * Linux Secret Service (requires `secretstorage
- https://pypi.python.org/pypi/secretstorage`_)
+ * Freedesktop `Secret Service
+ http://standards.freedesktop.org/secret-service/`_ (requires
+ `secretstorage https://pypi.python.org/pypi/secretstorage`_)
* `KWallet https://en.wikipedia.org/wiki/KWallet`_
(requires `dbus https://pypi.python.org/pypi/dbus-python`_)
* `Windows Credential Vault
@@ -40,20 +41,21 @@
Installation Instructions
-------------------------
- easy_install or pip
- ===================
+ Install from Index
+ ==================
- Run easy_install or pip::
+ Install using your favorite installer. For example:
- $ easy_install keyring
$ pip install keyring
- Source installation
- ===================
-
- Download the source tarball from https://pypi.python.org/pypi/keyring,
- uncompress it, and then run "setup.py install".
+ Linux
+ -----
+ On Linux, the recommended keyring relies on SecretStorage, which in
+ turn relies on dbus-python, but dbus-python does not install correctly
+ when using the Python installers, so dbus-python must be installed
+ as a system package. See `SecretStorage
+ https://github.com/mitya57/secretstorage`_ for details.
-------------
Using Keyring
@@ -187,6 +189,30 @@
print("failed to store password")
print("password", keyring.get_password("demo-service", "tarek"))
+
+ Using Keyring on Ubuntu 16.04
+ =============================
+
+ The following is a complete transcript for installing keyring in a
+ virtual environment on Ubuntu 16.04. No config file was used.::
+
+ $ sudo apt install python3-venv libdbus-glib-1-dev
+ $ cd /tmp
+ $ pyvenv py3
+ $ source py3/bin/activate
+ $ pip install -U pip
+ $ pip install secretstorage dbus-python
+ $ pip install keyring
+ $ python
+ >>> import keyring
+ >>> keyring.get_keyring()
+
+ >>> keyring.set_password("system", "username", "password")
+ >>> keyring.get_password("system", "username")
+ 'password'
+
+
+
Using Keyring on headless Linux systems
=======================================
@@ -269,7 +295,7 @@
-------------------
Keyring is instrumented with `pytest runner
- https://bitbucket.org/jaraco/pytest-runner`_. Thus, you may invoke the tests
+ https://github.com/pytest-dev/pytest-runner`_. Thus, you may invoke the tests
from any supported Python (with setuptools installed) using this command::
python setup.py test
@@ -319,6 +345,11 @@
.. _this post: http://tarekziade.wordpress.com/2009/03/27/pycon-hallway-session-1-a-keyring...
.. _Google Summer of Code: http://socghop.appspot.com/
+
+ .. image:: https://badges.gitter.im/jaraco/keyring.svg
+ :alt: Join the chat at https://gitter.im/jaraco/keyring
+ :target: https://gitter.im/jaraco/keyring?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge
+
Keywords: keyring Keychain GnomeKeyring Kwallet password storage
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/keyring.egg-info/SOURCES.txt new/keyring-9.3.1/keyring.egg-info/SOURCES.txt
--- old/keyring-9.0/keyring.egg-info/SOURCES.txt 2016-04-10 21:47:14.000000000 +0200
+++ new/keyring-9.3.1/keyring.egg-info/SOURCES.txt 2016-07-14 16:12:52.000000000 +0200
@@ -1,5 +1,4 @@
.gitignore
-.hgignore
.hgtags
.travis.yml
CHANGES.rst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/keyring.egg-info/requires.txt new/keyring-9.3.1/keyring.egg-info/requires.txt
--- old/keyring-9.0/keyring.egg-info/requires.txt 2016-04-10 21:47:14.000000000 +0200
+++ new/keyring-9.3.1/keyring.egg-info/requires.txt 2016-07-14 16:12:52.000000000 +0200
@@ -1,4 +1,7 @@
+[:sys_platform=="linux2" or sys_platform=="linux"]
+secretstorage
+
[:sys_platform=="win32"]
pywin32-ctypes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/keyring-9.0/setup.py new/keyring-9.3.1/setup.py
--- old/keyring-9.0/setup.py 2016-04-10 21:46:45.000000000 +0200
+++ new/keyring-9.3.1/setup.py 2016-07-14 16:12:11.000000000 +0200
@@ -38,6 +38,9 @@
extras_require={
'test': test_requirements,
':sys_platform=="win32"': ['pywin32-ctypes'],
+ ':sys_platform=="linux2" or sys_platform=="linux"': [
+ "secretstorage",
+ ],
},
setup_requires=[
'setuptools_scm>=1.9',