Hello community,

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

Package is "python-msrest"

Thu Oct  8 13:13:00 2020 rev:12 rq:839868 version:0.6.19

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-msrest/python-msrest.changes      
2020-10-02 17:23:22.698238993 +0200
+++ /work/SRC/openSUSE:Factory/.python-msrest.new.4249/python-msrest.changes    
2020-10-08 13:13:28.623242664 +0200
@@ -1,0 +2,8 @@
+Tue Oct  6 11:42:45 UTC 2020 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- New upstream release
+  + Version 0.6.19
+  + For detailed information about changes see the
+    README.rst file provided with this package
+
+-------------------------------------------------------------------

Old:
----
  msrest-0.6.18.tar.gz

New:
----
  msrest-0.6.19.tar.gz

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

Other differences:
------------------
++++++ python-msrest.spec ++++++
--- /var/tmp/diff_new_pack.ZXaf2A/_old  2020-10-08 13:13:29.363243334 +0200
+++ /var/tmp/diff_new_pack.ZXaf2A/_new  2020-10-08 13:13:29.367243337 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-msrest
-Version:        0.6.18
+Version:        0.6.19
 Release:        0
 Summary:        AutoRest swagger generator Python client runtime
 License:        MIT

++++++ msrest-0.6.18.tar.gz -> msrest-0.6.19.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrest-0.6.18/PKG-INFO new/msrest-0.6.19/PKG-INFO
--- old/msrest-0.6.18/PKG-INFO  2020-07-28 17:03:54.000000000 +0200
+++ new/msrest-0.6.19/PKG-INFO  2020-09-08 18:13:01.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: msrest
-Version: 0.6.18
+Version: 0.6.19
 Summary: AutoRest swagger generator Python client runtime.
 Home-page: https://github.com/Azure/msrest-for-python
 Author: Microsoft Corporation
@@ -27,6 +27,15 @@
         Release History
         ---------------
         
+        2020-09-08 Version 0.6.19
+        +++++++++++++++++++++++++
+        
+        **Bugfixes**
+        
+        - Fix serialization of random Model object  #220
+        - Fix serialization of unicode string in Py2 and object mode #221
+        
+        
         2020-07-27 Version 0.6.18
         +++++++++++++++++++++++++
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrest-0.6.18/README.rst new/msrest-0.6.19/README.rst
--- old/msrest-0.6.18/README.rst        2020-07-28 17:03:05.000000000 +0200
+++ new/msrest-0.6.19/README.rst        2020-09-08 18:12:14.000000000 +0200
@@ -20,6 +20,15 @@
 Release History
 ---------------
 
+2020-09-08 Version 0.6.19
++++++++++++++++++++++++++
+
+**Bugfixes**
+
+- Fix serialization of random Model object  #220
+- Fix serialization of unicode string in Py2 and object mode #221
+
+
 2020-07-27 Version 0.6.18
 +++++++++++++++++++++++++
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrest-0.6.18/msrest/serialization.py 
new/msrest-0.6.19/msrest/serialization.py
--- old/msrest-0.6.18/msrest/serialization.py   2020-07-28 17:03:05.000000000 
+0200
+++ new/msrest-0.6.19/msrest/serialization.py   2020-09-08 18:12:14.000000000 
+0200
@@ -951,9 +951,11 @@
             return self.serialize_basic(attr, self.basic_types[obj_type], 
**kwargs)
         if obj_type is _long_type:
             return self.serialize_long(attr)
+        if obj_type is unicode_str:
+            return self.serialize_unicode(attr)
 
         # If it's a model or I know this dependency, serialize as a Model
-        elif obj_type in self.dependencies.values() or isinstance(obj_type, 
Model):
+        elif obj_type in self.dependencies.values() or isinstance(attr, Model):
             return self._serialize(attr)
 
         if obj_type == dict:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrest-0.6.18/msrest/version.py 
new/msrest-0.6.19/msrest/version.py
--- old/msrest-0.6.18/msrest/version.py 2020-07-28 17:03:05.000000000 +0200
+++ new/msrest-0.6.19/msrest/version.py 2020-09-08 18:12:14.000000000 +0200
@@ -25,4 +25,4 @@
 # --------------------------------------------------------------------------
 
 #: version of this package. Use msrest.__version__ instead
-msrest_version = "0.6.18"
+msrest_version = "0.6.19"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrest-0.6.18/msrest.egg-info/PKG-INFO 
new/msrest-0.6.19/msrest.egg-info/PKG-INFO
--- old/msrest-0.6.18/msrest.egg-info/PKG-INFO  2020-07-28 17:03:54.000000000 
+0200
+++ new/msrest-0.6.19/msrest.egg-info/PKG-INFO  2020-09-08 18:13:01.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: msrest
-Version: 0.6.18
+Version: 0.6.19
 Summary: AutoRest swagger generator Python client runtime.
 Home-page: https://github.com/Azure/msrest-for-python
 Author: Microsoft Corporation
@@ -27,6 +27,15 @@
         Release History
         ---------------
         
+        2020-09-08 Version 0.6.19
+        +++++++++++++++++++++++++
+        
+        **Bugfixes**
+        
+        - Fix serialization of random Model object  #220
+        - Fix serialization of unicode string in Py2 and object mode #221
+        
+        
         2020-07-27 Version 0.6.18
         +++++++++++++++++++++++++
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrest-0.6.18/setup.py new/msrest-0.6.19/setup.py
--- old/msrest-0.6.18/setup.py  2020-07-28 17:03:05.000000000 +0200
+++ new/msrest-0.6.19/setup.py  2020-09-08 18:12:14.000000000 +0200
@@ -28,7 +28,7 @@
 
 setup(
     name='msrest',
-    version='0.6.18',
+    version='0.6.19',
     author='Microsoft Corporation',
     packages=find_packages(exclude=["tests", "tests.*"]),
     url=("https://github.com/Azure/msrest-for-python";),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/msrest-0.6.18/tests/test_serialization.py 
new/msrest-0.6.19/tests/test_serialization.py
--- old/msrest-0.6.18/tests/test_serialization.py       2020-07-28 
17:03:05.000000000 +0200
+++ new/msrest-0.6.19/tests/test_serialization.py       2020-09-08 
18:12:14.000000000 +0200
@@ -312,6 +312,28 @@
         assert s.query("filter", [',', ',', ','], "[str]", div=",") == 
"%2C,%2C,%2C"
         assert s.query("filter", [',', ',', ','], "[str]", div="|", 
skip_quote=True) == ",|,|,"
 
+    def test_serialize_custom_model(self):
+
+        class CustomSample(Model):
+            _validation = {
+                    'a': {'required': True},
+            }
+
+            _attribute_map = {
+                'a': {'key': 'a', 'type': 'str'},
+            }
+
+            def __init__(self, a):
+                self.a = a
+
+        s = Serializer()
+        model = CustomSample("helloworld")
+        serialized = s._serialize(model)
+
+        assert serialized is not None
+        assert isinstance(serialized, dict)
+        assert serialized['a'] == "helloworld"
+
     def test_serialize_direct_model(self):
         testobj = self.TestObj()
         testobj.attr_a = "myid"
@@ -1344,6 +1366,8 @@
         except NameError:
             long_type = int
 
+        s = Serializer()
+        assert s.serialize_data(long_type(1), 'object') == long_type(1)
 
         class TestModel(Model):
             _attribute_map = {'data': {'key': 'data', 'type': 'object'}}
@@ -1354,6 +1378,23 @@
             'data': {'id': long_type(1)}
         }
 
+    def test_unicode_as_type_object(self):
+        """Test irrelevant on Python 3. But still doing it to test regresssion.
+            https://github.com/Azure/msrest-for-python/issue/221
+        """
+
+        s = Serializer()
+        assert s.serialize_data(u"\ua015", 'object') == u"\ua015"
+
+        class TestModel(Model):
+            _attribute_map = {'data': {'key': 'data', 'type': 'object'}}
+
+        m = TestModel(data = {'id': u"\ua015"})
+        serialized = m.serialize()
+        assert serialized == {
+            'data': {'id': u"\ua015"}
+        }
+
     def test_json_with_xml_map(self):
         basic_json = {'age': 37, 'country': 'france'}
 


Reply via email to