From 3b38d172b4fa2d57309bc34b413e4b27d929c0bcd23521a3c5a4925386264fe6 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 12 Apr 2021 12:39:42 +0000 Subject: [PATCH 1/2] Accepting request 884522 from home:jayvdb:branches:devel:languages:python - Update to v0.6.0 OBS-URL: https://build.opensuse.org/request/show/884522 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests-cache?expand=0&rev=10 --- python-requests-cache.changes | 6 ++++++ python-requests-cache.spec | 34 ++++++++++++++++++++++++---------- requests-cache-0.5.2.tar.gz | 3 --- requests-cache-0.6.0.tar.gz | 3 +++ 4 files changed, 33 insertions(+), 13 deletions(-) delete mode 100644 requests-cache-0.5.2.tar.gz create mode 100644 requests-cache-0.6.0.tar.gz diff --git a/python-requests-cache.changes b/python-requests-cache.changes index ac482bc..2a15b2f 100644 --- a/python-requests-cache.changes +++ b/python-requests-cache.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Apr 10 04:33:50 UTC 2021 - John Vandenberg + +- Update to v0.6.0 + * See https://github.com/reclosedev/requests-cache/blob/master/HISTORY.md + ------------------------------------------------------------------- Tue Sep 10 10:50:37 UTC 2019 - Tomáš Chvátal diff --git a/python-requests-cache.spec b/python-requests-cache.spec index 8f01046..e924649 100644 --- a/python-requests-cache.spec +++ b/python-requests-cache.spec @@ -1,7 +1,7 @@ # # spec file for package python-requests-cache # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,23 +18,33 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-requests-cache -Version: 0.5.2 +Version: 0.6.0 Release: 0 Summary: Persistent cache for requests library License: BSD-2-Clause Group: Development/Languages/Python URL: https://github.com/reclosedev/requests-cache 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 +Requires: itsdangerous +Requires: python-requests >= 2.0.0 +Requires: url-normalize >= 1.4 BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module gunicorn} +BuildRequires: %{python_module httpbin} +BuildRequires: %{python_module itsdangerous} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests >= 2.0.0} +BuildRequires: %{python_module requests-mock} +BuildRequires: %{python_module url-normalize >= 1.4} +# /SECTION %python_subpackages %description -Requests-cache is a transparent persistent cache for requests_ (version >= 1.1.0) library. +Requests-cache is a transparent persistent cache for requests_ library. It can be useful when you are creating some simple data scraper with constantly changing parsing logic or data format, and don't want to redownload pages or @@ -44,25 +54,29 @@ Requests-cache ignores all cache headers, it just caches the data for the time you specify. If you need library which knows how to use HTTP headers and status codes, -take a look at `httpcache `_ and -`CacheControl `_. +take a look at `CacheControl `_. %prep %setup -q -n requests-cache-%{version} +sed -i '1{/^#!/d}' requests_cache/__init__.py %build %python_build %install %python_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%{python_expand rm -r %{buildroot}%{$python_sitelib}/tests/ +%fdupes %{buildroot}%{$python_sitelib} +} %check -%python_exec setup.py test +gunicorn -b 127.0.0.1:8080 httpbin:app -k gevent & +export HTTPBIN_URL=http://localhost:8080/ +%pytest %files %{python_files} %license LICENSE -%doc README.rst +%doc README.md HISTORY.md docs/*.rst %{python_sitelib}/* %changelog diff --git a/requests-cache-0.5.2.tar.gz b/requests-cache-0.5.2.tar.gz deleted file mode 100644 index acb65ff..0000000 --- a/requests-cache-0.5.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:813023269686045f8e01e2289cc1e7e9ae5ab22ddd1e2849a9093ab3ab7270eb -size 31159 diff --git a/requests-cache-0.6.0.tar.gz b/requests-cache-0.6.0.tar.gz new file mode 100644 index 0000000..a650e23 --- /dev/null +++ b/requests-cache-0.6.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ba9b8b7893b15464d2bd35c40098c6f7561d77416068f15932ea9d223e1559ed +size 52342 From f19311d310782aedd7cabb39970fcc24254433fbfc2262ae913b43818413563f Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 17 Apr 2021 14:11:44 +0000 Subject: [PATCH 2/2] Accepting request 885485 from home:jayvdb:branches:devel:languages:python - Fix runtime Requires, adding missing prefix python- - Add Recommends python-redis and Suggests for python-boto3 and python-mongodb - Activate integration tests, including redis - Update to v0.6.2 OBS-URL: https://build.opensuse.org/request/show/885485 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests-cache?expand=0&rev=11 --- python-requests-cache.changes | 23 +++++++++++++++++++++++ python-requests-cache.spec | 20 ++++++++++++-------- requests-cache-0.6.0.tar.gz | 3 --- requests-cache-0.6.2.tar.gz | 3 +++ 4 files changed, 38 insertions(+), 11 deletions(-) delete mode 100644 requests-cache-0.6.0.tar.gz create mode 100644 requests-cache-0.6.2.tar.gz diff --git a/python-requests-cache.changes b/python-requests-cache.changes index 2a15b2f..d434657 100644 --- a/python-requests-cache.changes +++ b/python-requests-cache.changes @@ -1,3 +1,26 @@ +------------------------------------------------------------------- +Wed Apr 14 22:46:16 UTC 2021 - John Vandenberg + +- Fix runtime Requires, adding missing prefix python- +- Add Recommends python-redis and Suggests for python-boto3 and + python-mongodb +- Activate integration tests, including redis +- Update to v0.6.2 + * Explicitly include docs, tests, and examples in sdist +- from v0.6.1 + * Handle errors due to invalid responses in BaseCache.urls + * Add recently renamed BaseCache.remove_old_entries() back, as an + alias with a DeprecationWarning + * Make parent dirs for new SQLite databases + * Add aws_access_key_id and aws_secret_access_key kwargs to + DynamoDbDict + * Update GridFSPickleDict.__delitem__ to raise a KeyError for + missing items + * Demote most logging.info statements to debug level + * Exclude test directory from find_packages() + * Make integration tests easier to run and/or fail more quickly in + environments where Docker isn't available + ------------------------------------------------------------------- Sat Apr 10 04:33:50 UTC 2021 - John Vandenberg diff --git a/python-requests-cache.spec b/python-requests-cache.spec index e924649..3fc45c4 100644 --- a/python-requests-cache.spec +++ b/python-requests-cache.spec @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-requests-cache -Version: 0.6.0 +Version: 0.6.2 Release: 0 Summary: Persistent cache for requests library License: BSD-2-Clause @@ -28,18 +28,24 @@ Source: https://files.pythonhosted.org/packages/source/r/requests-cache/ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: itsdangerous +Requires: python-itsdangerous Requires: python-requests >= 2.0.0 -Requires: url-normalize >= 1.4 +Requires: python-url-normalize >= 1.4 +Recommends: python-redis +Suggests: python-boto3 +Suggests: python-mongodb BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module gunicorn} BuildRequires: %{python_module httpbin} BuildRequires: %{python_module itsdangerous} BuildRequires: %{python_module pytest} +BuildRequires: %{python_module redis} BuildRequires: %{python_module requests >= 2.0.0} BuildRequires: %{python_module requests-mock} BuildRequires: %{python_module url-normalize >= 1.4} +BuildRequires: %{python_module timeout-decorator} +BuildRequires: redis # /SECTION %python_subpackages @@ -58,21 +64,19 @@ take a look at `CacheControl `_. %prep %setup -q -n requests-cache-%{version} -sed -i '1{/^#!/d}' requests_cache/__init__.py %build %python_build %install %python_install -%{python_expand rm -r %{buildroot}%{$python_sitelib}/tests/ -%fdupes %{buildroot}%{$python_sitelib} -} +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check gunicorn -b 127.0.0.1:8080 httpbin:app -k gevent & +%{_sbindir}/redis-server & export HTTPBIN_URL=http://localhost:8080/ -%pytest +%pytest -k 'not (dynamodb or gridfs or mongodb)' %files %{python_files} %license LICENSE diff --git a/requests-cache-0.6.0.tar.gz b/requests-cache-0.6.0.tar.gz deleted file mode 100644 index a650e23..0000000 --- a/requests-cache-0.6.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ba9b8b7893b15464d2bd35c40098c6f7561d77416068f15932ea9d223e1559ed -size 52342 diff --git a/requests-cache-0.6.2.tar.gz b/requests-cache-0.6.2.tar.gz new file mode 100644 index 0000000..8568728 --- /dev/null +++ b/requests-cache-0.6.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:896fbf1deb9b94abc3672cf3f3530614af411c09eb2bcc5f51d44e5cea0a3e87 +size 54355