Hello community,

here is the log from the commit of package python-azure-datalake-store for 
openSUSE:Factory checked in at 2018-05-13 16:03:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-azure-datalake-store (Old)
 and      /work/SRC/openSUSE:Factory/.python-azure-datalake-store.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-azure-datalake-store"

Sun May 13 16:03:31 2018 rev:3 rq:601544 version:0.0.19

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-azure-datalake-store/python-azure-datalake-store.changes
  2018-02-14 09:24:44.654434387 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-azure-datalake-store.new/python-azure-datalake-store.changes
     2018-05-13 16:03:37.605480267 +0200
@@ -1,0 +2,10 @@
+Tue Apr 24 14:17:44 UTC 2018 - [email protected]
+
+- New upstream release
+  + Version 0.0.19
+  + For detailed information about changes see the
+    HISTORY.rst file provided with this package  
+- Move LICENSE.txt from %doc to %license section
+- Update Requires from setup.py
+
+-------------------------------------------------------------------

Old:
----
  azure-datalake-store-0.0.17.tar.gz

New:
----
  azure-datalake-store-0.0.19.tar.gz

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

Other differences:
------------------
++++++ python-azure-datalake-store.spec ++++++
--- /var/tmp/diff_new_pack.UhUxZN/_old  2018-05-13 16:03:38.173459545 +0200
+++ /var/tmp/diff_new_pack.UhUxZN/_new  2018-05-13 16:03:38.177459399 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-azure-datalake-store
-Version:        0.0.17
+Version:        0.0.19
 Release:        0
 Summary:        Microsoft Azure Data Lake Store Client Library
 License:        MIT
@@ -72,7 +72,8 @@
 
 %files %{python_files}
 %defattr(-,root,root,-)
-%doc HISTORY.rst LICENSE.txt README.rst
+%doc HISTORY.rst README.rst
+%license LICENSE.txt
 %{python_sitelib}/azure/datalake/
 %{python_sitelib}/samples/
 %{python_sitelib}/azure_datalake_store-*.egg-info

++++++ ads_drop-compatible-releases-operator.patch ++++++
--- /var/tmp/diff_new_pack.UhUxZN/_old  2018-05-13 16:03:38.221457794 +0200
+++ /var/tmp/diff_new_pack.UhUxZN/_new  2018-05-13 16:03:38.225457648 +0200
@@ -1,6 +1,6 @@
-diff -Nru azure-datalake-store-0.0.14.orig/setup.py 
azure-datalake-store-0.0.14/setup.py
---- azure-datalake-store-0.0.14.orig/setup.py  2017-07-11 22:41:53.000000000 
+0200
-+++ azure-datalake-store-0.0.14/setup.py       2017-07-26 11:33:22.962837668 
+0200
+diff -Nru azure-datalake-store-0.0.19.orig/setup.py 
azure-datalake-store-0.0.19/setup.py
+--- azure-datalake-store-0.0.19.orig/setup.py  2018-03-15 04:14:41.000000000 
+0100
++++ azure-datalake-store-0.0.19/setup.py       2018-04-24 16:14:09.774725002 
+0200
 @@ -48,7 +48,7 @@
        install_requires=[
            'cffi',

++++++ ads_drop-extras-require.patch ++++++
--- /var/tmp/diff_new_pack.UhUxZN/_old  2018-05-13 16:03:38.237457211 +0200
+++ /var/tmp/diff_new_pack.UhUxZN/_new  2018-05-13 16:03:38.237457211 +0200
@@ -1,6 +1,6 @@
-diff -Nru azure-datalake-store-0.0.14.orig/setup.py 
azure-datalake-store-0.0.14/setup.py
---- azure-datalake-store-0.0.14.orig/setup.py  2017-07-26 11:38:38.425334485 
+0200
-+++ azure-datalake-store-0.0.14/setup.py       2017-07-26 11:38:01.809040500 
+0200
+diff -Nru azure-datalake-store-0.0.19.orig/setup.py 
azure-datalake-store-0.0.19/setup.py
+--- azure-datalake-store-0.0.19.orig/setup.py  2018-04-24 16:14:09.774725002 
+0200
++++ azure-datalake-store-0.0.19/setup.py       2018-04-24 16:14:56.087107930 
+0200
 @@ -50,10 +50,6 @@
            'adal>=0.4.2',
            'msrest>=0.4.5'

++++++ azure-datalake-store-0.0.17.tar.gz -> azure-datalake-store-0.0.19.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-datalake-store-0.0.17/HISTORY.rst 
new/azure-datalake-store-0.0.19/HISTORY.rst
--- old/azure-datalake-store-0.0.17/HISTORY.rst 2017-09-22 03:06:36.000000000 
+0200
+++ new/azure-datalake-store-0.0.19/HISTORY.rst 2018-03-15 04:14:41.000000000 
+0100
@@ -3,6 +3,15 @@
 Release History
 ===============
 
+0.0.19 (2018-03-14)
+-------------------
+* Fixed upload issue where destination filename was wrong while upload of 
directory with single file #208
+
+0.0.18 (2018-02-05)
+-------------------
+* Fixed read issue where whole file was cached while doing positional reads 
#198
+* Fixed readline as well for the same
+
 0.0.17 (2017-09-21)
 -------------------
 * Fixed README.rst indentation error
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-datalake-store-0.0.17/PKG-INFO 
new/azure-datalake-store-0.0.19/PKG-INFO
--- old/azure-datalake-store-0.0.17/PKG-INFO    2017-09-22 03:08:37.000000000 
+0200
+++ new/azure-datalake-store-0.0.19/PKG-INFO    2018-03-15 04:17:55.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: azure-datalake-store
-Version: 0.0.17
+Version: 0.0.19
 Summary: Azure Data Lake Store Filesystem Client Library for Python
 Home-page: https://github.com/Azure/azure-data-lake-store-python
 Author: Microsoft Corporation
@@ -231,6 +231,15 @@
         Release History
         ===============
         
+        0.0.19 (2018-03-14)
+        -------------------
+        * Fixed upload issue where destination filename was wrong while upload 
of directory with single file #208
+        
+        0.0.18 (2018-02-05)
+        -------------------
+        * Fixed read issue where whole file was cached while doing positional 
reads #198
+        * Fixed readline as well for the same
+        
         0.0.17 (2017-09-21)
         -------------------
         * Fixed README.rst indentation error
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-datalake-store-0.0.17/azure/datalake/store/__init__.py 
new/azure-datalake-store-0.0.19/azure/datalake/store/__init__.py
--- old/azure-datalake-store-0.0.17/azure/datalake/store/__init__.py    
2017-09-22 03:06:36.000000000 +0200
+++ new/azure-datalake-store-0.0.19/azure/datalake/store/__init__.py    
2018-03-15 04:14:41.000000000 +0100
@@ -6,7 +6,7 @@
 # license information.
 # --------------------------------------------------------------------------
 
-__version__ = "0.0.17"
+__version__ = "0.0.19"
 
 from .core import AzureDLFileSystem
 from .multithread import ADLDownloader
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-datalake-store-0.0.17/azure/datalake/store/core.py 
new/azure-datalake-store-0.0.19/azure/datalake/store/core.py
--- old/azure-datalake-store-0.0.17/azure/datalake/store/core.py        
2017-09-22 03:06:36.000000000 +0200
+++ new/azure-datalake-store-0.0.19/azure/datalake/store/core.py        
2018-03-15 04:14:41.000000000 +0100
@@ -662,8 +662,8 @@
         self.cache = b""
         self.loc = 0
         self.delimiter = delimiter
-        self.start = None
-        self.end = None
+        self.start = 0
+        self.end = 0
         self.closed = False
         self.trim = True
         self.buffer = io.BytesIO()
@@ -731,16 +731,29 @@
 
         If length is specified, at most size bytes will be read.
         """
-        self._fetch(self.loc, self.loc + 1)
+        if length < 0:
+            length = self.size
+
+        line = b""
         while True:
+
+            # if cache has last bytes of file and its read, return line and 
exit loop
+            if self.end >= self.size and self.loc >= self.end:
+                return line
+
+            self._read_blocksize()
+
             found = self.cache[self.loc - self.start:].find(b'\n') + 1
-            if length > 0 and found > length:
-                return self.read(length)
             if found:
-                return self.read(found)
-            if self.end >= self.size:
-                return self.read(length)
-            self._fetch(self.start, self.end + self.blocksize)
+                partialLine = self.cache[self.loc-self.start: 
min(self.loc-self.start+found, self.loc-self.start+length)]
+            else:
+                partialLine = self.cache[self.loc-self.start:]
+
+            self.loc += len(partialLine)
+            line += partialLine
+
+            if found:
+                return line
 
     def __next__(self):
         out = self.readline()
@@ -758,28 +771,34 @@
         return list(self)
 
     def _fetch(self, start, end):
-        if self.start is None and self.end is None:
-            # First read
-            self.start = start
-            self.end = min(end + self.blocksize, self.size)
-            response = _fetch_range_with_retry(
-                self.azure.azure, self.path.as_posix(), start, self.end, 
filesessionid=self.filesessionid)
-            self.cache = getattr(response, 'content', response)
-        if start < self.start:
-            response = _fetch_range_with_retry(
-                self.azure.azure, self.path.as_posix(), start, self.start, 
filesessionid=self.filesessionid)
-            new = getattr(response, 'content', response)
-            self.start = start
-            self.cache = new + self.cache
-        if end > self.end:
-            if self.end >= self.size:
-                return
-            newend = min(self.size, end + self.blocksize)
-            response = _fetch_range_with_retry(
-                self.azure.azure, self.path.as_posix(), self.end, newend, 
filesessionid=self.filesessionid)
-            new = getattr(response, 'content', response)
-            self.end = newend
-            self.cache = self.cache + new
+        self.start = start
+        self.end = min(end, self.size)
+        response = _fetch_range_with_retry(
+            self.azure.azure, self.path.as_posix(), self.start, self.end, 
filesessionid=self.filesessionid)
+        self.cache = getattr(response, 'content', response)
+
+    def _read_blocksize(self, offset=-1):
+        """
+        Reads next blocksize of data and updates the cache if read offset is 
not within cache otherwise nop
+
+        Parameters
+        ----------
+        offset : int (-1)
+            offset from where to read; if <0, last read location or beginning 
of file.
+        :return:
+        """
+        if offset < 0:
+            offset = self.loc
+        if offset >= self.size:
+            self.start = self.size
+            self.end = self.size
+            self.cache = b""
+            return
+        if offset >= self.start and offset < self.end:
+            return
+        if offset > self.size:
+            raise ValueError('Read offset is outside the File')
+        self._fetch(offset, offset + self.blocksize)
 
     def read(self, length=-1):
         """
@@ -796,15 +815,18 @@
             length = self.size
         if self.closed:
             raise ValueError('I/O operation on closed file.')
-        self._fetch(self.loc, self.loc + length)
-        out = self.cache[self.loc - self.start:
-                         self.loc - self.start + length]
-        self.loc += len(out)
-        if self.trim and self.blocksize:
-            num = (self.loc - self.start) // self.blocksize - 1
-            if num > 0:
-                self.start += self.blocksize * num
-                self.cache = self.cache[self.blocksize * num:]
+
+        out = b""
+        while length > 0:
+            self._read_blocksize()
+            data_read = self.cache[self.loc - self.start:
+                             min(self.loc - self.start + length, self.end - 
self.start)]
+            out += data_read
+            self.loc += len(data_read)
+            length -= len(data_read)
+            if self.loc >= self.size:
+                length = 0
+
         return out
 
     read1 = read
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-datalake-store-0.0.17/azure/datalake/store/multithread.py 
new/azure-datalake-store-0.0.19/azure/datalake/store/multithread.py
--- old/azure-datalake-store-0.0.17/azure/datalake/store/multithread.py 
2017-09-22 03:06:36.000000000 +0200
+++ new/azure-datalake-store-0.0.19/azure/datalake/store/multithread.py 
2018-03-15 04:14:41.000000000 +0100
@@ -441,6 +441,7 @@
     def _setup(self):
         """ Create set of parameters to loop over
         """
+        is_path_walk_empty = False
         if "*" not in self.lpath:
             out = os.walk(self.lpath)
             lfiles = sum(([os.path.join(dir, f) for f in fnames] for
@@ -448,10 +449,11 @@
             if (not lfiles and os.path.exists(self.lpath) and
                     not os.path.isdir(self.lpath)):
                 lfiles = [self.lpath]
+                is_path_walk_empty = True
         else:
             lfiles = glob.glob(self.lpath)
         
-        if len(lfiles) > 1:
+        if len(lfiles) > 0 and not is_path_walk_empty:
             local_rel_lpath = str(AzureDLPath(self.lpath).globless_prefix)
             file_pairs = [(f, self.rpath / 
AzureDLPath(f).relative_to(local_rel_lpath)) for f in lfiles]
         elif lfiles:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-datalake-store-0.0.17/azure_datalake_store.egg-info/PKG-INFO 
new/azure-datalake-store-0.0.19/azure_datalake_store.egg-info/PKG-INFO
--- old/azure-datalake-store-0.0.17/azure_datalake_store.egg-info/PKG-INFO      
2017-09-22 03:08:37.000000000 +0200
+++ new/azure-datalake-store-0.0.19/azure_datalake_store.egg-info/PKG-INFO      
2018-03-15 04:17:55.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: azure-datalake-store
-Version: 0.0.17
+Version: 0.0.19
 Summary: Azure Data Lake Store Filesystem Client Library for Python
 Home-page: https://github.com/Azure/azure-data-lake-store-python
 Author: Microsoft Corporation
@@ -231,6 +231,15 @@
         Release History
         ===============
         
+        0.0.19 (2018-03-14)
+        -------------------
+        * Fixed upload issue where destination filename was wrong while upload 
of directory with single file #208
+        
+        0.0.18 (2018-02-05)
+        -------------------
+        * Fixed read issue where whole file was cached while doing positional 
reads #198
+        * Fixed readline as well for the same
+        
         0.0.17 (2017-09-21)
         -------------------
         * Fixed README.rst indentation error


Reply via email to