Hello community, here is the log from the commit of package python-requests-mock for openSUSE:Factory checked in at 2018-02-26 23:24:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-requests-mock (Old) and /work/SRC/openSUSE:Factory/.python-requests-mock.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-requests-mock" Mon Feb 26 23:24:37 2018 rev:8 rq:579522 version:1.4.0 Changes: -------- --- /work/SRC/openSUSE:Factory/python-requests-mock/python-requests-mock.changes 2017-06-22 10:40:44.950609638 +0200 +++ /work/SRC/openSUSE:Factory/.python-requests-mock.new/python-requests-mock.changes 2018-02-26 23:24:37.507470936 +0100 @@ -1,0 +2,11 @@ +Fri Feb 23 13:52:35 UTC 2018 - tbecht...@suse.com + +- update to 1.4.0: + * allow an adapter to be passed to a Mocker object + * Rename [wheel] section to [bdist\_wheel] as the former is legacy + * Include license file in the generated wheel package + * Add testing for newer Python versions 3.5 and 3.6 + * Return a separate copy for each call to decorator + * Add string representation to \_RequestObjectProxy + +------------------------------------------------------------------- Old: ---- requests-mock-1.3.0.tar.gz New: ---- requests-mock-1.4.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-requests-mock.spec ++++++ --- /var/tmp/diff_new_pack.rocNE3/_old 2018-02-26 23:24:38.419438138 +0100 +++ /var/tmp/diff_new_pack.rocNE3/_new 2018-02-26 23:24:38.419438138 +0100 @@ -1,7 +1,7 @@ # # spec file for package python-requests-mock # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 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 @@ -19,7 +19,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without test Name: python-requests-mock -Version: 1.3.0 +Version: 1.4.0 Release: 0 Summary: Mock out responses from the requests package License: Apache-2.0 ++++++ requests-mock-1.3.0.tar.gz -> requests-mock-1.4.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/AUTHORS new/requests-mock-1.4.0/AUTHORS --- old/requests-mock-1.3.0/AUTHORS 2017-02-01 06:38:55.000000000 +0100 +++ new/requests-mock-1.4.0/AUTHORS 2017-12-06 00:10:55.000000000 +0100 @@ -1,11 +1,17 @@ +Darragh Bailey <dbai...@hpe.com> +David Kremer <courr...@david-kremer.fr> Ian Cordasco <ian.corda...@rackspace.com> Jamie Lennox <jamielen...@gmail.com> Jamie Lennox <jamielen...@redhat.com> Janonymous <janonymous.codevult...@gmail.com> Jeremy Stanley <fu...@yuggoth.org> +Jon Dufresne <jon.dufre...@gmail.com> Louis Taylor <lo...@kragniz.eu> Manuel Kaufmann <humi...@gmail.com> Monty Taylor <mord...@inaugust.com> +Rick van de Loo <rickvande...@gmail.com> Sebastian Kalinowski <sebast...@kalinowski.eu> +Swapnil Kulkarni (coolsvap) <m...@coolsvap.net> +Zuul <z...@review.openstack.org> reedip <reedip.baner...@nectechnologies.in> voith <voith...@gmail.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/ChangeLog new/requests-mock-1.4.0/ChangeLog --- old/requests-mock-1.3.0/ChangeLog 2017-02-01 06:38:55.000000000 +0100 +++ new/requests-mock-1.4.0/ChangeLog 2017-12-06 00:10:55.000000000 +0100 @@ -1,12 +1,22 @@ CHANGES ======= +1.4.0 +----- + +* allow an adapter to be passed to a Mocker object +* Rename [wheel] section to [bdist\_wheel] as the former is legacy +* Include license file in the generated wheel package +* Add testing for newer Python versions 3.5 and 3.6 +* Return a separate copy for each call to decorator +* Add string representation to \_RequestObjectProxy + 1.3.0 ----- -* Add a releasenote for additional_matcher +* Add a releasenote for additional\_matcher * Add documentation for the exception response -* Fix occurences of `adatper` +* Fix occurences of \`adatper\` * Type check the empty string when creating repsonse * Allow arbirtrary matcher to be add to match @@ -14,21 +24,22 @@ ----- * Allow for nested mocking -* Use create_response for fake http response in tests +* Use create\_response for fake http response in tests * Add hostname and port properties to request * Move request code and tests into their own files -* Add called_once to Mocker +* Add called\_once to Mocker * Fix docs building * Fix exception message when creating a response 1.1.0 ----- -* Add a called_once property to adapter +* Add a called\_once property to adapter * Enable case sensitive matching * Provide fixture extras for pip -* Allow doing real_http per mock via the mocker +* Allow doing real\_http per mock via the mocker * Return b'' when reading closed response +* Remove discover from test-requirements * Fixture documentation error 1.0.0 @@ -38,7 +49,7 @@ * 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 +* Add timeout and allow\_retries to RequestProxy * Add trove support for py34 and remove py33 * Fix py34 DB issue and remove py33/py26 * Remove pypip.in badge from readme @@ -49,7 +60,7 @@ * Support Cookies * Expose Fake objects in compat * Update .gitreview for new namespace -* Change ignore-errors to ignore_errors +* Change ignore-errors to ignore\_errors 0.6.0 ----- @@ -58,7 +69,7 @@ * Allow to decorate class with mock * Use weakref to hold matcher * Include matcher in request history -* Add called and call_count to mocker +* Add called and call\_count to mocker * Update README to use newer syntax * Allow specifying an exception to raise * Update novaclient and keystoneclient git repo @@ -71,18 +82,18 @@ 0.5.1 ----- -* Convert headers to bytes testing request_headers +* Convert headers to bytes testing request\_headers * Don't use requests.Response object directly * Allow interpreting a sent request as text and json * Create a tox env for requests v1.2.3 -* Add get_all to compatibility function +* Add get\_all to compatibility function * Lowercase scheme in regexp test -* Don't use session.prepare_request +* Don't use session.prepare\_request 0.5.0 ----- -* Remove old _Context object +* Remove old \_Context object * Correctly set adapter to response.connection * Add keystoneclient and novaclient tests to tox * Remove some github specific jobs @@ -90,7 +101,7 @@ * Requires requests >= 2.3 * Added stackforge gitreview * Fix tests running for zuul -* Make a public create_response function +* Make a public create\_response function * Change query string tests * Add wrapper around Request object * Add a mock() function @@ -112,7 +123,7 @@ ----- * Allow custom matchers -* Test matcher by __call__ +* Test matcher by \_\_call\_\_ * Update travis file 0.2.0 @@ -122,7 +133,7 @@ * Remove Overview section of fixtures * Doctest fixups * fixup README -* Add request_headers matching +* Add request\_headers matching * Create the Mocker * Fixup doc function link * Remove wheel from dependencies diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/PKG-INFO new/requests-mock-1.4.0/PKG-INFO --- old/requests-mock-1.3.0/PKG-INFO 2017-02-01 06:38:55.000000000 +0100 +++ new/requests-mock-1.4.0/PKG-INFO 2017-12-06 00:10:55.000000000 +0100 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: requests-mock -Version: 1.3.0 +Version: 1.4.0 Summary: Mock out responses from the requests package Home-page: https://requests-mock.readthedocs.org/ Author: Jamie Lennox Author-email: jamielen...@gmail.com License: Apache-2 +Description-Content-Type: UNKNOWN Description: =============================== requests-mock =============================== @@ -103,7 +104,10 @@ Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 2.6 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 :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/requests_mock/mocker.py new/requests-mock-1.4.0/requests_mock/mocker.py --- old/requests-mock-1.3.0/requests_mock/mocker.py 2017-02-01 06:37:40.000000000 +0100 +++ new/requests-mock-1.4.0/requests_mock/mocker.py 2017-12-06 00:08:02.000000000 +0100 @@ -61,8 +61,11 @@ """ def __init__(self, **kwargs): - case_sensitive = kwargs.pop('case_sensitive', self.case_sensitive) - self._adapter = adapter.Adapter(case_sensitive=case_sensitive) + self.case_sensitive = kwargs.pop('case_sensitive', self.case_sensitive) + self._adapter = ( + kwargs.pop('adapter', None) or + adapter.Adapter(case_sensitive=self.case_sensitive) + ) self._real_http = kwargs.pop('real_http', False) self._last_send = None @@ -198,7 +201,8 @@ """ m = Mocker( kw=self._kw, - real_http=self._real_http + real_http=self._real_http, + case_sensitive=self.case_sensitive ) return m @@ -209,7 +213,7 @@ """ @functools.wraps(func) def inner(*args, **kwargs): - with self as m: + with self.copy() as m: if self._kw: kwargs[self._kw] = m else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/requests_mock/request.py new/requests-mock-1.4.0/requests_mock/request.py --- old/requests-mock-1.3.0/requests_mock/request.py 2017-02-01 06:37:40.000000000 +0100 +++ new/requests-mock-1.4.0/requests_mock/request.py 2017-12-06 00:07:38.000000000 +0100 @@ -152,3 +152,6 @@ the matcher is not available it will return None. """ return self._matcher() + + def __str__(self): + return "{0.method} {0.url}".format(self._request) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/requests_mock/tests/test_mocker.py new/requests-mock-1.4.0/requests_mock/tests/test_mocker.py --- old/requests-mock-1.3.0/requests_mock/tests/test_mocker.py 2017-02-01 06:37:40.000000000 +0100 +++ new/requests-mock-1.4.0/requests_mock/tests/test_mocker.py 2017-12-06 00:08:02.000000000 +0100 @@ -92,6 +92,21 @@ inner() self.assertMockStopped() + def test_with_decorator_called_multiple_times(self): + + @requests_mock.Mocker() + def inner(arg1, m): + self._do_test(m) + self.assertEquals( + len(m.request_history), 1, + "Failed to provide clean mock on subsequent calls" + ) + + inner('a') + # if we call the same decorated method again should get + # a new request mock + inner('b') + def test_with_class_decorator(self): outer = self diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/requests_mock/tests/test_request.py new/requests-mock-1.4.0/requests_mock/tests/test_request.py --- old/requests-mock-1.3.0/requests_mock/tests/test_request.py 2017-02-01 06:37:40.000000000 +0100 +++ new/requests-mock-1.4.0/requests_mock/tests/test_request.py 2017-12-06 00:07:38.000000000 +0100 @@ -117,3 +117,7 @@ self.assertEqual('host.example.com', req.netloc) self.assertEqual('host.example.com', req.hostname) self.assertEqual(443, req.port) + + def test_to_string(self): + req = self.do_request(url='https://host.example.com/path') + self.assertEqual('GET https://host.example.com/path', str(req)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/requests_mock.egg-info/PKG-INFO new/requests-mock-1.4.0/requests_mock.egg-info/PKG-INFO --- old/requests-mock-1.3.0/requests_mock.egg-info/PKG-INFO 2017-02-01 06:38:55.000000000 +0100 +++ new/requests-mock-1.4.0/requests_mock.egg-info/PKG-INFO 2017-12-06 00:10:55.000000000 +0100 @@ -1,11 +1,12 @@ Metadata-Version: 1.1 Name: requests-mock -Version: 1.3.0 +Version: 1.4.0 Summary: Mock out responses from the requests package Home-page: https://requests-mock.readthedocs.org/ Author: Jamie Lennox Author-email: jamielen...@gmail.com License: Apache-2 +Description-Content-Type: UNKNOWN Description: =============================== requests-mock =============================== @@ -103,7 +104,10 @@ Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.7 -Classifier: Programming Language :: Python :: 2.6 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 :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Testing diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/requests_mock.egg-info/pbr.json new/requests-mock-1.4.0/requests_mock.egg-info/pbr.json --- old/requests-mock-1.3.0/requests_mock.egg-info/pbr.json 2017-02-01 06:38:55.000000000 +0100 +++ new/requests-mock-1.4.0/requests_mock.egg-info/pbr.json 2017-12-06 00:10:55.000000000 +0100 @@ -1 +1 @@ -{"git_version": "aa3e87c", "is_release": true} \ No newline at end of file +{"git_version": "fccc52d", "is_release": true} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/setup.cfg new/requests-mock-1.4.0/setup.cfg --- old/requests-mock-1.3.0/setup.cfg 2017-02-01 06:38:55.000000000 +0100 +++ new/requests-mock-1.4.0/setup.cfg 2017-12-06 00:10:55.000000000 +0100 @@ -5,6 +5,7 @@ summary = Mock out responses from the requests package description-file = README.rst license = Apache-2 +license-file = LICENSE home-page = https://requests-mock.readthedocs.org/ classifier = Development Status :: 5 - Production/Stable @@ -15,9 +16,12 @@ Programming Language :: Python Programming Language :: Python :: 2 Programming Language :: Python :: 2.7 - Programming Language :: Python :: 2.6 Programming Language :: Python :: 3 Programming Language :: Python :: 3.4 + Programming Language :: Python :: 3.5 + Programming Language :: Python :: 3.6 + Programming Language :: Python :: Implementation :: CPython + Programming Language :: Python :: Implementation :: PyPy Topic :: Software Development :: Testing test_suite = requests_mock.tests @@ -29,7 +33,7 @@ build-dir = doc/build source-dir = doc/source -[wheel] +[bdist_wheel] universal = 1 [extras] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/test-requirements.txt new/requests-mock-1.4.0/test-requirements.txt --- old/requests-mock-1.3.0/test-requirements.txt 2017-02-01 06:37:40.000000000 +0100 +++ new/requests-mock-1.4.0/test-requirements.txt 2017-12-06 00:08:02.000000000 +0100 @@ -1,4 +1,3 @@ -discover fixtures mock sphinx>=1.1.2,!=1.2.0,<1.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/requests-mock-1.3.0/tox.ini new/requests-mock-1.4.0/tox.ini --- old/requests-mock-1.3.0/tox.ini 2017-02-01 06:37:40.000000000 +0100 +++ new/requests-mock-1.4.0/tox.ini 2017-12-06 00:08:02.000000000 +0100 @@ -1,5 +1,5 @@ [tox] -envlist = py34,py27,pypy,pep8 +envlist = py36,py35,py34,py27,pypy,pep8 [testenv] setenv =