mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-04 01:37:34 -08:00
dev-python/betterproto: Bump to 2.0.0_beta6
Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
parent
a6271838af
commit
d154792bd5
@ -1,2 +1,4 @@
|
||||
DIST python-betterproto-v.2.0.0b6.gh.tar.gz 158969 BLAKE2B ddf269dbef6d0ed4098ec1e84a48ac64431710c26357da86a4f9f1656ce4f4ed8c29097f7e5c50f73ef0d57e3a7eb35ab18aac1864773cd2878e8970f75537a4 SHA512 2622e7d3bac4c6f04fe32d4abeeadf8af0cfcf08a365b3bb6c855763d4ac0528f90eefebfe70866b6431119fc7860bf61d99692411c82e94de9539b4da56543c
|
||||
DIST python-betterproto-v.2.0.0b6.tests.tar.xz 34652 BLAKE2B 51a419a7de999a954b1392a4ca2800b46f92284ec7e16891fdbf268a9debe33bcbdfb9d3135f162c4549ab5aeebfeb82f136e6e90f596e6eed3cebea44bd4a21 SHA512 4b5aad58fadde59bbf33d792ece212cee89764964cf5060883dc36c6662b1dd5524c6e36479f4f49899b4b77340e032f53649fbbe8210573736bd9e7bb9664c3
|
||||
DIST python-betterproto-v.2.0.0b7.gh.tar.gz 217820 BLAKE2B 2ede4c7b106c8c01279e1e57bc34c13c4e274215f077ae1d294108f40b6043682276c31703b1443bac5ab072a761141de306ff95cb34653180a9ee5bebe29b86 SHA512 4ca16c1cd09d76cde69848e6691be6f5716f730b7107f72e4a006c9b5881c815f4f24f9941861a972405d6d08bb47425900428886d1f8a2e37ace370c4514fbe
|
||||
DIST python-betterproto-v.2.0.0b7.tests.tar.xz 36328 BLAKE2B 43bb385c6e6746602b210fdf10a94bb4508366230461823d96fbdbeb868b1e0952cb1a3a596bfa4bbaa2e71b643e17cabeb4e11546c5eedf47d632e07d4078aa SHA512 a8b090d04e89a57dc8ff3b7775756cbf7d07bb317e47f76e12704cd41583b32a4f5f106a72af8c66f63e6def9bfc22ad93b4c39169b06b92b47a9f386326dfa7
|
||||
|
||||
78
dev-python/betterproto/betterproto-2.0.0_beta6.ebuild
Normal file
78
dev-python/betterproto/betterproto-2.0.0_beta6.ebuild
Normal file
@ -0,0 +1,78 @@
|
||||
# Copyright 2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DISTUTILS_USE_PEP517=poetry
|
||||
PYTHON_COMPAT=( python3_{10..12} )
|
||||
|
||||
inherit distutils-r1
|
||||
|
||||
TAG=v.${PV/_beta/b}
|
||||
MY_P=python-betterproto-${TAG}
|
||||
DESCRIPTION="A better Protobuf / gRPC generator & library"
|
||||
HOMEPAGE="
|
||||
https://github.com/danielgtaylor/python-betterproto/
|
||||
https://pypi.org/project/betterproto/
|
||||
"
|
||||
# no tests in sdist, as of 2.0.0b7
|
||||
SRC_URI="
|
||||
https://github.com/danielgtaylor/python-betterproto/archive/${TAG}.tar.gz
|
||||
-> ${MY_P}.gh.tar.gz
|
||||
"
|
||||
if [[ ${PKGBUMPING} != ${PVR} ]]; then
|
||||
# poetry install -E compiler
|
||||
# poetry run python -m tests.generate -v
|
||||
# pack tests/output*
|
||||
SRC_URI+="
|
||||
test? (
|
||||
https://dev.gentoo.org/~mgorny/dist/${MY_P}.tests.tar.xz
|
||||
)
|
||||
"
|
||||
fi
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
RDEPEND="
|
||||
>=dev-python/black-23.1.0[${PYTHON_USEDEP}]
|
||||
>=dev-python/grpclib-0.4.1[${PYTHON_USEDEP}]
|
||||
>=dev-python/isort-5.11.5[${PYTHON_USEDEP}]
|
||||
>=dev-python/jinja-3.0.3[${PYTHON_USEDEP}]
|
||||
>=dev-python/python-dateutil-2.8[${PYTHON_USEDEP}]
|
||||
>=dev-python/typing-extensions-4.7.1[${PYTHON_USEDEP}]
|
||||
"
|
||||
BDEPEND="
|
||||
test? (
|
||||
dev-python/cachelib[${PYTHON_USEDEP}]
|
||||
dev-python/pydantic[${PYTHON_USEDEP}]
|
||||
dev-python/tomlkit[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-asyncio[${PYTHON_USEDEP}]
|
||||
dev-python/pytest-mock[${PYTHON_USEDEP}]
|
||||
)
|
||||
"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
PATCHES=(
|
||||
# https://github.com/danielgtaylor/python-betterproto/pull/622
|
||||
"${FILESDIR}/${P}-pytest-8.patch"
|
||||
)
|
||||
|
||||
python_test() {
|
||||
local EPYTEST_IGNORE=(
|
||||
# broken with current pydantic
|
||||
tests/inputs/oneof/test_oneof.py
|
||||
)
|
||||
local EPYTEST_DESELECT=(
|
||||
# TODO: ordering issue?
|
||||
"tests/test_inputs.py::test_binary_compatibility[map]"
|
||||
# pydantic
|
||||
tests/inputs/bool/test_bool.py::test_pydantic_no_value
|
||||
)
|
||||
|
||||
local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
|
||||
epytest -p asyncio -p pytest_mock
|
||||
}
|
||||
@ -0,0 +1,39 @@
|
||||
From bfe6592b4f95886bbe395af2c2fa3d9e2a562315 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
||||
Date: Fri, 27 Sep 2024 19:01:53 +0200
|
||||
Subject: [PATCH] Update no-warning tests for pytest-8
|
||||
|
||||
Replace the deprecated `pytest.warns(None)` with the suggested
|
||||
replacement (from https://github.com/pytest-dev/pytest/issues/9404)
|
||||
to make the test suite forward compatible with pytest-8. This works
|
||||
correctly with pytest-6 as well.
|
||||
---
|
||||
tests/test_deprecated.py | 10 ++++------
|
||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/tests/test_deprecated.py b/tests/test_deprecated.py
|
||||
index 84e08bd..bee14f1 100644
|
||||
--- a/tests/test_deprecated.py
|
||||
+++ b/tests/test_deprecated.py
|
||||
@@ -32,14 +32,12 @@ def test_message_with_deprecated_field(message):
|
||||
|
||||
|
||||
def test_message_with_deprecated_field_not_set(message):
|
||||
- with pytest.warns(None) as record:
|
||||
+ with warnings.catch_warnings():
|
||||
+ warnings.simplefilter("error")
|
||||
Test(value=10)
|
||||
|
||||
- assert not record
|
||||
-
|
||||
|
||||
def test_message_with_deprecated_field_not_set_default(message):
|
||||
- with pytest.warns(None) as record:
|
||||
+ with warnings.catch_warnings():
|
||||
+ warnings.simplefilter("error")
|
||||
_ = Test(value=10).message
|
||||
-
|
||||
- assert not record
|
||||
--
|
||||
2.46.2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user