* [gentoo-commits] repo/gentoo:master commit in: net-misc/streamlink/files/, net-misc/streamlink/
@ 2024-04-14 11:09 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-04-14 11:09 UTC (permalink / raw
To: gentoo-commits
commit: 8ecf6088682ea90c50f52e841a4ee404370b4460
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 14 11:08:59 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 14 11:09:36 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ecf6088
net-misc/streamlink: fix tests w/ newer Python
Revbump as it fixes runtime behaviour too.
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/streamlink-6.7.2-validator.patch | 61 ++++++++++++
net-misc/streamlink/streamlink-6.7.2-r1.ebuild | 102 +++++++++++++++++++++
2 files changed, 163 insertions(+)
diff --git a/net-misc/streamlink/files/streamlink-6.7.2-validator.patch b/net-misc/streamlink/files/streamlink-6.7.2-validator.patch
new file mode 100644
index 000000000000..8dc69d62616a
--- /dev/null
+++ b/net-misc/streamlink/files/streamlink-6.7.2-validator.patch
@@ -0,0 +1,61 @@
+https://github.com/streamlink/streamlink/pull/5932
+https://github.com/streamlink/streamlink/commit/0466622dc0bd13db972f6a00d2e2bda31ad50229
+
+Quoting the PR:
+"""
+Since Python 3.11.9 / 3.12.3 / 3.13.0a6, urllib.parse.parse_qsl() now raises a TypeError
+if the input is not a str, is truthy and can't be passed to memoryview(), like integers for example,
+hence the test failure which previously just checked an invalid input to that validation schema.
+"""
+
+From 51c13ddd45f83384cf7800a881127ad74dec3bb8 Mon Sep 17 00:00:00 2001
+From: bastimeyer <mail@bastimeyer.de>
+Date: Tue, 9 Apr 2024 21:36:03 +0200
+Subject: [PATCH] plugin.api.validate: check parse_qsd() input type
+
+---
+ src/streamlink/plugin/api/validate/_validators.py | 6 +++++-
+ tests/test_api_validate.py | 11 +++++++++--
+ 2 files changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/src/streamlink/plugin/api/validate/_validators.py b/src/streamlink/plugin/api/validate/_validators.py
+index 69135b74919..e99d305733f 100644
+--- a/src/streamlink/plugin/api/validate/_validators.py
++++ b/src/streamlink/plugin/api/validate/_validators.py
+@@ -651,4 +651,8 @@ def validator_parse_qsd(*args, **kwargs) -> TransformSchema:
+ :raise ValidationError: On parsing error
+ """
+
+- return TransformSchema(_parse_qsd, *args, **kwargs, exception=ValidationError, schema=None)
++ def parser(*_args, **_kwargs):
++ validate(AnySchema(str, bytes), _args[0])
++ return _parse_qsd(*_args, **_kwargs, exception=ValidationError, schema=None)
++
++ return TransformSchema(parser, *args, **kwargs)
+diff --git a/tests/test_api_validate.py b/tests/test_api_validate.py
+index ceff9bc1dde..c328116d27b 100644
+--- a/tests/test_api_validate.py
++++ b/tests/test_api_validate.py
+@@ -1343,13 +1343,20 @@ def test_success(self):
+ validate.parse_qsd(),
+ "foo=bar&foo=baz&qux=quux",
+ ) == {"foo": "baz", "qux": "quux"}
++ assert validate.validate(
++ validate.parse_qsd(),
++ b"foo=bar&foo=baz&qux=quux",
++ ) == {b"foo": b"baz", b"qux": b"quux"}
+
+ def test_failure(self):
+ with pytest.raises(ValidationError) as cm:
+ validate.validate(validate.parse_qsd(), 123)
+ assert_validationerror(cm.value, """
+- ValidationError:
+- Unable to parse query string: 'int' object has no attribute 'decode' (123)
++ ValidationError(AnySchema):
++ ValidationError(type):
++ Type of 123 should be str, but is int
++ ValidationError(type):
++ Type of 123 should be bytes, but is int
+ """)
+
+
diff --git a/net-misc/streamlink/streamlink-6.7.2-r1.ebuild b/net-misc/streamlink/streamlink-6.7.2-r1.ebuild
new file mode 100644
index 000000000000..2f0f40037611
--- /dev/null
+++ b/net-misc/streamlink/streamlink-6.7.2-r1.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} = 9999* ]]; then
+ EGIT_REPO_URI="https://github.com/streamlink/${PN}.git"
+ inherit git-r3
+fi
+
+DISTUTILS_SINGLE_IMPL=1
+# >= 6.2.1 uses a bunch of setuptools hooks instead of vanilla setuptools
+# https://github.com/streamlink/streamlink/commit/194d9bc193f5285bc1ba33af5fd89209a96ad3a7
+DISTUTILS_USE_PEP517=standalone
+PYTHON_COMPAT=( python3_{10..12} )
+PYTHON_REQ_USE='xml(+),threads(+)'
+inherit distutils-r1
+
+DESCRIPTION="CLI for extracting streams from websites to a video player of your choice"
+HOMEPAGE="https://streamlink.github.io/"
+
+if [[ ${PV} != 9999* ]]; then
+ SRC_URI="https://github.com/streamlink/${PN}/releases/download/${PV}/${P}.tar.gz"
+fi
+
+LICENSE="BSD-2 Apache-2.0"
+SLOT="0"
+if [[ ${PV} != 9999* ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+fi
+
+# See https://github.com/streamlink/streamlink/commit/9d8156dd794ee0919297cd90d85bcc11b8a28358 for chardet/charset-normalizer dep
+# See https://github.com/streamlink/streamlink/pull/5895 re exceptiongroup dep
+RDEPEND="
+ media-video/ffmpeg
+ $(python_gen_cond_dep '
+ dev-python/certifi[${PYTHON_USEDEP}]
+ || (
+ dev-python/chardet[${PYTHON_USEDEP}]
+ dev-python/charset-normalizer[${PYTHON_USEDEP}]
+ )
+ dev-python/exceptiongroup[${PYTHON_USEDEP}]
+ >=dev-python/requests-2.26.0[${PYTHON_USEDEP}]
+ dev-python/isodate[${PYTHON_USEDEP}]
+ >=dev-python/lxml-4.6.4[${PYTHON_USEDEP}]
+ >=dev-python/websocket-client-1.2.1[${PYTHON_USEDEP}]
+ dev-python/pycountry[${PYTHON_USEDEP}]
+ >=dev-python/pycryptodome-3.4.3[${PYTHON_USEDEP}]
+ >dev-python/PySocks-1.5.7[${PYTHON_USEDEP}]
+ >=dev-python/trio-0.22.0[${PYTHON_USEDEP}]
+ >=dev-python/trio-websocket-0.9.0[${PYTHON_USEDEP}]
+ >=dev-python/urllib3-1.26.0[${PYTHON_USEDEP}]
+ ')
+"
+BDEPEND="
+ $(python_gen_cond_dep '
+ >=dev-python/setuptools-64[${PYTHON_USEDEP}]
+ >=dev-python/versioningit-2.0.0[${PYTHON_USEDEP}]
+ test? (
+ >=dev-python/freezegun-1.0.0[${PYTHON_USEDEP}]
+ dev-python/pytest-asyncio[${PYTHON_USEDEP}]
+ dev-python/pytest-trio[${PYTHON_USEDEP}]
+ dev-python/requests-mock[${PYTHON_USEDEP}]
+ )
+ ')
+"
+
+if [[ ${PV} == 9999* ]]; then
+ RDEPEND+="
+ $(python_gen_cond_dep '
+ >=dev-python/versioningit-2.0.0[${PYTHON_USEDEP}]
+ ')
+ "
+fi
+
+PATCHES=(
+ "${FILESDIR}"/${P}-validator.patch
+)
+
+distutils_enable_tests pytest
+
+python_test() {
+ # Skip tests requiring <dev-python/pytest-8.0.0 which is currently masked
+ # https://github.com/streamlink/streamlink/pull/5901
+ EPYTEST_DESELECT+=(
+ tests/webbrowser/cdp/test_client.py::TestEvaluate::test_exception
+ tests/webbrowser/cdp/test_client.py::TestEvaluate::test_error
+ tests/webbrowser/cdp/test_client.py::TestNavigate::test_detach
+ tests/webbrowser/cdp/test_client.py::TestNavigate::test_error
+ tests/webbrowser/cdp/test_connection.py::TestCreateConnection::test_failure
+ tests/webbrowser/cdp/test_connection.py::TestReaderError::test_invalid_json
+ tests/webbrowser/cdp/test_connection.py::TestReaderError::test_unknown_session_id
+ 'tests/webbrowser/cdp/test_connection.py::TestSend::test_timeout[Default timeout, response not in time]'
+ 'tests/webbrowser/cdp/test_connection.py::TestSend::test_timeout[Custom timeout, response not in time]'
+ tests/webbrowser/cdp/test_connection.py::TestSend::test_bad_command
+ tests/webbrowser/cdp/test_connection.py::TestSend::test_result_exception
+ tests/webbrowser/cdp/test_connection.py::TestHandleCmdResponse::test_response_error
+ tests/webbrowser/cdp/test_connection.py::TestHandleCmdResponse::test_response_no_result
+ )
+
+ epytest
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/streamlink/files/, net-misc/streamlink/
@ 2024-06-23 0:27 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2024-06-23 0:27 UTC (permalink / raw
To: gentoo-commits
commit: 283595b6412ed6f27d759968a9597c31edf0767f
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 22 23:48:01 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Jun 23 00:27:06 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=283595b6
net-misc/streamlink: drop 6.7.2-r1
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-misc/streamlink/Manifest | 1 -
.../files/streamlink-6.7.2-validator.patch | 61 ------------
net-misc/streamlink/streamlink-6.7.2-r1.ebuild | 102 ---------------------
3 files changed, 164 deletions(-)
diff --git a/net-misc/streamlink/Manifest b/net-misc/streamlink/Manifest
index 2050187b073c..bdbeffa41e75 100644
--- a/net-misc/streamlink/Manifest
+++ b/net-misc/streamlink/Manifest
@@ -1,3 +1,2 @@
-DIST streamlink-6.7.2.tar.gz 741037 BLAKE2B b6ecea883a8b09e524a28ebdee083bb5f1e563605ef16fb3adebba03194ad3f1d8f9dc902cfe80372dc53c5778f1ddc9695680b5cd4a87277b646fc15fffd7e2 SHA512 251e0b03c39dae980367e8a5b6ffcb1c279b0874eeaeff31d9d4486917b759ef27ba2bd5bba0bc74691237e429981f3748002e0ef49befe8c7be69160856ecfe
DIST streamlink-6.7.3.tar.gz 742832 BLAKE2B 5f03a036c3f2170d25e43618f36d7b937e8063f15a965f45d8cc6033b49899b15c19af23aa2a845f8aec74341932721b792dad6bff70400f0dea24a19f1415ed SHA512 0955faab177bcdd0f66500f837124bf0f426829cb5c847fa18bb85aa3fcd7c27a750bab13f3e247b5187e9561713330b582b10729d82984d98081856e976ae65
DIST streamlink-6.7.4.tar.gz 744387 BLAKE2B bd8fb9af560fbe164a63fd1b698100765c716b44b6f3364e6ad072f69d0fdee9d22dd0fda6c297f249915c9a60f10e2089228a8c19244a7ef18b5809632bf96a SHA512 266c66626624814d708a228d4e2e62c443c3973fb139632a88086619c755fa80d97fad077a2a7383f9beb3e2f4464274beb0bb446b85f6f63d6704a88a9c2e29
diff --git a/net-misc/streamlink/files/streamlink-6.7.2-validator.patch b/net-misc/streamlink/files/streamlink-6.7.2-validator.patch
deleted file mode 100644
index 8dc69d62616a..000000000000
--- a/net-misc/streamlink/files/streamlink-6.7.2-validator.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-https://github.com/streamlink/streamlink/pull/5932
-https://github.com/streamlink/streamlink/commit/0466622dc0bd13db972f6a00d2e2bda31ad50229
-
-Quoting the PR:
-"""
-Since Python 3.11.9 / 3.12.3 / 3.13.0a6, urllib.parse.parse_qsl() now raises a TypeError
-if the input is not a str, is truthy and can't be passed to memoryview(), like integers for example,
-hence the test failure which previously just checked an invalid input to that validation schema.
-"""
-
-From 51c13ddd45f83384cf7800a881127ad74dec3bb8 Mon Sep 17 00:00:00 2001
-From: bastimeyer <mail@bastimeyer.de>
-Date: Tue, 9 Apr 2024 21:36:03 +0200
-Subject: [PATCH] plugin.api.validate: check parse_qsd() input type
-
----
- src/streamlink/plugin/api/validate/_validators.py | 6 +++++-
- tests/test_api_validate.py | 11 +++++++++--
- 2 files changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/src/streamlink/plugin/api/validate/_validators.py b/src/streamlink/plugin/api/validate/_validators.py
-index 69135b74919..e99d305733f 100644
---- a/src/streamlink/plugin/api/validate/_validators.py
-+++ b/src/streamlink/plugin/api/validate/_validators.py
-@@ -651,4 +651,8 @@ def validator_parse_qsd(*args, **kwargs) -> TransformSchema:
- :raise ValidationError: On parsing error
- """
-
-- return TransformSchema(_parse_qsd, *args, **kwargs, exception=ValidationError, schema=None)
-+ def parser(*_args, **_kwargs):
-+ validate(AnySchema(str, bytes), _args[0])
-+ return _parse_qsd(*_args, **_kwargs, exception=ValidationError, schema=None)
-+
-+ return TransformSchema(parser, *args, **kwargs)
-diff --git a/tests/test_api_validate.py b/tests/test_api_validate.py
-index ceff9bc1dde..c328116d27b 100644
---- a/tests/test_api_validate.py
-+++ b/tests/test_api_validate.py
-@@ -1343,13 +1343,20 @@ def test_success(self):
- validate.parse_qsd(),
- "foo=bar&foo=baz&qux=quux",
- ) == {"foo": "baz", "qux": "quux"}
-+ assert validate.validate(
-+ validate.parse_qsd(),
-+ b"foo=bar&foo=baz&qux=quux",
-+ ) == {b"foo": b"baz", b"qux": b"quux"}
-
- def test_failure(self):
- with pytest.raises(ValidationError) as cm:
- validate.validate(validate.parse_qsd(), 123)
- assert_validationerror(cm.value, """
-- ValidationError:
-- Unable to parse query string: 'int' object has no attribute 'decode' (123)
-+ ValidationError(AnySchema):
-+ ValidationError(type):
-+ Type of 123 should be str, but is int
-+ ValidationError(type):
-+ Type of 123 should be bytes, but is int
- """)
-
-
diff --git a/net-misc/streamlink/streamlink-6.7.2-r1.ebuild b/net-misc/streamlink/streamlink-6.7.2-r1.ebuild
deleted file mode 100644
index 73d54972af03..000000000000
--- a/net-misc/streamlink/streamlink-6.7.2-r1.ebuild
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-if [[ ${PV} = 9999* ]]; then
- EGIT_REPO_URI="https://github.com/streamlink/${PN}.git"
- inherit git-r3
-fi
-
-DISTUTILS_SINGLE_IMPL=1
-# >= 6.2.1 uses a bunch of setuptools hooks instead of vanilla setuptools
-# https://github.com/streamlink/streamlink/commit/194d9bc193f5285bc1ba33af5fd89209a96ad3a7
-DISTUTILS_USE_PEP517=standalone
-PYTHON_COMPAT=( python3_{10..12} )
-PYTHON_REQ_USE='xml(+),threads(+)'
-inherit distutils-r1
-
-DESCRIPTION="CLI for extracting streams from websites to a video player of your choice"
-HOMEPAGE="https://streamlink.github.io/"
-
-if [[ ${PV} != 9999* ]]; then
- SRC_URI="https://github.com/streamlink/${PN}/releases/download/${PV}/${P}.tar.gz"
-fi
-
-LICENSE="BSD-2 Apache-2.0"
-SLOT="0"
-if [[ ${PV} != 9999* ]]; then
- KEYWORDS="amd64 ~arm ~arm64 ~x86"
-fi
-
-# See https://github.com/streamlink/streamlink/commit/9d8156dd794ee0919297cd90d85bcc11b8a28358 for chardet/charset-normalizer dep
-# See https://github.com/streamlink/streamlink/pull/5895 re exceptiongroup dep
-RDEPEND="
- media-video/ffmpeg
- $(python_gen_cond_dep '
- dev-python/certifi[${PYTHON_USEDEP}]
- || (
- dev-python/chardet[${PYTHON_USEDEP}]
- dev-python/charset-normalizer[${PYTHON_USEDEP}]
- )
- dev-python/exceptiongroup[${PYTHON_USEDEP}]
- >=dev-python/requests-2.26.0[${PYTHON_USEDEP}]
- dev-python/isodate[${PYTHON_USEDEP}]
- >=dev-python/lxml-4.6.4[${PYTHON_USEDEP}]
- >=dev-python/websocket-client-1.2.1[${PYTHON_USEDEP}]
- dev-python/pycountry[${PYTHON_USEDEP}]
- >=dev-python/pycryptodome-3.4.3[${PYTHON_USEDEP}]
- >dev-python/PySocks-1.5.7[${PYTHON_USEDEP}]
- >=dev-python/trio-0.22.0[${PYTHON_USEDEP}]
- >=dev-python/trio-websocket-0.9.0[${PYTHON_USEDEP}]
- >=dev-python/urllib3-1.26.0[${PYTHON_USEDEP}]
- ')
-"
-BDEPEND="
- $(python_gen_cond_dep '
- >=dev-python/setuptools-64[${PYTHON_USEDEP}]
- >=dev-python/versioningit-2.0.0[${PYTHON_USEDEP}]
- test? (
- >=dev-python/freezegun-1.0.0[${PYTHON_USEDEP}]
- dev-python/pytest-asyncio[${PYTHON_USEDEP}]
- dev-python/pytest-trio[${PYTHON_USEDEP}]
- dev-python/requests-mock[${PYTHON_USEDEP}]
- )
- ')
-"
-
-if [[ ${PV} == 9999* ]]; then
- RDEPEND+="
- $(python_gen_cond_dep '
- >=dev-python/versioningit-2.0.0[${PYTHON_USEDEP}]
- ')
- "
-fi
-
-PATCHES=(
- "${FILESDIR}"/${P}-validator.patch
-)
-
-distutils_enable_tests pytest
-
-python_test() {
- # Skip tests requiring <dev-python/pytest-8.0.0 which is currently masked
- # https://github.com/streamlink/streamlink/pull/5901
- EPYTEST_DESELECT+=(
- tests/webbrowser/cdp/test_client.py::TestEvaluate::test_exception
- tests/webbrowser/cdp/test_client.py::TestEvaluate::test_error
- tests/webbrowser/cdp/test_client.py::TestNavigate::test_detach
- tests/webbrowser/cdp/test_client.py::TestNavigate::test_error
- tests/webbrowser/cdp/test_connection.py::TestCreateConnection::test_failure
- tests/webbrowser/cdp/test_connection.py::TestReaderError::test_invalid_json
- tests/webbrowser/cdp/test_connection.py::TestReaderError::test_unknown_session_id
- 'tests/webbrowser/cdp/test_connection.py::TestSend::test_timeout[Default timeout, response not in time]'
- 'tests/webbrowser/cdp/test_connection.py::TestSend::test_timeout[Custom timeout, response not in time]'
- tests/webbrowser/cdp/test_connection.py::TestSend::test_bad_command
- tests/webbrowser/cdp/test_connection.py::TestSend::test_result_exception
- tests/webbrowser/cdp/test_connection.py::TestHandleCmdResponse::test_response_error
- tests/webbrowser/cdp/test_connection.py::TestHandleCmdResponse::test_response_no_result
- )
-
- epytest
-}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: net-misc/streamlink/files/, net-misc/streamlink/
@ 2023-11-25 4:49 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2023-11-25 4:49 UTC (permalink / raw
To: gentoo-commits
commit: 552018fe5c5f4f73207fb6b6d178af89b8f67d31
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 25 04:08:06 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Nov 25 04:08:06 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=552018fe
net-misc/streamlink: add 6.4.1, drop 6.4.0
Identical because I'd backported the patch already.
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-misc/streamlink/Manifest | 2 +-
.../files/streamlink-6.4.0-libxml2-2.12.0.patch | 199 ---------------------
...amlink-6.4.0.ebuild => streamlink-6.4.1.ebuild} | 4 -
3 files changed, 1 insertion(+), 204 deletions(-)
diff --git a/net-misc/streamlink/Manifest b/net-misc/streamlink/Manifest
index 15b36e018703..d883ba4e99a4 100644
--- a/net-misc/streamlink/Manifest
+++ b/net-misc/streamlink/Manifest
@@ -4,4 +4,4 @@ DIST streamlink-6.1.0.tar.gz 686463 BLAKE2B cc2890db0181e47bcae9da38eddeaadfd34b
DIST streamlink-6.2.0.tar.gz 690986 BLAKE2B 5f7cab73ea366580aeb837b8f8a27fa7cd5ca687afa53908900dc9f290a0da916778fda8351acda00f795688b156ca0f37302e67128ce30e9838a45111b88ecd SHA512 2747ebc584caa8ebb2fde5d4f309c911a52fd1a8d2d0e832487e589873c270534e0d0b18120a2db7a68e150e301e57db1e8d63f1d5bb6244f364e9cbd6606213
DIST streamlink-6.2.1.tar.gz 692446 BLAKE2B c1b98ffca37051675a92afc86d12635b538c1b12c023b652a05516faffb289f50b479b38ae48813a4f83d6c881dc7f211e66c6d7f7dd08adcf1a354c9bd15427 SHA512 852610d97138cf0a8066f760f747cb32f1d51c8c55b84df5b6a798556343010c2e68ca5d9a8473e8d32f72bc2a5d89f9d90ee70ccced84b6c9408930ed49585a
DIST streamlink-6.3.1.tar.gz 699073 BLAKE2B 9d1fc58bd0cf4539369fc9d49230c18ef3b9a783783a517c831089571424412841f9e8925202d32bc4218d7a08e4e53c823fc503199131edb59e8fd69e8d49fa SHA512 a1e50688acd3b99efd20c1ff1d3bda03cb6e6b5566484d29372bc6d08ee4115f8ad2edea2f0a90f5de105edb52689781892f413f4af3d836cdd9e9a364006610
-DIST streamlink-6.4.0.tar.gz 715287 BLAKE2B e2657a03bbc02e40207079a43dd2770dddb46b1b07db428bef4623a760bf37dc6853bbbc49a65462f5063e377ca45d2c540e6b879ba7852f76d49062c668f1af SHA512 94387a8d7861c2010319a57b57c430a9600ec3da17320293a13caa5769d19ab366522f36c24d96d481e123faddf6869b1126e3657a1c3b3164a8313daf9a3efb
+DIST streamlink-6.4.1.tar.gz 715775 BLAKE2B 40b6c080a8fa2815b12562aafde9ce1dd2c8fabe405e21d90fc7767c9e6c085f60c3d0dc9f33c77b85015aa64e2d209464662908674638719581278d128b3f1c SHA512 8886b990637e9f4e87b4fcdc00c2d3e11203746e7256c0d85aee3128f65baaf37ea730c2626c3ec8f0f5ee0042bbd271c4a6290bd346d59915f2f554602f0db4
diff --git a/net-misc/streamlink/files/streamlink-6.4.0-libxml2-2.12.0.patch b/net-misc/streamlink/files/streamlink-6.4.0-libxml2-2.12.0.patch
deleted file mode 100644
index ed5fd30366d2..000000000000
--- a/net-misc/streamlink/files/streamlink-6.4.0-libxml2-2.12.0.patch
+++ /dev/null
@@ -1,199 +0,0 @@
-https://github.com/streamlink/streamlink/commit/9d8156dd794ee0919297cd90d85bcc11b8a28358
-
-From 9d8156dd794ee0919297cd90d85bcc11b8a28358 Mon Sep 17 00:00:00 2001
-From: bastimeyer <mail@bastimeyer.de>
-Date: Tue, 21 Nov 2023 20:10:47 +0100
-Subject: [PATCH] utils.parse: fix libxml2 2.12.0 compatibility
-
----
- src/streamlink/compat.py | 11 ++++
- src/streamlink/utils/parse.py | 17 +++++-
- tests/utils/test_parse.py | 112 ++++++++++++++++++++++++++--------
- 3 files changed, 114 insertions(+), 26 deletions(-)
-
-diff --git a/src/streamlink/compat.py b/src/streamlink/compat.py
-index c75201544d3..993bce64cfd 100644
---- a/src/streamlink/compat.py
-+++ b/src/streamlink/compat.py
-@@ -2,11 +2,22 @@
- import sys
-
-
-+# compatibility import of charset_normalizer/chardet via requests<3.0
-+try:
-+ from requests.compat import chardet as charset_normalizer # type: ignore
-+except ImportError: # pragma: no cover
-+ import charset_normalizer
-+
-+
- is_darwin = sys.platform == "darwin"
- is_win32 = os.name == "nt"
-
-
-+detect_encoding = charset_normalizer.detect
-+
-+
- __all__ = [
- "is_darwin",
- "is_win32",
-+ "detect_encoding",
- ]
-diff --git a/src/streamlink/utils/parse.py b/src/streamlink/utils/parse.py
-index 8c9f79c8b51..17479b81f59 100644
---- a/src/streamlink/utils/parse.py
-+++ b/src/streamlink/utils/parse.py
-@@ -4,6 +4,7 @@
-
- from lxml.etree import HTML, XML
-
-+from streamlink.compat import detect_encoding
- from streamlink.plugin import PluginError
-
-
-@@ -51,7 +52,21 @@ def parse_html(
- - Removes XML declarations of invalid XHTML5 documents
- - Wraps errors in custom exception with a snippet of the data in the message
- """
-- if isinstance(data, str) and data.lstrip().startswith("<?xml"):
-+ # strip XML text declarations from XHTML5 documents which were incorrectly defined as HTML5
-+ is_bytes = isinstance(data, bytes)
-+ if data and data.lstrip()[:5].lower() == (b"<?xml" if is_bytes else "<?xml"):
-+ if is_bytes:
-+ # get the document's encoding using the "encoding" attribute value of the XML text declaration
-+ match = re.match(rb"^\s*<\?xml\s.*?encoding=(?P<q>[\'\"])(?P<encoding>.+?)(?P=q).*?\?>", data, re.IGNORECASE)
-+ if match:
-+ encoding_value = detect_encoding(match["encoding"])["encoding"]
-+ encoding = match["encoding"].decode(encoding_value)
-+ else:
-+ # no "encoding" attribute: try to figure out encoding from the document's content
-+ encoding = detect_encoding(data)["encoding"]
-+
-+ data = data.decode(encoding)
-+
- data = re.sub(r"^\s*<\?xml.+?\?>", "", data)
-
- return _parse(HTML, data, name, exception, schema, *args, **kwargs)
-diff --git a/tests/utils/test_parse.py b/tests/utils/test_parse.py
-index aedae7d4e8e..69c16f282b9 100644
---- a/tests/utils/test_parse.py
-+++ b/tests/utils/test_parse.py
-@@ -74,31 +74,93 @@ def test_parse_xml_entities(self):
- assert actual.tag == expected.tag
- assert actual.attrib == expected.attrib
-
-- def test_parse_xml_encoding(self):
-- tree = parse_xml("""<?xml version="1.0" encoding="UTF-8"?><test>ä</test>""")
-- assert tree.xpath(".//text()") == ["ä"]
-- tree = parse_xml("""<test>ä</test>""")
-- assert tree.xpath(".//text()") == ["ä"]
-- tree = parse_xml(b"""<?xml version="1.0" encoding="UTF-8"?><test>\xC3\xA4</test>""")
-- assert tree.xpath(".//text()") == ["ä"]
-- tree = parse_xml(b"""<test>\xC3\xA4</test>""")
-- assert tree.xpath(".//text()") == ["ä"]
--
-- def test_parse_html_encoding(self):
-- tree = parse_html("""<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body>ä</body></html>""")
-- assert tree.xpath(".//body/text()") == ["ä"]
-- tree = parse_html("""<!DOCTYPE html><html><body>ä</body></html>""")
-- assert tree.xpath(".//body/text()") == ["ä"]
-- tree = parse_html(b"""<!DOCTYPE html><html><meta charset="utf-8"/><body>\xC3\xA4</body></html>""")
-- assert tree.xpath(".//body/text()") == ["ä"]
-- tree = parse_html(b"""<!DOCTYPE html><html><body>\xC3\xA4</body></html>""")
-- assert tree.xpath(".//body/text()") == ["ä"]
--
-- def test_parse_html_xhtml5(self):
-- tree = parse_html("""<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html><html><body>ä?></body></html>""")
-- assert tree.xpath(".//body/text()") == ["ä?>"]
-- tree = parse_html(b"""<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html><html><body>\xC3\xA4?></body></html>""")
-- assert tree.xpath(".//body/text()") == ["ä?>"]
-+ @pytest.mark.parametrize(("content", "expected"), [
-+ pytest.param(
-+ """<?xml version="1.0" encoding="UTF-8"?><test>ä</test>""",
-+ "ä",
-+ id="string-utf-8",
-+ ),
-+ pytest.param(
-+ """<test>ä</test>""",
-+ "ä",
-+ id="string-unknown",
-+ ),
-+ pytest.param(
-+ b"""<?xml version="1.0" encoding="UTF-8"?><test>\xC3\xA4</test>""",
-+ "ä",
-+ id="bytes-utf-8",
-+ ),
-+ pytest.param(
-+ b"""<?xml version="1.0" encoding="ISO-8859-1"?><test>\xE4</test>""",
-+ "ä",
-+ id="bytes-iso-8859-1",
-+ ),
-+ pytest.param(
-+ b"""<test>\xC3\xA4</test>""",
-+ "ä",
-+ id="bytes-unknown",
-+ ),
-+ ])
-+ def test_parse_xml_encoding(self, content, expected):
-+ tree = parse_xml(content)
-+ assert tree.xpath(".//text()") == [expected]
-+
-+ @pytest.mark.parametrize(("content", "expected"), [
-+ pytest.param(
-+ """<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body>ä</body></html>""",
-+ "ä",
-+ id="string-utf-8",
-+ ),
-+ pytest.param(
-+ """<!DOCTYPE html><html><body>ä</body></html>""",
-+ "ä",
-+ id="string-unknown",
-+ ),
-+ pytest.param(
-+ b"""<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body>\xC3\xA4</body></html>""",
-+ "ä",
-+ id="bytes-utf-8",
-+ ),
-+ pytest.param(
-+ b"""<!DOCTYPE html><html><head><meta charset="ISO-8859-1"/></head><body>\xE4</body></html>""",
-+ "ä",
-+ id="bytes-iso-8859-1",
-+ ),
-+ pytest.param(
-+ b"""<!DOCTYPE html><html><body>\xC3\xA4</body></html>""",
-+ "ä",
-+ id="bytes-unknown",
-+ ),
-+ ])
-+ def test_parse_html_encoding(self, content, expected):
-+ tree = parse_html(content)
-+ assert tree.xpath(".//body/text()") == [expected]
-+
-+ @pytest.mark.parametrize(("content", "expected"), [
-+ pytest.param(
-+ """<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html><html><body>ä?></body></html>""",
-+ "ä?>",
-+ id="string",
-+ ),
-+ pytest.param(
-+ b"""<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html><html><body>\xC3\xA4?></body></html>""",
-+ "ä?>",
-+ id="bytes-utf-8",
-+ ),
-+ pytest.param(
-+ b"""<?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE html><html><body>\xE4?></body></html>""",
-+ "ä?>",
-+ id="bytes-iso-8859-1",
-+ ),
-+ pytest.param(
-+ b"""<?xml version="1.0"?><!DOCTYPE html><html><body>\xC3\xA4?></body></html>""",
-+ "ä?>",
-+ id="bytes-unknown",
-+ ),
-+ ])
-+ def test_parse_html_xhtml5(self, content, expected):
-+ tree = parse_html(content)
-+ assert tree.xpath(".//body/text()") == [expected]
-
- def test_parse_qsd(self):
- assert parse_qsd("test=1&foo=bar", schema=validate.Schema({"test": str, "foo": "bar"})) == {"test": "1", "foo": "bar"}
-
diff --git a/net-misc/streamlink/streamlink-6.4.0.ebuild b/net-misc/streamlink/streamlink-6.4.1.ebuild
similarity index 97%
rename from net-misc/streamlink/streamlink-6.4.0.ebuild
rename to net-misc/streamlink/streamlink-6.4.1.ebuild
index 2c9ca567becc..d73952536218 100644
--- a/net-misc/streamlink/streamlink-6.4.0.ebuild
+++ b/net-misc/streamlink/streamlink-6.4.1.ebuild
@@ -71,8 +71,4 @@ if [[ ${PV} == 9999* ]]; then
"
fi
-PATCHES=(
- "${FILESDIR}"/${P}-libxml2-2.12.0.patch
-)
-
distutils_enable_tests pytest
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-23 0:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-14 11:09 [gentoo-commits] repo/gentoo:master commit in: net-misc/streamlink/files/, net-misc/streamlink/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2024-06-23 0:27 Sam James
2023-11-25 4:49 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox