commit:     f7d4df563d424b8de27b30a1a67477b71092eb7c
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 23 18:02:22 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Dec 23 18:02:22 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f7d4df56

dev-python/iniconfig: Fix compatibility with pytest-7.2+

Closes: https://bugs.gentoo.org/887983
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 .../iniconfig/files/iniconfig-1.1.1-py.patch       | 41 ++++++++++++++++++++++
 dev-python/iniconfig/iniconfig-1.1.1-r1.ebuild     |  4 +++
 2 files changed, 45 insertions(+)

diff --git a/dev-python/iniconfig/files/iniconfig-1.1.1-py.patch 
b/dev-python/iniconfig/files/iniconfig-1.1.1-py.patch
new file mode 100644
index 000000000000..c1722bd3a466
--- /dev/null
+++ b/dev-python/iniconfig/files/iniconfig-1.1.1-py.patch
@@ -0,0 +1,41 @@
+From 6b714f558b6cfb9f25c58b70eeb134f3bfa1bebd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lum=C3=ADr=20=27Frenzy=27=20Balhar?=
+ <[email protected]>
+Date: Wed, 30 Nov 2022 22:47:56 +0100
+Subject: [PATCH] Drop dependency on py
+
+pytest 7.2 and tox 4 no longer depend on py and it's not needed here as well.
+---
+ testing/test_iniconfig.py | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/testing/test_iniconfig.py b/testing/test_iniconfig.py
+index fe12421..027949d 100644
+--- a/testing/test_iniconfig.py
++++ b/testing/test_iniconfig.py
+@@ -1,4 +1,3 @@
+-import py
+ import pytest
+ from iniconfig import IniConfig, ParseError, __all__ as ALL
+ from iniconfig import iscommentline
+@@ -100,7 +99,7 @@ def parse(input):
+ 
+ 
+ def parse_a_error(input):
+-    return py.test.raises(ParseError, parse, input)
++    return pytest.raises(ParseError, parse, input)
+ 
+ 
+ def test_tokenize(input, expected):
+@@ -135,7 +134,7 @@ def test_section_cant_be_empty():
+     assert excinfo.value.lineno == 0
+ 
+ 
[email protected]('line', [
[email protected]('line', [
+     '!!',
+     ])
+ def test_error_on_weird_lines(line):
+-- 
+2.39.0
+

diff --git a/dev-python/iniconfig/iniconfig-1.1.1-r1.ebuild 
b/dev-python/iniconfig/iniconfig-1.1.1-r1.ebuild
index eed3a00ab16f..22ff44d24447 100644
--- a/dev-python/iniconfig/iniconfig-1.1.1-r1.ebuild
+++ b/dev-python/iniconfig/iniconfig-1.1.1-r1.ebuild
@@ -24,3 +24,7 @@ BDEPEND="
 "
 
 distutils_enable_tests pytest
+
+PATCHES=(
+       "${FILESDIR}"/${P}-py.patch
+)

Reply via email to