summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRepository mirror & CI <repomirrorci@gentoo.org>2021-07-02 08:38:54 +0000
committerRepository mirror & CI <repomirrorci@gentoo.org>2021-07-02 08:38:54 +0000
commitb7254fc56d0b5658a3038f0553c46f8ea74ad5e3 (patch)
tree9e5ef9ba112a81344dfa936a42bbbaa766b710cd
parent2021-07-02 07:52:45 UTC (diff)
parentdev-python/werkzeug: Fix tests with -Wdefault (diff)
downloadgentoo-b7254fc56d0b5658a3038f0553c46f8ea74ad5e3.tar.gz
gentoo-b7254fc56d0b5658a3038f0553c46f8ea74ad5e3.tar.bz2
gentoo-b7254fc56d0b5658a3038f0553c46f8ea74ad5e3.zip
Merge updates from master
-rw-r--r--dev-python/werkzeug/files/werkzeug-2.0.1-test-warning.patch75
-rw-r--r--dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild1
-rw-r--r--eclass/python-utils-r1.eclass3
-rw-r--r--sci-libs/libsigrok/libsigrok-0.5.2-r2.ebuild (renamed from sci-libs/libsigrok/libsigrok-0.5.2-r1.ebuild)4
-rw-r--r--sci-libs/libsigrok/libsigrok-9999.ebuild6
-rw-r--r--sys-fs/zfs/zfs-9999.ebuild4
6 files changed, 88 insertions, 5 deletions
diff --git a/dev-python/werkzeug/files/werkzeug-2.0.1-test-warning.patch b/dev-python/werkzeug/files/werkzeug-2.0.1-test-warning.patch
new file mode 100644
index 000000000000..3bb14ab6ba42
--- /dev/null
+++ b/dev-python/werkzeug/files/werkzeug-2.0.1-test-warning.patch
@@ -0,0 +1,75 @@
+From 4201d0f6d1b337a0e69900a79042215896eede4a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Sat, 19 Jun 2021 09:51:43 +0200
+Subject: [PATCH] Fix warning tests to work correctly without -Werror
+
+Use pytest.warns() instead of pytest.raises() to test for warnings,
+in order to make these tests work correctly without -Werror. This does
+not change the behavior with -Werror.
+
+While -Werror is useful for package maintainers / CI, it is problematic
+for testing on end user systems. For end users, it is important whether
+the particular version of package is going to work on their setup,
+not whether it does not use anything that's deprecated but still
+working.
+---
+ CHANGES.rst | 2 ++
+ tests/test_wrappers.py | 12 ++++++------
+ 2 files changed, 8 insertions(+), 6 deletions(-)
+
+diff --git a/CHANGES.rst b/CHANGES.rst
+index 8fa1e454..9a05145f 100644
+--- a/CHANGES.rst
++++ b/CHANGES.rst
+@@ -5,6 +5,8 @@ Version 2.1.0
+
+ Unreleased
+
++- Fix warning tests to work correctly without -Werror
++
+
+ Version 2.0.2
+ -------------
+diff --git a/tests/test_wrappers.py b/tests/test_wrappers.py
+index 3ac80003..fe8c01f3 100644
+--- a/tests/test_wrappers.py
++++ b/tests/test_wrappers.py
+@@ -1633,29 +1633,29 @@ def test_response_mixins_deprecated(cls):
+ class CheckResponse(cls, wrappers.Response):
+ pass
+
+- with pytest.raises(DeprecationWarning, match=cls.__name__):
++ with pytest.warns(DeprecationWarning, match=cls.__name__):
+ CheckResponse()
+
+
+ def test_check_base_deprecated():
+- with pytest.raises(DeprecationWarning, match=r"issubclass\(cls, Request\)"):
++ with pytest.warns(DeprecationWarning, match=r"issubclass\(cls, Request\)"):
+ assert issubclass(wrappers.Request, wrappers.BaseRequest)
+
+- with pytest.raises(DeprecationWarning, match=r"isinstance\(obj, Request\)"):
++ with pytest.warns(DeprecationWarning, match=r"isinstance\(obj, Request\)"):
+ assert isinstance(
+ wrappers.Request({"SERVER_NAME": "example.org", "SERVER_PORT": "80"}),
+ wrappers.BaseRequest,
+ )
+
+- with pytest.raises(DeprecationWarning, match=r"issubclass\(cls, Response\)"):
++ with pytest.warns(DeprecationWarning, match=r"issubclass\(cls, Response\)"):
+ assert issubclass(wrappers.Response, wrappers.BaseResponse)
+
+- with pytest.raises(DeprecationWarning, match=r"isinstance\(obj, Response\)"):
++ with pytest.warns(DeprecationWarning, match=r"isinstance\(obj, Response\)"):
+ assert isinstance(wrappers.Response(), wrappers.BaseResponse)
+
+
+ def test_response_freeze_no_etag_deprecated():
+- with pytest.raises(DeprecationWarning, match="no_etag"):
++ with pytest.warns(DeprecationWarning, match="no_etag"):
+ Response("Hello, World!").freeze(no_etag=True)
+
+
+--
+2.32.0
+
diff --git a/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild b/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild
index a6c56f6d470f..2a62f10069ba 100644
--- a/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild
+++ b/dev-python/werkzeug/werkzeug-2.0.1-r1.ebuild
@@ -37,6 +37,7 @@ distutils_enable_tests pytest
PATCHES=(
"${FILESDIR}"/${P}-py310.patch
+ "${FILESDIR}"/${P}-test-warning.patch
)
python_test() {
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 7488802332f6..168c767a2eea 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1264,6 +1264,9 @@ epytest() {
-ra
# print local variables in tracebacks, useful for debugging
-l
+ # override filterwarnings=error, we do not really want -Werror
+ # for end users, as it tends to fail on new warnings from deps
+ -Wdefault
)
set -- "${EPYTHON}" -m pytest "${args[@]}" "${@}"
diff --git a/sci-libs/libsigrok/libsigrok-0.5.2-r1.ebuild b/sci-libs/libsigrok/libsigrok-0.5.2-r2.ebuild
index 23601315e40f..441a3bc48621 100644
--- a/sci-libs/libsigrok/libsigrok-0.5.2-r1.ebuild
+++ b/sci-libs/libsigrok/libsigrok-0.5.2-r2.ebuild
@@ -45,7 +45,7 @@ LIB_DEPEND="
usb? ( virtual/libusb:1[static-libs(+)] )
"
RDEPEND="
- java? ( >=virtual/jre-1.4 )
+ java? ( >=virtual/jre-1.8:* )
!static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} )
static-libs? ( ${LIB_DEPEND} )
"
@@ -53,7 +53,7 @@ DEPEND="${LIB_DEPEND//\[static-libs(+)]}
cxx? ( app-doc/doxygen )
java? (
>=dev-lang/swig-3.0.6
- >=virtual/jdk-1.4
+ >=virtual/jdk-1.8:*
)
python? (
>=dev-lang/swig-3.0.6
diff --git a/sci-libs/libsigrok/libsigrok-9999.ebuild b/sci-libs/libsigrok/libsigrok-9999.ebuild
index 3ca48b69c906..02994b07b73a 100644
--- a/sci-libs/libsigrok/libsigrok-9999.ebuild
+++ b/sci-libs/libsigrok/libsigrok-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -45,7 +45,7 @@ LIB_DEPEND="
usb? ( virtual/libusb:1[static-libs(+)] )
"
RDEPEND="
- java? ( >=virtual/jre-1.4 )
+ java? ( >=virtual/jre-1.8:* )
!static-libs? ( ${LIB_DEPEND//\[static-libs(+)]} )
static-libs? ( ${LIB_DEPEND} )
"
@@ -53,7 +53,7 @@ DEPEND="${LIB_DEPEND//\[static-libs(+)]}
cxx? ( app-doc/doxygen )
java? (
>=dev-lang/swig-3.0.6
- >=virtual/jdk-1.4
+ >=virtual/jdk-1.8:*
)
python? (
>=dev-lang/swig-3.0.6
diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
index 957b611b7ef5..e3ae8b236090 100644
--- a/sys-fs/zfs/zfs-9999.ebuild
+++ b/sys-fs/zfs/zfs-9999.ebuild
@@ -54,6 +54,10 @@ BDEPEND="virtual/awk
nls? ( sys-devel/gettext )
python? (
dev-python/setuptools[${PYTHON_USEDEP}]
+ || (
+ dev-python/packaging[${PYTHON_USEDEP}]
+ dev-python/distlib[${PYTHON_USEDEP}]
+ )
)
"