git: f4b4d7fb2815 - main - www/py-requests-cache93: Allow build with py-cattrs 22.2.0

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 09 Oct 2022 15:41:20 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f4b4d7fb281556784b495dc8e8eee9dfb6862e11

commit f4b4d7fb281556784b495dc8e8eee9dfb6862e11
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-10-09 15:33:52 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-10-09 15:38:12 +0000

    www/py-requests-cache93: Allow build with py-cattrs 22.2.0
    
    - Bump PORTREVISION for package change
---
 www/py-requests-cache93/Makefile             |  5 +---
 www/py-requests-cache93/files/patch-cattrs   | 36 ++++++++++++++++++++++++++--
 www/py-requests-cache93/files/patch-setup.py |  2 +-
 3 files changed, 36 insertions(+), 7 deletions(-)

diff --git a/www/py-requests-cache93/Makefile b/www/py-requests-cache93/Makefile
index 80bf23c64177..ece988d97b9f 100644
--- a/www/py-requests-cache93/Makefile
+++ b/www/py-requests-cache93/Makefile
@@ -15,7 +15,7 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}appdirs>=1.4.4<2.0.0:devel/py-appdirs@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}attrs>=21.2:devel/py-attrs@${PY_FLAVOR} \
-		${PYTHON_PKGNAMEPREFIX}cattrs>=1.8<22.2:devel/py-cattrs@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}cattrs>=1.8<22.3:devel/py-cattrs@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}requests>=2.22<3.0:www/py-requests@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}url-normalize>=1.4<2.0:net/py-url-normalize@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}urllib3>=1.25.5,1<2.0.0,1:net/py-urllib3@${PY_FLAVOR}
@@ -27,7 +27,4 @@ NO_ARCH=	yes
 
 PORTSCOUT=	ignore:1
 
-do-test:
-	cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -rs -v
-
 .include <bsd.port.mk>
diff --git a/www/py-requests-cache93/files/patch-cattrs b/www/py-requests-cache93/files/patch-cattrs
index c94d37779c38..6318c6e8082e 100644
--- a/www/py-requests-cache93/files/patch-cattrs
+++ b/www/py-requests-cache93/files/patch-cattrs
@@ -1,3 +1,35 @@
+--- requests_cache/serializers/cattrs.py.orig	2022-02-23 03:10:56 UTC
++++ requests_cache/serializers/cattrs.py
+@@ -14,7 +14,7 @@ serialization format.
+ from datetime import datetime, timedelta
+ from typing import Callable, Dict, ForwardRef, MutableMapping
+ 
+-from cattr import GenConverter
++from cattr import Converter
+ from requests.cookies import RequestsCookieJar, cookiejar_from_dict
+ from requests.structures import CaseInsensitiveDict
+ from urllib3._collections import HTTPHeaderDict
+@@ -28,7 +28,7 @@ class CattrStage(Stage):
+     on its own, or as a stage within a :py:class:`.SerializerPipeline`.
+     """
+ 
+-    def __init__(self, factory: Callable[..., GenConverter] = None):
++    def __init__(self, factory: Callable[..., Converter] = None):
+         self.converter = init_converter(factory)
+ 
+     def dumps(self, value: CachedResponse) -> Dict:
+@@ -42,9 +42,9 @@ class CattrStage(Stage):
+         return self.converter.structure(value, cl=CachedResponse)
+ 
+ 
+-def init_converter(factory: Callable[..., GenConverter] = None):
++def init_converter(factory: Callable[..., Converter] = None):
+     """Make a converter to structure and unstructure nested objects within a :py:class:`.CachedResponse`"""
+-    factory = factory or GenConverter
++    factory = factory or Converter
+     converter = factory(omit_if_default=True)
+ 
+     # Convert datetimes to and from iso-formatted strings
 Obtained from:	https://github.com/requests-cache/requests-cache/commit/66550b5355f4a4f063b4b22c3139a2f941c91eb4
 
 --- requests_cache/serializers/preconf.py.orig	2022-02-23 03:10:56 UTC
@@ -26,7 +58,7 @@ Obtained from:	https://github.com/requests-cache/requests-cache/commit/66550b535
 -from cattr.preconf import bson as bson_preconf
 -from cattr.preconf import json as json_preconf
 -from cattr.preconf import msgpack, orjson, pyyaml, tomlkit, ujson
-+from cattr import GenConverter
++from cattr import Converter
  
  from .._utils import get_placeholder_class
  from .cattrs import CattrStage
@@ -180,7 +212,7 @@ Obtained from:	https://github.com/requests-cache/requests-cache/commit/66550b535
  ['appdirs>=1.4.4,<2.0.0',
   'attrs>=21.2,<22.0',
 - 'cattrs>=1.8,<2.0',
-+ 'cattrs>=1.8,<22.2',
++ 'cattrs>=1.8,<22.3',
   'requests>=2.22,<3.0',
   'url-normalize>=1.4,<2.0',
   'urllib3>=1.25.5,<2.0.0']
diff --git a/www/py-requests-cache93/files/patch-setup.py b/www/py-requests-cache93/files/patch-setup.py
index 6cadfb7e8e49..1bb030ad70ea 100644
--- a/www/py-requests-cache93/files/patch-setup.py
+++ b/www/py-requests-cache93/files/patch-setup.py
@@ -6,6 +6,6 @@
  ['appdirs>=1.4.4,<2.0.0',
 - 'attrs>=21.2,<22.0',
 + 'attrs>=21.2',
-  'cattrs>=1.8,<22.2',
+  'cattrs>=1.8,<22.3',
   'requests>=2.22,<3.0',
   'url-normalize>=1.4,<2.0',