From nobody Thu Jul 07 12:37:44 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9E71612A8D12; Thu, 7 Jul 2022 12:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ldwt06qMqz3kqx; Thu, 7 Jul 2022 12:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657197465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RWbHQCXtT7n8rBSS+nOGSOYwVmJVk9pd2a8veSnxltg=; b=FG2OUQUqV+dLcTcw9qZZMdzAxTfyEMCRocRsEME5cJQMcB492LRlqTM29HYsQNSjQYp+3D uHzo9JjtDguLVZrr5HAxRZMuFSm8sokBGjdS46ybNFgJ8E9AkMvvUg8snJUXKzTwKsDGxW Q+fRBIzRmfJH8KguPsVFEPWdt3rp6/AM/QKlmry1SleCNvyukFyGq0OS0gtap91VC8Do+P IZwXbbsNSmJbxhXchtjjks8vBRL+npwhkufJMuRnqgG0/7e+Gu1RGB815zL9nA70gDloLh PuxS410/EAWVC3mPVG0dBPkAMkZ5F84O2zOZ5PbHOqYnkmdNha+sbPnzJHmTew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Ldwt05sVczjtG; Thu, 7 Jul 2022 12:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 267CbiuP074851; Thu, 7 Jul 2022 12:37:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 267Cbi8V074850; Thu, 7 Jul 2022 12:37:44 GMT (envelope-from git) Date: Thu, 7 Jul 2022 12:37:44 GMT Message-Id: <202207071237.267Cbi8V074850@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 99f010015649 - main - www/py-requests-cache: Update to 0.9.5 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 99f01001564924ca1744f6f381dfda45575cccf8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657197465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RWbHQCXtT7n8rBSS+nOGSOYwVmJVk9pd2a8veSnxltg=; b=SkDc2JDphGWCBbcj5HwxiyuK8BicJT8QjGG32Jg8oQqiL2Tz0T1Cj0+J8coSWVNZ+k0E5a tvY+doVUbc6TRr7eee0QdMpfVOecX900Ln3bAU3hcUcxLCGhg4pIov4WrKboe5gGC53Qs5 gw6i4DRsvltt+Dpo12Gsut1CzdavDDj++FJrf4T0NGJp7aazEBYlHutn0k044YbbehJ3ja lD+GCPpuOXa5gQTu9f0dHSHQw/oD5Vb97TfLrWwWtHFGtkjrLV+2F+dmp4uPgff1hs7KtG aNMqmOTpHbdbk2FJanIeKKJn1QphuKuZZyegKIqZRRVTGNUMPb2KaGR3mGTzyw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657197465; a=rsa-sha256; cv=none; b=Q/NnQ/mhgefXxXQ4SbyZ8cEm6oeH6n0NAsFOGRKhgdko2lqtlLzNs81X0xN2yF4Mo4vAB0 9dIjg4M/whuWnedEIw+7QcYNZhN+QqOk/bcsYgVh6qABA6bgjBRaA+P35j5Akdema7Rrz4 WBPlyicTUqpbLEyJdf17OiouqkeVfXQHoZuBFGZ/YEFwFjYGCRMglH43gNBvJUxoJ247l5 9nkXslgFbMYWP1mdGqvCL53wUlq9yZzxySfjZKrdLguFoDJ7I3vTPed4YiTQ7WuyWJBL39 9fHYnq6IFolb1gwAbwv1OGOgrpD2FzuK66Zb1hMOwLioZhFZ+Q3SSB9dV1RPqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=99f01001564924ca1744f6f381dfda45575cccf8 commit 99f01001564924ca1744f6f381dfda45575cccf8 Author: Po-Chuan Hsieh AuthorDate: 2022-07-07 12:22:51 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-07-07 12:36:19 +0000 www/py-requests-cache: Update to 0.9.5 - Update WWW Changes: https://github.com/requests-cache/requests-cache/releases https://github.com/requests-cache/requests-cache/blob/main/HISTORY.md --- www/py-requests-cache/Makefile | 12 +- www/py-requests-cache/distinfo | 6 +- www/py-requests-cache/files/patch-cattrs | 186 ------------------------------- www/py-requests-cache/pkg-descr | 2 +- 4 files changed, 13 insertions(+), 193 deletions(-) diff --git a/www/py-requests-cache/Makefile b/www/py-requests-cache/Makefile index 917ead1689ed..3aa30501c7d1 100644 --- a/www/py-requests-cache/Makefile +++ b/www/py-requests-cache/Makefile @@ -1,7 +1,7 @@ # Created by: Kubilay Kocak PORTNAME= requests-cache -PORTVERSION= 0.9.4 +PORTVERSION= 0.9.5 CATEGORIES= www python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -14,7 +14,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<22.0:devel/py-attrs@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}cattrs>=1.8<22.2:devel/py-cattrs@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}cattrs>=1.8<22.2.1: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} @@ -24,7 +24,13 @@ USE_PYTHON= autoplist concurrent distutils NO_ARCH= yes +.include + +.if ${PYTHON_REL} < 31100 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}exceptiongroup>=1.0.0rc3:devel/py-exceptiongroup@${PY_FLAVOR} +.endif + do-test: cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -rs -v -.include +.include diff --git a/www/py-requests-cache/distinfo b/www/py-requests-cache/distinfo index bdcbd99e2124..32c5559f18f1 100644 --- a/www/py-requests-cache/distinfo +++ b/www/py-requests-cache/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1650970173 -SHA256 (requests-cache-0.9.4.tar.gz) = 04bb1212bbefba122080163530555f36e64fcd517ef8f90e289ef76f7ae055da -SIZE (requests-cache-0.9.4.tar.gz) = 1506554 +TIMESTAMP = 1656702534 +SHA256 (requests-cache-0.9.5.tar.gz) = bd67575f541f9c10f44f8b49d8d449fb55db8af2e27d93c56349f227b78e4b70 +SIZE (requests-cache-0.9.5.tar.gz) = 1506795 diff --git a/www/py-requests-cache/files/patch-cattrs b/www/py-requests-cache/files/patch-cattrs deleted file mode 100644 index 7b551569bd72..000000000000 --- a/www/py-requests-cache/files/patch-cattrs +++ /dev/null @@ -1,186 +0,0 @@ -Obtained from: https://github.com/requests-cache/requests-cache/commit/66550b5355f4a4f063b4b22c3139a2f941c91eb4 - ---- requests_cache/serializers/preconf.py.orig 2022-04-23 00:00:39 UTC -+++ requests_cache/serializers/preconf.py -@@ -1,9 +1,10 @@ -+# flake8: noqa: F841 - """The ``cattrs`` library includes a number of `pre-configured converters - `_ that perform some pre-serialization steps - required for specific serialization formats. - - This module wraps those converters as serializer :py:class:`.Stage` objects. These are then used as --a stage in a :py:class:`.SerializerPipeline`, which runs after the base converter and before the -+stages in a :py:class:`.SerializerPipeline`, which runs after the base converter and before the - format's ``dumps()`` (or equivalent) method. - - For any optional libraries that aren't installed, the corresponding serializer will be a placeholder -@@ -13,70 +14,95 @@ class that raises an ``ImportError`` at initialization - :nosignatures: - """ - import pickle -+from datetime import timedelta -+from decimal import Decimal - from functools import partial -+from importlib import import_module - --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 .._utils import get_placeholder_class - from .cattrs import CattrStage - from .pipeline import SerializerPipeline, Stage - --base_stage = ( -- CattrStage() --) #: Base stage for all serializer pipelines (or standalone dict serializer) --dict_serializer = base_stage #: Partial serializer that unstructures responses into dicts --bson_preconf_stage = CattrStage(bson_preconf.make_converter) #: Pre-serialization steps for BSON --json_preconf_stage = CattrStage(json_preconf.make_converter) #: Pre-serialization steps for JSON --msgpack_preconf_stage = CattrStage(msgpack.make_converter) #: Pre-serialization steps for msgpack --orjson_preconf_stage = CattrStage(orjson.make_converter) #: Pre-serialization steps for orjson --yaml_preconf_stage = CattrStage(pyyaml.make_converter) #: Pre-serialization steps for YAML --toml_preconf_stage = CattrStage(tomlkit.make_converter) #: Pre-serialization steps for TOML --ujson_preconf_stage = CattrStage(ujson.make_converter) #: Pre-serialization steps for ultrajson --pickle_serializer = SerializerPipeline( -- [base_stage, pickle], is_binary=True --) #: Complete pickle serializer -+ -+def make_stage(preconf_module: str, **kwargs): -+ """Create a preconf serializer stage from a module name, if dependencies are installed""" -+ try: -+ factory = import_module(preconf_module).make_converter -+ return CattrStage(factory, **kwargs) -+ except ImportError as e: -+ return get_placeholder_class(e) -+ -+ -+# Pre-serialization stages -+base_stage = CattrStage() #: Base stage for all serializer pipelines - utf8_encoder = Stage(dumps=str.encode, loads=lambda x: x.decode()) #: Encode to bytes -+bson_preconf_stage = make_stage('cattr.preconf.bson') #: Pre-serialization steps for BSON -+json_preconf_stage = make_stage('cattr.preconf.json') #: Pre-serialization steps for JSON -+msgpack_preconf_stage = make_stage('cattr.preconf.msgpack') #: Pre-serialization steps for msgpack -+orjson_preconf_stage = make_stage('cattr.preconf.orjson') #: Pre-serialization steps for orjson -+toml_preconf_stage = make_stage('cattr.preconf.tomlkit') #: Pre-serialization steps for TOML -+ujson_preconf_stage = make_stage('cattr.preconf.ujson') #: Pre-serialization steps for ultrajson -+yaml_preconf_stage = make_stage('cattr.preconf.pyyaml') #: Pre-serialization steps for YAML - -+# Basic serializers with no additional dependencies -+dict_serializer = SerializerPipeline( -+ [base_stage], is_binary=False -+) #: Partial serializer that unstructures responses into dicts -+pickle_serializer = SerializerPipeline( -+ [base_stage, Stage(pickle)], is_binary=True -+) #: Pickle serializer - - # Safe pickle serializer --try: -+def signer_stage(secret_key=None, salt='requests-cache') -> Stage: -+ """Create a stage that uses ``itsdangerous`` to add a signature to responses on write, and -+ validate that signature with a secret key on read. Can be used in a -+ :py:class:`.SerializerPipeline` in combination with any other serialization steps. -+ """ - from itsdangerous import Signer - -- def signer_stage(secret_key=None, salt='requests-cache') -> Stage: -- """Create a stage that uses ``itsdangerous`` to add a signature to responses on write, and -- validate that signature with a secret key on read. Can be used in a -- :py:class:`.SerializerPipeline` in combination with any other serialization steps. -- """ -- return Stage(Signer(secret_key=secret_key, salt=salt), dumps='sign', loads='unsign') -+ return Stage( -+ Signer(secret_key=secret_key, salt=salt), -+ dumps='sign', -+ loads='unsign', -+ ) - -- def safe_pickle_serializer( -- secret_key=None, salt='requests-cache', **kwargs -- ) -> SerializerPipeline: -- """Create a serializer that uses ``pickle`` + ``itsdangerous`` to add a signature to -- responses on write, and validate that signature with a secret key on read. -- """ -- return SerializerPipeline( -- [base_stage, pickle, signer_stage(secret_key, salt)], is_binary=True -- ) - -+def safe_pickle_serializer(secret_key=None, salt='requests-cache', **kwargs) -> SerializerPipeline: -+ """Create a serializer that uses ``pickle`` + ``itsdangerous`` to add a signature to -+ responses on write, and validate that signature with a secret key on read. -+ """ -+ return SerializerPipeline( -+ [base_stage, Stage(pickle), signer_stage(secret_key, salt)], -+ is_binary=True, -+ ) -+ -+ -+try: -+ import itsdangerous # noqa: F401 - except ImportError as e: - signer_stage = get_placeholder_class(e) - safe_pickle_serializer = get_placeholder_class(e) - - - # BSON serializer --try: -+def _get_bson_functions(): -+ """Handle different function names between pymongo's bson and standalone bson""" - try: -- from bson import decode as _bson_loads -- from bson import encode as _bson_dumps -+ import pymongo # noqa: F401 -+ -+ return {'dumps': 'encode', 'loads': 'decode'} - except ImportError: -- from bson import dumps as _bson_dumps -- from bson import loads as _bson_loads -+ return {'dumps': 'dumps', 'loads': 'loads'} - -+ -+try: -+ import bson -+ - bson_serializer = SerializerPipeline( -- [bson_preconf_stage, Stage(dumps=_bson_dumps, loads=_bson_loads)], is_binary=True -+ [bson_preconf_stage, Stage(bson, **_get_bson_functions())], -+ is_binary=True, - ) #: Complete BSON serializer; uses pymongo's ``bson`` if installed, otherwise standalone ``bson`` codec - except ImportError as e: - bson_serializer = get_placeholder_class(e) -@@ -94,7 +120,8 @@ except ImportError: - - _json_stage = Stage(dumps=partial(json.dumps, indent=2), loads=json.loads) - json_serializer = SerializerPipeline( -- [_json_preconf_stage, _json_stage], is_binary=False -+ [_json_preconf_stage, _json_stage], -+ is_binary=False, - ) #: Complete JSON serializer; uses ultrajson if available - - -@@ -102,11 +129,9 @@ json_serializer = SerializerPipeline( - try: - import yaml - -+ _yaml_stage = Stage(yaml, loads='safe_load', dumps='safe_dump') - yaml_serializer = SerializerPipeline( -- [ -- yaml_preconf_stage, -- Stage(yaml, loads='safe_load', dumps='safe_dump'), -- ], -+ [yaml_preconf_stage, _yaml_stage], - is_binary=False, - ) #: Complete YAML serializer - except ImportError as e: ---- setup.py.orig 1970-01-01 00:00:00 UTC -+++ setup.py -@@ -13,7 +13,7 @@ package_data = \ - install_requires = \ - ['appdirs>=1.4.4,<2.0.0', - 'attrs>=21.2,<22.0', -- 'cattrs>=1.8,<2.0', -+ 'cattrs>=1.8,<22.2', - 'requests>=2.22,<3.0', - 'url-normalize>=1.4,<2.0', - 'urllib3>=1.25.5,<2.0.0'] diff --git a/www/py-requests-cache/pkg-descr b/www/py-requests-cache/pkg-descr index cbffa1b55be5..068627947fb0 100644 --- a/www/py-requests-cache/pkg-descr +++ b/www/py-requests-cache/pkg-descr @@ -16,4 +16,4 @@ Features: any combination of strategies - Compatibility: Can be combined with other popular libraries based on requests -WWW: https://github.com/reclosedev/requests-cache +WWW: https://github.com/requests-cache/requests-cache