From nobody Sun Dec 10 18:39:21 2023 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 4SpDDn4pZCz54DN0; Sun, 10 Dec 2023 18:39:21 +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 4SpDDn2lhdz3bs7; Sun, 10 Dec 2023 18:39:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702233561; 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=QWoP7+OV6NwUf5VeJxDymMzIbkM7RHIdq3SEc4t1iss=; b=vvSHVQgRQ4hnSxHHTNIMwTgY3ym+HFLHyJxUxId2/9jGe0QczEa5TjSXQ2rPdyuln6YGGo L9E75v73f9T7wwYYiNTOVVbg2F/uzw3Puy8MRoSIWJ5VAgrc50AApG1U15YACOJIuZZ1HU 7jEhpAFA6K6ByQbc+sXHzKKFcfRAeHlv3VrHJ/+Cwi5e47DLA1wn0RciQaOIPfLCm6lmHF fqp1gOUfmJlR3gUALGSXK7ScvPxR5TjnMeDBYknlxAV8XwpccJXdm7oihm+6f6tAHXr+4r imhJxLV/FkmGgZN8x0iZpMP1/pP3dGNdDeeaZePl9z78L0KJX0Whg+m/oPHiRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702233561; a=rsa-sha256; cv=none; b=mqbkI8ASZ8S+1dq4N7SPuDeX4cloJvVMTJm5LLfCRasnvkSsCal3VZWzYtgf9ZiMKjffsQ i0Ve1daUoHVqWTWtWdziQnuesK0e1/if8TCbgfNw0BDU+A+wwICvp5JM7ckU5lnFk7pqRf B1+yv/T8bphJIgyjb9fjs8gocj0NANeX6Dg/o6rVm4voS1635jNT8loiSXAMDWhiIXuq1O yNeEXN1b0hd1cNPSwO9CWQTIckJ8y5ylAWEnZn4/Bm6/tSC1g+sh/RSmXY45+ruyuRlwz9 xmEMVri2arWPQndlmJ8MCNwUXhAjjVaqH1+Q9vJX0ZmVWrw+g4q8GDXjzR8PZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702233561; 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=QWoP7+OV6NwUf5VeJxDymMzIbkM7RHIdq3SEc4t1iss=; b=R0/vQj4ywhhkuAFk3FbQr3aTHwnQ5SaQXbOUclcY2xNVvE5EyRJqMH5cO+dDUc68AkO0z9 6hcpb1MyAy/1VJTpgLdEBe01+qeFd2SBhZdvjEvAuxjs/Cfi97PMP7fhx0kwiSe7D7v3c9 t6965dVd/d+OPBEs8i2O0wKSdZe72ETSK8HNkeAOH0Y4A6YAohVnMGRtwMip+tUA2vo5uN QR7aKqi7rieEuTuqEfJRtBt2wGsrR7zSKOondPzBysOxn4yVcYXOB74E06E6XGe3ifsPiB Y9KqlcWmjf9xdWaDmR1X7ccBIorJpA5Wk6tH9V6OibYZOneBpbhJzlwEcenjJA== 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 4SpDDn1pqDzyhT; Sun, 10 Dec 2023 18:39:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BAIdLiW093069; Sun, 10 Dec 2023 18:39:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BAIdL9c093066; Sun, 10 Dec 2023 18:39:21 GMT (envelope-from git) Date: Sun, 10 Dec 2023 18:39:21 GMT Message-Id: <202312101839.3BAIdL9c093066@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jan Beich Subject: git: 361d91e43dba - main - www/py-flask-restx: update to 1.3.0 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: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 361d91e43dbad4e4b881e8a62f93ed1b9ed191e5 Auto-Submitted: auto-generated The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=361d91e43dbad4e4b881e8a62f93ed1b9ed191e5 commit 361d91e43dbad4e4b881e8a62f93ed1b9ed191e5 Author: Jan Beich AuthorDate: 2023-12-10 14:48:32 +0000 Commit: Jan Beich CommitDate: 2023-12-10 18:38:50 +0000 www/py-flask-restx: update to 1.3.0 Changes: https://github.com/python-restx/flask-restx/releases/tag/1.3.0 Reported by: GitHub (watch releases) --- www/py-flask-restx/Makefile | 3 +- www/py-flask-restx/distinfo | 6 +- www/py-flask-restx/files/patch-flask3 | 127 ---------------------------------- 3 files changed, 4 insertions(+), 132 deletions(-) diff --git a/www/py-flask-restx/Makefile b/www/py-flask-restx/Makefile index 17e095205d63..3e7b4fc9f51c 100644 --- a/www/py-flask-restx/Makefile +++ b/www/py-flask-restx/Makefile @@ -1,6 +1,5 @@ PORTNAME= flask-restx -PORTVERSION= 1.2.0 -PORTREVISION= 1 +PORTVERSION= 1.3.0 CATEGORIES= www python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/www/py-flask-restx/distinfo b/www/py-flask-restx/distinfo index 2580e6955d02..423ad8667b77 100644 --- a/www/py-flask-restx/distinfo +++ b/www/py-flask-restx/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1697977240 -SHA256 (flask-restx-1.2.0.tar.gz) = 9a5338b108c57fbed1d24d5d53fe98442b2be7ffa2ff3291305af7a613ce6fc0 -SIZE (flask-restx-1.2.0.tar.gz) = 2813317 +TIMESTAMP = 1702219712 +SHA256 (flask-restx-1.3.0.tar.gz) = 4f3d3fa7b6191fcc715b18c201a12cd875176f92ba4acc61626ccfd571ee1728 +SIZE (flask-restx-1.3.0.tar.gz) = 2814072 diff --git a/www/py-flask-restx/files/patch-flask3 b/www/py-flask-restx/files/patch-flask3 deleted file mode 100644 index 22887f79e25f..000000000000 --- a/www/py-flask-restx/files/patch-flask3 +++ /dev/null @@ -1,127 +0,0 @@ -https://github.com/python-restx/flask-restx/pull/572 - ---- flask_restx/api.py.orig 2023-10-22 12:20:40 UTC -+++ flask_restx/api.py -@@ -14,10 +14,6 @@ from flask import make_response as original_flask_make - from flask import url_for, request, current_app - from flask import make_response as original_flask_make_response - --try: -- from flask.helpers import _endpoint_from_view_func --except ImportError: -- from flask.scaffold import _endpoint_from_view_func - from flask.signals import got_request_exception - - from jsonschema import RefResolver -@@ -45,10 +41,13 @@ from .swagger import Swagger - from .postman import PostmanCollectionV1 - from .resource import Resource - from .swagger import Swagger --from .utils import default_id, camel_to_dash, unpack -+from .utils import default_id, camel_to_dash, unpack, import_check_view_func - from .representations import output_json - from ._http import HTTPStatus - -+endpoint_from_view_func = import_check_view_func() -+ -+ - RE_RULES = re.compile("(<.*>)") - - # List headers that should never be handled by Flask-RESTX -@@ -850,7 +849,7 @@ class Api(object): - rule = blueprint_setup.url_prefix + rule - options.setdefault("subdomain", blueprint_setup.subdomain) - if endpoint is None: -- endpoint = _endpoint_from_view_func(view_func) -+ endpoint = endpoint_from_view_func(view_func) - defaults = blueprint_setup.url_defaults - if "defaults" in options: - defaults = dict(defaults, **options.pop("defaults")) ---- flask_restx/utils.py.orig 2023-10-22 12:20:40 UTC -+++ flask_restx/utils.py -@@ -1,4 +1,6 @@ import re - import re -+import warnings -+import typing - - from collections import OrderedDict - from copy import deepcopy -@@ -17,9 +19,14 @@ __all__ = ( - "not_none", - "not_none_sorted", - "unpack", -+ "import_check_view_func", - ) - - -+class FlaskCompatibilityWarning(DeprecationWarning): -+ pass -+ -+ - def merge(first, second): - """ - Recursively merges two dictionaries. -@@ -118,3 +125,43 @@ def unpack(response, default_code=HTTPStatus.OK): - return data, code or default_code, headers - else: - raise ValueError("Too many response values") -+ -+ -+def to_view_name(view_func: typing.Callable) -> str: -+ """Helper that returns the default endpoint for a given -+ function. This always is the function name. -+ -+ Note: copy of simple flask internal helper -+ """ -+ assert view_func is not None, "expected view func if endpoint is not provided." -+ return view_func.__name__ -+ -+ -+def import_check_view_func(): -+ """ -+ Resolve import flask _endpoint_from_view_func. -+ -+ Show warning if function cannot be found and provide copy of last known implementation. -+ -+ Note: This helper method exists because reoccurring problem with flask function, but -+ actual method body remaining the same in each flask version. -+ """ -+ import importlib.metadata -+ -+ flask_version = importlib.metadata.version("flask").split(".") -+ try: -+ if flask_version[0] == "1": -+ from flask.helpers import _endpoint_from_view_func -+ elif flask_version[0] == "2": -+ from flask.scaffold import _endpoint_from_view_func -+ elif flask_version[0] == "3": -+ from flask.sansio.scaffold import _endpoint_from_view_func -+ else: -+ warnings.simplefilter("once", FlaskCompatibilityWarning) -+ _endpoint_from_view_func = None -+ except ImportError: -+ warnings.simplefilter("once", FlaskCompatibilityWarning) -+ _endpoint_from_view_func = None -+ if _endpoint_from_view_func is None: -+ _endpoint_from_view_func = to_view_name -+ return _endpoint_from_view_func ---- tests/test_utils.py.orig 2023-10-22 12:20:40 UTC -+++ tests/test_utils.py -@@ -98,3 +98,17 @@ class UnpackTest(object): - def test_too_many_values(self): - with pytest.raises(ValueError): - utils.unpack((None, None, None, None)) -+ -+ -+class ToViewNameTest(object): -+ def test_none(self): -+ with pytest.raises(AssertionError): -+ _ = utils.to_view_name(None) -+ -+ def test_name(self): -+ assert utils.to_view_name(self.test_none) == self.test_none.__name__ -+ -+ -+class ImportCheckViewFuncTest(object): -+ def test_callable(self): -+ assert callable(utils.import_check_view_func())