New Upstream Snapshot - docker-pycreds

Ready changes

Summary

Merged new upstream version: 0.4.0+git20181130.1.9c0b66d (was: 0.3.0).

Resulting package

Built on 2023-01-22T06:01 (took 4m17s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-snapshots python3-dockerpycreds

Lintian Result

Diff

diff --git a/PKG-INFO b/PKG-INFO
index 0cec3f7..d948377 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,25 +1,57 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: docker-pycreds
-Version: 0.3.0
+Version: 0.4.0
 Summary: Python bindings for the docker credentials store API
 Home-page: https://github.com/shin-/dockerpy-creds
-Author: UNKNOWN
-Author-email: UNKNOWN
 License: Apache License 2.0
-Description: UNKNOWN
-Platform: UNKNOWN
 Classifier: Development Status :: 4 - Beta
 Classifier: Environment :: Other Environment
 Classifier: Intended Audience :: Developers
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-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
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Description-Content-Type: text/markdown
+License-File: LICENSE
+
+# docker-pycreds
+
+[![CircleCI](https://circleci.com/gh/shin-/dockerpy-creds/tree/master.svg?style=svg)](https://circleci.com/gh/shin-/dockerpy-creds/tree/master)
+
+Python bindings for the docker credentials store API
+
+## Credentials store info
+
+[Docker documentation page](https://docs.docker.com/engine/reference/commandline/login/#/credentials-store)
+
+## Requirements
+
+On top of the dependencies in `requirements.txt`, the `docker-credential`
+executable for the platform must be installed on the user's system.
+
+## API usage
+
+```python
+
+import dockerpycreds
+
+store = dockerpycreds.Store('secretservice')
+store.store(
+    server='https://index.docker.io/v1/', username='johndoe',
+    secret='hunter2'
+)
+
+print(store.list())
+
+print(store.get('https://index.docker.io/v1/'))
+
+
+store.erase('https://index.docker.io/v1/')
+```
diff --git a/README.md b/README.md
index 548c7fb..a1d3137 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,11 @@ store.store(
     server='https://index.docker.io/v1/', username='johndoe',
     secret='hunter2'
 )
-print store.get('https://index.docker.io/v1/')
+
+print(store.list())
+
+print(store.get('https://index.docker.io/v1/'))
+
 
 store.erase('https://index.docker.io/v1/')
 ```
diff --git a/debian/changelog b/debian/changelog
index 559c4cb..001c78c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+docker-pycreds (0.4.0+git20181130.1.9c0b66d-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sun, 22 Jan 2023 05:57:55 -0000
+
 docker-pycreds (0.3.0-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff --git a/debian/patches/Relax-test-dependencies.patch b/debian/patches/Relax-test-dependencies.patch
index 2c11eec..d58c52d 100644
--- a/debian/patches/Relax-test-dependencies.patch
+++ b/debian/patches/Relax-test-dependencies.patch
@@ -7,10 +7,10 @@ Otherwise setup.py will try to download them
  test-requirements.txt | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/test-requirements.txt b/test-requirements.txt
-index 9dc5b8b..fc72390 100644
---- a/test-requirements.txt
-+++ b/test-requirements.txt
+Index: docker-pycreds.git/test-requirements.txt
+===================================================================
+--- docker-pycreds.git.orig/test-requirements.txt
++++ docker-pycreds.git/test-requirements.txt
 @@ -1,3 +1,3 @@
 -pytest==3.0.2
 -flake8==2.4.1
diff --git a/docker_pycreds.egg-info/PKG-INFO b/docker_pycreds.egg-info/PKG-INFO
index 0cec3f7..d948377 100644
--- a/docker_pycreds.egg-info/PKG-INFO
+++ b/docker_pycreds.egg-info/PKG-INFO
@@ -1,25 +1,57 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
 Name: docker-pycreds
-Version: 0.3.0
+Version: 0.4.0
 Summary: Python bindings for the docker credentials store API
 Home-page: https://github.com/shin-/dockerpy-creds
-Author: UNKNOWN
-Author-email: UNKNOWN
 License: Apache License 2.0
-Description: UNKNOWN
-Platform: UNKNOWN
 Classifier: Development Status :: 4 - Beta
 Classifier: Environment :: Other Environment
 Classifier: Intended Audience :: Developers
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-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
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
+Description-Content-Type: text/markdown
+License-File: LICENSE
+
+# docker-pycreds
+
+[![CircleCI](https://circleci.com/gh/shin-/dockerpy-creds/tree/master.svg?style=svg)](https://circleci.com/gh/shin-/dockerpy-creds/tree/master)
+
+Python bindings for the docker credentials store API
+
+## Credentials store info
+
+[Docker documentation page](https://docs.docker.com/engine/reference/commandline/login/#/credentials-store)
+
+## Requirements
+
+On top of the dependencies in `requirements.txt`, the `docker-credential`
+executable for the platform must be installed on the user's system.
+
+## API usage
+
+```python
+
+import dockerpycreds
+
+store = dockerpycreds.Store('secretservice')
+store.store(
+    server='https://index.docker.io/v1/', username='johndoe',
+    secret='hunter2'
+)
+
+print(store.list())
+
+print(store.get('https://index.docker.io/v1/'))
+
+
+store.erase('https://index.docker.io/v1/')
+```
diff --git a/docker_pycreds.egg-info/requires.txt b/docker_pycreds.egg-info/requires.txt
index e73dacc..3fd3941 100644
--- a/docker_pycreds.egg-info/requires.txt
+++ b/docker_pycreds.egg-info/requires.txt
@@ -1 +1 @@
-six >= 1.4.0
+six>=1.4.0
diff --git a/dockerpycreds/errors.py b/dockerpycreds/errors.py
index 9e4695c..42a1bc1 100644
--- a/dockerpycreds/errors.py
+++ b/dockerpycreds/errors.py
@@ -14,12 +14,12 @@ def process_store_error(cpe, program):
     message = cpe.output.decode('utf-8')
     if 'credentials not found in native keychain' in message:
         return CredentialsNotFound(
-            'No matching credentials in {0}'.format(
+            'No matching credentials in {}'.format(
                 program
             )
         )
     return StoreError(
-        'Credentials store {0} exited with "{1}".'.format(
+        'Credentials store {} exited with "{}".'.format(
             program, cpe.output.decode('utf-8').strip()
         )
     )
diff --git a/dockerpycreds/store.py b/dockerpycreds/store.py
index 269b9e0..3f51e4a 100644
--- a/dockerpycreds/store.py
+++ b/dockerpycreds/store.py
@@ -21,7 +21,7 @@ class Store(object):
         self.environment = environment
         if self.exe is None:
             raise errors.InitializationError(
-                '{0} not installed or not available in PATH'.format(
+                '{} not installed or not available in PATH'.format(
                     self.program
                 )
             )
@@ -65,6 +65,12 @@ class Store(object):
             server = server.encode('utf-8')
         self._execute('erase', server)
 
+    def list(self):
+        """ List stored credentials. Requires v0.4.0+ of the helper.
+        """
+        data = self._execute('list', None)
+        return json.loads(data.decode('utf-8'))
+
     def _execute(self, subcmd, data_input):
         output = None
         env = create_environment_dict(self.environment)
@@ -88,13 +94,13 @@ class Store(object):
         except OSError as e:
             if e.errno == os.errno.ENOENT:
                 raise errors.StoreError(
-                    '{0} not installed or not available in PATH'.format(
+                    '{} not installed or not available in PATH'.format(
                         self.program
                     )
                 )
             else:
                 raise errors.StoreError(
-                    'Unexpected OS error "{0}", errno={1}'.format(
+                    'Unexpected OS error "{}", errno={}'.format(
                         e.strerror, e.errno
                     )
                 )
diff --git a/dockerpycreds/version.py b/dockerpycreds/version.py
index 275c4ec..df0b6bb 100644
--- a/dockerpycreds/version.py
+++ b/dockerpycreds/version.py
@@ -1,2 +1,2 @@
-version = "0.3.0"
+version = "0.4.0"
 version_info = tuple([int(d) for d in version.split("-")[0].split(".")])
diff --git a/setup.cfg b/setup.cfg
index 1c0622f..9b14936 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,5 +7,4 @@ description_file = README.md
 [egg_info]
 tag_build = 
 tag_date = 0
-tag_svn_revision = 0
 
diff --git a/setup.py b/setup.py
index aec8a93..46375c0 100644
--- a/setup.py
+++ b/setup.py
@@ -17,11 +17,17 @@ exec(open('dockerpycreds/version.py').read())
 with open('./test-requirements.txt') as test_reqs_txt:
     test_requirements = [line for line in test_reqs_txt]
 
+long_description = None
+with open('./README.md', 'r') as readme:
+    long_description = readme.read()
+
 
 setup(
     name="docker-pycreds",
     version=version,
     description="Python bindings for the docker credentials store API",
+    long_description=long_description,
+    long_description_content_type='text/markdown',
     url='https://github.com/shin-/dockerpy-creds',
     license='Apache License 2.0',
     packages=[
@@ -31,6 +37,8 @@ setup(
     tests_require=test_requirements,
     zip_safe=False,
     test_suite='tests',
+    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
+
     classifiers=[
         'Development Status :: 4 - Beta',
         'Environment :: Other Environment',
@@ -38,10 +46,8 @@ setup(
         'Operating System :: OS Independent',
         'Programming Language :: Python',
         'Programming Language :: Python :: 2',
-        'Programming Language :: Python :: 2.6',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.3',
         'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
diff --git a/tests/store_test.py b/tests/store_test.py
index ba5fd7b..31e19c3 100644
--- a/tests/store_test.py
+++ b/tests/store_test.py
@@ -33,7 +33,7 @@ class TestStore(object):
             self.store = Store(DEFAULT_OSX_STORE)
 
     def get_random_servername(self):
-        res = 'pycreds_test_{0:x}'.format(random.getrandbits(32))
+        res = 'pycreds_test_{:x}'.format(random.getrandbits(32))
         self.tmp_keys.append(res)
         return res
 
@@ -69,6 +69,16 @@ class TestStore(object):
         with pytest.raises(CredentialsNotFound):
             self.store.get(key)
 
+    def test_list(self):
+        names = (self.get_random_servername(), self.get_random_servername())
+        self.store.store(names[0], username='sakuya', secret='izayoi')
+        self.store.store(names[1], username='reimu', secret='hakurei')
+        data = self.store.list()
+        assert names[0] in data
+        assert data[names[0]] == 'sakuya'
+        assert names[1] in data
+        assert data[names[1]] == 'reimu'
+
     def test_execute_with_env_override(self):
         self.store.exe = 'env'
         self.store.environment = {'FOO': 'bar'}

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/lib/python3/dist-packages/docker_pycreds-0.4.0.egg-info/PKG-INFO
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/docker_pycreds-0.4.0.egg-info/dependency_links.txt
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/docker_pycreds-0.4.0.egg-info/not-zip-safe
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/docker_pycreds-0.4.0.egg-info/requires.txt
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/docker_pycreds-0.4.0.egg-info/top_level.txt

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/lib/python3/dist-packages/docker_pycreds-0.3.0.egg-info/PKG-INFO
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/docker_pycreds-0.3.0.egg-info/dependency_links.txt
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/docker_pycreds-0.3.0.egg-info/not-zip-safe
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/docker_pycreds-0.3.0.egg-info/requires.txt
-rw-r--r--  root/root   /usr/lib/python3/dist-packages/docker_pycreds-0.3.0.egg-info/top_level.txt

No differences were encountered in the control files

More details

Full run details