Hello community,

here is the log from the commit of package python-PyFxA for openSUSE:Factory 
checked in at 2019-07-26 12:44:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyFxA (Old)
 and      /work/SRC/openSUSE:Factory/.python-PyFxA.new.4126 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-PyFxA"

Fri Jul 26 12:44:28 2019 rev:7 rq:718746 version:0.7.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyFxA/python-PyFxA.changes        
2019-06-04 12:12:59.339809031 +0200
+++ /work/SRC/openSUSE:Factory/.python-PyFxA.new.4126/python-PyFxA.changes      
2019-07-26 12:44:31.333834280 +0200
@@ -1,0 +2,6 @@
+Fri Jul 26 07:07:23 UTC 2019 - Antoine Belvire <[email protected]>
+
+- Update to version 0.7.3:
+  * Allow specifying a `ttl` when redeeming an authorization code.
+
+-------------------------------------------------------------------

Old:
----
  PyFxA-0.7.2.tar.gz

New:
----
  PyFxA-0.7.3.tar.gz

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

Other differences:
------------------
++++++ python-PyFxA.spec ++++++
--- /var/tmp/diff_new_pack.ABVnoD/_old  2019-07-26 12:44:32.905833545 +0200
+++ /var/tmp/diff_new_pack.ABVnoD/_new  2019-07-26 12:44:32.925833536 +0200
@@ -19,7 +19,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-PyFxA
-Version:        0.7.2
+Version:        0.7.3
 Release:        0
 Summary:        Firefox Accounts client library for Python
 License:        MPL-2.0

++++++ PyFxA-0.7.2.tar.gz -> PyFxA-0.7.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyFxA-0.7.2/CHANGES.txt new/PyFxA-0.7.3/CHANGES.txt
--- old/PyFxA-0.7.2/CHANGES.txt 2019-06-03 05:14:22.000000000 +0200
+++ new/PyFxA-0.7.3/CHANGES.txt 2019-07-26 01:01:01.000000000 +0200
@@ -3,6 +3,12 @@
 
 This document describes changes between each past release.
 
+0.7.3 (2019-07-26)
+==================
+
+- Allow specifying a `ttl` when redeeming an authorization code.
+
+
 0.7.2 (2019-06-03)
 ==================
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyFxA-0.7.2/PKG-INFO new/PyFxA-0.7.3/PKG-INFO
--- old/PyFxA-0.7.2/PKG-INFO    2019-06-03 05:16:02.000000000 +0200
+++ new/PyFxA-0.7.3/PKG-INFO    2019-07-26 01:03:29.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: PyFxA
-Version: 0.7.2
+Version: 0.7.3
 Summary: Firefox Accounts client library for Python
 Home-page: https://github.com/mozilla/PyFxA
 Author: Mozilla Services
@@ -316,6 +316,12 @@
         
         This document describes changes between each past release.
         
+        0.7.3 (2019-07-26)
+        ==================
+        
+        - Allow specifying a `ttl` when redeeming an authorization code.
+        
+        
         0.7.2 (2019-06-03)
         ==================
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyFxA-0.7.2/PyFxA.egg-info/PKG-INFO 
new/PyFxA-0.7.3/PyFxA.egg-info/PKG-INFO
--- old/PyFxA-0.7.2/PyFxA.egg-info/PKG-INFO     2019-06-03 05:15:30.000000000 
+0200
+++ new/PyFxA-0.7.3/PyFxA.egg-info/PKG-INFO     2019-07-26 01:03:29.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: PyFxA
-Version: 0.7.2
+Version: 0.7.3
 Summary: Firefox Accounts client library for Python
 Home-page: https://github.com/mozilla/PyFxA
 Author: Mozilla Services
@@ -316,6 +316,12 @@
         
         This document describes changes between each past release.
         
+        0.7.3 (2019-07-26)
+        ==================
+        
+        - Allow specifying a `ttl` when redeeming an authorization code.
+        
+        
         0.7.2 (2019-06-03)
         ==================
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyFxA-0.7.2/dev-requirements.txt 
new/PyFxA-0.7.3/dev-requirements.txt
--- old/PyFxA-0.7.2/dev-requirements.txt        2019-06-03 04:17:57.000000000 
+0200
+++ new/PyFxA-0.7.3/dev-requirements.txt        2019-07-26 00:58:59.000000000 
+0200
@@ -1,8 +1,8 @@
 grequests
 mock;python_version<"3.3"
 responses
-pytest
-pytest-runner
+pytest==4.6.4
+pytest-runner==4.5.1
 pytest-cov
 pytest-flake8
 pyotp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyFxA-0.7.2/fxa/oauth.py new/PyFxA-0.7.3/fxa/oauth.py
--- old/PyFxA-0.7.2/fxa/oauth.py        2018-12-13 09:20:11.000000000 +0100
+++ new/PyFxA-0.7.3/fxa/oauth.py        2019-07-26 00:58:59.000000000 +0200
@@ -93,13 +93,14 @@
         return urlunparse(authorization_url._replace(query=query_str))
 
     def trade_code(self, code, client_id=None, client_secret=None,
-                   code_verifier=None):
+                   code_verifier=None, ttl=None):
         """Trade the authentication code for a longer lived token.
 
         :param code: the authentication code from the oauth redirect dance.
         :param client_id: the string generated during FxA client registration.
         :param client_secret: the related secret string.
         :param code_verifier: optional PKCE code verifier.
+        :param ttl: optional ttl in seconds, the access token is valid for.
         :returns: a dict with user id and authorized scopes for this token.
         """
         if client_id is None:
@@ -115,6 +116,8 @@
             body["client_secret"] = client_secret
         if code_verifier is not None:
             body["code_verifier"] = code_verifier
+        if ttl is not None:
+            body["ttl"] = ttl
         resp = self.apiclient.post(url, body)
 
         if 'access_token' not in resp:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyFxA-0.7.2/fxa/tests/test_oauth.py 
new/PyFxA-0.7.3/fxa/tests/test_oauth.py
--- old/PyFxA-0.7.2/fxa/tests/test_oauth.py     2018-12-13 09:20:11.000000000 
+0100
+++ new/PyFxA-0.7.3/fxa/tests/test_oauth.py     2019-07-26 00:58:59.000000000 
+0200
@@ -133,6 +133,24 @@
           'code_verifier': 'verifyme',
         })
 
+    @responses.activate
+    def test_trade_token_can_take_ttl(self):
+        responses.add(responses.POST,
+                      'https://server/v1/token',
+                      body='{"access_token": "tokay"}',
+                      content_type='application/json')
+        tokens = self.client.trade_code(
+            code='1234',
+            ttl=120,
+        )
+        self.assertEqual(tokens, {"access_token": "tokay"})
+        self.assertEqual(self._get_request_body(), {
+          'client_id': 'abc',
+          'client_secret': 'cake',
+          'code': '1234',
+          'ttl': 120
+        })
+
 
 class TestAuthClientVerifyCode(unittest.TestCase):
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyFxA-0.7.2/setup.py new/PyFxA-0.7.3/setup.py
--- old/PyFxA-0.7.2/setup.py    2019-06-03 05:14:35.000000000 +0200
+++ new/PyFxA-0.7.3/setup.py    2019-07-26 01:01:34.000000000 +0200
@@ -24,10 +24,6 @@
     requires = (ln.strip() for ln in f)
     test_requires = [ln for ln in requires if ln and not ln.startswith("#")]
 
-# Read the version number from the module source code.
-# To do so, we parse out all lines up to the ones defining __version__ and
-# execute them, then grab the resulting value of the __version__ variable.
-
 REQUIREMENTS = [
     "requests>=2.4.2",
     "cryptography",
@@ -44,7 +40,7 @@
 
 
 setup(name="PyFxA",
-      version='0.7.2',
+      version='0.7.3',
       description="Firefox Accounts client library for Python",
       long_description=README + "\n\n" + CHANGES,
       classifiers=[


Reply via email to