mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-15 01:53:25 -04:00
Merge updates from master
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
DIST pulumi-v3.80.0-linux-x64.tar.gz 162654764 BLAKE2B c7f3774ebb221344144953d36522d31f2ff3e6c01e7e7269ae22f024fb3f7274adba9353c8d30cadb953571575ac13e36e6fc3358b0435d900e0653d4ee584e3 SHA512 9b5850c8dfa6e1c86d027ac01e42802023b5be02a2989ca4bc62fb3e8a6c2e1d59d3ab30e9b381e411215c0956ac2157841e8240c16d8e2cfb3ba5c6026a5b3f
|
||||
DIST pulumi-v3.81.0-linux-x64.tar.gz 162663777 BLAKE2B 95ab73b4f8d3695bf90b9cd5068692908e89e0e931b1d580f847de74871b6e5ca5e39196d4d3e6e010cf91843f6649b39e77d4b278e32302d22730d6eb7efbec SHA512 8a3b680cc348385c32c1069338e7d710b696e26c6f4b60dea963848b0df4298c8b08262938d2e93460c77cb620ce6495b60da97145a347b50fd71619173585f8
|
||||
DIST pulumi-v3.86.0-linux-x64.tar.gz 163524936 BLAKE2B 9a5865f85a6e835c91ac4b2b3a66a8eb97b6f85026cdd314614d9ffea9a3a7ec01d8d6571d9b2a8cbb13cd26c4b5df73cf4bef443ece841ce31d78a8147b5ffd SHA512 6328207c6cbddd08824334a55906ad37c724335757298586fd9e0a3f50979b08bbb4754e1b34745f559b7fd285a99f8d0d615c49f9ca2fba43d7e3e25f28a93f
|
||||
DIST pulumi-v3.88.0-linux-x64.tar.gz 168130870 BLAKE2B 876f03ae240f338a5a258cd0ddfca089837b55a29d1ded333b5c89cdcf5abcc4f7561cd31ccb7bd5a679d2a7e29dec1102e3a77cff5061d90e48570c0bfb3688 SHA512 bc85f4362cf0665b706aab731d079797e1eca9a064d5cf411891e5aa2e2cf50eefb76a7f1e156799754ec51548db17e9438ee6e0be077e692e0b25a6e0017d96
|
||||
|
||||
36
dev-python/adb-shell/adb-shell-0.4.4-r1.ebuild
Normal file
36
dev-python/adb-shell/adb-shell-0.4.4-r1.ebuild
Normal file
@@ -0,0 +1,36 @@
|
||||
# Copyright 2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_11 )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="A Python implementation of ADB with shell and FileSync functionality."
|
||||
HOMEPAGE="https://pypi.org/project/adb-shell/ https://github.com/JeffLIrion/adb_shell"
|
||||
SRC_URI="https://github.com/JeffLIrion/adb_shell/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
S="${WORKDIR}/adb_shell-${PV}"
|
||||
|
||||
RDEPEND="
|
||||
dev-python/aiofiles[${PYTHON_USEDEP}]
|
||||
dev-python/async-timeout[${PYTHON_USEDEP}]
|
||||
dev-python/cryptography[${PYTHON_USEDEP}]
|
||||
dev-python/pyasn1[${PYTHON_USEDEP}]
|
||||
dev-python/rsa[${PYTHON_USEDEP}]
|
||||
"
|
||||
DEPEND="test? (
|
||||
${RDEPEND}
|
||||
dev-python/pycryptodome[${PYTHON_USEDEP}]
|
||||
dev-python/libusb1[${PYTHON_USEDEP}]
|
||||
|
||||
)"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
distutils_enable_tests unittest
|
||||
@@ -1,2 +1 @@
|
||||
DIST flask-restx-0.5.1.tar.gz 398653 BLAKE2B 605c66decc83d8d7fc3449d3b7053cc2bb589d23f4db22d3a61b9422a97ceefdc0335af8c002762ec7693844b005f5562fdfda09e95c1e83fa266709af640a9d SHA512 0e4ca95a6bb45f7dfba1758387aded6215ec64fa55060889e6843fb50eed09fda96ba936eacd0d8f27b29f5dec2468d4945386f25ff4de6a51f571e16617cf52
|
||||
DIST flask-restx-1.1.0.tar.gz 398890 BLAKE2B 0268d0173e35bd36e3cd7c8eb40b1083370eed9cad3fe0cd0c55c548481844f14fa68b80f7d0461ef98074ca384cb880c1c9c30fb8d1bf0ca5e497b0cfc134b2 SHA512 83c0319591078827fe7ad2db04833817df13b5e808e3137b309b6b994908c9ae40c665aa8f10def5e06a7d1f41d9b4dc03be35c46b6403e03ef28684cc512380
|
||||
|
||||
150
dev-python/flask-restx/files/flask-restx-fix-flask-compat.patch
Normal file
150
dev-python/flask-restx/files/flask-restx-fix-flask-compat.patch
Normal file
@@ -0,0 +1,150 @@
|
||||
diff --git a/flask_restx/api.py b/flask_restx/api.py
|
||||
index 5996dd59..bd0413dd 100644
|
||||
--- a/flask_restx/api.py
|
||||
+++ b/flask_restx/api.py
|
||||
@@ -14,10 +14,6 @@
|
||||
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 .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 @@ def _blueprint_setup_add_url_rule_patch(
|
||||
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"))
|
||||
diff --git a/flask_restx/utils.py b/flask_restx/utils.py
|
||||
index 809a29b3..35dec2ae 100644
|
||||
--- a/flask_restx/utils.py
|
||||
+++ b/flask_restx/utils.py
|
||||
@@ -1,4 +1,6 @@
|
||||
import re
|
||||
+import warnings
|
||||
+import typing
|
||||
|
||||
from collections import OrderedDict
|
||||
from copy import deepcopy
|
||||
@@ -20,6 +22,10 @@
|
||||
)
|
||||
|
||||
|
||||
+class FlaskCompatibilityWarning(DeprecationWarning):
|
||||
+ pass
|
||||
+
|
||||
+
|
||||
def merge(first, second):
|
||||
"""
|
||||
Recursively merges two dictionaries.
|
||||
@@ -118,3 +124,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
|
||||
diff --git a/tests/test_utils.py b/tests/test_utils.py
|
||||
index d98d68d0..fe3a1adb 100644
|
||||
--- a/tests/test_utils.py
|
||||
+++ b/tests/test_utils.py
|
||||
@@ -98,3 +98,17 @@ def test_value_headers_default_code(self):
|
||||
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 self.test_none == self.test_none.__name__
|
||||
+
|
||||
+
|
||||
+class ImportCheckViewFuncTest(object):
|
||||
+ def test_callable(self):
|
||||
+ assert callable(utils.import_check_view_func())
|
||||
|
||||
From 13ac54e4ba513c01ec8e4a23b4e88b7b555cf2f1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Trval?= <trval@kajot.cz>
|
||||
Date: Fri, 6 Oct 2023 15:46:13 +0200
|
||||
Subject: [PATCH 2/2] modify: include new import_check_view_func in
|
||||
utils.__all__ to keep nice static checks
|
||||
|
||||
---
|
||||
flask_restx/utils.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/flask_restx/utils.py b/flask_restx/utils.py
|
||||
index 35dec2ae..367527a5 100644
|
||||
--- a/flask_restx/utils.py
|
||||
+++ b/flask_restx/utils.py
|
||||
@@ -19,6 +19,7 @@
|
||||
"not_none",
|
||||
"not_none_sorted",
|
||||
"unpack",
|
||||
+ "import_check_view_func",
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYTHON_COMPAT=( python3_10)
|
||||
PYTHON_COMPAT=( python3_{11,12})
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Framework API development with Flask"
|
||||
@@ -13,9 +13,11 @@ SRC_URI="https://github.com/python-restx/${PN}/archive/${PV}.tar.gz -> ${P}.tar.
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS=""
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="test"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-fix-flask-compat.patch" )
|
||||
|
||||
RDEPEND="
|
||||
dev-python/aniso8601[${PYTHON_USEDEP}]
|
||||
dev-python/flask[${PYTHON_USEDEP}]
|
||||
@@ -0,0 +1,74 @@
|
||||
diff --git a/pytest_flask/fixtures.py b/pytest_flask/fixtures.py
|
||||
index eb25861..486ec8b 100755
|
||||
--- a/pytest_flask/fixtures.py
|
||||
+++ b/pytest_flask/fixtures.py
|
||||
@@ -3,7 +3,6 @@ import socket
|
||||
import warnings
|
||||
|
||||
import pytest
|
||||
-from flask import _request_ctx_stack
|
||||
|
||||
from ._internal import _determine_scope
|
||||
from ._internal import _make_accept_header
|
||||
@@ -93,23 +92,6 @@ def config(app):
|
||||
return app.config
|
||||
|
||||
|
||||
-@pytest.fixture
|
||||
-def request_ctx(app):
|
||||
- """The request context which contains all request relevant information,
|
||||
- e.g. `session`, `g`, `flashes`, etc.
|
||||
- """
|
||||
- warnings.warn(
|
||||
- "In Werzeug 2.0.0, the Client request methods "
|
||||
- "(client.get, client.post) always return an instance of TestResponse. This "
|
||||
- "class provides a reference to the request object through 'response.request' "
|
||||
- "The fixture 'request_ctx' is deprecated and will be removed in the future, using TestResponse.request "
|
||||
- "is the prefered way.",
|
||||
- DeprecationWarning,
|
||||
- stacklevel=2,
|
||||
- )
|
||||
- return _request_ctx_stack.top
|
||||
-
|
||||
-
|
||||
@pytest.fixture(params=["application/json", "text/html"])
|
||||
def mimetype(request):
|
||||
return request.param
|
||||
diff --git a/pytest_flask/plugin.py b/pytest_flask/plugin.py
|
||||
index bb4bf59..037f062 100755
|
||||
--- a/pytest_flask/plugin.py
|
||||
+++ b/pytest_flask/plugin.py
|
||||
@@ -19,7 +19,6 @@ from .fixtures import client
|
||||
from .fixtures import client_class
|
||||
from .fixtures import config
|
||||
from .fixtures import live_server
|
||||
-from .fixtures import request_ctx
|
||||
from .pytest_compat import getfixturevalue
|
||||
|
||||
|
||||
diff --git a/tests/test_fixtures.py b/tests/test_fixtures.py
|
||||
index a55fd98..b38af95 100755
|
||||
--- a/tests/test_fixtures.py
|
||||
+++ b/tests/test_fixtures.py
|
||||
@@ -16,21 +16,6 @@ class TestFixtures:
|
||||
def test_accept_jsonp(self, accept_jsonp):
|
||||
assert accept_jsonp == [("Accept", "application/json-p")]
|
||||
|
||||
- def test_request_ctx(self, app, request_ctx):
|
||||
- assert request_ctx.app is app
|
||||
-
|
||||
- def test_request_ctx_is_kept_around(self, client):
|
||||
- res = client.get(url_for("index"), headers=[("X-Something", "42")])
|
||||
- """In werkzeug 2.0.0 the test Client provides a new attribute 'request'
|
||||
- in the response class wich holds a reference to the request object that
|
||||
- produced the respective response, making instrospection easier"""
|
||||
- try:
|
||||
- assert res.request.headers["X-Something"] == "42"
|
||||
- except AttributeError:
|
||||
- """This is the conventional (pre 2.0.0) way of reaching the
|
||||
- request object, using flask.request global."""
|
||||
- assert request.headers["X-Something"] == "42"
|
||||
-
|
||||
def test_accept_mimetype(self, accept_mimetype):
|
||||
mimestrings = [[("Accept", "application/json")], [("Accept", "text/html")]]
|
||||
assert accept_mimetype in mimestrings
|
||||
32
dev-python/pytest-flask/pytest-flask-1.2.0-r1.ebuild
Normal file
32
dev-python/pytest-flask/pytest-flask-1.2.0-r1.ebuild
Normal file
@@ -0,0 +1,32 @@
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
PYPI_NO_NORMALIZE=1
|
||||
PYTHON_COMPAT=( python3_{11,12} pypy3 )
|
||||
inherit distutils-r1 pypi
|
||||
|
||||
DESCRIPTION="A set of pytest fixtures to test Flask applications "
|
||||
HOMEPAGE="http://pytest-flask.readthedocs.org"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="test"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${PN}-fix-flask-compat.patch" )
|
||||
|
||||
RDEPEND="
|
||||
dev-python/flask[${PYTHON_USEDEP}]
|
||||
dev-python/werkzeug[${PYTHON_USEDEP}]
|
||||
"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
test? (
|
||||
dev-python/mock[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
@@ -15,6 +15,8 @@ S="${WORKDIR}/eartag-${PV}"
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="test"
|
||||
RESTRICT="!test? ( test )"
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
DEPEND="
|
||||
@@ -26,6 +28,7 @@ DEPEND="
|
||||
>=media-libs/mutagen-1.46.0
|
||||
>=dev-python/python-magic-0.4.27
|
||||
>=dev-python/pyacoustid-1.2.2-r1
|
||||
test? ( >=dev-python/pytest-7.4.0 )
|
||||
"
|
||||
RDEPEND="${DEPEND}"
|
||||
BDEPEND="
|
||||
|
||||
@@ -16,6 +16,10 @@ SLOT="0"
|
||||
LICENSE="all-rights-reserved"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RDEPEND="
|
||||
app-arch/brotli
|
||||
"
|
||||
|
||||
src_unpack() {
|
||||
unpack_deb ${A}
|
||||
}
|
||||
|
||||
@@ -440,14 +440,14 @@ src_configure() {
|
||||
src_compile() {
|
||||
meson_src_compile
|
||||
cargo_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# meson_src_install won't find spot binary otherwise because cargo.sh isn't used for compiling
|
||||
mv "${WORKDIR}/${P}/target/release/spot" \
|
||||
"${WORKDIR}/${P}-build/src/spot" \
|
||||
|| die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
meson_src_install
|
||||
}
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
DIST phinger-xcursors-1.1.tar.bz2 943817 BLAKE2B d56b88e65aaa7f689a94f0d2cfdb644db89694dc483720047973106a6f76e7e49dab17fa895646d78eaafda55ed01fba129bd7016f4ae0e0414c861270289296 SHA512 437d67a77f0abfda65e974b3a63f6452078f3ae86f3fe63d0069ad456922e6244cb6ec57f5cdcddf7c03e96e43349c3774c157c35efd6c7a2e16a84a7dbc6480
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>alexey@zapparov.com</email>
|
||||
<name>Alexey Zapparov</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<bugs-to>https://github.com/phisch/phinger-cursors/issues</bugs-to>
|
||||
<remote-id type="github">phisch/phinger-cursors</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -1,24 +0,0 @@
|
||||
# Copyright 2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Most likely the most over engineered cursor theme"
|
||||
HOMEPAGE="https://github.com/phisch/phinger-cursors"
|
||||
SRC_URI="https://github.com/phisch/phinger-cursors/releases/download/v${PV}/phinger-cursors-variants.tar.bz2 -> ${P}.tar.bz2"
|
||||
|
||||
LICENSE="CC-BY-SA-4.0"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RDEPEND="x11-libs/libXcursor"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_install() {
|
||||
insinto /usr/share/cursors/xorg-x11/Phinger
|
||||
doins -r phinger-cursors/*
|
||||
|
||||
insinto /usr/share/cursors/xorg-x11/Phinger-Light
|
||||
doins -r phinger-cursors-light/*
|
||||
}
|
||||
Reference in New Issue
Block a user