Hello community,
here is the log from the commit of package python-requests-cache for
openSUSE:Factory checked in at 2019-09-11 10:35:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-requests-cache (Old)
and /work/SRC/openSUSE:Factory/.python-requests-cache.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-requests-cache"
Wed Sep 11 10:35:50 2019 rev:4 rq:729800 version:0.5.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-requests-cache/python-requests-cache.changes
2019-05-07 23:20:11.069082128 +0200
+++
/work/SRC/openSUSE:Factory/.python-requests-cache.new.7948/python-requests-cache.changes
2019-09-11 10:35:51.603288096 +0200
@@ -1,0 +2,6 @@
+Tue Sep 10 10:50:37 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.5.2:
+ * Fix DeprecationWarning from collections #140
+
+-------------------------------------------------------------------
Old:
----
requests-cache-0.5.0.tar.gz
New:
----
requests-cache-0.5.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-requests-cache.spec ++++++
--- /var/tmp/diff_new_pack.KBrCmc/_old 2019-09-11 10:35:52.187287926 +0200
+++ /var/tmp/diff_new_pack.KBrCmc/_new 2019-09-11 10:35:52.187287926 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-requests-cache
-Version: 0.5.0
+Version: 0.5.2
Release: 0
Summary: Persistent cache for requests library
License: BSD-2-Clause
@@ -27,6 +27,7 @@
Source:
https://files.pythonhosted.org/packages/source/r/requests-cache/requests-cache-%{version}.tar.gz
BuildRequires: %{python_module requests >= 1.1.0}
BuildRequires: %{python_module setuptools}
+BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-requests >= 1.1.0
BuildArch: noarch
@@ -54,6 +55,7 @@
%install
%python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_exec setup.py test
++++++ requests-cache-0.5.0.tar.gz -> requests-cache-0.5.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-cache-0.5.0/HISTORY.rst
new/requests-cache-0.5.2/HISTORY.rst
--- old/requests-cache-0.5.0/HISTORY.rst 2019-04-18 20:04:09.000000000
+0200
+++ new/requests-cache-0.5.2/HISTORY.rst 2019-08-14 15:57:48.000000000
+0200
@@ -2,6 +2,20 @@
History
-------
+0.5.2 (2019-08-14)
+++++++++++++++++++
+
+* Fix DeprecationWarning from collections #140
+
+
+0.5.1 (2019-08-13)
+++++++++++++++++++
+
+* Remove Python 2.6 Testing from travis #133
+* Fix DeprecationWarning from collections #131
+* vacuum the sqlite database after clearing a table #134
+* Fix handling of unpickle errors #128
+
0.5.0 (2019-04-18)
++++++++++++++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-cache-0.5.0/PKG-INFO
new/requests-cache-0.5.2/PKG-INFO
--- old/requests-cache-0.5.0/PKG-INFO 2019-04-18 20:06:34.000000000 +0200
+++ new/requests-cache-0.5.2/PKG-INFO 2019-08-14 15:58:37.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: requests-cache
-Version: 0.5.0
+Version: 0.5.2
Summary: Persistent cache for requests library
Home-page: https://github.com/reclosedev/requests-cache
Author: Roman Haritonov
@@ -19,6 +19,9 @@
.. image::
https://coveralls.io/repos/reclosedev/requests-cache/badge.svg?branch=master&service=github
:target:
https://coveralls.io/github/reclosedev/requests-cache?branch=master
+ .. image:: https://www.codeshelter.co/static/badges/badge-flat.svg
+ :target: https://www.codeshelter.co/
+ :alt: Code Shelter
Usage example
@@ -70,6 +73,20 @@
History
-------
+ 0.5.2 (2019-08-14)
+ ++++++++++++++++++
+
+ * Fix DeprecationWarning from collections #140
+
+
+ 0.5.1 (2019-08-13)
+ ++++++++++++++++++
+
+ * Remove Python 2.6 Testing from travis #133
+ * Fix DeprecationWarning from collections #131
+ * vacuum the sqlite database after clearing a table #134
+ * Fix handling of unpickle errors #128
+
0.5.0 (2019-04-18)
++++++++++++++++++
@@ -228,6 +245,5 @@
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-cache-0.5.0/README.rst
new/requests-cache-0.5.2/README.rst
--- old/requests-cache-0.5.0/README.rst 2019-04-13 11:28:41.000000000 +0200
+++ new/requests-cache-0.5.2/README.rst 2019-06-25 15:30:48.000000000 +0200
@@ -11,6 +11,9 @@
.. image::
https://coveralls.io/repos/reclosedev/requests-cache/badge.svg?branch=master&service=github
:target:
https://coveralls.io/github/reclosedev/requests-cache?branch=master
+.. image:: https://www.codeshelter.co/static/badges/badge-flat.svg
+ :target: https://www.codeshelter.co/
+ :alt: Code Shelter
Usage example
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-cache-0.5.0/requests_cache/__init__.py
new/requests-cache-0.5.2/requests_cache/__init__.py
--- old/requests-cache-0.5.0/requests_cache/__init__.py 2019-04-18
20:04:55.000000000 +0200
+++ new/requests-cache-0.5.2/requests_cache/__init__.py 2019-08-14
15:56:56.000000000 +0200
@@ -23,9 +23,9 @@
:license: BSD, see LICENSE for more details.
"""
__docformat__ = 'restructuredtext'
-__version__ = '0.5.0'
+__version__ = '0.5.2'
-from .core import(
+from .core import (
CachedSession, install_cache, uninstall_cache,
disabled, enabled, get_cache, clear, configure, remove_expired_responses
)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requests-cache-0.5.0/requests_cache/backends/storage/dbdict.py
new/requests-cache-0.5.2/requests_cache/backends/storage/dbdict.py
--- old/requests-cache-0.5.0/requests_cache/backends/storage/dbdict.py
2019-04-13 11:15:37.000000000 +0200
+++ new/requests-cache-0.5.2/requests_cache/backends/storage/dbdict.py
2019-06-25 15:31:01.000000000 +0200
@@ -152,6 +152,7 @@
con.execute("drop table `%s`" % self.table_name)
con.execute("create table `%s` (key PRIMARY KEY, value)" %
self.table_name)
+ con.execute("vacuum")
def __str__(self):
return str(dict(self.items()))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requests-cache-0.5.0/requests_cache/backends/storage/dynamodbdict.py
new/requests-cache-0.5.2/requests_cache/backends/storage/dynamodbdict.py
--- old/requests-cache-0.5.0/requests_cache/backends/storage/dynamodbdict.py
2019-04-13 10:14:31.000000000 +0200
+++ new/requests-cache-0.5.2/requests_cache/backends/storage/dynamodbdict.py
2019-08-14 15:56:14.000000000 +0200
@@ -6,7 +6,10 @@
Dictionary-like objects for saving large data sets to ``dynamodb``
key-store
"""
-from collections import MutableMapping
+try:
+ from collections.abc import MutableMapping
+except ImportError:
+ from collections import MutableMapping
try:
import cPickle as pickle
except ImportError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requests-cache-0.5.0/requests_cache/backends/storage/gridfspickledict.py
new/requests-cache-0.5.2/requests_cache/backends/storage/gridfspickledict.py
---
old/requests-cache-0.5.0/requests_cache/backends/storage/gridfspickledict.py
2019-04-13 10:14:31.000000000 +0200
+++
new/requests-cache-0.5.2/requests_cache/backends/storage/gridfspickledict.py
2019-08-14 15:56:14.000000000 +0200
@@ -7,7 +7,10 @@
Dictionary-like objects for saving large data sets to ``mongodb`` database
"""
-from collections import MutableMapping
+try:
+ from collections.abc import MutableMapping
+except ImportError:
+ from collections import MutableMapping
try:
import cPickle as pickle
except ImportError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requests-cache-0.5.0/requests_cache/backends/storage/mongodict.py
new/requests-cache-0.5.2/requests_cache/backends/storage/mongodict.py
--- old/requests-cache-0.5.0/requests_cache/backends/storage/mongodict.py
2019-04-13 10:14:31.000000000 +0200
+++ new/requests-cache-0.5.2/requests_cache/backends/storage/mongodict.py
2019-06-25 15:31:01.000000000 +0200
@@ -7,7 +7,11 @@
Dictionary-like objects for saving large data sets to ``mongodb`` database
"""
-from collections import MutableMapping
+try:
+ from collections.abc import MutableMapping
+except ImportError:
+ from collections import MutableMapping
+
try:
import cPickle as pickle
except ImportError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requests-cache-0.5.0/requests_cache/backends/storage/redisdict.py
new/requests-cache-0.5.2/requests_cache/backends/storage/redisdict.py
--- old/requests-cache-0.5.0/requests_cache/backends/storage/redisdict.py
2019-04-13 10:14:31.000000000 +0200
+++ new/requests-cache-0.5.2/requests_cache/backends/storage/redisdict.py
2019-08-14 15:56:14.000000000 +0200
@@ -6,7 +6,10 @@
Dictionary-like objects for saving large data sets to ``redis`` key-store
"""
-from collections import MutableMapping
+try:
+ from collections.abc import MutableMapping
+except ImportError:
+ from collections import MutableMapping
try:
import cPickle as pickle
except ImportError:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-cache-0.5.0/requests_cache/compat.py
new/requests-cache-0.5.2/requests_cache/compat.py
--- old/requests-cache-0.5.0/requests_cache/compat.py 2019-04-13
10:14:31.000000000 +0200
+++ new/requests-cache-0.5.2/requests_cache/compat.py 2019-06-25
15:43:06.000000000 +0200
@@ -3,8 +3,6 @@
"""
pythoncompat
"""
-
-
import sys
# -------
@@ -89,7 +87,6 @@
basestring = basestring
-
elif is_py3:
from urllib.parse import urlparse, urlunparse, urljoin, urlsplit,
urlencode, quote, unquote, parse_qsl
from urllib.request import parse_http_list
@@ -100,4 +97,3 @@
str = str
bytes = bytes
basestring = (str,bytes)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-cache-0.5.0/requests_cache/core.py
new/requests-cache-0.5.2/requests_cache/core.py
--- old/requests-cache-0.5.0/requests_cache/core.py 2019-04-13
11:15:37.000000000 +0200
+++ new/requests-cache-0.5.2/requests_cache/core.py 2019-06-25
15:44:58.000000000 +0200
@@ -100,7 +100,11 @@
response.from_cache = False
return response
- response, timestamp = self.cache.get_response_and_time(cache_key)
+ try:
+ response, timestamp = self.cache.get_response_and_time(cache_key)
+ except (ImportError, TypeError):
+ return send_request_and_cache_response()
+
if response is None:
return send_request_and_cache_response()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/requests-cache-0.5.0/requests_cache.egg-info/PKG-INFO
new/requests-cache-0.5.2/requests_cache.egg-info/PKG-INFO
--- old/requests-cache-0.5.0/requests_cache.egg-info/PKG-INFO 2019-04-18
20:06:34.000000000 +0200
+++ new/requests-cache-0.5.2/requests_cache.egg-info/PKG-INFO 2019-08-14
15:58:37.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: requests-cache
-Version: 0.5.0
+Version: 0.5.2
Summary: Persistent cache for requests library
Home-page: https://github.com/reclosedev/requests-cache
Author: Roman Haritonov
@@ -19,6 +19,9 @@
.. image::
https://coveralls.io/repos/reclosedev/requests-cache/badge.svg?branch=master&service=github
:target:
https://coveralls.io/github/reclosedev/requests-cache?branch=master
+ .. image:: https://www.codeshelter.co/static/badges/badge-flat.svg
+ :target: https://www.codeshelter.co/
+ :alt: Code Shelter
Usage example
@@ -70,6 +73,20 @@
History
-------
+ 0.5.2 (2019-08-14)
+ ++++++++++++++++++
+
+ * Fix DeprecationWarning from collections #140
+
+
+ 0.5.1 (2019-08-13)
+ ++++++++++++++++++
+
+ * Remove Python 2.6 Testing from travis #133
+ * Fix DeprecationWarning from collections #131
+ * vacuum the sqlite database after clearing a table #134
+ * Fix handling of unpickle errors #128
+
0.5.0 (2019-04-18)
++++++++++++++++++
@@ -228,6 +245,5 @@
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Programming Language :: Python
-Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-cache-0.5.0/setup.py
new/requests-cache-0.5.2/setup.py
--- old/requests-cache-0.5.0/setup.py 2019-04-18 20:04:34.000000000 +0200
+++ new/requests-cache-0.5.2/setup.py 2019-08-14 15:56:56.000000000 +0200
@@ -20,7 +20,7 @@
packages=['requests_cache',
'requests_cache.backends',
'requests_cache.backends.storage'],
- version='0.5.0',
+ version='0.5.2',
description='Persistent cache for requests library',
author='Roman Haritonov',
author_email='[email protected]',
@@ -35,7 +35,6 @@
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries :: Python Modules',
'Programming Language :: Python',
- 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/requests-cache-0.5.0/tests/test_cache.py
new/requests-cache-0.5.2/tests/test_cache.py
--- old/requests-cache-0.5.0/tests/test_cache.py 2019-04-13
10:14:31.000000000 +0200
+++ new/requests-cache-0.5.2/tests/test_cache.py 2019-06-25
15:43:16.000000000 +0200
@@ -467,6 +467,17 @@
self.assertEqual(len(s.cache.keys_map), 0)
self.assertIn(ok_url, list(s.cache.responses.values())[0][0].url)
+ def test_cache_unpickle_errors(self):
+ url = httpbin('get?q=1')
+ self.assertFalse(self.s.get(url).from_cache)
+ with
mock.patch("requests_cache.backends.base.BaseCache.restore_response",
side_effect=TypeError):
+ resp = self.s.get(url)
+ self.assertFalse(resp.from_cache)
+ self.assertEquals(resp.json()["args"]["q"], "1")
+ resp = self.s.get(url)
+ self.assertTrue(resp.from_cache)
+ self.assertEquals(resp.json()["args"]["q"], "1")
+
if __name__ == '__main__':
unittest.main()