pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/py-cachecontrol
Module Name: pkgsrc
Committed By: wiz
Date: Tue May 30 07:39:19 UTC 2023
Modified Files:
pkgsrc/devel/py-cachecontrol: Makefile PLIST distinfo
Added Files:
pkgsrc/devel/py-cachecontrol/patches: patch-cachecontrol_serialize.py
patch-tests_test__etag.py patch-tests_test__vary.py
Log Message:
py-cachecontrol: update to 0.12.12nb1.
Updated to 0.12.12 but add a post-release patch to
improve urllib 2.
Bugfixes and use filelock (instead of lockfile)
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 pkgsrc/devel/py-cachecontrol/Makefile
cvs rdiff -u -r1.3 -r1.4 pkgsrc/devel/py-cachecontrol/PLIST
cvs rdiff -u -r1.5 -r1.6 pkgsrc/devel/py-cachecontrol/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/devel/py-cachecontrol/patches/patch-cachecontrol_serialize.py \
pkgsrc/devel/py-cachecontrol/patches/patch-tests_test__etag.py \
pkgsrc/devel/py-cachecontrol/patches/patch-tests_test__vary.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/py-cachecontrol/Makefile
diff -u pkgsrc/devel/py-cachecontrol/Makefile:1.9 pkgsrc/devel/py-cachecontrol/Makefile:1.10
--- pkgsrc/devel/py-cachecontrol/Makefile:1.9 Mon May 23 11:56:16 2022
+++ pkgsrc/devel/py-cachecontrol/Makefile Tue May 30 07:39:18 2023
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.9 2022/05/23 11:56:16 adam Exp $
+# $NetBSD: Makefile,v 1.10 2023/05/30 07:39:18 wiz Exp $
-DISTNAME= CacheControl-0.12.11
+DISTNAME= CacheControl-0.12.12
PKGNAME= ${PYPKGPREFIX}-${DISTNAME:tl}
+PKGREVISION= 1
CATEGORIES= devel python
MASTER_SITES= ${MASTER_SITE_PYPI:=C/CacheControl/}
@@ -13,7 +14,10 @@ LICENSE= apache-2.0
DEPENDS+= ${PYPKGPREFIX}-msgpack>=0.5.2:../../devel/py-msgpack
DEPENDS+= ${PYPKGPREFIX}-requests>=0:../../devel/py-requests
# filecache
-DEPENDS+= ${PYPKGPREFIX}-lockfile>=0.9:../../devel/py-lockfile
+DEPENDS+= ${PYPKGPREFIX}-filelock>=0:../../devel/py-filelock
+TEST_DEPENDS+= ${PYPKGPREFIX}-mock>=0:../../devel/py-mock
+TEST_DEPENDS+= ${PYPKGPREFIX}-test>=0:../../devel/py-test
+TEST_DEPENDS+= ${PYPKGPREFIX}-cherrypy>=0:../../www/py-cherrypy
USE_LANGUAGES= # none
Index: pkgsrc/devel/py-cachecontrol/PLIST
diff -u pkgsrc/devel/py-cachecontrol/PLIST:1.3 pkgsrc/devel/py-cachecontrol/PLIST:1.4
--- pkgsrc/devel/py-cachecontrol/PLIST:1.3 Sat Nov 6 08:52:29 2021
+++ pkgsrc/devel/py-cachecontrol/PLIST Tue May 30 07:39:18 2023
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.3 2021/11/06 08:52:29 adam Exp $
+@comment $NetBSD: PLIST,v 1.4 2023/05/30 07:39:18 wiz Exp $
bin/doesitcache-${PYVERSSUFFIX}
${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
@@ -45,3 +45,54 @@ ${PYSITELIB}/cachecontrol/serialize.pyo
${PYSITELIB}/cachecontrol/wrapper.py
${PYSITELIB}/cachecontrol/wrapper.pyc
${PYSITELIB}/cachecontrol/wrapper.pyo
+${PYSITELIB}/tests/__init__.py
+${PYSITELIB}/tests/__init__.pyc
+${PYSITELIB}/tests/__init__.pyo
+${PYSITELIB}/tests/conftest.py
+${PYSITELIB}/tests/conftest.pyc
+${PYSITELIB}/tests/conftest.pyo
+${PYSITELIB}/tests/issue_263.py
+${PYSITELIB}/tests/issue_263.pyc
+${PYSITELIB}/tests/issue_263.pyo
+${PYSITELIB}/tests/test_adapter.py
+${PYSITELIB}/tests/test_adapter.pyc
+${PYSITELIB}/tests/test_adapter.pyo
+${PYSITELIB}/tests/test_cache_control.py
+${PYSITELIB}/tests/test_cache_control.pyc
+${PYSITELIB}/tests/test_cache_control.pyo
+${PYSITELIB}/tests/test_chunked_response.py
+${PYSITELIB}/tests/test_chunked_response.pyc
+${PYSITELIB}/tests/test_chunked_response.pyo
+${PYSITELIB}/tests/test_etag.py
+${PYSITELIB}/tests/test_etag.pyc
+${PYSITELIB}/tests/test_etag.pyo
+${PYSITELIB}/tests/test_expires_heuristics.py
+${PYSITELIB}/tests/test_expires_heuristics.pyc
+${PYSITELIB}/tests/test_expires_heuristics.pyo
+${PYSITELIB}/tests/test_max_age.py
+${PYSITELIB}/tests/test_max_age.pyc
+${PYSITELIB}/tests/test_max_age.pyo
+${PYSITELIB}/tests/test_redirects.py
+${PYSITELIB}/tests/test_redirects.pyc
+${PYSITELIB}/tests/test_redirects.pyo
+${PYSITELIB}/tests/test_regressions.py
+${PYSITELIB}/tests/test_regressions.pyc
+${PYSITELIB}/tests/test_regressions.pyo
+${PYSITELIB}/tests/test_serialization.py
+${PYSITELIB}/tests/test_serialization.pyc
+${PYSITELIB}/tests/test_serialization.pyo
+${PYSITELIB}/tests/test_server_http_version.py
+${PYSITELIB}/tests/test_server_http_version.pyc
+${PYSITELIB}/tests/test_server_http_version.pyo
+${PYSITELIB}/tests/test_storage_filecache.py
+${PYSITELIB}/tests/test_storage_filecache.pyc
+${PYSITELIB}/tests/test_storage_filecache.pyo
+${PYSITELIB}/tests/test_storage_redis.py
+${PYSITELIB}/tests/test_storage_redis.pyc
+${PYSITELIB}/tests/test_storage_redis.pyo
+${PYSITELIB}/tests/test_vary.py
+${PYSITELIB}/tests/test_vary.pyc
+${PYSITELIB}/tests/test_vary.pyo
+${PYSITELIB}/tests/utils.py
+${PYSITELIB}/tests/utils.pyc
+${PYSITELIB}/tests/utils.pyo
Index: pkgsrc/devel/py-cachecontrol/distinfo
diff -u pkgsrc/devel/py-cachecontrol/distinfo:1.5 pkgsrc/devel/py-cachecontrol/distinfo:1.6
--- pkgsrc/devel/py-cachecontrol/distinfo:1.5 Mon May 23 11:56:16 2022
+++ pkgsrc/devel/py-cachecontrol/distinfo Tue May 30 07:39:18 2023
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.5 2022/05/23 11:56:16 adam Exp $
+$NetBSD: distinfo,v 1.6 2023/05/30 07:39:18 wiz Exp $
-BLAKE2s (CacheControl-0.12.11.tar.gz) = 0cb70752c9bb683aa31948ef8e00f899c1e02fdefef8467fcbb6a16837e0cd4a
-SHA512 (CacheControl-0.12.11.tar.gz) = 6a39e8fd2ebcca776cad533a79f107897aaffbe68b561f89301ef824d2400f8c36ec4e52682b7cf14734f9f77ab27e251202c71036b43422d81126f48cc27834
-Size (CacheControl-0.12.11.tar.gz) = 16552 bytes
+BLAKE2s (CacheControl-0.12.12.tar.gz) = b8f32c739508711f2fb8103de333f53fe758ed3610872b18f01cd74e49a9c964
+SHA512 (CacheControl-0.12.12.tar.gz) = f3af0e2b341f70cde19cc8d0e16f300b291a7f7277dfee8f8cbac1c62d8582a2fca2c76074d81181ab47cf65493f310f16d55153867674c107f170b78eca02a3
+Size (CacheControl-0.12.12.tar.gz) = 29181 bytes
+SHA1 (patch-cachecontrol_serialize.py) = 6453b9474fc2a7b005e8d18f1c1cfcb36c56fe3f
+SHA1 (patch-tests_test__etag.py) = 22452b237d777cc4ff7187b43760dd059e47fea3
+SHA1 (patch-tests_test__vary.py) = 17b76c7231d8162ec509646107d7694f3939091b
Added files:
Index: pkgsrc/devel/py-cachecontrol/patches/patch-cachecontrol_serialize.py
diff -u /dev/null pkgsrc/devel/py-cachecontrol/patches/patch-cachecontrol_serialize.py:1.1
--- /dev/null Tue May 30 07:39:19 2023
+++ pkgsrc/devel/py-cachecontrol/patches/patch-cachecontrol_serialize.py Tue May 30 07:39:19 2023
@@ -0,0 +1,25 @@
+$NetBSD: patch-cachecontrol_serialize.py,v 1.1 2023/05/30 07:39:19 wiz Exp $
+
+disuse HTTPResponse.strict
+https://github.com/ionrock/cachecontrol/commit/8f037ba1650c446759d6db581012714f6109850f
+
+--- cachecontrol/serialize.py.orig 2022-04-19 17:16:07.000000000 +0000
++++ cachecontrol/serialize.py
+@@ -51,7 +51,6 @@ class Serializer(object):
+ u"status": response.status,
+ u"version": response.version,
+ u"reason": text_type(response.reason),
+- u"strict": response.strict,
+ u"decode_content": response.decode_content,
+ }
+ }
+@@ -138,6 +137,9 @@ class Serializer(object):
+ # TypeError: 'str' does not support the buffer interface
+ body = io.BytesIO(body_raw.encode("utf8"))
+
++ # Discard any `strict` parameter serialized by older version of cachecontrol.
++ cached["response"].pop("strict", None)
++
+ return HTTPResponse(body=body, preload_content=False, **cached["response"])
+
+ def _loads_v0(self, request, data, body_file=None):
Index: pkgsrc/devel/py-cachecontrol/patches/patch-tests_test__etag.py
diff -u /dev/null pkgsrc/devel/py-cachecontrol/patches/patch-tests_test__etag.py:1.1
--- /dev/null Tue May 30 07:39:19 2023
+++ pkgsrc/devel/py-cachecontrol/patches/patch-tests_test__etag.py Tue May 30 07:39:19 2023
@@ -0,0 +1,41 @@
+$NetBSD: patch-tests_test__etag.py,v 1.1 2023/05/30 07:39:19 wiz Exp $
+
+disuse HTTPResponse.strict
+https://github.com/ionrock/cachecontrol/commit/8f037ba1650c446759d6db581012714f6109850f
+
+--- tests/test_etag.py.orig 2022-09-12 14:28:45.000000000 +0000
++++ tests/test_etag.py
+@@ -1,6 +1,8 @@
+ # SPDX-FileCopyrightText: 2015 Eric Larson
+ #
+ # SPDX-License-Identifier: Apache-2.0
++from contextlib import ExitStack
++from contextlib import suppress
+
+ import pytest
+
+@@ -134,11 +136,20 @@ class TestReleaseConnection(object):
+
+ resp = Mock(status=304, headers={})
+
+- # This is how the urllib3 response is created in
+- # requests.adapters
+- response_mod = "requests.adapters.HTTPResponse.from_httplib"
++ # These are various ways the the urllib3 response can created
++ # in requests.adapters. Which one is actually used depends
++ # on which version if `requests` is in use, as well as perhaps
++ # other parameters.
++ response_mods = [
++ "requests.adapters.HTTPResponse.from_httplib",
++ "urllib3.HTTPConnectionPool.urlopen",
++ ]
++
++ with ExitStack() as stack:
++ for mod in response_mods:
++ with suppress(ImportError):
++ stack.enter_context(patch(mod, Mock(return_value=resp)))
+
+- with patch(response_mod, Mock(return_value=resp)):
+ sess.get(etag_url)
+ assert resp.read.called
+ assert resp.release_conn.called
Index: pkgsrc/devel/py-cachecontrol/patches/patch-tests_test__vary.py
diff -u /dev/null pkgsrc/devel/py-cachecontrol/patches/patch-tests_test__vary.py:1.1
--- /dev/null Tue May 30 07:39:19 2023
+++ pkgsrc/devel/py-cachecontrol/patches/patch-tests_test__vary.py Tue May 30 07:39:19 2023
@@ -0,0 +1,15 @@
+$NetBSD: patch-tests_test__vary.py,v 1.1 2023/05/30 07:39:19 wiz Exp $
+
+disuse HTTPResponse.strict
+https://github.com/ionrock/cachecontrol/commit/8f037ba1650c446759d6db581012714f6109850f
+
+--- tests/test_vary.py.orig 2020-07-23 15:23:57.000000000 +0000
++++ tests/test_vary.py
+@@ -33,7 +33,6 @@ class TestVary(object):
+ cached.status == resp.raw.status,
+ cached.version == resp.raw.version,
+ cached.reason == resp.raw.reason,
+- cached.strict == resp.raw.strict,
+ cached.decode_content == resp.raw.decode_content,
+ ]
+
Home |
Main Index |
Thread Index |
Old Index