commit:     0288a3c565e8846ab922e6e2cd51d54c0f8def6c
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 11 16:14:34 2021 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Mar 11 16:16:40 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0288a3c5

dev-python/ruamel-yaml-0.16.13-r1: skip test_collections_deprecation on pypy3

This only got deprecated in Python 3.7 and our pypy is 3.6-compatible.

Closes: https://bugs.gentoo.org/775473
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 ...yaml-0.16.13-pypy3_collection_deprecation.patch | 22 ++++++++++++++++++++++
 .../ruamel-yaml/ruamel-yaml-0.16.13-r1.ebuild      |  4 ++++
 2 files changed, 26 insertions(+)

diff --git 
a/dev-python/ruamel-yaml/files/ruamel-yaml-0.16.13-pypy3_collection_deprecation.patch
 
b/dev-python/ruamel-yaml/files/ruamel-yaml-0.16.13-pypy3_collection_deprecation.patch
new file mode 100644
index 00000000000..9f7be2676ec
--- /dev/null
+++ 
b/dev-python/ruamel-yaml/files/ruamel-yaml-0.16.13-pypy3_collection_deprecation.patch
@@ -0,0 +1,22 @@
+Note that this implicitly assumes pypy3 to be compatible with CPython 3.6.
+The test could in principle be more robust - but between 3.7 support
+in PyPy is still being alpha-grade and the fact there will be many more
+serious issues with switching the Gentoo pypy3 target to those versions,
+why bother for now.
+
+--- a/_test/test_deprecation.py
++++ b/_test/test_deprecation.py
+@@ -2,11 +2,12 @@
+ 
+ from __future__ import print_function
+ 
++import platform
+ import sys
+ import pytest  # NOQA
+ 
+ 
[email protected](sys.version_info < (3, 7) or sys.version_info >= (3, 9),
[email protected](platform.python_implementation() == 'PyPy' or 
sys.version_info < (3, 7) or sys.version_info >= (3, 9),
+                     reason='collections not available?')
+ def test_collections_deprecation():
+     with pytest.warns(DeprecationWarning):

diff --git a/dev-python/ruamel-yaml/ruamel-yaml-0.16.13-r1.ebuild 
b/dev-python/ruamel-yaml/ruamel-yaml-0.16.13-r1.ebuild
index 9d1cf66a423..41502f6c026 100644
--- a/dev-python/ruamel-yaml/ruamel-yaml-0.16.13-r1.ebuild
+++ b/dev-python/ruamel-yaml/ruamel-yaml-0.16.13-r1.ebuild
@@ -26,6 +26,10 @@ BDEPEND="test? (
        dev-python/ruamel-std-pathlib[${PYTHON_USEDEP}]
 )"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-0.16.13-pypy3_collection_deprecation.patch
+)
+
 S="${WORKDIR}"/${MY_P}
 
 distutils_enable_tests pytest

Reply via email to