[Python-modules-commits] r25190 - in packages/python-keyring/trunk/debian (3 files)

mitya57-guest at users.alioth.debian.org mitya57-guest at users.alioth.debian.org
Sun Jul 14 15:46:41 UTC 2013


    Date: Sunday, July 14, 2013 @ 15:46:40
  Author: mitya57-guest
Revision: 25190

Update to 1.6, drop upstream backend-compatibility.patch

Modified:
  packages/python-keyring/trunk/debian/changelog
  packages/python-keyring/trunk/debian/patches/series
Deleted:
  packages/python-keyring/trunk/debian/patches/backend-compatibility.patch

Modified: packages/python-keyring/trunk/debian/changelog
===================================================================
--- packages/python-keyring/trunk/debian/changelog	2013-07-14 14:51:05 UTC (rev 25189)
+++ packages/python-keyring/trunk/debian/changelog	2013-07-14 15:46:40 UTC (rev 25190)
@@ -1,17 +1,17 @@
-python-keyring (1.5-1) UNRELEASED; urgency=low
+python-keyring (1.6-1) UNRELEASED; urgency=low
 
   [ Dmitry Shachnev ]
   * New upstream release.
+    - Fixes incompatibility between GNOME Keyring and SecretService
+      backends (closes: #714440).
+    - Removes warning when gnome-keyring is not available (LP: #1197988).
   * Drop fix-importkiller.patch, applied upstream.
-  * debian/patches/backend-compatibility.patch: make the GNOME Keyring
-    backend compatible with passwords stored using the SecretService
-    backend (closes: #714440).
 
   [ Sebastian Ramacher ]
   * debian/control: Update homepage to point to the Bitbucket repository. The
     old homepage 404s.
 
- -- Dmitry Shachnev <mitya57 at gmail.com>  Sat, 29 Jun 2013 12:39:14 +0400
+ -- Dmitry Shachnev <mitya57 at gmail.com>  Sun, 14 Jul 2013 19:39:12 +0400
 
 python-keyring (1.4-1) unstable; urgency=low
 

Deleted: packages/python-keyring/trunk/debian/patches/backend-compatibility.patch
===================================================================
--- packages/python-keyring/trunk/debian/patches/backend-compatibility.patch	2013-07-14 14:51:05 UTC (rev 25189)
+++ packages/python-keyring/trunk/debian/patches/backend-compatibility.patch	2013-07-14 15:46:40 UTC (rev 25190)
@@ -1,105 +0,0 @@
-Description: compatibility improvements for GNOME Keyring backend
- - Use the same attributes (username / service) as the SecretService
-   backend uses, allow searching for old ones for compatibility.
- - Also set application attribute.
- - Correctly handle all types of errors, not only CANCELLED and NO_MATCH.
-Author: Dmitry Shachnev <mitya57 at gmail.com>
-Forwarded: yes, https://bitbucket.org/kang/python-keyring-lib/pull-request/33/
-Bug: https://bitbucket.org/kang/python-keyring-lib/issue/104/
-Last-Update: 2013-06-29
-
---- a/keyring/backends/Gnome.py
-+++ b/keyring/backends/Gnome.py
-@@ -23,27 +23,34 @@
-             else:
-                 return 0
- 
-+    def _find_passwords(self, service, username, deleting=False):
-+        from gi.repository import GnomeKeyring
-+        passwords = []
-+
-+        service = self._safe_string(service)
-+        username = self._safe_string(username)
-+        for attrs_tuple in (('username', 'service'), ('user', 'domain')):
-+            attrs = GnomeKeyring.Attribute.list_new()
-+            GnomeKeyring.Attribute.list_append_string(attrs, attrs_tuple[0], username)
-+            GnomeKeyring.Attribute.list_append_string(attrs, attrs_tuple[1], service)
-+            result, items = GnomeKeyring.find_items_sync(
-+                GnomeKeyring.ItemType.NETWORK_PASSWORD, attrs)
-+            if result == GnomeKeyring.Result.OK:
-+                passwords += items
-+            elif deleting:
-+                if result == GnomeKeyring.Result.CANCELLED:
-+                    raise PasswordDeleteError("Cancelled by user")
-+                elif result != GnomeKeyring.Result.NO_MATCH:
-+                    raise PasswordDeleteError(result.value_name)
-+        return passwords
-+
-     def get_password(self, service, username):
-         """Get password of the username for the service
-         """
--        from gi.repository import GnomeKeyring
--
--        service = self._safe_string(service)
--        username = self._safe_string(username)
--        attrs = GnomeKeyring.Attribute.list_new()
--        GnomeKeyring.Attribute.list_append_string(attrs, 'user', username)
--        GnomeKeyring.Attribute.list_append_string(attrs, 'domain', service)
--        result, items = GnomeKeyring.find_items_sync(
--            GnomeKeyring.ItemType.NETWORK_PASSWORD, attrs)
--        if result == GnomeKeyring.Result.IO_ERROR:
--            return None
--        if result == GnomeKeyring.Result.NO_MATCH:
--            return None
--        if result == GnomeKeyring.Result.CANCELLED:
--            # The user pressed "Cancel" when prompted to unlock their keyring.
-+        items = self._find_passwords(service, username)
-+        if not items:
-             return None
- 
--        assert len(items) == 1, 'no more than one entry should ever match'
-         secret = items[0].secret
-         return secret if isinstance(secret, unicode) else secret.decode('utf-8')
- 
-@@ -56,8 +63,9 @@
-         username = self._safe_string(username)
-         password = self._safe_string(password)
-         attrs = GnomeKeyring.Attribute.list_new()
--        GnomeKeyring.Attribute.list_append_string(attrs, 'user', username)
--        GnomeKeyring.Attribute.list_append_string(attrs, 'domain', service)
-+        GnomeKeyring.Attribute.list_append_string(attrs, 'username', username)
-+        GnomeKeyring.Attribute.list_append_string(attrs, 'service', service)
-+        GnomeKeyring.Attribute.list_append_string(attrs, 'application', 'python-keyring')
-         result = GnomeKeyring.item_create_sync(
-             self.KEYRING_NAME, GnomeKeyring.ItemType.NETWORK_PASSWORD,
-             "Password for '%s' on '%s'" % (username, service),
-@@ -65,23 +73,23 @@
-         if result == GnomeKeyring.Result.CANCELLED:
-             # The user pressed "Cancel" when prompted to unlock their keyring.
-             raise PasswordSetError("Cancelled by user")
-+        elif result != GnomeKeyring.Result.OK:
-+            raise PasswordSetError(result.value_name)
- 
-     def delete_password(self, service, username):
-         """Delete the password for the username of the service.
-         """
-         from gi.repository import GnomeKeyring
--        attrs = GnomeKeyring.Attribute.list_new()
--        GnomeKeyring.Attribute.list_append_string(attrs, 'user', username)
--        GnomeKeyring.Attribute.list_append_string(attrs, 'domain', service)
--        result, items = GnomeKeyring.find_items_sync(
--            GnomeKeyring.ItemType.NETWORK_PASSWORD, attrs)
--        if result == GnomeKeyring.Result.NO_MATCH:
-+        items = self._find_passwords(service, username, deleting=True)
-+        if not items:
-             raise PasswordDeleteError("Password not found")
-         for current in items:
-             result = GnomeKeyring.item_delete_sync(current.keyring,
-                                                    current.item_id)
-             if result == GnomeKeyring.Result.CANCELLED:
-                 raise PasswordDeleteError("Cancelled by user")
-+            elif result != GnomeKeyring.Result.OK:
-+                raise PasswordDeleteError(result.value_name)
- 
-     def _safe_string(self, source, encoding='utf-8'):
-         """Convert unicode to string as gnomekeyring barfs on unicode"""

Modified: packages/python-keyring/trunk/debian/patches/series
===================================================================
--- packages/python-keyring/trunk/debian/patches/series	2013-07-14 14:51:05 UTC (rev 25189)
+++ packages/python-keyring/trunk/debian/patches/series	2013-07-14 15:46:40 UTC (rev 25190)
@@ -1,3 +1,2 @@
 no-pytest-runner.patch
 catch-dbus-errors.patch
-backend-compatibility.patch




More information about the Python-modules-commits mailing list