Hello community,

here is the log from the commit of package python-msrestazure for 
openSUSE:Factory checked in at 2020-10-02 17:23:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-msrestazure (Old)
 and      /work/SRC/openSUSE:Factory/.python-msrestazure.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-msrestazure"

Fri Oct  2 17:23:17 2020 rev:10 rq:830914 version:0.6.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-msrestazure/python-msrestazure.changes    
2020-03-31 19:41:39.984588647 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-msrestazure.new.4249/python-msrestazure.changes
  2020-10-02 17:23:29.850243274 +0200
@@ -1,0 +2,9 @@
+Fri Aug 28 13:18:55 UTC 2020 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- New upstream release
+  + Version 0.6.4
+  + For detailed information about changes see the
+    README.rst file provided with this package
+- Update Requires from setup.py
+
+-------------------------------------------------------------------

Old:
----
  msrestazure-0.6.3.tar.gz

New:
----
  msrestazure-0.6.4.tar.gz

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

Other differences:
------------------
++++++ python-msrestazure.spec ++++++
--- /var/tmp/diff_new_pack.hToA1R/_old  2020-10-02 17:23:30.858243878 +0200
+++ /var/tmp/diff_new_pack.hToA1R/_new  2020-10-02 17:23:30.862243880 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-msrestazure
-Version:        0.6.3
+Version:        0.6.4
 Release:        0
 Summary:        AutoRest swagger generator - Azure-specific module
 License:        MIT
@@ -33,6 +33,7 @@
 Requires:       python-adal >= 0.6.0
 Requires:       python-msrest < 2.0.0
 Requires:       python-msrest >= 0.6.0
+Requires:       python-six
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 

++++++ msrestazure-0.6.3.tar.gz -> msrestazure-0.6.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrestazure-0.6.3/PKG-INFO 
new/msrestazure-0.6.4/PKG-INFO
--- old/msrestazure-0.6.3/PKG-INFO      2020-03-17 23:45:08.000000000 +0100
+++ new/msrestazure-0.6.4/PKG-INFO      2020-06-29 22:04:02.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: msrestazure
-Version: 0.6.3
+Version: 0.6.4
 Summary: AutoRest swagger generator Python client runtime. Azure-specific 
module.
 Home-page: https://github.com/Azure/msrestazure-for-python
 Author: Microsoft Corporation
@@ -28,6 +28,14 @@
         Release History
         ---------------
         
+        2020-06-29 Version 0.6.4
+        ++++++++++++++++++++++++
+        
+        **Bugfix**
+        
+        - Unable to raise exception if JSON body contains UTF-8 characters on 
Python 2 #150
+        
+        
         2020-03-17 Version 0.6.3
         ++++++++++++++++++++++++
         
@@ -575,9 +583,9 @@
 Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-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: Programming Language :: Python :: 3.8
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Topic :: Software Development
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrestazure-0.6.3/README.rst 
new/msrestazure-0.6.4/README.rst
--- old/msrestazure-0.6.3/README.rst    2020-03-17 23:44:21.000000000 +0100
+++ new/msrestazure-0.6.4/README.rst    2020-06-29 22:03:12.000000000 +0200
@@ -20,6 +20,14 @@
 Release History
 ---------------
 
+2020-06-29 Version 0.6.4
+++++++++++++++++++++++++
+
+**Bugfix**
+
+- Unable to raise exception if JSON body contains UTF-8 characters on Python 2 
#150
+
+
 2020-03-17 Version 0.6.3
 ++++++++++++++++++++++++
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrestazure-0.6.3/msrestazure/azure_exceptions.py 
new/msrestazure-0.6.4/msrestazure/azure_exceptions.py
--- old/msrestazure-0.6.3/msrestazure/azure_exceptions.py       2020-03-17 
23:44:21.000000000 +0100
+++ new/msrestazure-0.6.4/msrestazure/azure_exceptions.py       2020-06-29 
22:03:12.000000000 +0200
@@ -25,6 +25,7 @@
 # --------------------------------------------------------------------------
 
 import json
+import six
 
 from requests import RequestException
 
@@ -55,6 +56,15 @@
     def __init__(self, error):
         self.error = error
 
+
+def _unicode_or_str(obj):
+    try:
+        return unicode(obj)
+    except NameError:
+        return str(obj)
+
+
[email protected]_2_unicode_compatible
 class CloudErrorData(object):
     """Cloud Error Data object, deserialized from error data returned
     during a failed REST API call.
@@ -85,37 +95,37 @@
 
     def __str__(self):
         """Cloud error message."""
-        error_str = "Azure Error: {}".format(self.error)
-        error_str += "\nMessage: {}".format(self._message)
+        error_str = u"Azure Error: {}".format(self.error)
+        error_str += u"\nMessage: {}".format(self._message)
         if self.target:
-            error_str += "\nTarget: {}".format(self.target)
+            error_str += u"\nTarget: {}".format(self.target)
         if self.request_id:
-            error_str += "\nRequest ID: {}".format(self.request_id)
+            error_str += u"\nRequest ID: {}".format(self.request_id)
         if self.error_time:
-            error_str += "\nError Time: {}".format(self.error_time)
+            error_str += u"\nError Time: {}".format(self.error_time)
         if self.data:
-            error_str += "\nAdditional Data:"
+            error_str += u"\nAdditional Data:"
             for key, value in self.data.items():
-                error_str += "\n\t{} : {}".format(key, value)
+                error_str += u"\n\t{} : {}".format(key, value)
         if self.details:
             error_str += "\nException Details:"
             for error_obj in self.details:
-                error_str += "\n\tError Code: {}".format(error_obj.error)
-                error_str += "\n\tMessage: {}".format(error_obj.message)
+                error_str += u"\n\tError Code: {}".format(error_obj.error)
+                error_str += u"\n\tMessage: {}".format(error_obj.message)
                 if error_obj.target:
-                    error_str += "\n\tTarget: {}".format(error_obj.target)
+                    error_str += u"\n\tTarget: {}".format(error_obj.target)
                 if error_obj.innererror:
-                    error_str += "\nInner error: 
{}".format(json.dumps(error_obj.innererror, indent=4))
+                    error_str += u"\nInner error: 
{}".format(json.dumps(error_obj.innererror, indent=4, ensure_ascii=False))
                 if error_obj.additionalInfo:
-                    error_str += "\n\tAdditional Information:"
+                    error_str += u"\n\tAdditional Information:"
                     for error_info in error_obj.additionalInfo:
-                        error_str += 
"\n\t\t{}".format(str(error_info).replace("\n", "\n\t\t"))
+                        error_str += 
"\n\t\t{}".format(_unicode_or_str(error_info).replace("\n", "\n\t\t"))
         if self.innererror:
-            error_str += "\nInner error: 
{}".format(json.dumps(self.innererror, indent=4))
+            error_str += u"\nInner error: 
{}".format(json.dumps(self.innererror, indent=4, ensure_ascii=False))
         if self.additionalInfo:
             error_str += "\nAdditional Information:"
             for error_info in self.additionalInfo:
-                error_str += "\n\t{}".format(str(error_info).replace("\n", 
"\n\t"))
+                error_str += 
u"\n\t{}".format(_unicode_or_str(error_info).replace("\n", "\n\t"))
         return error_str
 
     @classmethod
@@ -153,6 +163,7 @@
             pass
 
 
[email protected]_2_unicode_compatible
 class CloudError(ClientException):
     """ClientError, exception raised for failed Azure REST call.
     Will attempt to deserialize response into meaningful error
@@ -189,8 +200,8 @@
     def __str__(self):
         """Cloud error message"""
         if self.error:
-            return str(self.error)
-        return str(self.message)
+            return _unicode_or_str(self.error)
+        return _unicode_or_str(self.message)
 
     def _build_error_data(self, response):
         try:
@@ -244,6 +255,8 @@
                 self.message = msg.format(
                     response.status_code, message)
 
+
[email protected]_2_unicode_compatible
 class TypedErrorInfo(object):
     """Typed Error Info object, deserialized from error data returned
     during a failed REST API call. Contains additional error information
@@ -261,6 +274,6 @@
 
     def __str__(self):
         """Cloud error message."""
-        error_str = "Type: {}".format(self.type)
-        error_str += "\nInfo: {}".format(json.dumps(self.info, indent=4))
+        error_str = u"Type: {}".format(self.type)
+        error_str += u"\nInfo: {}".format(json.dumps(self.info, indent=4, 
ensure_ascii=False))
         return error_str
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrestazure-0.6.3/msrestazure/version.py 
new/msrestazure-0.6.4/msrestazure/version.py
--- old/msrestazure-0.6.3/msrestazure/version.py        2020-03-17 
23:44:21.000000000 +0100
+++ new/msrestazure-0.6.4/msrestazure/version.py        2020-06-29 
22:03:12.000000000 +0200
@@ -25,4 +25,4 @@
 # --------------------------------------------------------------------------
 
 #: version of the package. Use msrestazure.__version__ instead.
-msrestazure_version = "0.6.3"
+msrestazure_version = "0.6.4"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrestazure-0.6.3/msrestazure.egg-info/PKG-INFO 
new/msrestazure-0.6.4/msrestazure.egg-info/PKG-INFO
--- old/msrestazure-0.6.3/msrestazure.egg-info/PKG-INFO 2020-03-17 
23:45:08.000000000 +0100
+++ new/msrestazure-0.6.4/msrestazure.egg-info/PKG-INFO 2020-06-29 
22:04:02.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: msrestazure
-Version: 0.6.3
+Version: 0.6.4
 Summary: AutoRest swagger generator Python client runtime. Azure-specific 
module.
 Home-page: https://github.com/Azure/msrestazure-for-python
 Author: Microsoft Corporation
@@ -28,6 +28,14 @@
         Release History
         ---------------
         
+        2020-06-29 Version 0.6.4
+        ++++++++++++++++++++++++
+        
+        **Bugfix**
+        
+        - Unable to raise exception if JSON body contains UTF-8 characters on 
Python 2 #150
+        
+        
         2020-03-17 Version 0.6.3
         ++++++++++++++++++++++++
         
@@ -575,9 +583,9 @@
 Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-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: Programming Language :: Python :: 3.8
 Classifier: License :: OSI Approved :: MIT License
 Classifier: Topic :: Software Development
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrestazure-0.6.3/msrestazure.egg-info/requires.txt 
new/msrestazure-0.6.4/msrestazure.egg-info/requires.txt
--- old/msrestazure-0.6.3/msrestazure.egg-info/requires.txt     2020-03-17 
23:45:08.000000000 +0100
+++ new/msrestazure-0.6.4/msrestazure.egg-info/requires.txt     2020-06-29 
22:04:02.000000000 +0200
@@ -1,2 +1,3 @@
 msrest<2.0.0,>=0.6.0
 adal<2.0.0,>=0.6.0
+six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrestazure-0.6.3/setup.py 
new/msrestazure-0.6.4/setup.py
--- old/msrestazure-0.6.3/setup.py      2020-03-17 23:44:21.000000000 +0100
+++ new/msrestazure-0.6.4/setup.py      2020-06-29 22:03:12.000000000 +0200
@@ -28,7 +28,7 @@
 
 setup(
     name='msrestazure',
-    version='0.6.3',
+    version='0.6.4',
     author='Microsoft Corporation',
     author_email='[email protected]',
     packages=find_packages(exclude=["tests", "tests.*"]),
@@ -43,14 +43,15 @@
         'Programming Language :: Python :: 2',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.4',
         'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
+        'Programming Language :: Python :: 3.8',
         'License :: OSI Approved :: MIT License',
         'Topic :: Software Development'],
     install_requires=[
         "msrest>=0.6.0,<2.0.0",
         "adal>=0.6.0,<2.0.0",
+        "six",
     ],
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrestazure-0.6.3/tests/test_exceptions.py 
new/msrestazure-0.6.4/tests/test_exceptions.py
--- old/msrestazure-0.6.3/tests/test_exceptions.py      2020-03-17 
23:44:21.000000000 +0100
+++ new/msrestazure-0.6.4/tests/test_exceptions.py      2020-06-29 
22:03:12.000000000 +0200
@@ -1,4 +1,5 @@
-#--------------------------------------------------------------------------
+# -*- coding: utf-8 -*-
+#--------------------------------------------------------------------------
 #
 # Copyright (c) Microsoft Corporation. All rights reserved.
 #
@@ -204,6 +205,18 @@
         self.assertEqual(error.status_code, 400)
         self.assertIsInstance(error.error, Response)
 
+        message = { 'error': {
+            'code': '500',
+            'message': u"ééééé",
+            }}
+        response._content = json.dumps(message).encode("utf-8")
+        error = CloudError(response)
+        try:  # Python 2
+            assert u"ééééé" in unicode(error)
+            assert u"ééééé".encode("utf-8") in str(error)
+        except NameError:  # Python 3
+            assert "ééééé" in str(error)
+
         response._content = b"{{"
         error = CloudError(response)
         self.assertIn("None", error.message)


Reply via email to