Hello community,

here is the log from the commit of package python-requests-mock for 
openSUSE:Factory checked in at 2016-07-14 09:46:25
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-requests-mock (Old)
 and      /work/SRC/openSUSE:Factory/.python-requests-mock.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-requests-mock"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-requests-mock/python-requests-mock.changes    
    2015-12-16 17:42:29.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-requests-mock.new/python-requests-mock.changes
   2016-07-14 09:46:29.000000000 +0200
@@ -1,0 +2,17 @@
+Fri Jul  8 08:55:29 UTC 2016 - [email protected]
+
+- fix source url
+
+-------------------------------------------------------------------
+Wed Jul  6 16:13:45 UTC 2016 - [email protected]
+
+- update to 1.0.0:
+  * Add tox environment to run against master requests
+  * Change dev status classifier to stable
+  * Doc fixups
+  * Expose cert and proxies as attributes of the last request
+  * Add timeout and allow_retries to RequestProxy
+  * Fix py34 DB issue and remove py33/py26
+  * Remove pypip.in badge from readme
+
+-------------------------------------------------------------------

Old:
----
  requests-mock-0.7.0.tar.gz

New:
----
  requests-mock-1.0.0.tar.gz

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

Other differences:
------------------
++++++ python-requests-mock.spec ++++++
--- /var/tmp/diff_new_pack.px99aC/_old  2016-07-14 09:46:31.000000000 +0200
+++ /var/tmp/diff_new_pack.px99aC/_new  2016-07-14 09:46:31.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-requests-mock
 #
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 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
@@ -17,13 +17,13 @@
 
 
 Name:           python-requests-mock
-Version:        0.7.0
+Version:        1.0.0
 Release:        0
 Summary:        Mock out responses from the requests package
 License:        Apache-2.0
 Group:          Development/Languages/Python
 Url:            https://requests-mock.readthedocs.org/
-Source:         
https://pypi.python.org/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz
+Source:         
https://pypi.io/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz
 BuildRequires:  python-devel
 BuildRequires:  python-fixtures
 BuildRequires:  python-mock

++++++ requests-mock-0.7.0.tar.gz -> requests-mock-1.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-mock-0.7.0/AUTHORS 
new/requests-mock-1.0.0/AUTHORS
--- old/requests-mock-0.7.0/AUTHORS     2015-11-24 02:31:04.000000000 +0100
+++ new/requests-mock-1.0.0/AUTHORS     2016-05-09 07:14:35.000000000 +0200
@@ -1,6 +1,8 @@
 Ian Cordasco <[email protected]>
 Jamie Lennox <[email protected]>
 Jamie Lennox <[email protected]>
+Janonymous <[email protected]>
 Jeremy Stanley <[email protected]>
+Louis Taylor <[email protected]>
 Monty Taylor <[email protected]>
 Sebastian Kalinowski <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-mock-0.7.0/ChangeLog 
new/requests-mock-1.0.0/ChangeLog
--- old/requests-mock-0.7.0/ChangeLog   2015-11-24 02:31:04.000000000 +0100
+++ new/requests-mock-1.0.0/ChangeLog   2016-05-09 07:14:35.000000000 +0200
@@ -1,6 +1,17 @@
 CHANGES
 =======
 
+1.0.0
+-----
+
+* Add tox environment to run against master requests
+* Change dev status classifier to stable
+* Doc fixups
+* Expose cert and proxies as attributes of the last request
+* Add timeout and allow_retries to RequestProxy
+* Fix py34 DB issue and remove py33/py26
+* Remove pypip.in badge from readme
+
 0.7.0
 -----
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-mock-0.7.0/PKG-INFO 
new/requests-mock-1.0.0/PKG-INFO
--- old/requests-mock-0.7.0/PKG-INFO    2015-11-24 02:31:04.000000000 +0100
+++ new/requests-mock-1.0.0/PKG-INFO    2016-05-09 07:14:35.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: requests-mock
-Version: 0.7.0
+Version: 1.0.0
 Summary: Mock out responses from the requests package
 Home-page: https://requests-mock.readthedocs.org/
 Author: Jamie Lennox
@@ -13,9 +13,6 @@
         .. image:: https://badge.fury.io/py/requests-mock.png
             :target: http://badge.fury.io/py/requests-mock
         
-        .. image:: https://pypip.in/d/requests-mock/badge.png
-                :target: https://crate.io/packages/requests-mock?version=latest
-        
         Intro
         =====
         
@@ -98,7 +95,7 @@
         
         
 Platform: UNKNOWN
-Classifier: Development Status :: 3 - Alpha
+Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: Intended Audience :: Information Technology
 Classifier: License :: OSI Approved :: Apache Software License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-mock-0.7.0/README.rst 
new/requests-mock-1.0.0/README.rst
--- old/requests-mock-0.7.0/README.rst  2015-11-24 02:30:36.000000000 +0100
+++ new/requests-mock-1.0.0/README.rst  2016-05-09 07:12:34.000000000 +0200
@@ -5,9 +5,6 @@
 .. image:: https://badge.fury.io/py/requests-mock.png
     :target: http://badge.fury.io/py/requests-mock
 
-.. image:: https://pypip.in/d/requests-mock/badge.png
-        :target: https://crate.io/packages/requests-mock?version=latest
-
 Intro
 =====
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-mock-0.7.0/docs/conf.py 
new/requests-mock-1.0.0/docs/conf.py
--- old/requests-mock-0.7.0/docs/conf.py        2015-11-24 02:30:36.000000000 
+0100
+++ new/requests-mock-1.0.0/docs/conf.py        2016-05-09 07:12:37.000000000 
+0200
@@ -267,7 +267,8 @@
 
 requests_uri = 'http://docs.python-requests.org/en/latest/'
 urllib3_uri = 'http://urllib3.readthedocs.org/en/latest'
-python_uri = 'http://docs.python.org/3.3'
+python_uri = 'http://docs.python.org/3'
 intersphinx_mapping = {'requests': (requests_uri, None),
+                       'urllib': (python_uri, None),
                        'urllib3': (urllib3_uri, None),
                        'python': (python_uri, None)}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-mock-0.7.0/docs/history.rst 
new/requests-mock-1.0.0/docs/history.rst
--- old/requests-mock-0.7.0/docs/history.rst    2015-11-24 02:30:36.000000000 
+0100
+++ new/requests-mock-1.0.0/docs/history.rst    2016-05-09 07:12:37.000000000 
+0200
@@ -7,7 +7,7 @@
 Called
 ======
 
-The easiest way to test if a request hit the adapter is to simply check the 
called property.
+The easiest way to test if a request hit the adapter is to simply check the 
called property or the call_count property.
 
 .. doctest::
 
@@ -38,10 +38,29 @@
     >>> history[0].url
     'http://test.com/'
 
-This request history object is a wrapper around a standard 
:py:class:`requests.Request` object with some additional information that make 
the interface more workable (as the :py:class:`~requests.Request` object is 
generally not dealt with by users.
+The alias `last_request` is also available for the last request to go through 
the mocker.
+
+This request object is a wrapper around a standard 
:py:class:`requests.Request` object with some additional information that make 
the interface more workable (as the :py:class:`~requests.Request` object is 
generally not dealt with by users.
 
 These additions include:
 
 :text: The data of the request converted into a unicode string.
 :json: The data of the request loaded from json into python objects.
-:qs: The query string of the request. See :py:meth:`urllib.parse.parse_qs` for 
information on the return format.
+:qs: The query string of the request. See :py:func:`urllib.parse.parse_qs` for 
information on the return format.
+
+.. doctest::
+
+    >>> m.last_request.qs.scheme
+    'http'
+    >>> m.last_request.qs.netloc
+    'test.com'
+
+The following parameters of the :py:func:`requests.request` call are also 
exposed via the request object:
+
+:timeout: How long to wait for the server to send data before giving up.
+:allow_redirects: Set to True if POST/PUT/DELETE redirect following is allowed.
+:proxies: Dictionary mapping protocol to the URL of the proxy.
+:verify: whether the SSL cert will be verified.
+:cert: The client certificate or cert/key tuple for this request.
+
+Note: That the default value of these attributes are the values that are 
passed to the adapter and not what is passed to the request method. This means 
that the default for allow_redirects is None (even though that is interpretted 
as True) if unset, whereas the defautl for verify is True, and the default for 
proxies the empty dict.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-mock-0.7.0/requests_mock/adapter.py 
new/requests-mock-1.0.0/requests_mock/adapter.py
--- old/requests-mock-0.7.0/requests_mock/adapter.py    2015-11-24 
02:30:36.000000000 +0100
+++ new/requests-mock-1.0.0/requests_mock/adapter.py    2016-05-09 
07:12:37.000000000 +0200
@@ -10,6 +10,7 @@
 # License for the specific language governing permissions and limitations
 # under the License.
 
+import copy
 import json
 import weakref
 
@@ -31,12 +32,20 @@
     the request_history users will be able to access these properties.
     """
 
-    def __init__(self, request):
+    def __init__(self, request, **kwargs):
         self._request = request
         self._matcher = None
         self._url_parts_ = None
         self._qs = None
 
+        # All of these params should always exist but we use a default
+        # to make the test setup easier.
+        self._timeout = kwargs.pop('timeout', None)
+        self._allow_redirects = kwargs.pop('allow_redirects', None)
+        self._verify = kwargs.pop('verify', None)
+        self._cert = kwargs.pop('cert', None)
+        self._proxies = copy.deepcopy(kwargs.pop('proxies', {}))
+
     def __getattr__(self, name):
         return getattr(self._request, name)
 
@@ -70,6 +79,26 @@
 
         return self._qs
 
+    @property
+    def timeout(self):
+        return self._timeout
+
+    @property
+    def allow_redirects(self):
+        return self._allow_redirects
+
+    @property
+    def verify(self):
+        return self._verify
+
+    @property
+    def cert(self):
+        return self._cert
+
+    @property
+    def proxies(self):
+        return self._proxies
+
     @classmethod
     def _create(cls, *args, **kwargs):
         return cls(requests.Request(*args, **kwargs).prepare())
@@ -237,7 +266,7 @@
         self._matchers = []
 
     def send(self, request, **kwargs):
-        request = _RequestObjectProxy(request)
+        request = _RequestObjectProxy(request, **kwargs)
         self._add_to_history(request)
 
         for matcher in reversed(self._matchers):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/requests-mock-0.7.0/requests_mock/tests/test_adapter.py 
new/requests-mock-1.0.0/requests_mock/tests/test_adapter.py
--- old/requests-mock-0.7.0/requests_mock/tests/test_adapter.py 2015-11-24 
02:30:36.000000000 +0100
+++ new/requests-mock-1.0.0/requests_mock/tests/test_adapter.py 2016-05-09 
07:12:37.000000000 +0200
@@ -576,3 +576,91 @@
         self.assertEqual('apple', resp.cookies['sugar'])
         self.assertEqual(set(['/foo', '/bar']), set(resp.cookies.list_paths()))
         self.assertEqual(['.example.com'], resp.cookies.list_domains())
+
+    def test_base_params(self):
+        data = 'testdata'
+        self.adapter.register_uri('GET', self.url, text=data)
+        resp = self.session.get(self.url)
+
+        self.assertEqual('GET', self.adapter.last_request.method)
+        self.assertEqual(200, resp.status_code)
+        self.assertEqual(data, resp.text)
+
+        self.assertIs(None, self.adapter.last_request.allow_redirects)
+        self.assertIs(None, self.adapter.last_request.timeout)
+        self.assertIs(True, self.adapter.last_request.verify)
+        self.assertIs(None, self.adapter.last_request.cert)
+
+        # actually it's an OrderedDict, but equality works fine
+        self.assertEqual({}, self.adapter.last_request.proxies)
+
+    def test_allow_redirects(self):
+        data = 'testdata'
+        self.adapter.register_uri('GET', self.url, text=data, status_code=300)
+        resp = self.session.get(self.url, allow_redirects=False)
+
+        self.assertEqual('GET', self.adapter.last_request.method)
+        self.assertEqual(300, resp.status_code)
+        self.assertEqual(data, resp.text)
+        self.assertFalse(self.adapter.last_request.allow_redirects)
+
+    def test_timeout(self):
+        data = 'testdata'
+        timeout = 300
+
+        self.adapter.register_uri('GET', self.url, text=data)
+        resp = self.session.get(self.url, timeout=timeout)
+
+        self.assertEqual('GET', self.adapter.last_request.method)
+        self.assertEqual(200, resp.status_code)
+        self.assertEqual(data, resp.text)
+        self.assertEqual(timeout, self.adapter.last_request.timeout)
+
+    def test_verify_false(self):
+        data = 'testdata'
+        verify = False
+
+        self.adapter.register_uri('GET', self.url, text=data)
+        resp = self.session.get(self.url, verify=verify)
+        self.assertEqual('GET', self.adapter.last_request.method)
+        self.assertEqual(200, resp.status_code)
+        self.assertEqual(data, resp.text)
+        self.assertIs(verify, self.adapter.last_request.verify)
+
+    def test_verify_path(self):
+        data = 'testdata'
+        verify = '/path/to/cacerts.pem'
+
+        self.adapter.register_uri('GET', self.url, text=data)
+        resp = self.session.get(self.url, verify=verify)
+        self.assertEqual('GET', self.adapter.last_request.method)
+        self.assertEqual(200, resp.status_code)
+        self.assertEqual(data, resp.text)
+        self.assertEqual(verify, self.adapter.last_request.verify)
+
+    def test_certs(self):
+        data = 'testdata'
+        cert = ('/path/to/cert.pem', 'path/to/key.pem')
+
+        self.adapter.register_uri('GET', self.url, text=data)
+        resp = self.session.get(self.url, cert=cert)
+
+        self.assertEqual('GET', self.adapter.last_request.method)
+        self.assertEqual(200, resp.status_code)
+        self.assertEqual(data, resp.text)
+        self.assertEqual(cert, self.adapter.last_request.cert)
+        self.assertTrue(self.adapter.last_request.verify)
+
+    def test_proxies(self):
+        data = 'testdata'
+        proxies = {'http': 'foo.bar:3128',
+                   'http://host.name': 'foo.bar:4012'}
+
+        self.adapter.register_uri('GET', self.url, text=data)
+        resp = self.session.get(self.url, proxies=proxies)
+
+        self.assertEqual('GET', self.adapter.last_request.method)
+        self.assertEqual(200, resp.status_code)
+        self.assertEqual(data, resp.text)
+        self.assertEqual(proxies, self.adapter.last_request.proxies)
+        self.assertIsNot(proxies, self.adapter.last_request.proxies)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-mock-0.7.0/requests_mock.egg-info/PKG-INFO 
new/requests-mock-1.0.0/requests_mock.egg-info/PKG-INFO
--- old/requests-mock-0.7.0/requests_mock.egg-info/PKG-INFO     2015-11-24 
02:31:04.000000000 +0100
+++ new/requests-mock-1.0.0/requests_mock.egg-info/PKG-INFO     2016-05-09 
07:14:35.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: requests-mock
-Version: 0.7.0
+Version: 1.0.0
 Summary: Mock out responses from the requests package
 Home-page: https://requests-mock.readthedocs.org/
 Author: Jamie Lennox
@@ -13,9 +13,6 @@
         .. image:: https://badge.fury.io/py/requests-mock.png
             :target: http://badge.fury.io/py/requests-mock
         
-        .. image:: https://pypip.in/d/requests-mock/badge.png
-                :target: https://crate.io/packages/requests-mock?version=latest
-        
         Intro
         =====
         
@@ -98,7 +95,7 @@
         
         
 Platform: UNKNOWN
-Classifier: Development Status :: 3 - Alpha
+Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
 Classifier: Intended Audience :: Information Technology
 Classifier: License :: OSI Approved :: Apache Software License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-mock-0.7.0/requests_mock.egg-info/pbr.json 
new/requests-mock-1.0.0/requests_mock.egg-info/pbr.json
--- old/requests-mock-0.7.0/requests_mock.egg-info/pbr.json     2015-11-24 
02:31:04.000000000 +0100
+++ new/requests-mock-1.0.0/requests_mock.egg-info/pbr.json     2016-05-09 
07:14:35.000000000 +0200
@@ -1 +1 @@
-{"is_release": true, "git_version": "4cf015d"}
\ No newline at end of file
+{"is_release": true, "git_version": "a8b009c"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-mock-0.7.0/setup.cfg 
new/requests-mock-1.0.0/setup.cfg
--- old/requests-mock-0.7.0/setup.cfg   2015-11-24 02:31:04.000000000 +0100
+++ new/requests-mock-1.0.0/setup.cfg   2016-05-09 07:14:35.000000000 +0200
@@ -7,7 +7,7 @@
 license = Apache-2
 home-page = https://requests-mock.readthedocs.org/
 classifier = 
-       Development Status :: 3 - Alpha
+       Development Status :: 5 - Production/Stable
        Intended Audience :: Developers
        Intended Audience :: Information Technology
        License :: OSI Approved :: Apache Software License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/requests-mock-0.7.0/tox.ini 
new/requests-mock-1.0.0/tox.ini
--- old/requests-mock-0.7.0/tox.ini     2015-11-24 02:30:36.000000000 +0100
+++ new/requests-mock-1.0.0/tox.ini     2016-05-09 07:12:37.000000000 +0200
@@ -1,5 +1,5 @@
 [tox]
-envlist = py26, py27, py33,py34, pypy, pep8
+envlist = py34,py27,pypy,pep8
 
 [testenv]
 setenv =
@@ -73,3 +73,9 @@
 
 [testenv:docs]
 commands = python setup.py build_sphinx
+
+[testenv:requests-tip]
+deps =
+    six
+    -egit+https://github.com/kennethreitz/requests.git#egg=requests
+    -r{toxinidir}/test-requirements.txt


Reply via email to