Hello community,

here is the log from the commit of package python-girder-client for 
openSUSE:Factory checked in at 2020-11-17 21:26:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-girder-client (Old)
 and      /work/SRC/openSUSE:Factory/.python-girder-client.new.24930 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-girder-client"

Tue Nov 17 21:26:31 2020 rev:6 rq:848973 version:3.1.3

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-girder-client/python-girder-client.changes    
    2020-05-28 09:18:20.873102058 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-girder-client.new.24930/python-girder-client.changes
     2020-11-17 21:26:32.689452763 +0100
@@ -1,0 +2,6 @@
+Thu Nov 12 13:31:32 UTC 2020 - Marketa Machova <[email protected]>
+
+- update to 3.1.3
+  * few fixes and improvements, see commits on GitHub
+
+-------------------------------------------------------------------

Old:
----
  girder-client-3.0.8.tar.gz

New:
----
  girder-client-3.1.3.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-girder-client.spec ++++++
--- /var/tmp/diff_new_pack.WWJxVI/_old  2020-11-17 21:26:33.253453322 +0100
+++ /var/tmp/diff_new_pack.WWJxVI/_new  2020-11-17 21:26:33.261453331 +0100
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-girder-client
-Version:        3.0.8
+Version:        3.1.3
 Release:        0
 Summary:        Python Girder client
 License:        Apache-2.0
@@ -36,13 +36,6 @@
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
 BuildArch:      noarch
-# SECTION test requirements
-BuildRequires:  %{python_module click >= 6.7}
-BuildRequires:  %{python_module diskcache}
-BuildRequires:  %{python_module requests >= 2.4.2}
-BuildRequires:  %{python_module requests-toolbelt}
-BuildRequires:  %{python_module six}
-# /SECTION
 %python_subpackages
 
 %description

++++++ girder-client-3.0.8.tar.gz -> girder-client-3.1.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/girder-client-3.0.8/PKG-INFO 
new/girder-client-3.1.3/PKG-INFO
--- old/girder-client-3.0.8/PKG-INFO    2020-02-04 15:20:41.000000000 +0100
+++ new/girder-client-3.1.3/PKG-INFO    2020-10-09 15:20:37.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: girder-client
-Version: 3.0.8
+Version: 3.1.3
 Summary: Python client for interacting with Girder servers
 Home-page: http://girder.readthedocs.org/en/latest/python-client.html
 Author: Kitware, Inc.
@@ -19,5 +19,4 @@
 Classifier: Environment :: Console
 Classifier: License :: OSI Approved :: Apache Software License
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/girder-client-3.0.8/girder_client/__init__.py 
new/girder-client-3.1.3/girder_client/__init__.py
--- old/girder-client-3.0.8/girder_client/__init__.py   2020-02-04 
15:19:01.000000000 +0100
+++ new/girder-client-3.1.3/girder_client/__init__.py   2020-10-09 
15:19:38.000000000 +0200
@@ -10,9 +10,9 @@
 __license__ = 'Apache 2.0'
 
 import diskcache
-import errno
 import getpass
 import glob
+import io
 import json
 import logging
 import mimetypes
@@ -20,7 +20,6 @@
 import re
 import requests
 import shutil
-import six
 import tempfile
 
 from contextlib import contextmanager
@@ -33,27 +32,13 @@
 _logger = logging.getLogger('girder_client.lib')
 
 
-def _safeMakedirs(path):
-    """
-    Wraps os.makedirs in such a way that it will not raise exceptions if the
-    directory already exists.
-
-    :param path: The directory to create.
-    """
-    try:
-        os.makedirs(path)
-    except OSError as exception:
-        if exception.errno != errno.EEXIST:
-            raise
-
-
 class AuthenticationError(RuntimeError):
     pass
 
 
 class IncorrectUploadLengthError(RuntimeError):
     def __init__(self, message, upload=None):
-        super(IncorrectUploadLengthError, self).__init__(message)
+        super().__init__(message)
         self.upload = upload
 
 
@@ -66,25 +51,24 @@
     """
 
     def __init__(self, status, text, url, method, response=None):
-        super(HttpError, self).__init__('HTTP error %s: %s %s' % (status, 
method, url),
-                                        response=response)
+        super().__init__('HTTP error %s: %s %s' % (status, method, url), 
response=response)
         self.status = status
         self.responseText = text
         self.url = url
         self.method = method
 
     def __str__(self):
-        return super(HttpError, self).__str__() + '\nResponse text: ' + 
self.responseText
+        return super().__str__() + '\nResponse text: ' + self.responseText
 
 
 class IncompleteResponseError(requests.RequestException):
     def __init__(self, message, expected, received, response=None):
-        super(IncompleteResponseError, self).__init__('%s (%d of %d bytes 
received)' % (
+        super().__init__('%s (%d of %d bytes received)' % (
             message, received, expected
         ), response=response)
 
 
-class _NoopProgressReporter(object):
+class _NoopProgressReporter:
     reportProgress = False
 
     def __init__(self, label='', length=0):
@@ -101,18 +85,18 @@
         pass
 
 
-class _ProgressBytesIO(six.BytesIO):
+class _ProgressBytesIO(io.BytesIO):
     def __init__(self, *args, **kwargs):
         self.reporter = kwargs.pop('reporter')
-        six.BytesIO.__init__(self, *args, **kwargs)
+        super().__init__(*args, **kwargs)
 
     def read(self, _size=-1):
-        _chunk = six.BytesIO.read(self, _size)
+        _chunk = super().read(_size)
         self.reporter.update(len(_chunk))
         return _chunk
 
 
-class GirderClient(object):
+class GirderClient:
     """
     A class for interacting with the Girder RESTful API.
     Some simple examples of how to use this class follow:
@@ -308,7 +292,7 @@
         else:
             if interactive:
                 if username is None:
-                    username = six.moves.input('Login or email: ')
+                    username = input('Login or email: ')
                 password = getpass.getpass('Password for %s: ' % username)
 
             if username is None or password is None:
@@ -554,7 +538,7 @@
         """
         params = dict(params or {})
         params['offset'] = offset or 0
-        params['limit'] = limit or DEFAULT_PAGE_LIMIT
+        params['limit'] = limit if limit is not None else DEFAULT_PAGE_LIMIT
 
         while True:
             records = self.get(path, params)
@@ -614,7 +598,7 @@
             same name already exists.
         :param metadata: JSON metadata to set on item.
         """
-        if metadata is not None and not isinstance(metadata, six.string_types):
+        if metadata is not None and not isinstance(metadata, str):
             metadata = json.dumps(metadata)
 
         params = {
@@ -730,7 +714,7 @@
             the same name exists.
         :param metadata: JSON metadata to set on the folder.
         """
-        if metadata is not None and not isinstance(metadata, six.string_types):
+        if metadata is not None and not isinstance(metadata, str):
             metadata = json.dumps(metadata)
 
         params = {
@@ -792,7 +776,7 @@
         :param access: JSON document specifying access control.
         :param public: Boolean specificying the public value.
         """
-        if access is not None and not isinstance(access, six.string_types):
+        if access is not None and not isinstance(access, str):
             access = json.dumps(access)
 
         path = 'folder/' + folderId + '/access'
@@ -925,7 +909,7 @@
 
         if size <= self.MAX_CHUNK_SIZE and self.getServerVersion() >= ['2', 
'3']:
             chunk = stream.read(size)
-            if isinstance(chunk, six.text_type):
+            if isinstance(chunk, str):
                 chunk = chunk.encode('utf8')
             with self.progressReporterCls(label=filename, length=size) as 
reporter:
                 return self.post(
@@ -1002,7 +986,7 @@
                 if not chunk:
                     break
 
-                if isinstance(chunk, six.text_type):
+                if isinstance(chunk, str):
                     chunk = chunk.encode('utf8')
 
                 uploadObj = self.post(
@@ -1157,8 +1141,9 @@
         Copy the `fp` file-like object to `path` which may be a filename string
         or another file-like object to write to.
         """
-        if isinstance(path, six.string_types):
-            _safeMakedirs(os.path.dirname(path))
+        if isinstance(path, str):
+            # Use "abspath" to cleanly get the parent of ".", without 
following symlinks otherwise
+            os.makedirs(os.path.dirname(os.path.abspath(path)), exist_ok=True)
             with open(path, 'wb') as dst:
                 shutil.copyfileobj(fp, dst)
         else:
@@ -1197,7 +1182,7 @@
 
         # download to a tempfile
         progressFileName = fileId
-        if isinstance(path, six.string_types):
+        if isinstance(path, str):
             progressFileName = os.path.basename(path)
 
         req = self._streamingFileDownload(fileId)
@@ -1219,9 +1204,10 @@
             with open(tmp.name, 'rb') as fp:
                 self.cache.set(cacheKey, fp, read=True)
 
-        if isinstance(path, six.string_types):
+        if isinstance(path, str):
             # we can just rename the tempfile
-            _safeMakedirs(os.path.dirname(path))
+            # Use "abspath" to cleanly get the parent of ".", without 
following symlinks otherwise
+            os.makedirs(os.path.dirname(os.path.abspath(path)), exist_ok=True)
             shutil.move(tmp.name, path)
         else:
             # write to file-like object
@@ -1277,7 +1263,7 @@
                     break
                 else:
                     dest = os.path.join(dest, self.transformFilename(name))
-                    _safeMakedirs(dest)
+                    os.makedirs(dest, exist_ok=True)
 
             for file in files:
                 self.downloadFile(
@@ -1314,7 +1300,7 @@
 
             for folder in folders:
                 local = os.path.join(dest, 
self.transformFilename(folder['name']))
-                _safeMakedirs(local)
+                os.makedirs(local, exist_ok=True)
 
                 self.downloadFolderRecursive(folder['_id'], local, sync=sync)
 
@@ -1373,7 +1359,7 @@
 
                 for folder in folders:
                     local = os.path.join(dest, 
self.transformFilename(folder['name']))
-                    _safeMakedirs(local)
+                    os.makedirs(local, exist_ok=True)
 
                     self.downloadFolderRecursive(folder['_id'], local, 
sync=sync)
 
@@ -1401,7 +1387,7 @@
         try:
             with open(os.path.join(dest, '.girder_metadata'), 'r') as fh:
                 self.localMetadata = json.loads(fh.read())
-        except (OSError if six.PY3 else (IOError, OSError)):
+        except OSError:
             print('Local metadata does not exists. Falling back to download.')
 
     def inheritAccessControlRecursive(self, ancestorFolderId, access=None, 
public=None):
@@ -1484,7 +1470,7 @@
         children = self.listFolder(parentId, parentType, name=folderName)
 
         try:
-            return six.next(children)
+            return next(children)
         except StopIteration:
             return self.createFolder(parentId, folderName, 
parentType=parentType,
                                      metadata=metadata)
@@ -1510,7 +1496,7 @@
         if reuseExisting:
             children = self.listItem(parentFolderId, name=name)
             try:
-                item = six.next(children)
+                item = next(children)
             except StopIteration:
                 pass
 
@@ -1704,7 +1690,7 @@
             print('No matching files: ' + repr(filePattern))
 
     def _checkResourcePath(self, objId):
-        if isinstance(objId, six.string_types) and objId.startswith('/'):
+        if isinstance(objId, str) and objId.startswith('/'):
             try:
                 return self.resourceLookup(objId)['_id']
             except requests.HTTPError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/girder-client-3.0.8/girder_client/cli.py 
new/girder-client-3.1.3/girder_client/cli.py
--- old/girder-client-3.0.8/girder_client/cli.py        2020-02-04 
15:19:01.000000000 +0100
+++ new/girder-client-3.1.3/girder_client/cli.py        2020-10-09 
15:19:38.000000000 +0200
@@ -1,10 +1,10 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 import click
+from http.client import HTTPConnection
 import logging
 import requests
 from requests.adapters import HTTPAdapter
-from six.moves.http_client import HTTPConnection
 import sys
 import types
 from girder_client import GirderClient, __version__
@@ -64,7 +64,7 @@
 
         _progressBar.reportProgress = sys.stdout.isatty()
 
-        super(GirderCli, self).__init__(
+        super().__init__(
             host=host, port=port, apiRoot=apiRoot, scheme=scheme, 
apiUrl=apiUrl,
             progressReporterCls=_progressBar)
         interactive = password is None
@@ -85,7 +85,7 @@
             session.verify = self.sslVerify
             if self.retries:
                 session.mount(self.urlBase, 
HTTPAdapter(max_retries=self.retries))
-            return super(GirderCli, self).sendRestRequest(*args, **kwargs)
+            return super().sendRestRequest(*args, **kwargs)
 
 
 class _HiddenOption(click.Option):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/girder-client-3.0.8/girder_client.egg-info/PKG-INFO 
new/girder-client-3.1.3/girder_client.egg-info/PKG-INFO
--- old/girder-client-3.0.8/girder_client.egg-info/PKG-INFO     2020-02-04 
15:20:41.000000000 +0100
+++ new/girder-client-3.1.3/girder_client.egg-info/PKG-INFO     2020-10-09 
15:20:37.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: girder-client
-Version: 3.0.8
+Version: 3.1.3
 Summary: Python client for interacting with Girder servers
 Home-page: http://girder.readthedocs.org/en/latest/python-client.html
 Author: Kitware, Inc.
@@ -19,5 +19,4 @@
 Classifier: Environment :: Console
 Classifier: License :: OSI Approved :: Apache Software License
 Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/girder-client-3.0.8/girder_client.egg-info/requires.txt 
new/girder-client-3.1.3/girder_client.egg-info/requires.txt
--- old/girder-client-3.0.8/girder_client.egg-info/requires.txt 2020-02-04 
15:20:41.000000000 +0100
+++ new/girder-client-3.1.3/girder_client.egg-info/requires.txt 2020-10-09 
15:20:37.000000000 +0200
@@ -2,4 +2,3 @@
 diskcache
 requests>=2.4.2
 requests_toolbelt
-six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/girder-client-3.0.8/setup.py 
new/girder-client-3.1.3/setup.py
--- old/girder-client-3.0.8/setup.py    2020-02-04 15:19:01.000000000 +0100
+++ new/girder-client-3.1.3/setup.py    2020-10-09 15:19:38.000000000 +0200
@@ -24,7 +24,6 @@
     'diskcache',
     'requests>=2.4.2',
     'requests_toolbelt',
-    'six'
 ]
 with open('README.rst') as f:
     readme = f.read()
@@ -45,7 +44,6 @@
         'Environment :: Console',
         'License :: OSI Approved :: Apache Software License',
         'Operating System :: OS Independent',
-        'Programming Language :: Python :: 2',
         'Programming Language :: Python :: 3'
     ],
     packages=find_packages(exclude=('tests.*', 'tests')),
_______________________________________________
openSUSE Commits mailing list -- [email protected]
To unsubscribe, email [email protected]
List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette
List Archives: 
https://lists.opensuse.org/archives/list/[email protected]

Reply via email to