Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-requests-hawk for 
openSUSE:Factory checked in at 2021-06-06 22:40:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-requests-hawk (Old)
 and      /work/SRC/openSUSE:Factory/.python-requests-hawk.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-requests-hawk"

Sun Jun  6 22:40:30 2021 rev:6 rq:897756 version:1.1.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-requests-hawk/python-requests-hawk.changes    
    2021-06-04 00:34:15.540991469 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-requests-hawk.new.1898/python-requests-hawk.changes
      2021-06-06 22:40:32.739382684 +0200
@@ -1,0 +2,8 @@
+Sat Jun  5 20:37:41 UTC 2021 - Antoine Belvire <[email protected]>
+
+- Update to version 1.1.1:
+  * Handle cases where Content-Type is defined as bytes rather than
+   string. (#25)
+  * Allow for app mohawk sender parameter configuration.
+
+-------------------------------------------------------------------

Old:
----
  requests-hawk-1.1.0.tar.gz

New:
----
  requests-hawk-1.1.1.tar.gz

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

Other differences:
------------------
++++++ python-requests-hawk.spec ++++++
--- /var/tmp/diff_new_pack.yUI1QC/_old  2021-06-06 22:40:33.903384964 +0200
+++ /var/tmp/diff_new_pack.yUI1QC/_new  2021-06-06 22:40:33.903384964 +0200
@@ -19,7 +19,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-requests-hawk
-Version:        1.1.0
+Version:        1.1.1
 Release:        0
 Summary:        Hawk authentication strategy for the requests python library
 License:        Apache-2.0

++++++ requests-hawk-1.1.0.tar.gz -> requests-hawk-1.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-hawk-1.1.0/CHANGES.txt 
new/requests-hawk-1.1.1/CHANGES.txt
--- old/requests-hawk-1.1.0/CHANGES.txt 2020-12-17 05:54:38.000000000 +0100
+++ new/requests-hawk-1.1.1/CHANGES.txt 2021-06-04 19:00:08.000000000 +0200
@@ -1,6 +1,13 @@
 CHANGELOG
 =========
 
+1.1.1 (2021-06-04)
+------------------
+
+- Handle cases where Content-Type is defined as bytes rather than string. (#25)
+- Allow for app mohawk sender parameter configuration
+
+
 1.1.0 (2020-12-16)
 ------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-hawk-1.1.0/PKG-INFO 
new/requests-hawk-1.1.1/PKG-INFO
--- old/requests-hawk-1.1.0/PKG-INFO    2020-12-17 05:55:08.000000000 +0100
+++ new/requests-hawk-1.1.1/PKG-INFO    2021-06-04 19:00:08.950368600 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: requests-hawk
-Version: 1.1.0
+Version: 1.1.1
 Summary: requests-hawk
 Home-page: https://github.com/mozilla-services/requests-hawk
 Author: Mozilla Services
@@ -131,6 +131,13 @@
         CHANGELOG
         =========
         
+        1.1.1 (2021-06-04)
+        ------------------
+        
+        - Handle cases where Content-Type is defined as bytes rather than 
string. (#25)
+        - Allow for app mohawk sender parameter configuration
+        
+        
         1.1.0 (2020-12-16)
         ------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-hawk-1.1.0/requests_hawk/__init__.py 
new/requests-hawk-1.1.1/requests_hawk/__init__.py
--- old/requests-hawk-1.1.0/requests_hawk/__init__.py   2020-12-17 
05:54:38.000000000 +0100
+++ new/requests-hawk-1.1.1/requests_hawk/__init__.py   2021-06-04 
19:00:08.000000000 +0200
@@ -40,7 +40,7 @@
     """
     def __init__(self, hawk_session=None, id=None, key=None, 
algorithm='sha256',
                  credentials=None, server_url=None, _timestamp=None,
-                 always_hash_content=True):
+                 always_hash_content=True, app=None):
         if credentials is not None:
             raise AttributeError("The 'credentials' param has been removed. "
                                  "Pass 'id' and 'key' instead, or 
'**credentials_dict'.")
@@ -68,19 +68,25 @@
         self._timestamp = _timestamp
         self.host = urlparse(server_url).netloc if server_url else None
         self.always_hash_content = always_hash_content
+        self.app = app
 
     def __call__(self, r):
         if self.host is not None:
             r.headers['Host'] = self.host
 
+        content_type = r.headers.get("Content-Type") or ""
+        if not isinstance(content_type, text_type):
+            content_type = content_type.decode("utf-8")
+
         sender = mohawk.Sender(
             self.credentials,
             r.url,
             r.method,
             content=r.body or EmptyValue,
-            content_type=r.headers.get("Content-Type", EmptyValue),
+            content_type=content_type or EmptyValue,
             always_hash_content=self.always_hash_content,
-            _timestamp=self._timestamp
+            _timestamp=self._timestamp,
+            app=self.app
         )
 
         r.headers['Authorization'] = sender.request_header
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/requests-hawk-1.1.0/requests_hawk/tests/test_hawkauth.py 
new/requests-hawk-1.1.1/requests_hawk/tests/test_hawkauth.py
--- old/requests-hawk-1.1.0/requests_hawk/tests/test_hawkauth.py        
2020-12-17 05:54:38.000000000 +0100
+++ new/requests-hawk-1.1.1/requests_hawk/tests/test_hawkauth.py        
2021-06-04 19:00:08.000000000 +0200
@@ -101,3 +101,12 @@
         request = Request('GET', 'http://www.example.com', auth=auth)
         r = request.prepare()
         self.assertNotIn('hash="', r.headers['Authorization'])
+
+    def test_hawk_auth_supports_binary_content_type(self):
+        headers = {'Content-Type': b'application/json'}
+        auth = HawkAuth(id='test_id', key='test_key')
+        request = Request('POST', 'https://example.com', auth=auth,
+                          headers=headers, data=b"data")
+        r = request.prepare()
+        auth_header = r.headers['Authorization']
+        self.assertTrue('id="test_id"' in auth_header, "ID doesn't match")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-hawk-1.1.0/requests_hawk.egg-info/PKG-INFO 
new/requests-hawk-1.1.1/requests_hawk.egg-info/PKG-INFO
--- old/requests-hawk-1.1.0/requests_hawk.egg-info/PKG-INFO     2020-12-17 
05:55:08.000000000 +0100
+++ new/requests-hawk-1.1.1/requests_hawk.egg-info/PKG-INFO     2021-06-04 
19:00:08.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: requests-hawk
-Version: 1.1.0
+Version: 1.1.1
 Summary: requests-hawk
 Home-page: https://github.com/mozilla-services/requests-hawk
 Author: Mozilla Services
@@ -131,6 +131,13 @@
         CHANGELOG
         =========
         
+        1.1.1 (2021-06-04)
+        ------------------
+        
+        - Handle cases where Content-Type is defined as bytes rather than 
string. (#25)
+        - Allow for app mohawk sender parameter configuration
+        
+        
         1.1.0 (2020-12-16)
         ------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/requests-hawk-1.1.0/requests_hawk.egg-info/requires.txt 
new/requests-hawk-1.1.1/requests_hawk.egg-info/requires.txt
--- old/requests-hawk-1.1.0/requests_hawk.egg-info/requires.txt 2020-12-17 
05:55:08.000000000 +0100
+++ new/requests-hawk-1.1.1/requests_hawk.egg-info/requires.txt 2021-06-04 
19:00:08.000000000 +0200
@@ -1,2 +1,2 @@
-mohawk
 requests
+mohawk
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-hawk-1.1.0/setup.py 
new/requests-hawk-1.1.1/setup.py
--- old/requests-hawk-1.1.0/setup.py    2020-12-17 05:54:38.000000000 +0100
+++ new/requests-hawk-1.1.1/setup.py    2021-06-04 19:00:08.000000000 +0200
@@ -13,7 +13,7 @@
 requires = ['requests', 'mohawk']
 
 setup(name='requests-hawk',
-      version='1.1.0',
+      version='1.1.1',
       description='requests-hawk',
       long_description=README + '\n\n' + CHANGES,
       classifiers=[

Reply via email to