Hello community,
here is the log from the commit of package python-requests-mock for
openSUSE:Factory checked in at 2019-09-23 12:17:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-requests-mock (Old)
and /work/SRC/openSUSE:Factory/.python-requests-mock.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-requests-mock"
Mon Sep 23 12:17:07 2019 rev:13 rq:731152 version:1.7.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-requests-mock/python-requests-mock.changes
2019-06-13 22:29:55.408447997 +0200
+++
/work/SRC/openSUSE:Factory/.python-requests-mock.new.7948/python-requests-mock.changes
2019-09-23 12:17:09.929809159 +0200
@@ -1,0 +2,11 @@
+Sun Sep 15 11:17:30 UTC 2019 - Jan Engelhardt <[email protected]>
+
+- Use noun phrsae in summary.
+
+-------------------------------------------------------------------
+Tue Sep 10 10:49:05 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 1.7.0:
+ * support for purl
+
+-------------------------------------------------------------------
@@ -163 +173,0 @@
-
Old:
----
requests-mock-1.6.0.tar.gz
New:
----
requests-mock-1.7.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-requests-mock.spec ++++++
--- /var/tmp/diff_new_pack.rCDyOV/_old 2019-09-23 12:17:10.457809072 +0200
+++ /var/tmp/diff_new_pack.rCDyOV/_new 2019-09-23 12:17:10.461809072 +0200
@@ -18,17 +18,18 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-requests-mock
-Version: 1.6.0
+Version: 1.7.0
Release: 0
-Summary: Mock out responses from the requests package
+Summary: Module to mock out responses from the requests package
License: Apache-2.0
Group: Development/Languages/Python
-URL: https://requests-mock.readthedocs.org/
+URL: https://github.com/jamielennox/requests-mock
Source:
https://files.pythonhosted.org/packages/source/r/requests-mock/requests-mock-%{version}.tar.gz
BuildRequires: %{python_module fixtures}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pbr}
BuildRequires: %{python_module purl}
+BuildRequires: %{python_module purl}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests >= 2.3}
BuildRequires: %{python_module rpm-macros}
++++++ requests-mock-1.6.0.tar.gz -> requests-mock-1.7.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/AUTHORS
new/requests-mock-1.7.0/AUTHORS
--- old/requests-mock-1.6.0/AUTHORS 2019-04-28 11:14:07.000000000 +0200
+++ new/requests-mock-1.7.0/AUTHORS 2019-09-01 09:48:16.000000000 +0200
@@ -1,3 +1,4 @@
+Alex Peters <[email protected]>
Andreas Jaeger <[email protected]>
Darragh Bailey <[email protected]>
David Kremer <[email protected]>
@@ -10,6 +11,7 @@
Jon Dufresne <[email protected]>
Louis Taylor <[email protected]>
Manuel Kaufmann <[email protected]>
+Matthias Bilger <[email protected]>
Monty Taylor <[email protected]>
Noam <[email protected]>
Rick van de Loo <[email protected]>
@@ -17,5 +19,6 @@
Swapnil Kulkarni (coolsvap) <[email protected]>
Ville Skyttä <[email protected]>
boncheff <[email protected]>
+popokatapepel <[email protected]>
reedip <[email protected]>
voith <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/ChangeLog
new/requests-mock-1.7.0/ChangeLog
--- old/requests-mock-1.6.0/ChangeLog 2019-04-28 11:14:07.000000000 +0200
+++ new/requests-mock-1.7.0/ChangeLog 2019-09-01 09:48:16.000000000 +0200
@@ -1,6 +1,16 @@
CHANGES
=======
+1.7.0
+-----
+
+* Keep blank values query string values on request history
+* Add release notes for requests version pin
+* Keep blank values (#106)
+* Pin requests version to <3
+* Add known issue for cookies in Sessions
+* logger added to adapter.py (#93)
+
1.6.0
-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/PKG-INFO
new/requests-mock-1.7.0/PKG-INFO
--- old/requests-mock-1.6.0/PKG-INFO 2019-04-28 11:14:08.000000000 +0200
+++ new/requests-mock-1.7.0/PKG-INFO 2019-09-01 09:48:17.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: requests-mock
-Version: 1.6.0
+Version: 1.7.0
Summary: Mock out responses from the requests package
Home-page: https://requests-mock.readthedocs.io/
Author: Jamie Lennox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/RELEASENOTES.rst
new/requests-mock-1.7.0/RELEASENOTES.rst
--- old/requests-mock-1.6.0/RELEASENOTES.rst 2019-04-28 11:14:08.000000000
+0200
+++ new/requests-mock-1.7.0/RELEASENOTES.rst 2019-09-01 09:48:17.000000000
+0200
@@ -2,6 +2,31 @@
requests-mock
=============
+.. _requests-mock_1.7.0:
+
+1.7.0
+=====
+
+.. _requests-mock_1.7.0_New Features:
+
+New Features
+------------
+
+.. releasenotes/notes/match-empty-query-string-e6d6976fe002da0b.yaml @
b'9210dfc1c831c4afdd698dcd9ac637ee36019439'
+
+- You can now match on the empty query string value like `/path?a`.
+
+
+.. _requests-mock_1.7.0_Bug Fixes:
+
+Bug Fixes
+---------
+
+.. releasenotes/notes/pin-requests-version-e0f090aa31dc86c3.yaml @
b'1e2d0904f85e7987fa4b33429a2f80f156e997cf'
+
+- Pins version of requests to <3 to prepare for new release of requests in
future.
+
+
.. _requests-mock_1.6.0:
1.6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/doc/source/knownissues.rst
new/requests-mock-1.7.0/doc/source/knownissues.rst
--- old/requests-mock-1.6.0/doc/source/knownissues.rst 2019-04-28
11:13:46.000000000 +0200
+++ new/requests-mock-1.7.0/doc/source/knownissues.rst 2019-09-01
09:48:00.000000000 +0200
@@ -32,3 +32,24 @@
Note that even with case_sensitive enabled the protocol and netloc of a mock
are still matched in a case insensitive way.
+
+Cookies in Sessions
+-------------------
+
+If a mocked response sets a cookie, the cookie will be accessible through the
+Response object as expected.
+
+If, however, the mocked response is requested through a Session, the cookie
will
+not reach the Session instance.
+
+The problem is that the Requests library adds cookies to Session objects by
+reading the ``httplib`` response object, not the ``requests`` Response object.
+Mock responses naturally don't use ``httplib``.
+
+To fix this issue, the *requests-mock* library needs to convert all acceptable
+forms of mocked cookies into ``Set-Cookie`` headers to enable the Requests
+library to properly process them.
+
+This issue is being tracked on GitHub:
+
+https://github.com/jamielennox/requests-mock/issues/17
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/doc/source/matching.rst
new/requests-mock-1.7.0/doc/source/matching.rst
--- old/requests-mock-1.6.0/doc/source/matching.rst 2019-04-28
11:13:46.000000000 +0200
+++ new/requests-mock-1.7.0/doc/source/matching.rst 2019-09-01
09:48:00.000000000 +0200
@@ -104,6 +104,14 @@
>>> session.get('mock://test.com/7?a=1&b=2').text
'resp'
+We can also match an empty query string.
+
+.. doctest::
+
+ >>> adapter.register_uri('GET', '/7?a', text='resp')
+ >>> session.get('mock://test.com/7?a').text
+ 'resp'
+
If any part of the query string is wrong then it will not match.
.. doctest::
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requests-mock-1.6.0/releasenotes/notes/match-empty-query-string-e6d6976fe002da0b.yaml
new/requests-mock-1.7.0/releasenotes/notes/match-empty-query-string-e6d6976fe002da0b.yaml
---
old/requests-mock-1.6.0/releasenotes/notes/match-empty-query-string-e6d6976fe002da0b.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/requests-mock-1.7.0/releasenotes/notes/match-empty-query-string-e6d6976fe002da0b.yaml
2019-09-01 09:48:00.000000000 +0200
@@ -0,0 +1,3 @@
+---
+features:
+ - You can now match on the empty query string value like `/path?a`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requests-mock-1.6.0/releasenotes/notes/pin-requests-version-e0f090aa31dc86c3.yaml
new/requests-mock-1.7.0/releasenotes/notes/pin-requests-version-e0f090aa31dc86c3.yaml
---
old/requests-mock-1.6.0/releasenotes/notes/pin-requests-version-e0f090aa31dc86c3.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/requests-mock-1.7.0/releasenotes/notes/pin-requests-version-e0f090aa31dc86c3.yaml
2019-09-01 09:48:00.000000000 +0200
@@ -0,0 +1,4 @@
+---
+fixes:
+ - |
+ Pins version of requests to <3 to prepare for new release of requests in
future.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/releasenotes/notes/reno.cache
new/requests-mock-1.7.0/releasenotes/notes/reno.cache
--- old/requests-mock-1.6.0/releasenotes/notes/reno.cache 2019-04-28
11:14:08.000000000 +0200
+++ new/requests-mock-1.7.0/releasenotes/notes/reno.cache 2019-09-01
09:48:17.000000000 +0200
@@ -60,6 +60,14 @@
now be done via pip with `pip install requests-mock[fixture]`
'
+ releasenotes/notes/match-empty-query-string-e6d6976fe002da0b.yaml:
+ features:
+ - You can now match on the empty query string value like `/path?a`.
+ releasenotes/notes/pin-requests-version-e0f090aa31dc86c3.yaml:
+ fixes:
+ - 'Pins version of requests to <3 to prepare for new release of requests
in future.
+
+ '
releasenotes/notes/py.test-2-4e7735793288ea2d.yaml:
fixes:
- The py.test plugin was broken when using py.test < 3.0. The version of
py.test
@@ -106,6 +114,14 @@
'
notes:
- files:
+ - - releasenotes/notes/match-empty-query-string-e6d6976fe002da0b.yaml
+ - !!binary |
+ OTIxMGRmYzFjODMxYzRhZmRkNjk4ZGNkOWFjNjM3ZWUzNjAxOTQzOQ==
+ - - releasenotes/notes/pin-requests-version-e0f090aa31dc86c3.yaml
+ - !!binary |
+ MWUyZDA5MDRmODVlNzk4N2ZhNGIzMzQyOWEyZjgwZjE1NmU5OTdjZg==
+ version: 1.7.0
+- files:
- - releasenotes/notes/Allow-pickling-response-fe751b0a760a5001.yaml
- !!binary |
YTBlOGZiNjFlMGJjYWRiODViMGRjYjFlYTNiN2E1ZDAyOTgyMWVlOA==
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/requests_mock/adapter.py
new/requests-mock-1.7.0/requests_mock/adapter.py
--- old/requests-mock-1.6.0/requests_mock/adapter.py 2019-04-28
11:13:46.000000000 +0200
+++ new/requests-mock-1.7.0/requests_mock/adapter.py 2019-09-01
09:48:00.000000000 +0200
@@ -20,6 +20,10 @@
from requests_mock.request import _RequestObjectProxy
from requests_mock.response import _MatcherResponse
+import logging
+
+logger = logging.getLogger(__name__)
+
try:
import purl
purl_types = (purl.URL,)
@@ -147,8 +151,8 @@
return False
# construct our own qs structure as we remove items from it below
- request_qs = urlparse.parse_qs(request.query)
- matcher_qs = urlparse.parse_qs(self._query)
+ request_qs = urlparse.parse_qs(request.query, keep_blank_values=True)
+ matcher_qs = urlparse.parse_qs(self._query, keep_blank_values=True)
for k, vals in six.iteritems(matcher_qs):
for v in vals:
@@ -245,6 +249,7 @@
if resp is not None:
request._matcher = weakref.ref(matcher)
resp.connection = self
+ logger.debug('{} {}
{}'.format(request._request.method,request._request.url, resp.status_code))
return resp
raise exceptions.NoMockAddress(request)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/requests_mock/request.py
new/requests-mock-1.7.0/requests_mock/request.py
--- old/requests-mock-1.6.0/requests_mock/request.py 2019-04-28
11:13:46.000000000 +0200
+++ new/requests-mock-1.7.0/requests_mock/request.py 2019-09-01
09:48:00.000000000 +0200
@@ -110,7 +110,7 @@
@property
def qs(self):
if self._qs is None:
- self._qs = urlparse.parse_qs(self.query)
+ self._qs = urlparse.parse_qs(self.query, keep_blank_values=True)
return self._qs
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/requests_mock.egg-info/PKG-INFO
new/requests-mock-1.7.0/requests_mock.egg-info/PKG-INFO
--- old/requests-mock-1.6.0/requests_mock.egg-info/PKG-INFO 2019-04-28
11:14:07.000000000 +0200
+++ new/requests-mock-1.7.0/requests_mock.egg-info/PKG-INFO 2019-09-01
09:48:16.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: requests-mock
-Version: 1.6.0
+Version: 1.7.0
Summary: Mock out responses from the requests package
Home-page: https://requests-mock.readthedocs.io/
Author: Jamie Lennox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requests-mock-1.6.0/requests_mock.egg-info/SOURCES.txt
new/requests-mock-1.7.0/requests_mock.egg-info/SOURCES.txt
--- old/requests-mock-1.6.0/requests_mock.egg-info/SOURCES.txt 2019-04-28
11:14:07.000000000 +0200
+++ new/requests-mock-1.7.0/requests_mock.egg-info/SOURCES.txt 2019-09-01
09:48:17.000000000 +0200
@@ -39,6 +39,8 @@
releasenotes/notes/case-insensitive-matching-a3143221359bbf2d.yaml
releasenotes/notes/fix-pytest-version-discovery-43f27e7e162ed055.yaml
releasenotes/notes/fixture-extras-699a5b5fb5bd6aab.yaml
+releasenotes/notes/match-empty-query-string-e6d6976fe002da0b.yaml
+releasenotes/notes/pin-requests-version-e0f090aa31dc86c3.yaml
releasenotes/notes/py.test-2-4e7735793288ea2d.yaml
releasenotes/notes/pytest-7e35da8c5f2cd428.yaml
releasenotes/notes/repo-move-15e956e1d54c048b.yaml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/requests_mock.egg-info/pbr.json
new/requests-mock-1.7.0/requests_mock.egg-info/pbr.json
--- old/requests-mock-1.6.0/requests_mock.egg-info/pbr.json 2019-04-28
11:14:07.000000000 +0200
+++ new/requests-mock-1.7.0/requests_mock.egg-info/pbr.json 2019-09-01
09:48:16.000000000 +0200
@@ -1 +1 @@
-{"git_version": "722206a", "is_release": false}
\ No newline at end of file
+{"git_version": "c1457d6", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requests-mock-1.6.0/requests_mock.egg-info/requires.txt
new/requests-mock-1.7.0/requests_mock.egg-info/requires.txt
--- old/requests-mock-1.6.0/requests_mock.egg-info/requires.txt 2019-04-28
11:14:07.000000000 +0200
+++ new/requests-mock-1.7.0/requests_mock.egg-info/requires.txt 2019-09-01
09:48:16.000000000 +0200
@@ -1,4 +1,4 @@
-requests>=2.3
+requests<3,>=2.3
six
[fixture]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/requirements.txt
new/requests-mock-1.7.0/requirements.txt
--- old/requests-mock-1.6.0/requirements.txt 2019-04-28 11:13:46.000000000
+0200
+++ new/requests-mock-1.7.0/requirements.txt 2019-09-01 09:48:00.000000000
+0200
@@ -1,2 +1,2 @@
-requests>=2.3
+requests>=2.3,<3
six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/tests/test_matcher.py
new/requests-mock-1.7.0/tests/test_matcher.py
--- old/requests-mock-1.6.0/tests/test_matcher.py 2019-04-28
11:13:46.000000000 +0200
+++ new/requests-mock-1.7.0/tests/test_matcher.py 2019-09-01
09:48:00.000000000 +0200
@@ -176,6 +176,16 @@
self.assertNoMatch('/path?a=1&b=2',
'http://www.test.com/path?a=1')
+ def test_query_empty_string(self):
+ self.assertMatch('/path?a',
+ 'http://www.test.com/path?a')
+ self.assertMatch('/path?bob&paul',
+ 'http://www.test.com/path?paul&bob')
+ self.assertNoMatch('/path?bob',
+ 'http://www.test.com/path?paul')
+ self.assertNoMatch('/path?pual&bob',
+ 'http://www.test.com/path?bob')
+
def test_method_match(self):
self.assertNoMatchMethodBoth('GET', 'POST')
self.assertMatchMethodBoth('GET', 'get')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-mock-1.6.0/tests/test_request.py
new/requests-mock-1.7.0/tests/test_request.py
--- old/requests-mock-1.6.0/tests/test_request.py 2019-04-28
11:13:46.000000000 +0200
+++ new/requests-mock-1.7.0/tests/test_request.py 2019-09-01
09:48:00.000000000 +0200
@@ -130,3 +130,7 @@
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))
+
+ def test_empty_query_string(self):
+ req = self.do_request(url='https://host.example.com/path?key')
+ self.assertEqual([''], req.qs['key'])