Hello community,

here is the log from the commit of package python-azure-storage-common for 
openSUSE:Factory checked in at 2019-03-05 12:26:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-azure-storage-common (Old)
 and      /work/SRC/openSUSE:Factory/.python-azure-storage-common.new.28833 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-azure-storage-common"

Tue Mar  5 12:26:30 2019 rev:2 rq:681644 version:1.4.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-azure-storage-common/python-azure-storage-common.changes
  2018-10-15 10:46:26.947197305 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-azure-storage-common.new.28833/python-azure-storage-common.changes
       2019-03-05 12:26:30.832831851 +0100
@@ -1,0 +2,10 @@
+Mon Feb 25 10:59:30 UTC 2019 - John Vandenberg <[email protected]>
+
+- Obtain LICENSE.txt from sdist
+- Add build dependency azure-common >= 1.1.5 to prevent building
+  and publishing into an repository which doesnt have that, as tests
+  do not exist to block incompatible builds
+- Remove unnecessary build dependency on python-devel and unzip
+- Update to v1.4.0
+
+-------------------------------------------------------------------

Old:
----
  LICENSE.txt
  azure-storage-common-1.3.0.tar.gz

New:
----
  azure-storage-common-1.4.0.tar.gz

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

Other differences:
------------------
++++++ python-azure-storage-common.spec ++++++
--- /var/tmp/diff_new_pack.7yHP6g/_old  2019-03-05 12:26:31.212831920 +0100
+++ /var/tmp/diff_new_pack.7yHP6g/_new  2019-03-05 12:26:31.212831920 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-azure-storage-common
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 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
@@ -12,28 +12,27 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
+
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-azure-storage-common
-Version:        1.3.0
+Version:        1.4.0
 Release:        0
 Summary:        Microsoft Azure Storage Common Client Library for Python
 License:        MIT
 Group:          Development/Languages/Python
 Url:            https://github.com/Azure/azure-sdk-for-python
 Source:         
https://files.pythonhosted.org/packages/source/a/azure-storage-common/azure-storage-common-%{version}.tar.gz
-Source1:        LICENSE.txt
-BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module azure-common >= 1.1.5}
+BuildRequires:  %{python_module azure-nspkg}
+BuildRequires:  %{python_module azure-storage-nspkg}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  python-rpm-macros
-BuildRequires:  unzip
-BuildRequires:  %{python_module azure-storage-nspkg}
-BuildRequires:  %{python_module azure-nspkg}
-Requires:       python-azure-storage-nspkg
-Requires:       python-azure-nspkg
 Requires:       python-azure-common >= 1.1.5
+Requires:       python-azure-nspkg
+Requires:       python-azure-storage-nspkg
 Requires:       python-cryptography
 Requires:       python-python-dateutil
 Requires:       python-requests
@@ -54,7 +53,6 @@
 %setup -q -n azure-storage-common-%{version}
 
 %build
-install -m 644 %{SOURCE1} %{_builddir}/azure-storage-common-%{version}
 %python_build
 
 %install
@@ -66,10 +64,13 @@
 rm -rf %{buildroot}%{$python_sitelib}/azure/__pycache__
 }
 
+# no tests readily available
+# https://github.com/Azure/azure-sdk-for-python/issues/4412
+
 %files %{python_files}
-%defattr(-,root,root,-)
 %doc README.rst
 %license LICENSE.txt
 %{python_sitelib}/azure/storage/common
 %{python_sitelib}/azure_storage_common-*.egg-info
+
 %changelog

++++++ azure-storage-common-1.3.0.tar.gz -> azure-storage-common-1.4.0.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-common-1.3.0/LICENSE.txt 
new/azure-storage-common-1.4.0/LICENSE.txt
--- old/azure-storage-common-1.3.0/LICENSE.txt  1970-01-01 01:00:00.000000000 
+0100
+++ new/azure-storage-common-1.4.0/LICENSE.txt  2018-11-10 00:24:52.000000000 
+0100
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2017 Microsoft
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-common-1.3.0/MANIFEST.in 
new/azure-storage-common-1.4.0/MANIFEST.in
--- old/azure-storage-common-1.3.0/MANIFEST.in  2017-11-01 22:31:22.000000000 
+0100
+++ new/azure-storage-common-1.4.0/MANIFEST.in  2018-11-10 02:33:59.000000000 
+0100
@@ -1,2 +1,4 @@
 include *.rst
-include azure_bdist_wheel.py
+include azure/__init__.py
+include azure/storage/__init__.py
+include LICENSE.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-common-1.3.0/PKG-INFO 
new/azure-storage-common-1.4.0/PKG-INFO
--- old/azure-storage-common-1.3.0/PKG-INFO     2018-06-27 02:49:02.000000000 
+0200
+++ new/azure-storage-common-1.4.0/PKG-INFO     2018-11-10 03:01:25.000000000 
+0100
@@ -1,18 +1,22 @@
 Metadata-Version: 1.1
 Name: azure-storage-common
-Version: 1.3.0
+Version: 1.4.0
 Summary: Microsoft Azure Storage Common Client Library for Python
 Home-page: https://github.com/Azure/azure-storage-python
 Author: Microsoft Corporation
 Author-email: [email protected]
 License: MIT License
-Description-Content-Type: UNKNOWN
 Description: Microsoft Azure Storage SDK for Python
         ======================================
         
+        .. image:: https://travis-ci.org/Azure/azure-storage-python.svg
+            :target: https://travis-ci.org/Azure/azure-storage-python
+        .. image:: 
https://img.shields.io/codecov/c/github/azure/azure-storage-python.svg
+            :target: https://codecov.io/gh/Azure/azure-storage-python
+        
         This project provides a client library in Python that makes it easy to
         consume Microsoft Azure Storage services. For documentation please see
-        the Microsoft Azure `Python Developer Center`_ and our `API 
Reference`_ Page.
+        the Microsoft Azure `Python Developer Center`_ and our `API 
Reference`_ (also available on `readthedocs`_).
         
             If you are looking for the Service Bus or Azure Management
             libraries, please visit
@@ -220,7 +224,8 @@
         -  `API Reference`_
         
         .. _Python Developer Center: 
http://azure.microsoft.com/en-us/develop/python/
-        .. _API Reference: https://azure-storage.readthedocs.io/en/latest/
+        .. _API Reference: 
https://docs.microsoft.com/en-us/python/api/overview/azure/storage/client?view=azure-python
+        .. _readthedocs: https://azure-storage.readthedocs.io/
         .. _here: 
https://github.com/Azure/azure-storage-python/archive/master.zip
         .. _create an account: https://account.windowsazure.com/signup
         .. _Developer Forums on MSDN: 
http://social.msdn.microsoft.com/Forums/windowsazure/en-US/home?forum=windowsazuredata
@@ -233,6 +238,7 @@
         .. _problems: https://github.com/Azure/azure-storage-python/issues/219
         .. _upgrading pip: 
https://docs.microsoft.com/en-us/visualstudio/python/managing-python-on-azure-app-service
         .. _cosmosdb: https://github.com/Azure/azure-cosmosdb-python
+        
 Platform: UNKNOWN
 Classifier: Development Status :: 4 - Beta
 Classifier: Programming Language :: Python
@@ -243,4 +249,5 @@
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
 Classifier: License :: OSI Approved :: MIT License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-common-1.3.0/README.rst 
new/azure-storage-common-1.4.0/README.rst
--- old/azure-storage-common-1.3.0/README.rst   2017-11-01 22:31:22.000000000 
+0100
+++ new/azure-storage-common-1.4.0/README.rst   2018-09-10 23:24:14.000000000 
+0200
@@ -1,9 +1,14 @@
 Microsoft Azure Storage SDK for Python
 ======================================
 
+.. image:: https://travis-ci.org/Azure/azure-storage-python.svg
+    :target: https://travis-ci.org/Azure/azure-storage-python
+.. image:: 
https://img.shields.io/codecov/c/github/azure/azure-storage-python.svg
+    :target: https://codecov.io/gh/Azure/azure-storage-python
+
 This project provides a client library in Python that makes it easy to
 consume Microsoft Azure Storage services. For documentation please see
-the Microsoft Azure `Python Developer Center`_ and our `API Reference`_ Page.
+the Microsoft Azure `Python Developer Center`_ and our `API Reference`_ (also 
available on `readthedocs`_).
 
     If you are looking for the Service Bus or Azure Management
     libraries, please visit
@@ -211,7 +216,8 @@
 -  `API Reference`_
 
 .. _Python Developer Center: http://azure.microsoft.com/en-us/develop/python/
-.. _API Reference: https://azure-storage.readthedocs.io/en/latest/
+.. _API Reference: 
https://docs.microsoft.com/en-us/python/api/overview/azure/storage/client?view=azure-python
+.. _readthedocs: https://azure-storage.readthedocs.io/
 .. _here: https://github.com/Azure/azure-storage-python/archive/master.zip
 .. _create an account: https://account.windowsazure.com/signup
 .. _Developer Forums on MSDN: 
http://social.msdn.microsoft.com/Forums/windowsazure/en-US/home?forum=windowsazuredata
@@ -223,4 +229,4 @@
 .. _CONTRIBUTING.md doc: CONTRIBUTING.md
 .. _problems: https://github.com/Azure/azure-storage-python/issues/219
 .. _upgrading pip: 
https://docs.microsoft.com/en-us/visualstudio/python/managing-python-on-azure-app-service
-.. _cosmosdb: https://github.com/Azure/azure-cosmosdb-python
\ No newline at end of file
+.. _cosmosdb: https://github.com/Azure/azure-cosmosdb-python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-common-1.3.0/azure/__init__.py 
new/azure-storage-common-1.4.0/azure/__init__.py
--- old/azure-storage-common-1.3.0/azure/__init__.py    2018-01-12 
09:40:56.000000000 +0100
+++ new/azure-storage-common-1.4.0/azure/__init__.py    2018-10-23 
23:30:56.000000000 +0200
@@ -1 +1 @@
-__import__('pkg_resources').declare_namespace(__name__)
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-common-1.3.0/azure/storage/__init__.py 
new/azure-storage-common-1.4.0/azure/storage/__init__.py
--- old/azure-storage-common-1.3.0/azure/storage/__init__.py    2018-01-12 
09:40:56.000000000 +0100
+++ new/azure-storage-common-1.4.0/azure/storage/__init__.py    2018-10-23 
23:30:56.000000000 +0200
@@ -1 +1 @@
-__import__('pkg_resources').declare_namespace(__name__)
+__path__ = __import__('pkgutil').extend_path(__path__, __name__)
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-common-1.3.0/azure/storage/common/__init__.py 
new/azure-storage-common-1.4.0/azure/storage/common/__init__.py
--- old/azure-storage-common-1.3.0/azure/storage/common/__init__.py     
2018-06-26 22:21:35.000000000 +0200
+++ new/azure-storage-common-1.4.0/azure/storage/common/__init__.py     
2018-09-10 23:24:14.000000000 +0200
@@ -36,3 +36,4 @@
     SharedAccessSignature,
 )
 from .tokencredential import TokenCredential
+from ._error import AzureSigningError
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-common-1.3.0/azure/storage/common/_auth.py 
new/azure-storage-common-1.4.0/azure/storage/common/_auth.py
--- old/azure-storage-common-1.3.0/azure/storage/common/_auth.py        
2018-06-01 00:48:14.000000000 +0200
+++ new/azure-storage-common-1.4.0/azure/storage/common/_auth.py        
2018-11-10 00:24:09.000000000 +0100
@@ -10,10 +10,21 @@
     DEV_ACCOUNT_NAME,
     DEV_ACCOUNT_SECONDARY_NAME
 )
+import sys
+if sys.version_info >= (3,):
+    from urllib.parse import parse_qsl
+else:
+    from urlparse import parse_qsl
+
 
 import logging
 logger = logging.getLogger(__name__)
 
+from ._error import (
+    AzureSigningError,
+    _wrap_exception,
+)
+
 
 class _StorageSharedKeyAuthentication(object):
     def __init__(self, account_name, account_key, is_emulated=False):
@@ -54,9 +65,14 @@
         return string_to_sign
 
     def _add_authorization_header(self, request, string_to_sign):
-        signature = _sign_string(self.account_key, string_to_sign)
-        auth_string = 'SharedKey ' + self.account_name + ':' + signature
-        request.headers['Authorization'] = auth_string
+        try:
+            signature = _sign_string(self.account_key, string_to_sign)
+            auth_string = 'SharedKey ' + self.account_name + ':' + signature
+            request.headers['Authorization'] = auth_string
+        except Exception as ex:
+            # Wrap any error that occurred as signing error
+            # Doing so will clarify/locate the source of problem
+            raise _wrap_exception(ex, AzureSigningError)
 
 
 class _StorageSharedKeyAuthentication(_StorageSharedKeyAuthentication):
@@ -100,18 +116,14 @@
         # ignore ?-prefix (added by tools such as Azure Portal) on sas tokens
         # doing so avoids double question marks when signing
         if sas_token[0] == '?':
-            self.sas_token = sas_token[1:]
-        else:
-            self.sas_token = sas_token
+            sas_token = sas_token[1:]
+
+        self.sas_qs = parse_qsl(sas_token)
 
     def sign_request(self, request):
-        # if 'sig=' is present, then the request has already been signed
+        # if 'sig' is present, then the request has already been signed
         # as is the case when performing retries
-        if 'sig=' in request.path:
+        if 'sig' in request.query:
             return
-        if '?' in request.path:
-            request.path += '&'
-        else:
-            request.path += '?'
 
-        request.path += self.sas_token
+        request.query.update(self.sas_qs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-common-1.3.0/azure/storage/common/_connection.py 
new/azure-storage-common-1.4.0/azure/storage/common/_connection.py
--- old/azure-storage-common-1.3.0/azure/storage/common/_connection.py  
2018-06-01 00:48:49.000000000 +0200
+++ new/azure-storage-common-1.4.0/azure/storage/common/_connection.py  
2018-09-10 23:24:14.000000000 +0200
@@ -60,9 +60,10 @@
 
             # Only set the account key if a sas_token is not present to allow 
sas to be used with the emulator
             self.account_key = DEV_ACCOUNT_KEY if not self.sas_token else None
+            emulator_endpoint = _EMULATOR_ENDPOINTS[service] if custom_domain 
is None else custom_domain
 
-            self.primary_endpoint = 
'{}/{}'.format(_EMULATOR_ENDPOINTS[service], DEV_ACCOUNT_NAME)
-            self.secondary_endpoint = 
'{}/{}'.format(_EMULATOR_ENDPOINTS[service], DEV_ACCOUNT_SECONDARY_NAME)
+            self.primary_endpoint = '{}/{}'.format(emulator_endpoint, 
DEV_ACCOUNT_NAME)
+            self.secondary_endpoint = '{}/{}'.format(emulator_endpoint, 
DEV_ACCOUNT_SECONDARY_NAME)
         else:
             # Strip whitespace from the key
             if self.account_key:
@@ -108,7 +109,7 @@
         if connection_string:
             params = 
_ServiceParameters._from_connection_string(connection_string, service)
         elif is_emulated:
-            params = _ServiceParameters(service, is_emulated=True)
+            params = _ServiceParameters(service, is_emulated=True, 
custom_domain=custom_domain)
         elif account_name:
             if protocol.lower() != 'https' and token_credential is not None:
                 raise ValueError("Token credential is only supported with 
HTTPS.")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-common-1.3.0/azure/storage/common/_constants.py 
new/azure-storage-common-1.4.0/azure/storage/common/_constants.py
--- old/azure-storage-common-1.3.0/azure/storage/common/_constants.py   
2018-06-26 22:21:35.000000000 +0200
+++ new/azure-storage-common-1.4.0/azure/storage/common/_constants.py   
2018-11-10 00:24:52.000000000 +0100
@@ -7,7 +7,7 @@
 import sys
 
 __author__ = 'Microsoft Corp. <[email protected]>'
-__version__ = '1.3.0'
+__version__ = '1.4.0'
 
 # UserAgent string sample: 'Azure-Storage/0.37.0-0.38.0 (Python CPython 3.4.2; 
Windows 8)'
 # First version(0.37.0) is the common package, and the second version(0.38.0) 
is the service package
@@ -45,3 +45,7 @@
 
 # Encryption constants
 _ENCRYPTION_PROTOCOL_V1 = '1.0'
+
+_AUTHORIZATION_HEADER_NAME = 'Authorization'
+_COPY_SOURCE_HEADER_NAME = 'x-ms-copy-source'
+_REDACTED_VALUE = 'REDACTED'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-common-1.3.0/azure/storage/common/_error.py 
new/azure-storage-common-1.4.0/azure/storage/common/_error.py
--- old/azure-storage-common-1.3.0/azure/storage/common/_error.py       
2018-06-20 22:54:29.000000000 +0200
+++ new/azure-storage-common-1.4.0/azure/storage/common/_error.py       
2018-10-23 23:30:56.000000000 +0200
@@ -47,10 +47,6 @@
 _ERROR_VALUE_NONE = '{0} should not be None.'
 _ERROR_VALUE_NONE_OR_EMPTY = '{0} should not be None or empty.'
 _ERROR_VALUE_NEGATIVE = '{0} should not be negative.'
-_ERROR_NO_SINGLE_THREAD_CHUNKING = \
-    'To use {0} chunk downloader more than 1 thread must be ' + \
-    'used since get_{0}_to_bytes should be called for single threaded ' + \
-    '{0} downloads.'
 _ERROR_START_END_NEEDED_FOR_MD5 = \
     'Both end_range and start_range need to be specified ' + \
     'for getting content MD5.'
@@ -185,3 +181,28 @@
 def _validate_encryption_unsupported(require_encryption, key_encryption_key):
     if require_encryption or (key_encryption_key is not None):
         raise ValueError(_ERROR_UNSUPPORTED_METHOD_FOR_ENCRYPTION)
+
+
+# wraps a given exception with the desired exception type
+def _wrap_exception(ex, desired_type):
+    msg = ""
+    if len(ex.args) > 0:
+        msg = ex.args[0]
+    if version_info >= (3,):
+        # Automatic chaining in Python 3 means we keep the trace
+        return desired_type(msg)
+    else:
+        # There isn't a good solution in 2 for keeping the stack trace
+        # in general, or that will not result in an error in 3
+        # However, we can keep the previous error type and message
+        # TODO: In the future we will log the trace
+        return desired_type('{}: {}'.format(ex.__class__.__name__, msg))
+
+
+class AzureSigningError(AzureException):
+    """
+    Represents a fatal error when attempting to sign a request.
+    In general, the cause of this exception is user error. For example, the 
given account key is not valid.
+    Please visit 
https://docs.microsoft.com/en-us/azure/storage/common/storage-create-storage-account
 for more info.
+    """
+    pass
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-common-1.3.0/azure/storage/common/cloudstorageaccount.py 
new/azure-storage-common-1.4.0/azure/storage/common/cloudstorageaccount.py
--- old/azure-storage-common-1.3.0/azure/storage/common/cloudstorageaccount.py  
2018-01-12 09:40:56.000000000 +0100
+++ new/azure-storage-common-1.4.0/azure/storage/common/cloudstorageaccount.py  
2018-09-10 23:24:14.000000000 +0200
@@ -27,7 +27,8 @@
     use the factory or can construct the appropriate service directly.
     """
 
-    def __init__(self, account_name=None, account_key=None, sas_token=None, 
is_emulated=None):
+    def __init__(self, account_name=None, account_key=None, sas_token=None,
+                 is_emulated=None, endpoint_suffix=None):
         '''
         :param str account_name:
             The storage account name. This is used to authenticate requests 
@@ -40,13 +41,17 @@
              instead of the account key. If account key and sas token are both 
              specified, account key will be used to sign.
         :param bool is_emulated:
-            Whether to use the emulator. Defaults to False. If specified, will 
+            Whether to use the emulator. Defaults to False. If specified, will
             override all other parameters.
+        :param str endpoint_suffix:
+            The host base component of the url, minus the account name. 
Defaults
+            to Azure (core.windows.net). Override this to use a sovereign 
cloud.
         '''
         self.account_name = account_name
         self.account_key = account_key
         self.sas_token = sas_token
         self.is_emulated = is_emulated
+        self.endpoint_suffix = endpoint_suffix
 
     def create_block_blob_service(self):
         '''
@@ -60,7 +65,8 @@
             from azure.storage.blob.blockblobservice import BlockBlobService
             return BlockBlobService(self.account_name, self.account_key,
                                     sas_token=self.sas_token,
-                                    is_emulated=self.is_emulated)
+                                    is_emulated=self.is_emulated,
+                                    endpoint_suffix=self.endpoint_suffix)
         except ImportError:
             raise Exception('The package azure-storage-blob is required. '
                             + 'Please install it using "pip install 
azure-storage-blob"')
@@ -77,7 +83,8 @@
             from azure.storage.blob.pageblobservice import PageBlobService
             return PageBlobService(self.account_name, self.account_key,
                                    sas_token=self.sas_token,
-                                   is_emulated=self.is_emulated)
+                                   is_emulated=self.is_emulated,
+                                   endpoint_suffix=self.endpoint_suffix)
         except ImportError:
             raise Exception('The package azure-storage-blob is required. '
                             + 'Please install it using "pip install 
azure-storage-blob"')
@@ -94,7 +101,8 @@
             from azure.storage.blob.appendblobservice import AppendBlobService
             return AppendBlobService(self.account_name, self.account_key,
                                      sas_token=self.sas_token,
-                                     is_emulated=self.is_emulated)
+                                     is_emulated=self.is_emulated,
+                                     endpoint_suffix=self.endpoint_suffix)
         except ImportError:
             raise Exception('The package azure-storage-blob is required. '
                             + 'Please install it using "pip install 
azure-storage-blob"')
@@ -111,7 +119,8 @@
             from azure.storage.queue.queueservice import QueueService
             return QueueService(self.account_name, self.account_key,
                                 sas_token=self.sas_token,
-                                is_emulated=self.is_emulated)
+                                is_emulated=self.is_emulated,
+                                endpoint_suffix=self.endpoint_suffix)
         except ImportError:
             raise Exception('The package azure-storage-queue is required. '
                             + 'Please install it using "pip install 
azure-storage-queue"')
@@ -127,7 +136,8 @@
         try:
             from azure.storage.file.fileservice import FileService
             return FileService(self.account_name, self.account_key,
-                               sas_token=self.sas_token)
+                               sas_token=self.sas_token,
+                               endpoint_suffix=self.endpoint_suffix)
         except ImportError:
             raise Exception('The package azure-storage-file is required. '
                             + 'Please install it using "pip install 
azure-storage-file"')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-common-1.3.0/azure/storage/common/retry.py 
new/azure-storage-common-1.4.0/azure/storage/common/retry.py
--- old/azure-storage-common-1.3.0/azure/storage/common/retry.py        
2018-06-01 00:48:14.000000000 +0200
+++ new/azure-storage-common-1.4.0/azure/storage/common/retry.py        
2018-09-10 23:24:14.000000000 +0200
@@ -151,7 +151,7 @@
                 self._set_next_host_location(context)
 
             # rewind the request body if it is a stream
-            if hasattr(context.request.body, 'read'):
+            if hasattr(context.request, 'body') and 
hasattr(context.request.body, 'read'):
                 # no position was saved, then retry would not work
                 if context.body_position is None:
                     return None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-common-1.3.0/azure/storage/common/storageclient.py 
new/azure-storage-common-1.4.0/azure/storage/common/storageclient.py
--- old/azure-storage-common-1.3.0/azure/storage/common/storageclient.py        
2018-06-20 22:54:29.000000000 +0200
+++ new/azure-storage-common-1.4.0/azure/storage/common/storageclient.py        
2018-11-10 00:24:09.000000000 +0100
@@ -4,14 +4,12 @@
 # license information.
 # --------------------------------------------------------------------------
 
-import sys
+import requests
 from abc import ABCMeta
 import logging
-
-logger = logging.getLogger(__name__)
 from time import sleep
+import sys
 
-import requests
 from azure.common import (
     AzureException,
     AzureHttpError,
@@ -23,10 +21,15 @@
     DEFAULT_USER_AGENT_STRING,
     USER_AGENT_STRING_PREFIX,
     USER_AGENT_STRING_SUFFIX,
+    _AUTHORIZATION_HEADER_NAME,
+    _REDACTED_VALUE,
+    _COPY_SOURCE_HEADER_NAME,
 )
 from ._error import (
     _ERROR_DECRYPTION_FAILURE,
     _http_error_handler,
+    _wrap_exception,
+    AzureSigningError,
 )
 from ._http import HTTPError
 from ._http.httpclient import _HTTPClient
@@ -41,6 +44,23 @@
 )
 from .retry import ExponentialRetry
 from io import UnsupportedOperation
+from .sharedaccesssignature import _QueryStringConstants
+
+if sys.version_info >= (3,):
+    from urllib.parse import (
+        urlparse,
+        parse_qsl,
+        urlunparse,
+        urlencode,
+    )
+else:
+    from urlparse import (
+        urlparse,
+        parse_qsl,
+        urlunparse,
+    )
+    from urllib import urlencode
+logger = logging.getLogger(__name__)
 
 
 class StorageClient(object):
@@ -210,6 +230,36 @@
         else:
             return ""
 
+    @staticmethod
+    def _scrub_headers(headers):
+        # make a copy to avoid contaminating the request
+        clean_headers = headers.copy()
+
+        if _AUTHORIZATION_HEADER_NAME in clean_headers:
+            clean_headers[_AUTHORIZATION_HEADER_NAME] = _REDACTED_VALUE
+
+        # in case of copy operations, there could be a SAS signature present 
in the header value
+        if _COPY_SOURCE_HEADER_NAME in clean_headers \
+                and _QueryStringConstants.SIGNED_SIGNATURE + "=" in 
clean_headers[_COPY_SOURCE_HEADER_NAME]:
+            # take the url apart and scrub away the signed signature
+            scheme, netloc, path, params, query, fragment = 
urlparse(clean_headers[_COPY_SOURCE_HEADER_NAME])
+            parsed_qs = dict(parse_qsl(query))
+            parsed_qs[_QueryStringConstants.SIGNED_SIGNATURE] = _REDACTED_VALUE
+
+            # the SAS needs to be put back together
+            clean_headers[_COPY_SOURCE_HEADER_NAME] = urlunparse(
+                (scheme, netloc, path, params, urlencode(parsed_qs), fragment))
+        return clean_headers
+
+    @staticmethod
+    def _scrub_query_parameters(query):
+        # make a copy to avoid contaminating the request
+        clean_queries = query.copy()
+
+        if _QueryStringConstants.SIGNED_SIGNATURE in clean_queries:
+            clean_queries[_QueryStringConstants.SIGNED_SIGNATURE] = 
_REDACTED_VALUE
+        return clean_queries
+
     def _perform_request(self, request, parser=None, parser_args=None, 
operation_context=None, expected_errors=None):
         '''
         Sends the request and return response. Catches HTTPError and hands it
@@ -258,12 +308,14 @@
                     retry_context.request = request
 
                     # Log the request before it goes out
-                    logger.info("%s Outgoing request: Method=%s, Path=%s, 
Query=%s, Headers=%s.",
-                                client_request_id_prefix,
-                                request.method,
-                                request.path,
-                                request.query,
-                                str(request.headers).replace('\n', ''))
+                    # Avoid unnecessary scrubbing if the logger is not on
+                    if logger.isEnabledFor(logging.INFO):
+                        logger.info("%s Outgoing request: Method=%s, Path=%s, 
Query=%s, Headers=%s.",
+                                    client_request_id_prefix,
+                                    request.method,
+                                    request.path,
+                                    
self._scrub_query_parameters(request.query),
+                                    
str(self._scrub_headers(request.headers)).replace('\n', ''))
 
                     # Perform the request
                     response = self._httpclient.perform_request(request)
@@ -306,21 +358,13 @@
                     raise ex
                 except Exception as ex:
                     retry_context.exception = ex
-                    if sys.version_info >= (3,):
-                        # Automatic chaining in Python 3 means we keep the 
trace
-                        raise AzureException(ex.args[0])
-                    else:
-                        # There isn't a good solution in 2 for keeping the 
stack trace 
-                        # in general, or that will not result in an error in 3
-                        # However, we can keep the previous error type and 
message
-                        # TODO: In the future we will log the trace
-                        msg = ""
-                        if len(ex.args) > 0:
-                            msg = ex.args[0]
-                        raise AzureException('{}: 
{}'.format(ex.__class__.__name__, msg))
+                    raise _wrap_exception(ex, AzureException)
 
             except AzureException as ex:
                 # only parse the strings used for logging if logging is at 
least enabled for CRITICAL
+                exception_str_in_one_line = ''
+                status_code = ''
+                timestamp_and_request_id = ''
                 if logger.isEnabledFor(logging.CRITICAL):
                     exception_str_in_one_line = str(ex).replace('\n', '')
                     status_code = retry_context.response.status if 
retry_context.response is not None else 'Unknown'
@@ -335,6 +379,11 @@
                                 status_code,
                                 exception_str_in_one_line)
                     raise ex
+                elif isinstance(ex, AzureSigningError):
+                    logger.info("%s Unable to sign the request: Exception=%s.",
+                                client_request_id_prefix,
+                                exception_str_in_one_line)
+                    raise ex
 
                 logger.info("%s Operation failed: checking if the operation 
should be retried. "
                             "Current retry count=%s, %s, HTTP status code=%s, 
Exception=%s.",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-common-1.3.0/azure_bdist_wheel.py 
new/azure-storage-common-1.4.0/azure_bdist_wheel.py
--- old/azure-storage-common-1.3.0/azure_bdist_wheel.py 2018-06-01 
00:48:14.000000000 +0200
+++ new/azure-storage-common-1.4.0/azure_bdist_wheel.py 1970-01-01 
01:00:00.000000000 +0100
@@ -1,54 +0,0 @@
-#-------------------------------------------------------------------------
-# Copyright (c) Microsoft Corporation. All rights reserved.
-# Licensed under the MIT License. See License.txt in the project root for
-# license information.
-#--------------------------------------------------------------------------
-
-from distutils import log as logger
-import os.path
-
-from wheel.bdist_wheel import bdist_wheel
-class azure_bdist_wheel(bdist_wheel):
-    """The purpose of this class is to build wheel a little differently than 
the sdist,
-    without requiring to build the wheel from the sdist (i.e. you can build 
the wheel
-    directly from source).
-    """
-
-    description = "Create an Azure wheel distribution"
-
-    user_options = bdist_wheel.user_options + \
-        [('azure-namespace-package=', None,
-            "Name of the deepest nspkg used")]
-
-    def initialize_options(self):
-        bdist_wheel.initialize_options(self)
-        self.azure_namespace_package = None
-
-    def finalize_options(self):
-        bdist_wheel.finalize_options(self)
-        if self.azure_namespace_package and not 
self.azure_namespace_package.endswith("-nspkg"):
-            raise ValueError("azure_namespace_package must finish by -nspkg")
-
-    def run(self):
-        if not self.distribution.install_requires:
-            self.distribution.install_requires = []
-        self.distribution.install_requires.append(
-            "{}>=2.0.0".format(self.azure_namespace_package))
-        bdist_wheel.run(self)
-
-    def write_record(self, bdist_dir, distinfo_dir):
-        if self.azure_namespace_package:
-            # Split and remove last part, assuming it's "nspkg"
-            subparts = self.azure_namespace_package.split('-')[0:-1]
-        folder_with_init = [os.path.join(*subparts[0:i+1]) for i in 
range(len(subparts))]
-        for azure_sub_package in folder_with_init:
-            init_file = os.path.join(bdist_dir, azure_sub_package, 
'__init__.py')
-            if os.path.isfile(init_file):
-                logger.info("manually remove {} while building the 
wheel".format(init_file))
-                os.remove(init_file)
-            else:
-                raise ValueError("Unable to find {}. Are you sure of your 
namespace package?".format(init_file))
-        bdist_wheel.write_record(self, bdist_dir, distinfo_dir)
-cmdclass = {
-    'bdist_wheel': azure_bdist_wheel,
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-common-1.3.0/azure_storage_common.egg-info/PKG-INFO 
new/azure-storage-common-1.4.0/azure_storage_common.egg-info/PKG-INFO
--- old/azure-storage-common-1.3.0/azure_storage_common.egg-info/PKG-INFO       
2018-06-27 02:49:02.000000000 +0200
+++ new/azure-storage-common-1.4.0/azure_storage_common.egg-info/PKG-INFO       
2018-11-10 03:01:25.000000000 +0100
@@ -1,18 +1,22 @@
 Metadata-Version: 1.1
 Name: azure-storage-common
-Version: 1.3.0
+Version: 1.4.0
 Summary: Microsoft Azure Storage Common Client Library for Python
 Home-page: https://github.com/Azure/azure-storage-python
 Author: Microsoft Corporation
 Author-email: [email protected]
 License: MIT License
-Description-Content-Type: UNKNOWN
 Description: Microsoft Azure Storage SDK for Python
         ======================================
         
+        .. image:: https://travis-ci.org/Azure/azure-storage-python.svg
+            :target: https://travis-ci.org/Azure/azure-storage-python
+        .. image:: 
https://img.shields.io/codecov/c/github/azure/azure-storage-python.svg
+            :target: https://codecov.io/gh/Azure/azure-storage-python
+        
         This project provides a client library in Python that makes it easy to
         consume Microsoft Azure Storage services. For documentation please see
-        the Microsoft Azure `Python Developer Center`_ and our `API 
Reference`_ Page.
+        the Microsoft Azure `Python Developer Center`_ and our `API 
Reference`_ (also available on `readthedocs`_).
         
             If you are looking for the Service Bus or Azure Management
             libraries, please visit
@@ -220,7 +224,8 @@
         -  `API Reference`_
         
         .. _Python Developer Center: 
http://azure.microsoft.com/en-us/develop/python/
-        .. _API Reference: https://azure-storage.readthedocs.io/en/latest/
+        .. _API Reference: 
https://docs.microsoft.com/en-us/python/api/overview/azure/storage/client?view=azure-python
+        .. _readthedocs: https://azure-storage.readthedocs.io/
         .. _here: 
https://github.com/Azure/azure-storage-python/archive/master.zip
         .. _create an account: https://account.windowsazure.com/signup
         .. _Developer Forums on MSDN: 
http://social.msdn.microsoft.com/Forums/windowsazure/en-US/home?forum=windowsazuredata
@@ -233,6 +238,7 @@
         .. _problems: https://github.com/Azure/azure-storage-python/issues/219
         .. _upgrading pip: 
https://docs.microsoft.com/en-us/visualstudio/python/managing-python-on-azure-app-service
         .. _cosmosdb: https://github.com/Azure/azure-cosmosdb-python
+        
 Platform: UNKNOWN
 Classifier: Development Status :: 4 - Beta
 Classifier: Programming Language :: Python
@@ -243,4 +249,5 @@
 Classifier: Programming Language :: Python :: 3.4
 Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
+Classifier: Programming Language :: Python :: 3.7
 Classifier: License :: OSI Approved :: MIT License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-common-1.3.0/azure_storage_common.egg-info/SOURCES.txt 
new/azure-storage-common-1.4.0/azure_storage_common.egg-info/SOURCES.txt
--- old/azure-storage-common-1.3.0/azure_storage_common.egg-info/SOURCES.txt    
2018-06-27 02:49:02.000000000 +0200
+++ new/azure-storage-common-1.4.0/azure_storage_common.egg-info/SOURCES.txt    
2018-11-10 03:01:25.000000000 +0100
@@ -1,6 +1,6 @@
+LICENSE.txt
 MANIFEST.in
 README.rst
-azure_bdist_wheel.py
 setup.cfg
 setup.py
 azure/__init__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-storage-common-1.3.0/azure_storage_common.egg-info/requires.txt 
new/azure-storage-common-1.4.0/azure_storage_common.egg-info/requires.txt
--- old/azure-storage-common-1.3.0/azure_storage_common.egg-info/requires.txt   
2018-06-27 02:49:02.000000000 +0200
+++ new/azure-storage-common-1.4.0/azure_storage_common.egg-info/requires.txt   
2018-11-10 03:01:25.000000000 +0100
@@ -2,3 +2,6 @@
 cryptography
 python-dateutil
 requests
+
+[:python_version<'3.0']
+azure-storage-nspkg
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-common-1.3.0/setup.cfg 
new/azure-storage-common-1.4.0/setup.cfg
--- old/azure-storage-common-1.3.0/setup.cfg    2018-06-27 02:49:02.000000000 
+0200
+++ new/azure-storage-common-1.4.0/setup.cfg    2018-11-10 03:01:25.000000000 
+0100
@@ -1,6 +1,5 @@
 [bdist_wheel]
 universal = 1
-azure-namespace-package = azure-storage-nspkg
 
 [egg_info]
 tag_build = 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-storage-common-1.3.0/setup.py 
new/azure-storage-common-1.4.0/setup.py
--- old/azure-storage-common-1.3.0/setup.py     2018-06-26 22:21:35.000000000 
+0200
+++ new/azure-storage-common-1.4.0/setup.py     2018-11-10 00:24:52.000000000 
+0100
@@ -10,13 +10,6 @@
 
 from setuptools import setup, find_packages
 
-try:
-    from azure_bdist_wheel import cmdclass
-except ImportError:
-    from distutils import log as logger
-
-    logger.warn("Wheel is not available, disabling bdist_wheel hook")
-    cmdclass = {}
 
 # azure v0.x is not compatible with this package
 # azure v0.x used to have a __version__ attribute (newer versions don't)
@@ -51,7 +44,7 @@
 
 setup(
     name='azure-storage-common',
-    version='1.3.0',
+    version='1.4.0',
     description='Microsoft Azure Storage Common Client Library for Python',
     long_description=open('README.rst', 'r').read(),
     license='MIT License',
@@ -68,15 +61,22 @@
         'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
+        'Programming Language :: Python :: 3.7',
         'License :: OSI Approved :: MIT License',
     ],
     zip_safe=False,
-    packages=find_packages(),
+    packages=find_packages(exclude=[
+        # Exclude packages that will be covered by PEP420 or nspkg
+        'azure',
+        'azure.storage',
+    ]),
     install_requires=[
-                         'azure-common>=1.1.5',
-                         'cryptography',
-                         'python-dateutil',
-                         'requests',
-                     ],
-    cmdclass=cmdclass
+        'azure-common>=1.1.5',
+        'cryptography',
+        'python-dateutil',
+        'requests',
+    ],
+    extras_require={
+        ":python_version<'3.0'": ['azure-storage-nspkg'],
+    }
 )


Reply via email to