public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:master commit in: dev-python/os-api-ref/, dev-python/os-api-ref/files/
@ 2023-12-21  6:32 Viorel Munteanu
  0 siblings, 0 replies; only message in thread
From: Viorel Munteanu @ 2023-12-21  6:32 UTC (permalink / raw
  To: gentoo-commits

commit:     2edca9857e312d4f34701297d5814b3811e3029d
Author:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
AuthorDate: Wed Dec 20 14:59:50 2023 +0000
Commit:     Viorel Munteanu <ceamac <AT> gentoo <DOT> org>
CommitDate: Wed Dec 20 14:59:50 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=2edca985

dev-python/os-api-ref: add 3.0.0, drop 2.3.0

Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com>

 dev-python/os-api-ref/Manifest                     |  2 +-
 .../files/os-api-ref-3.0.0-python-3.12.patch       | 18 ++++++++++
 .../files/os-api-ref-3.0.0-sphinx-7.2.0.patch      | 39 ++++++++++++++++++++++
 ...pi-ref-2.3.0.ebuild => os-api-ref-3.0.0.ebuild} | 20 ++++++++---
 4 files changed, 74 insertions(+), 5 deletions(-)

diff --git a/dev-python/os-api-ref/Manifest b/dev-python/os-api-ref/Manifest
index 04b388085d..25aa0cb6d0 100644
--- a/dev-python/os-api-ref/Manifest
+++ b/dev-python/os-api-ref/Manifest
@@ -1 +1 @@
-DIST os-api-ref-2.3.0.tar.gz 92864 BLAKE2B 48d74f40a4b865520ec1b61235245f2571262c14c46f994d9b6655a33376a981732212ad4f38b894e495e6381302054eb455516de03b2d2f87662c8f29f4650d SHA512 e53063df90393c17e764e640c4ad5e1e6f1da7286ce9da6bdd460d54e2f831022a366c9cb711b95d8bfa872294309620f2d44cd4910277971ff2f2719c5d81eb
+DIST os-api-ref-3.0.0.tar.gz 92919 BLAKE2B 8797fe76819148bad25d35039144b04d65c58ff9ddb235adb5e5eb39c073a938f1e17ed71ddfcb3c9ea53e98fa4876ccaef1963ec0b7b34f7d1a85c5829567f7 SHA512 ad7030cc91eacb482da19e42d94a81af4c3715f090966e33063d49693f567b0653e2e4a51d9526fe0e2a63480493f148582f96dc811b24e26534c9c05edf3897

diff --git a/dev-python/os-api-ref/files/os-api-ref-3.0.0-python-3.12.patch b/dev-python/os-api-ref/files/os-api-ref-3.0.0-python-3.12.patch
new file mode 100644
index 0000000000..c0b7f66eb1
--- /dev/null
+++ b/dev-python/os-api-ref/files/os-api-ref-3.0.0-python-3.12.patch
@@ -0,0 +1,18 @@
+diff --git a/os_api_ref/tests/test_microversions.py b/os_api_ref/tests/test_microversions.py
+index 8281442..c338c51 100644
+--- a/os_api_ref/tests/test_microversions.py
++++ b/os_api_ref/tests/test_microversions.py
+@@ -44,11 +44,11 @@ class TestMicroversions(base.TestCase):
+     def test_rest_method(self):
+         """Test that min / max mv css class attributes are set"""
+         content = self.soup.find_all(class_='rp_min_ver_2_17')
+-        self.assertRegexpMatches(
++        self.assertRegex(
+             str(content[0]),
+             '^<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ?"')
+         content = self.soup.find_all(class_='rp_max_ver_2_19')
+-        self.assertRegexpMatches(
++        self.assertRegex(
+             str(content[0]),
+             '^<div class="operation-grp rp_min_ver_2_17 rp_max_ver_2_19 ?"')
+ 

diff --git a/dev-python/os-api-ref/files/os-api-ref-3.0.0-sphinx-7.2.0.patch b/dev-python/os-api-ref/files/os-api-ref-3.0.0-sphinx-7.2.0.patch
new file mode 100644
index 0000000000..8e398371bd
--- /dev/null
+++ b/dev-python/os-api-ref/files/os-api-ref-3.0.0-sphinx-7.2.0.patch
@@ -0,0 +1,39 @@
+diff --git a/os_api_ref/tests/base.py b/os_api_ref/tests/base.py
+index 6e5e0dc..f5c2c1d 100644
+--- a/os_api_ref/tests/base.py
++++ b/os_api_ref/tests/base.py
+@@ -16,10 +16,11 @@
+ import os
+ 
+ import fixtures
++import shutil
+ import tempfile
+ import testtools
+ 
+-from sphinx.testing.path import path
++from pathlib import Path
+ from sphinx.testing.util import SphinxTestApp
+ 
+ 
+@@ -33,17 +34,16 @@ _TRUE_VALUES = ('True', 'true', '1', 'yes')
+ class with_app:
+     def __init__(self, **kwargs):
+         if 'srcdir' in kwargs:
+-            self.srcdir = path(kwargs['srcdir'])
++            self.srcdir = Path(kwargs['srcdir'])
+         self.sphinx_app_args = kwargs
+ 
+     def __call__(self, f):
+         def newf(*args, **kwargs):
+             with tempfile.TemporaryDirectory() as tmpdirname:
+-                tmpdir = path(tmpdirname)
+-                tmproot = tmpdir / self.srcdir.basename()
+-                self.srcdir.copytree(tmproot)
++                tmpdir = Path(tmpdirname)
++                tmproot = tmpdir / self.srcdir.name
++                shutil.copytree(self.srcdir, tmproot)
+                 self.sphinx_app_args['srcdir'] = tmproot
+-                self.builddir = tmproot.joinpath('_build')
+ 
+                 app = SphinxTestApp(freshenv=True, **self.sphinx_app_args)
+ 

diff --git a/dev-python/os-api-ref/os-api-ref-2.3.0.ebuild b/dev-python/os-api-ref/os-api-ref-3.0.0.ebuild
similarity index 58%
rename from dev-python/os-api-ref/os-api-ref-2.3.0.ebuild
rename to dev-python/os-api-ref/os-api-ref-3.0.0.ebuild
index 1801cca09f..b696b0d2d3 100644
--- a/dev-python/os-api-ref/os-api-ref-2.3.0.ebuild
+++ b/dev-python/os-api-ref/os-api-ref-3.0.0.ebuild
@@ -1,10 +1,16 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-EPYTEST_DESELECT=( os_api_ref/tests/test_microversions.py::TestMicroversions::test_parameters_table )
-PYTHON_COMPAT=( python3_10 )
+EPYTEST_DESELECT=(
+	os_api_ref/tests/test_basic_example.py::TestBasicExample::test_parameters
+	os_api_ref/tests/test_basic_example.py::TestBasicExample::test_rest_response
+	os_api_ref/tests/test_microversions.py::TestMicroversions::test_parameters_table
+	os_api_ref/tests/test_warnings.py::TestWarnings::test_missing_field
+)
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
 PYPI_NO_NORMALIZE=1
 
 inherit distutils-r1 pypi
@@ -29,11 +35,17 @@ DEPEND="${RDEPEND}"
 BDEPEND="
 	test? (
 		>=dev-python/beautifulsoup4-4.6.0[${PYTHON_USEDEP}]
-		>=dev-python/sphinx-testing-1.0.1[${PYTHON_USEDEP}]
+		dev-python/fixtures[${PYTHON_USEDEP}]
+		>=dev-python/sphinx-4.0.0[${PYTHON_USEDEP}]
 		>=dev-python/subunit-1.0.0[${PYTHON_USEDEP}]
 		>=dev-python/testtools-2.2.0[${PYTHON_USEDEP}]
 	)
 "
 
+PATCHES=(
+	"${FILESDIR}/${P}-python-3.12.patch"
+	"${FILESDIR}/${P}-sphinx-7.2.0.patch"
+)
+
 distutils_enable_tests pytest
 distutils_enable_sphinx doc/source ">=dev-python/openstackdocstheme-2.2.1"


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-21  6:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-21  6:32 [gentoo-commits] repo/proj/guru:master commit in: dev-python/os-api-ref/, dev-python/os-api-ref/files/ Viorel Munteanu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox