summaryrefslogtreecommitdiff
path: root/dev-python/sybil
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-29 18:57:21 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-29 18:57:21 +0000
commit8455eae17683fbd2c785ca4b8443581622f388c7 (patch)
tree51bb7aac8b41b8f6e692f9e5b4e65001315b43fd /dev-python/sybil
parentb2f1788f6f0365b76f55f257b2d170c1e68a8640 (diff)
gentoo auto-resync : 29:01:2024 - 18:57:21
Diffstat (limited to 'dev-python/sybil')
-rw-r--r--dev-python/sybil/Manifest3
-rw-r--r--dev-python/sybil/files/sybil-6.0.2-pytest-8.patch40
-rw-r--r--dev-python/sybil/sybil-6.0.2-r1.ebuild (renamed from dev-python/sybil/sybil-6.0.2.ebuild)12
3 files changed, 53 insertions, 2 deletions
diff --git a/dev-python/sybil/Manifest b/dev-python/sybil/Manifest
index 157c3b994591..525b2a28b542 100644
--- a/dev-python/sybil/Manifest
+++ b/dev-python/sybil/Manifest
@@ -1,3 +1,4 @@
+AUX sybil-6.0.2-pytest-8.patch 2027 BLAKE2B c71742c315b0195a5984a40b399e071f648c9c5a688f3099d2a8771f01c946ae9074be307793055235225364330b72d7e00b27c03a3c94f0a56d316c60fc6b3a SHA512 f9c237aea2c498d3df076b011a377983344ad03b89e2f11146f13216d38157795f67f2afd78bf714ffbce2902d73caf1a79e01409738d92d8f3df4ee97761fa1
DIST sybil-6.0.2.gh.tar.gz 67619 BLAKE2B ec723cb21d2ac1232bd6e9a3e3edb0bc65c705048c2d288df778b4dd19a1b46c956f7d2bd57dfa028d7a8a06357501ffc1226ba171e2073abec51f8d3c536d86 SHA512 9966173b5fb013be1f298b586052d8c10b76efb43bf5230f3d0b780e6d6238e7e33840eeb7c8b9860911351ea612766ed19ea2a61d48424465f3b58e408da5d2
-EBUILD sybil-6.0.2.ebuild 734 BLAKE2B 46ce10ce0cac76396586205f9a4abb001f265c0b3b03149e065fd023eefd102517057e2ed7dd7080e47648abda923518fc394de99d42a9df03cb848f99808be8 SHA512 690027da753a48fea77fae8bc519698cd75a2a6518d7c76cfbfad8b775dbaa28f4580c266b896f95d79734da452a2738ea63638d40d03c3f597a672910ffe37a
+EBUILD sybil-6.0.2-r1.ebuild 901 BLAKE2B 559ec680a63f7a095b352808370bf04950ea23f683f0a4800a8dc3468a6c19f2ad5e90811daad2d60217b04a31c115782cafefc933e254b67acdb8f990ca682e SHA512 d58e428155a5727391159e7e500c405ab2705fcb93416127aad3360abaaa79ebadb64768a0568358bda4e1740cd46d873862c7301eb82673183a46c2ffe6ef79
MISC metadata.xml 402 BLAKE2B 3fcce3ac9ff731e24a3f6e761da2d840b3a7c9107b3d9a46afe00fed61b475d1400580b4ccf49dd71f6a1ab8098dc2aaf895e529a723cd96301d1400ee211edf SHA512 138106c714dc33871ccf535cc47d669580b665c842adfea5442a03067fe507236d8fde4158f006e1188003abe53c9c25db98632dadd1cfa0e41efd1755c2c75c
diff --git a/dev-python/sybil/files/sybil-6.0.2-pytest-8.patch b/dev-python/sybil/files/sybil-6.0.2-pytest-8.patch
new file mode 100644
index 000000000000..2447289c0266
--- /dev/null
+++ b/dev-python/sybil/files/sybil-6.0.2-pytest-8.patch
@@ -0,0 +1,40 @@
+From d7428b4cfe5f817037030d025028bf09fd7992ee Mon Sep 17 00:00:00 2001
+From: Adam Dangoor <adamdangoor@gmail.com>
+Date: Mon, 29 Jan 2024 11:29:16 +0000
+Subject: [PATCH] Add fixes for Pytest 8.0.0
+
+---
+ CHANGELOG.rst | 5 +++++
+ sybil/integration/pytest.py | 17 +++++++++++++----
+ 2 files changed, 18 insertions(+), 4 deletions(-)
+
+diff --git a/sybil/integration/pytest.py b/sybil/integration/pytest.py
+index 8ce6c72..cad311d 100644
+--- a/sybil/integration/pytest.py
++++ b/sybil/integration/pytest.py
+@@ -53,12 +53,21 @@ def __init__(self, parent, sybil, example: Example) -> None:
+ def request_fixtures(self, names):
+ # pytest fixtures dance:
+ fm = self.session._fixturemanager
+- closure = fm.getfixtureclosure(names, self)
+- initialnames, names_closure, arg2fixturedefs = closure
+- fixtureinfo = FuncFixtureInfo(names, initialnames, names_closure, arg2fixturedefs)
++ if PYTEST_VERSION >= (8, 0, 0):
++ closure = fm.getfixtureclosure(initialnames=names, parentnode=self, ignore_args=set())
++ names_closure, arg2fixturedefs = closure
++ fixtureinfo = FuncFixtureInfo(argnames=names, initialnames=names, names_closure=names_closure, name2fixturedefs=arg2fixturedefs)
++ else:
++ closure = fm.getfixtureclosure(names, self)
++ initialnames, names_closure, arg2fixturedefs = closure
++ fixtureinfo = FuncFixtureInfo(names, initialnames, names_closure, arg2fixturedefs)
+ self._fixtureinfo = fixtureinfo
+ self.funcargs = {}
+- self._request = fixtures.FixtureRequest(self, _ispytest=True)
++ if PYTEST_VERSION >= (8, 0, 0):
++ self._request = fixtures.TopRequest(pyfuncitem=self, _ispytest=True)
++ self.fixturenames = names_closure
++ else:
++ self._request = fixtures.FixtureRequest(self, _ispytest=True)
+
+ def reportinfo(self) -> Tuple[Union["os.PathLike[str]", str], Optional[int], str]:
+ info = '%s line=%i column=%i' % (
diff --git a/dev-python/sybil/sybil-6.0.2.ebuild b/dev-python/sybil/sybil-6.0.2-r1.ebuild
index 27065ab0f6bb..0a280c114202 100644
--- a/dev-python/sybil/sybil-6.0.2.ebuild
+++ b/dev-python/sybil/sybil-6.0.2-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2019-2023 Gentoo Authors
+# Copyright 2019-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -32,3 +32,13 @@ BDEPEND="
"
distutils_enable_tests pytest
+
+PATCHES=(
+ # https://github.com/simplistix/sybil/pull/108
+ "${FILESDIR}/${P}-pytest-8.patch"
+)
+
+python_test() {
+ local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1
+ epytest
+}