From: "Ionen Wolkens" <ionen@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/qutebrowser/, www-client/qutebrowser/files/
Date: Fri, 26 Apr 2024 11:31:08 +0000 (UTC) [thread overview]
Message-ID: <1714131032.ad94d2fe89249c6d7c7f8962668e409bcdfa464f.ionen@gentoo> (raw)
commit: ad94d2fe89249c6d7c7f8962668e409bcdfa464f
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 26 11:25:15 2024 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Fri Apr 26 11:30:32 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad94d2fe
www-client/qutebrowser: backport tests fix for PyQt6-6.7.0
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
.../files/qutebrowser-3.1.0-pyqt670-tests.patch | 73 ++++++++++++++++++++++
www-client/qutebrowser/qutebrowser-3.1.0-r1.ebuild | 1 +
2 files changed, 74 insertions(+)
diff --git a/www-client/qutebrowser/files/qutebrowser-3.1.0-pyqt670-tests.patch b/www-client/qutebrowser/files/qutebrowser-3.1.0-pyqt670-tests.patch
new file mode 100644
index 000000000000..8095c3fa02ce
--- /dev/null
+++ b/www-client/qutebrowser/files/qutebrowser-3.1.0-pyqt670-tests.patch
@@ -0,0 +1,73 @@
+https://github.com/qutebrowser/qutebrowser/commit/1ee138b681a590ee500954361eed2cf923b1d8a0
+From: Florian Bruhin <me@the-compiler.org>
+Date: Mon, 25 Mar 2024 23:19:37 +0100
+Subject: [PATCH] qtutils: Handle QDataStream.Status.SizeLimitExceeded
+--- a/qutebrowser/utils/qtutils.py
++++ b/qutebrowser/utils/qtutils.py
+@@ -193,6 +193,15 @@ def check_qdatastream(stream: QDataStream) -> None:
+ QDataStream.Status.WriteFailed: ("The data stream cannot write to the "
+ "underlying device."),
+ }
++ try:
++ status_to_str[QDataStream.Status.SizeLimitExceeded] = ( # type: ignore[attr-defined]
++ "The data stream cannot read or write the data because its size is larger "
++ "than supported by the current platform."
++ )
++ except AttributeError:
++ # Added in Qt 6.7
++ pass
++
+ if stream.status() != QDataStream.Status.Ok:
+ raise OSError(status_to_str[stream.status()])
+
+--- a/tests/unit/utils/test_qtutils.py
++++ b/tests/unit/utils/test_qtutils.py
+@@ -208,6 +208,18 @@ def test_ensure_valid(obj, raising, exc_reason, exc_str):
+ "The data stream has read corrupt data."),
+ (QDataStream.Status.WriteFailed, True,
+ "The data stream cannot write to the underlying device."),
++ pytest.param(
++ getattr(QDataStream.Status, "SizeLimitExceeded", None),
++ True,
++ (
++ "The data stream cannot read or write the data because its size is larger "
++ "than supported by the current platform."
++ ),
++ marks=pytest.mark.skipif(
++ not hasattr(QDataStream.Status, "SizeLimitExceeded"),
++ reason="Added in Qt 6.7"
++ )
++ ),
+ ])
+ def test_check_qdatastream(status, raising, message):
+ """Test check_qdatastream.
+@@ -226,10 +238,25 @@ def test_check_qdatastream(status, raising, message):
+ qtutils.check_qdatastream(stream)
+
+
+-def test_qdatastream_status_count():
+- """Make sure no new members are added to QDataStream.Status."""
+- status_vals = testutils.enum_members(QDataStream, QDataStream.Status)
+- assert len(status_vals) == 4
++def test_qdatastream_status_members():
++ """Make sure no new members are added to QDataStream.Status.
++
++ If this fails, qtutils.check_qdatastream will need to be updated with the
++ respective error documentation.
++ """
++ status_vals = set(testutils.enum_members(QDataStream, QDataStream.Status).values())
++ expected = {
++ QDataStream.Status.Ok,
++ QDataStream.Status.ReadPastEnd,
++ QDataStream.Status.ReadCorruptData,
++ QDataStream.Status.WriteFailed,
++ }
++ try:
++ expected.add(QDataStream.Status.SizeLimitExceeded)
++ except AttributeError:
++ # Added in Qt 6.7
++ pass
++ assert status_vals == expected
+
+
+ @pytest.mark.parametrize('color, expected', [
diff --git a/www-client/qutebrowser/qutebrowser-3.1.0-r1.ebuild b/www-client/qutebrowser/qutebrowser-3.1.0-r1.ebuild
index f40f5009dff3..3eb916073966 100644
--- a/www-client/qutebrowser/qutebrowser-3.1.0-r1.ebuild
+++ b/www-client/qutebrowser/qutebrowser-3.1.0-r1.ebuild
@@ -83,6 +83,7 @@ distutils_enable_tests pytest
PATCHES=(
"${FILESDIR}"/${P}-qt663-tests.patch
+ "${FILESDIR}"/${P}-pyqt670-tests.patch
)
src_prepare() {
next reply other threads:[~2024-04-26 11:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-26 11:31 Ionen Wolkens [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-06-28 14:45 [gentoo-commits] repo/gentoo:master commit in: www-client/qutebrowser/, www-client/qutebrowser/files/ Ionen Wolkens
2024-03-22 2:26 Ionen Wolkens
2023-09-27 0:00 Ionen Wolkens
2023-09-18 11:57 Ionen Wolkens
2023-07-24 4:27 Ionen Wolkens
2021-10-15 15:53 Ionen Wolkens
2020-07-09 17:16 Stefan Strogin
2016-03-11 3:15 Tim Harder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1714131032.ad94d2fe89249c6d7c7f8962668e409bcdfa464f.ionen@gentoo \
--to=ionen@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox