Hello community,
here is the log from the commit of package python-docker-pycreds for
openSUSE:Factory checked in at 2018-02-27 16:58:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-docker-pycreds (Old)
and /work/SRC/openSUSE:Factory/.python-docker-pycreds.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-docker-pycreds"
Tue Feb 27 16:58:43 2018 rev:5 rq:580065 version:0.2.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-docker-pycreds/python-docker-pycreds.changes
2017-08-16 16:12:02.175510991 +0200
+++
/work/SRC/openSUSE:Factory/.python-docker-pycreds.new/python-docker-pycreds.changes
2018-02-27 16:59:32.472609492 +0100
@@ -1,0 +2,12 @@
+Fri Feb 23 04:01:28 UTC 2018 - [email protected]
+
+- specfile:
+ * update copyright year
+ * add flake8 and pytest-cov to test requirements (according to setup.py)
+
+- update to version 0.2.2:
+ * Add support for docker-credential-pass
+ * Add test-running Dockerfile
+ * Update setup.py
+
+-------------------------------------------------------------------
Old:
----
docker-pycreds-0.2.1.tar.gz
New:
----
docker-pycreds-0.2.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-docker-pycreds.spec ++++++
--- /var/tmp/diff_new_pack.VdzyTT/_old 2018-02-27 16:59:33.140585357 +0100
+++ /var/tmp/diff_new_pack.VdzyTT/_new 2018-02-27 16:59:33.144585213 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-docker-pycreds
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -15,11 +15,12 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
+
%bcond_with test
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-docker-pycreds
-Version: 0.2.1
+Version: 0.2.2
Release: 0
Summary: Python bindings for the Docker credentials store API
License: Apache-2.0
@@ -31,6 +32,8 @@
BuildRequires: fdupes
BuildRequires: python-rpm-macros
%if %{with test}
+BuildRequires: %{python_module flake8}
+BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest}
%endif
Requires: python-six
++++++ docker-pycreds-0.2.1.tar.gz -> docker-pycreds-0.2.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-pycreds-0.2.1/PKG-INFO
new/docker-pycreds-0.2.2/PKG-INFO
--- old/docker-pycreds-0.2.1/PKG-INFO 2016-09-12 03:54:32.000000000 +0200
+++ new/docker-pycreds-0.2.2/PKG-INFO 2018-02-15 00:54:02.000000000 +0100
@@ -1,11 +1,11 @@
Metadata-Version: 1.1
Name: docker-pycreds
-Version: 0.2.1
+Version: 0.2.2
Summary: Python bindings for the docker credentials store API
-Home-page: https://github.com/shin-/docker-pycreds/
+Home-page: https://github.com/shin-/dockerpy-creds
Author: UNKNOWN
Author-email: UNKNOWN
-License: UNKNOWN
+License: Apache License 2.0
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
@@ -20,5 +20,6 @@
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: Apache Software License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/docker-pycreds-0.2.1/docker_pycreds.egg-info/PKG-INFO
new/docker-pycreds-0.2.2/docker_pycreds.egg-info/PKG-INFO
--- old/docker-pycreds-0.2.1/docker_pycreds.egg-info/PKG-INFO 2016-09-12
03:54:32.000000000 +0200
+++ new/docker-pycreds-0.2.2/docker_pycreds.egg-info/PKG-INFO 2018-02-15
00:54:02.000000000 +0100
@@ -1,11 +1,11 @@
Metadata-Version: 1.1
Name: docker-pycreds
-Version: 0.2.1
+Version: 0.2.2
Summary: Python bindings for the docker credentials store API
-Home-page: https://github.com/shin-/docker-pycreds/
+Home-page: https://github.com/shin-/dockerpy-creds
Author: UNKNOWN
Author-email: UNKNOWN
-License: UNKNOWN
+License: Apache License 2.0
Description: UNKNOWN
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
@@ -20,5 +20,6 @@
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: Apache Software License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-pycreds-0.2.1/dockerpycreds/store.py
new/docker-pycreds-0.2.2/dockerpycreds/store.py
--- old/docker-pycreds-0.2.1/dockerpycreds/store.py 2016-09-06
23:46:44.000000000 +0200
+++ new/docker-pycreds-0.2.2/dockerpycreds/store.py 2018-02-15
00:43:11.000000000 +0100
@@ -23,7 +23,18 @@
if not isinstance(server, six.binary_type):
server = server.encode('utf-8')
data = self._execute('get', server)
- return json.loads(data.decode('utf-8'))
+ result = json.loads(data.decode('utf-8'))
+
+ # docker-credential-pass will return an object for inexistent servers
+ # whereas other helpers will exit with returncode != 0. For
+ # consistency, if no significant data is returned,
+ # raise CredentialsNotFound
+ if result['Username'] == '' and result['Secret'] == '':
+ raise errors.CredentialsNotFound(
+ 'No matching credentials in {}'.format(self.program)
+ )
+
+ return result
def store(self, server, username, secret):
""" Store credentials for `server`. Raises a `StoreError` if an error
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-pycreds-0.2.1/dockerpycreds/version.py
new/docker-pycreds-0.2.2/dockerpycreds/version.py
--- old/docker-pycreds-0.2.1/dockerpycreds/version.py 2016-09-12
03:53:23.000000000 +0200
+++ new/docker-pycreds-0.2.2/dockerpycreds/version.py 2018-02-15
00:50:26.000000000 +0100
@@ -1,2 +1,2 @@
-version = "0.2.1"
+version = "0.2.2"
version_info = tuple([int(d) for d in version.split("-")[0].split(".")])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-pycreds-0.2.1/setup.py
new/docker-pycreds-0.2.2/setup.py
--- old/docker-pycreds-0.2.1/setup.py 2016-09-12 03:41:45.000000000 +0200
+++ new/docker-pycreds-0.2.2/setup.py 2018-02-15 00:46:53.000000000 +0100
@@ -22,7 +22,8 @@
name="docker-pycreds",
version=version,
description="Python bindings for the docker credentials store API",
- url='https://github.com/shin-/docker-pycreds/',
+ url='https://github.com/shin-/dockerpy-creds',
+ license='Apache License 2.0',
packages=[
'dockerpycreds',
],
@@ -43,6 +44,7 @@
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
+ 'Programming Language :: Python :: 3.6',
'Topic :: Utilities',
'License :: OSI Approved :: Apache Software License',
],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/docker-pycreds-0.2.1/tests/store_test.py
new/docker-pycreds-0.2.2/tests/store_test.py
--- old/docker-pycreds-0.2.1/tests/store_test.py 2016-09-03
04:28:43.000000000 +0200
+++ new/docker-pycreds-0.2.2/tests/store_test.py 2018-02-15
00:46:00.000000000 +0100
@@ -3,21 +3,31 @@
import pytest
import six
+from distutils.spawn import find_executable
from dockerpycreds import (
- Store, StoreError, DEFAULT_LINUX_STORE, DEFAULT_OSX_STORE
+ CredentialsNotFound, Store, StoreError, DEFAULT_LINUX_STORE,
+ DEFAULT_OSX_STORE
)
class TestStore(object):
def teardown_method(self):
for server in self.tmp_keys:
- self.store.erase(server)
+ try:
+ self.store.erase(server)
+ except StoreError:
+ pass
def setup_method(self):
self.tmp_keys = []
if sys.platform.startswith('linux'):
- self.store = Store(DEFAULT_LINUX_STORE)
+ if find_executable('docker-credential-' + DEFAULT_LINUX_STORE):
+ self.store = Store(DEFAULT_LINUX_STORE)
+ elif find_executable('docker-credential-pass'):
+ self.store = Store('pass')
+ else:
+ raise Exception('No supported docker-credential store in PATH')
elif sys.platform.startswith('darwin'):
self.store = Store(DEFAULT_OSX_STORE)
@@ -31,21 +41,21 @@
self.store.store(server=key, username='user', secret='pass')
data = self.store.get(key)
assert data == {
- 'ServerURL': '',
+ 'ServerURL': key,
'Username': 'user',
'Secret': 'pass'
}
def test_get_nonexistent(self):
key = self.get_random_servername()
- with pytest.raises(StoreError):
+ with pytest.raises(CredentialsNotFound):
self.store.get(key)
def test_store_and_erase(self):
key = self.get_random_servername()
self.store.store(server=key, username='user', secret='pass')
self.store.erase(key)
- with pytest.raises(StoreError):
+ with pytest.raises(CredentialsNotFound):
self.store.get(key)
def test_unicode_strings(self):
@@ -55,3 +65,5 @@
data = self.store.get(key)
assert data
self.store.erase(key)
+ with pytest.raises(CredentialsNotFound):
+ self.store.get(key)