Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package streamlink for openSUSE:Factory checked in at 2026-11-13 18:35:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/streamlink (Old) and /work/SRC/openSUSE:Factory/.streamlink.new.1251 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "streamlink" Fri Nov 13 18:35:42 2026 rev:37 rq:1397294 version:8.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/streamlink/streamlink.changes 2026-10-18 19:25:04.533162480 +0200 +++ /work/SRC/openSUSE:Factory/.streamlink.new.1251/streamlink.changes 2026-11-13 18:40:03.965322856 +0100 @@ -1,0 +2,9 @@ +Fri Nov 13 09:30:02 UTC 2026 - Richard Rahl <[email protected]> + +- Update to version 8.6.3: + + Fixed: --retry-streams and --retry-max in external/continuous HTTP output + mode when re-fetching + + Tests: fixed race-conditions in HLS tests +- remove link to keyserver + +------------------------------------------------------------------- Old: ---- streamlink-8.6.2.tar.gz streamlink-8.6.2.tar.gz.asc New: ---- streamlink-8.6.3.tar.gz streamlink-8.6.3.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ streamlink.spec ++++++ --- /var/tmp/diff_new_pack.Lj53x9/_old 2026-11-13 18:40:05.807400793 +0100 +++ /var/tmp/diff_new_pack.Lj53x9/_new 2026-11-13 18:40:05.809400877 +0100 @@ -18,14 +18,14 @@ %define pythons %{primary_python} Name: streamlink -Version: 8.6.2 +Version: 8.6.3 Release: 0 Summary: Program to pipe streams from services into a video player License: Apache-2.0 AND BSD-2-Clause URL: https://streamlink.github.io Source: https://github.com/%{name}/%{name}/releases/download/%{version}/streamlink-%{version}.tar.gz Source1: https://github.com/%{name}/%{name}/releases/download/%{version}/streamlink-%{version}.tar.gz.asc -Source2: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xcdac41b9122470faf357a9d344448a298d5c3618#/streamlink.keyring +Source2: streamlink.keyring # Thanks to Debian for providing these patches Patch0: remove-check-for-update.patch Patch1: lower-pytest-requirement.patch ++++++ streamlink-8.6.2.tar.gz -> streamlink-8.6.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/CHANGELOG.md new/streamlink-8.6.3/CHANGELOG.md --- old/streamlink-8.6.2/CHANGELOG.md 2026-10-07 21:49:42.941742400 +0200 +++ new/streamlink-8.6.3/CHANGELOG.md 2026-10-29 19:57:52.352718000 +0100 @@ -1,5 +1,15 @@ # Changelog +## streamlink 8.6.3 (2026-10-29) + +- SECURITY: new minor release primarily for Streamlink's Windows / Linux AppImages builds, with `brotli 1.2.1` (via uv.lock) ([`CVE-2026-111497`](https://nvd.nist.gov/vuln/detail/CVE-2026-111497)) +- Fixed: `--retry-streams` and `--retry-max` in external/continuous HTTP output mode when re-fetching ([#7165](https://github.com/streamlink/streamlink/pull/7165)) +- Build: bumped `pycryptodome` version requirements to `>=3.4.3,<5` ([#7167](https://github.com/streamlink/streamlink/pull/7167)) +- Tests: fixed race-conditions in HLS tests ([#7174](https://github.com/streamlink/streamlink/pull/7174), [#7176](https://github.com/streamlink/streamlink/pull/7176)) + +[Full changelog](https://github.com/streamlink/streamlink/compare/8.6.2...8.6.3) + + ## streamlink 8.6.2 (2026-10-07) - SECURITY: fixed arbitrary local file read via `file://` URLs in DASH `Location` tags (`CVE-2026-TO-BE-ASSIGNED` / [`GHSA-j7pf-m7gx-jr33`](https://github.com/streamlink/streamlink/security/advisories/GHSA-j7pf-m7gx-jr33)) ([`98781761`](https://github.com/streamlink/streamlink/commit/987817618f57b6def852693e4e0a95fd9c8437f2)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/PKG-INFO new/streamlink-8.6.3/PKG-INFO --- old/streamlink-8.6.2/PKG-INFO 2026-10-07 21:50:00.453098300 +0200 +++ new/streamlink-8.6.3/PKG-INFO 2026-10-29 19:58:08.441716700 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: streamlink -Version: 8.6.2 +Version: 8.6.3 Summary: Streamlink is a command-line utility that extracts streams from various services and pipes them into a video player of choice. Author: Streamlink Author-email: [email protected] @@ -36,7 +36,7 @@ Requires-Dist: isodate Requires-Dist: lxml<8,>=5.0.0 Requires-Dist: pycountry -Requires-Dist: pycryptodome<4,>=3.4.3 +Requires-Dist: pycryptodome<5,>=3.4.3 Requires-Dist: PySocks!=1.5.7,>=1.5.6 Requires-Dist: requests<3,>=2.30.0 Requires-Dist: trio<1,>=0.25.0; python_version >= "3.13" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/build_backend/test_plugins_json.py new/streamlink-8.6.3/build_backend/test_plugins_json.py --- old/streamlink-8.6.2/build_backend/test_plugins_json.py 2026-10-07 21:49:42.943055200 +0200 +++ new/streamlink-8.6.3/build_backend/test_plugins_json.py 2026-10-29 19:57:52.353833700 +0100 @@ -199,8 +199,8 @@ PluginMatcher(pattern="bar", flags=re.IGNORECASE, priority=None, name=None), PluginMatcher(pattern="bar", flags=re.IGNORECASE, priority=None, name=None), PluginMatcher(pattern="bar", flags=re.IGNORECASE, priority=None, name=None), - PluginMatcher(pattern="baz", flags=re.I | re.S | re.X, priority=None, name=None), - PluginMatcher(pattern="baz", flags=re.I | re.S | re.X, priority=None, name=None), + PluginMatcher(pattern="baz", flags=re.I | re.S | re.X, priority=None, name=None), # ruff: ignore[regex-flag-alias] + PluginMatcher(pattern="baz", flags=re.I | re.S | re.X, priority=None, name=None), # ruff: ignore[regex-flag-alias] ], does_not_raise, id="pattern", @@ -1092,7 +1092,7 @@ assert pluginvisitor.matchers == [ PluginMatcher(pattern="https://a", flags=None, priority=None, name=None), PluginMatcher(pattern="https://b", flags=re.IGNORECASE, priority=PluginMatcher.LOW_PRIORITY, name="b"), - PluginMatcher(pattern="https://c", flags=re.I | re.X, priority=20, name="c"), + PluginMatcher(pattern="https://c", flags=re.IGNORECASE | re.VERBOSE, priority=20, name="c"), ] assert pluginvisitor.arguments == [ PluginArgument(name="a", type="comma_list_filter", type_kwargs={"acceptable": ["a", "b"]}, default=["a"], help="a"), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/completions/bash/streamlink new/streamlink-8.6.3/completions/bash/streamlink --- old/streamlink-8.6.2/completions/bash/streamlink 2026-10-07 21:49:58.826314700 +0200 +++ new/streamlink-8.6.3/completions/bash/streamlink 2026-10-29 19:58:07.232473100 +0100 @@ -216,7 +216,12 @@ compgen -W "${current_action_choices[*]}" -- "$completing_word") fi + if [[ ${#COMPREPLY[@]} = 0 ]]; then + # native fallback matches are not necessarily filenames (e.g. variables) + compopt +o filenames 2>/dev/null || : # bash>=4 + fi + return 0 } -complete -F _shtab_streamlink streamlink \ No newline at end of file +complete -o bashdefault -F _shtab_streamlink streamlink \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/docs/_build/man/streamlink.1 new/streamlink-8.6.3/docs/_build/man/streamlink.1 --- old/streamlink-8.6.2/docs/_build/man/streamlink.1 2026-10-07 21:49:57.276991400 +0200 +++ new/streamlink-8.6.3/docs/_build/man/streamlink.1 2026-10-29 19:58:05.831681500 +0100 @@ -27,7 +27,7 @@ .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "STREAMLINK" "1" "Oct 07, 2026" "8.6.2" "Streamlink" +.TH "STREAMLINK" "1" "Oct 29, 2026" "8.6.3" "Streamlink" .SH NAME streamlink \- extracts streams from various services and pipes them into a video player of choice .SH SYNOPSIS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/docs/changelog.md new/streamlink-8.6.3/docs/changelog.md --- old/streamlink-8.6.2/docs/changelog.md 2026-10-07 21:49:42.941742400 +0200 +++ new/streamlink-8.6.3/docs/changelog.md 2026-10-29 19:57:52.352718000 +0100 @@ -1,5 +1,15 @@ # Changelog +## streamlink 8.6.3 (2026-10-29) + +- SECURITY: new minor release primarily for Streamlink's Windows / Linux AppImages builds, with `brotli 1.2.1` (via uv.lock) ([`CVE-2026-111497`](https://nvd.nist.gov/vuln/detail/CVE-2026-111497)) +- Fixed: `--retry-streams` and `--retry-max` in external/continuous HTTP output mode when re-fetching ([#7165](https://github.com/streamlink/streamlink/pull/7165)) +- Build: bumped `pycryptodome` version requirements to `>=3.4.3,<5` ([#7167](https://github.com/streamlink/streamlink/pull/7167)) +- Tests: fixed race-conditions in HLS tests ([#7174](https://github.com/streamlink/streamlink/pull/7174), [#7176](https://github.com/streamlink/streamlink/pull/7176)) + +[Full changelog](https://github.com/streamlink/streamlink/compare/8.6.2...8.6.3) + + ## streamlink 8.6.2 (2026-10-07) - SECURITY: fixed arbitrary local file read via `file://` URLs in DASH `Location` tags (`CVE-2026-TO-BE-ASSIGNED` / [`GHSA-j7pf-m7gx-jr33`](https://github.com/streamlink/streamlink/security/advisories/GHSA-j7pf-m7gx-jr33)) ([`98781761`](https://github.com/streamlink/streamlink/commit/987817618f57b6def852693e4e0a95fd9c8437f2)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/docs/install.rst new/streamlink-8.6.3/docs/install.rst --- old/streamlink-8.6.2/docs/install.rst 2026-10-07 21:49:42.945525000 +0200 +++ new/streamlink-8.6.3/docs/install.rst 2026-10-29 19:57:52.355641400 +0100 @@ -187,6 +187,16 @@ - .. code-block:: bash sudo dnf install streamlink + * - :octicon:`package-dependents` `FreeBSD (pkg)`_ + - .. code-block:: bash + + pkg install multimedia/streamlink + + * - :octicon:`package-dependents` `FreeBSD (ports)`_ + - .. code-block:: bash + + cd /usr/ports/multimedia/streamlink + make config install clean * - :octicon:`package-dependents` `Gentoo Linux`_ - .. code-block:: bash @@ -223,6 +233,8 @@ .. _Debian (sid, testing): https://packages.debian.org/sid/streamlink .. _Debian (stable): https://packages.debian.org/trixie-backports/streamlink .. _Fedora: https://src.fedoraproject.org/rpms/python-streamlink +.. _FreeBSD (pkg): https://ports.freebsd.org/cgi/ports.cgi?query=streamlink&stype=name +.. _FreeBSD (ports): https://www.freshports.org/multimedia/streamlink .. _Gentoo Linux: https://packages.gentoo.org/package/net-misc/streamlink .. _NixOS: https://github.com/NixOS/nixpkgs/tree/master/pkgs/by-name/st/streamlink .. _openSUSE: https://build.opensuse.org/package/show/multimedia:apps/streamlink diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/pyproject.toml new/streamlink-8.6.3/pyproject.toml --- old/streamlink-8.6.2/pyproject.toml 2026-10-07 21:50:00.454700700 +0200 +++ new/streamlink-8.6.3/pyproject.toml 2026-10-29 19:58:08.443575100 +0100 @@ -60,7 +60,7 @@ "isodate", "lxml >=5.0.0,<8", "pycountry", - "pycryptodome >=3.4.3,<4", + "pycryptodome >=3.4.3,<5", "PySocks >=1.5.6,!=1.5.7", "requests >=2.30.0,<3", "trio >=0.25.0,<1 ; python_version>='3.13'", @@ -108,14 +108,14 @@ "freezegun >=1.5.0", ] lint = [ - "ruff ==0.16.10", + "ruff ==0.17.3", ] typing = [ { include-group = "test" }, { include-group = "docs" }, { include-group = "script" }, # tools and typing dependencies - "ty ==0.0.85", + "ty ==0.0.92", "mypy[faster-cache] ==2.4.0", "typing-extensions >=4.0.0", # dependency overrides @@ -265,6 +265,12 @@ [tool.ruff.lint] select = [ + "correctness", + "suspicious", +# "complexity", + "performance", + "style", + # pycodestyle "E", "W", @@ -315,15 +321,20 @@ ] ignore = [ "async-function-with-timeout", + "blind-except", "builtin-attribute-shadowing", "compare-to-empty-string", + "escape-sequence-in-docstring", "explicit-string-concatenation", + "math-constant", "missing-f-string-syntax", "missing-trailing-comma", # already covered by ruff's formatter "parenthesize-chained-operators", + "raise-vanilla-class", "redefined-loop-name", "return-in-generator", "stdlib-module-shadowing", + "subclass-builtin", "unnecessary-collection-call", "unnecessary-dunder-call", "unsorted-dunder-all", @@ -368,6 +379,12 @@ [tool.ty.environment] python-platform = "all" +[[tool.ty.overrides]] +include = ["build_backend", "docs", "src", "tests"] + +[tool.ty.overrides.rules] +invalid-mutable-override = "ignore" # TODO: don't ignore this rule + [tool.ty.src] exclude = [ "src/streamlink/packages/**", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/setup.py new/streamlink-8.6.3/setup.py --- old/streamlink-8.6.2/setup.py 2026-10-07 21:50:00.454700700 +0200 +++ new/streamlink-8.6.3/setup.py 2026-10-29 19:58:08.443575100 +0100 @@ -91,5 +91,5 @@ cmdclass=get_cmdclasses(cmdclass), entry_points=entry_points, data_files=data_files, - version="8.6.2", + version="8.6.3", ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink/_version.py new/streamlink-8.6.3/src/streamlink/_version.py --- old/streamlink-8.6.2/src/streamlink/_version.py 2026-10-07 21:50:00.455700600 +0200 +++ new/streamlink-8.6.3/src/streamlink/_version.py 2026-10-29 19:58:08.443575100 +0100 @@ -1 +1 @@ -__version__ = "8.6.2" +__version__ = "8.6.3" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink/plugins/youtube.py new/streamlink-8.6.3/src/streamlink/plugins/youtube.py --- old/streamlink-8.6.2/src/streamlink/plugins/youtube.py 2026-10-07 21:49:42.955525000 +0200 +++ new/streamlink-8.6.3/src/streamlink/plugins/youtube.py 2026-10-29 19:57:52.362603000 +0100 @@ -89,9 +89,7 @@ # translate input URLs to be able to find embedded data and to avoid unnecessary HTTP redirects if parsed.netloc == "gaming.youtube.com": self.url = urlunparse(parsed._replace(scheme="https", netloc="www.youtube.com")) - elif self.matches["shorthand"]: - self.url = self._url_canonical.format(video_id=self.match["video_id"]) - elif self.matches["embed"] and self.match["video_id"]: + elif self.matches["shorthand"] or self.matches["embed"] and self.match["video_id"]: self.url = self._url_canonical.format(video_id=self.match["video_id"]) elif self.matches["embed"] and self.match["live"]: self.url = self._url_channelid_live.format(channel_id=self.match["live"]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink/session/http.pyi new/streamlink-8.6.3/src/streamlink/session/http.pyi --- old/streamlink-8.6.2/src/streamlink/session/http.pyi 2026-10-07 21:49:42.956588700 +0200 +++ new/streamlink-8.6.3/src/streamlink/session/http.pyi 2026-10-29 19:57:52.364100700 +0100 @@ -26,29 +26,14 @@ class _SchemaKwargs(TypedDict): schema: Schema -class _RequestKwargs(_requeststypes.RequestKwargs, _StreamlinkKwargs): - pass - -class _RequestKwargsWithSchema(_requeststypes.RequestKwargs, _StreamlinkKwargs, _SchemaKwargs): - pass - -class _GetKwargs(_requeststypes.GetKwargs, _StreamlinkKwargs): - pass - -class _GetKwargsWithSchema(_requeststypes.GetKwargs, _StreamlinkKwargs, _SchemaKwargs): - pass - -class _PostKwargs(_requeststypes.PostKwargs, _StreamlinkKwargs): - pass - -class _PostKwargsWithSchema(_requeststypes.PostKwargs, _StreamlinkKwargs, _SchemaKwargs): - pass - -class _DataKwargs(_requeststypes.DataKwargs, _StreamlinkKwargs): - pass - -class _DataKwargsWithSchema(_requeststypes.DataKwargs, _StreamlinkKwargs, _SchemaKwargs): - pass +class _RequestKwargs(_requeststypes.RequestKwargs, _StreamlinkKwargs): ... +class _RequestKwargsWithSchema(_requeststypes.RequestKwargs, _StreamlinkKwargs, _SchemaKwargs): ... +class _GetKwargs(_requeststypes.GetKwargs, _StreamlinkKwargs): ... +class _GetKwargsWithSchema(_requeststypes.GetKwargs, _StreamlinkKwargs, _SchemaKwargs): ... +class _PostKwargs(_requeststypes.PostKwargs, _StreamlinkKwargs): ... +class _PostKwargsWithSchema(_requeststypes.PostKwargs, _StreamlinkKwargs, _SchemaKwargs): ... +class _DataKwargs(_requeststypes.DataKwargs, _StreamlinkKwargs): ... +class _DataKwargsWithSchema(_requeststypes.DataKwargs, _StreamlinkKwargs, _SchemaKwargs): ... # ---- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink/stream/dash/manifest.py new/streamlink-8.6.3/src/streamlink/stream/dash/manifest.py --- old/streamlink-8.6.2/src/streamlink/stream/dash/manifest.py 2026-10-07 21:49:42.957197200 +0200 +++ new/streamlink-8.6.3/src/streamlink/stream/dash/manifest.py 2026-10-29 19:57:52.364587500 +0100 @@ -330,7 +330,7 @@ __tag__ = "MPD" - parent: None # type: ignore[assignment] + parent: None # type: ignore[assignment, ty:invalid-attribute-override] timelines: dict[TTimelineIdent, int] DEFAULT_MINBUFFERTIME = 3.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink/stream/wrappers.py new/streamlink-8.6.3/src/streamlink/stream/wrappers.py --- old/streamlink-8.6.2/src/streamlink/stream/wrappers.py 2026-10-07 21:49:42.958191900 +0200 +++ new/streamlink-8.6.3/src/streamlink/stream/wrappers.py 2026-10-29 19:57:52.365400800 +0100 @@ -1,4 +1,5 @@ import io +from contextlib import suppress from threading import Thread from streamlink.buffers import Buffer, RingBuffer @@ -81,10 +82,8 @@ self.buffer.close() if hasattr(self.fd, "close"): - try: + with suppress(Exception): self.fd.close() - except Exception: - pass def __init__(self, session, fd, timeout=30): self.buffer = RingBuffer(session.get_option("ringbuffer-size")) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink/utils/crypto.py new/streamlink-8.6.3/src/streamlink/utils/crypto.py --- old/streamlink-8.6.2/src/streamlink/utils/crypto.py 2026-10-07 21:49:42.958472500 +0200 +++ new/streamlink-8.6.3/src/streamlink/utils/crypto.py 2026-10-29 19:57:52.365609000 +0100 @@ -14,6 +14,8 @@ from Crypto.Util.Padding import pad, unpad except ImportError: # pragma: no cover # pycryptodomex (independent of the old PyCrypto library) + # Support for pycryptodomex ended with pycryptodome 4.0.0. + # Keep the fallback imports until pycryptodomex is not packaged by major distros anymore. from Cryptodome.Cipher import AES, PKCS1_v1_5 # type: ignore from Cryptodome.Hash import MD5, SHA256 # type: ignore from Cryptodome.PublicKey import RSA # type: ignore diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink/utils/dataclass.py new/streamlink-8.6.3/src/streamlink/utils/dataclass.py --- old/streamlink-8.6.2/src/streamlink/utils/dataclass.py 2026-10-07 21:49:42.958472500 +0200 +++ new/streamlink-8.6.3/src/streamlink/utils/dataclass.py 2026-10-29 19:57:52.365609000 +0100 @@ -17,10 +17,8 @@ from _typeshed import DataclassInstance - _Ta = TypeVar("_Ta") - _Tb = TypeVar("_Tb") - - _TFormatters: TypeAlias = dict[type[_Tb], Callable[[_Tb], str]] + _T = TypeVar("_T") + _TFormatters: TypeAlias = dict[type[_T], Callable[[_T], str]] _DEFAULT_FORMATTERS: _TFormatters = { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink.egg-info/PKG-INFO new/streamlink-8.6.3/src/streamlink.egg-info/PKG-INFO --- old/streamlink-8.6.2/src/streamlink.egg-info/PKG-INFO 2026-10-07 21:50:00.247698500 +0200 +++ new/streamlink-8.6.3/src/streamlink.egg-info/PKG-INFO 2026-10-29 19:58:08.312962300 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.4 Name: streamlink -Version: 8.6.2 +Version: 8.6.3 Summary: Streamlink is a command-line utility that extracts streams from various services and pipes them into a video player of choice. Author: Streamlink Author-email: [email protected] @@ -36,7 +36,7 @@ Requires-Dist: isodate Requires-Dist: lxml<8,>=5.0.0 Requires-Dist: pycountry -Requires-Dist: pycryptodome<4,>=3.4.3 +Requires-Dist: pycryptodome<5,>=3.4.3 Requires-Dist: PySocks!=1.5.7,>=1.5.6 Requires-Dist: requests<3,>=2.30.0 Requires-Dist: trio<1,>=0.25.0; python_version >= "3.13" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink.egg-info/requires.txt new/streamlink-8.6.3/src/streamlink.egg-info/requires.txt --- old/streamlink-8.6.2/src/streamlink.egg-info/requires.txt 2026-10-07 21:50:00.251362800 +0200 +++ new/streamlink-8.6.3/src/streamlink.egg-info/requires.txt 2026-10-29 19:58:08.314593600 +0100 @@ -2,7 +2,7 @@ isodate lxml<8,>=5.0.0 pycountry -pycryptodome<4,>=3.4.3 +pycryptodome<5,>=3.4.3 PySocks!=1.5.7,>=1.5.6 requests<3,>=2.30.0 trio-websocket<1,>=0.9.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink_cli/compat.py new/streamlink-8.6.3/src/streamlink_cli/compat.py --- old/streamlink-8.6.2/src/streamlink_cli/compat.py 2026-10-07 21:49:42.963115700 +0200 +++ new/streamlink-8.6.3/src/streamlink_cli/compat.py 2026-10-29 19:57:52.369332300 +0100 @@ -9,7 +9,7 @@ from atexit import register as _atexit_register from pathlib import Path - stdout = Path(devnull).open("wb") + stdout = Path(devnull).open("wb") # ruff: ignore[open-file-with-context-handler] _atexit_register(stdout.close) del _atexit_register diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink_cli/console/progress.py new/streamlink-8.6.3/src/streamlink_cli/console/progress.py --- old/streamlink-8.6.2/src/streamlink_cli/console/progress.py 2026-10-07 21:49:42.963504000 +0200 +++ new/streamlink-8.6.3/src/streamlink_cli/console/progress.py 2026-10-29 19:57:52.369635000 +0100 @@ -94,7 +94,7 @@ try: for idx, fn, _ in variable: static[idx] = fn(max_width) - except Exception: + except Exception: # ruff: ignore[try-except-continue] continue break diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink_cli/console/stream.py new/streamlink-8.6.3/src/streamlink_cli/console/stream.py --- old/streamlink-8.6.2/src/streamlink_cli/console/stream.py 2026-10-07 21:49:42.963525000 +0200 +++ new/streamlink-8.6.3/src/streamlink_cli/console/stream.py 2026-10-29 19:57:52.369635000 +0100 @@ -19,7 +19,7 @@ class ConsoleOutputStream(StreamWrapper): - def __new__(cls, stream: TextIOWrapper) -> ConsoleOutputStream: + def __new__(cls, stream: TextIOWrapper) -> ConsoleOutputStream: # ruff: ignore[non-self-return-type] if stream.isatty(): if ( is_win32 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink_cli/console/stream_wrapper.py new/streamlink-8.6.3/src/streamlink_cli/console/stream_wrapper.py --- old/streamlink-8.6.2/src/streamlink_cli/console/stream_wrapper.py 2026-10-07 21:49:42.963525000 +0200 +++ new/streamlink-8.6.3/src/streamlink_cli/console/stream_wrapper.py 2026-10-29 19:57:52.369635000 +0100 @@ -13,7 +13,7 @@ def wrap(cls, obj, attr): stream = getattr(obj, attr) if not isinstance(stream, TextIOWrapper): - raise AttributeError(f"{stream!r} is not a TextIOWrapper object ({obj!r}, {attr!r})") + raise TypeError(f"{stream!r} is not a TextIOWrapper object ({obj!r}, {attr!r})") console_output_stream = cls(stream) console_output_stream._wrap(obj, attr) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/src/streamlink_cli/main.py new/streamlink-8.6.3/src/streamlink_cli/main.py --- old/streamlink-8.6.2/src/streamlink_cli/main.py 2026-10-07 21:49:42.963525000 +0200 +++ new/streamlink-8.6.3/src/streamlink_cli/main.py 2026-10-29 19:57:52.369635000 +0100 @@ -265,6 +265,9 @@ user_agent = server.request.headers.get("User-Agent") or "unknown player" log.info(f"Got HTTP request from {user_agent}") + retry_streams = args.retry_streams or 10 + retry_max = args.retry_max or 0 + retry_attempts = 0 stream_fd = prebuffer = None while not stream_fd and (not player or player.running): try: # ruff: ignore[too-many-statements-in-try-clause] @@ -277,20 +280,35 @@ for stream_name in (resolve_stream_name(streams, s) for s in args.stream): if stream_name in streams: stream = streams[stream_name] + retry_attempts = 0 break else: - log.info("Stream not available, will re-fetch streams in 10 sec") - sleep(10) + if retry_attempts >= retry_max > 0: + continuous = False + break + log.info(f"Stream not available, re-fetching streams in {retry_streams:.1f} second(s)") + retry_attempts += 1 + sleep(retry_streams) continue except PluginError as err: - log.error(f"Unable to fetch new streams: {err}") + if retry_attempts >= retry_max > 0: + continuous = False + break + log.error(f"Unable to fetch new streams, retrying in {retry_streams:.1f} second(s): {err}") + retry_attempts += 1 + sleep(retry_streams) continue - try: - log.info(f"Opening stream: {stream_name} ({type(stream).shortname()})") - stream_fd, prebuffer = open_stream(stream) - except StreamError as err: - log.error(err) + for i in range(args.retry_open): + try: + log.info(f"Opening stream: {stream_name} ({type(stream).shortname()})") + stream_fd, prebuffer = open_stream(stream) + break + except StreamError as err: + log.error(f"Try {i + 1}/{args.retry_open}: Could not open stream {stream} ({err})") + else: + server.shutdown() + raise StreamlinkCLIError(f"Could not open stream {stream}, tried {args.retry_open} times, exiting") if stream_fd and prebuffer: log.debug("Writing stream to player") @@ -298,6 +316,7 @@ try: stream_runner.run(prebuffer) except OSError as err: + server.shutdown() raise StreamlinkCLIError() from err if not continuous: @@ -525,7 +544,7 @@ streams = None if not streams: - log.info(f"Waiting for streams, retrying every {interval} second(s)") + log.info(f"Waiting for streams, retrying every {interval:.1f} second(s)") attempts = 0 while not streams: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/tests/cli/console/test_stream_wrapper.py new/streamlink-8.6.3/tests/cli/console/test_stream_wrapper.py --- old/streamlink-8.6.2/tests/cli/console/test_stream_wrapper.py 2026-10-07 21:49:42.964973700 +0200 +++ new/streamlink-8.6.3/tests/cli/console/test_stream_wrapper.py 2026-10-29 19:57:52.370636700 +0100 @@ -12,7 +12,7 @@ def test_wrap_error(): - with pytest.raises(AttributeError): + with pytest.raises(TypeError): ConsoleOutputStream.wrap(sys, "version") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/tests/cli/main/test_handle_url.py new/streamlink-8.6.3/tests/cli/main/test_handle_url.py --- old/streamlink-8.6.2/tests/cli/main/test_handle_url.py 2026-10-07 21:49:42.965525200 +0200 +++ new/streamlink-8.6.3/tests/cli/main/test_handle_url.py 2026-10-29 19:57:52.370952100 +0100 @@ -380,7 +380,7 @@ ( "[cli][info] Found matching plugin plugin for URL plugin\n" + "[plugins.plugin][info] plugin log message\n" - + "[cli][info] Waiting for streams, retrying every 1 second(s)\n" + + "[cli][info] Waiting for streams, retrying every 1.0 second(s)\n" + "error: No playable streams found on this URL: plugin\n" ), id="no-streams", @@ -476,7 +476,7 @@ ( "[cli][info] Found matching plugin plugin for URL plugin\n" + "[plugins.plugin][info] plugin log message\n" - + "[cli][info] Waiting for streams, retrying every 1 second(s)\n" + + "[cli][info] Waiting for streams, retrying every 1.0 second(s)\n" + "error: fatal\n" ), id="fatal-plugin-error-on-second-attempt", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/tests/cli/test_argparser.py new/streamlink-8.6.3/tests/cli/test_argparser.py --- old/streamlink-8.6.2/tests/cli/test_argparser.py 2026-10-07 21:49:42.966404000 +0200 +++ new/streamlink-8.6.3/tests/cli/test_argparser.py 2026-10-29 19:57:52.371696700 +0100 @@ -151,8 +151,10 @@ monkeypatch.setattr("argparse._", null_translations.gettext) monkeypatch.setattr("argparse.ngettext", null_translations.ngettext) - @pytest.fixture(scope="module") - def parser(self): + # noinspection nested-decorators + @pytest.fixture(scope="class") + @classmethod + def parser(cls): parser = ArgumentParser(exit_on_error=False) parser.add_argument("-a", "--one", dest="arg") parser.add_argument("-b", "--two", nargs=2) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/tests/mixins/stream_hls.py new/streamlink-8.6.3/tests/mixins/stream_hls.py --- old/streamlink-8.6.2/tests/mixins/stream_hls.py 2026-10-07 21:49:42.967188400 +0200 +++ new/streamlink-8.6.3/tests/mixins/stream_hls.py 2026-10-29 19:57:52.372346200 +0100 @@ -4,6 +4,7 @@ from binascii import hexlify from functools import partial from threading import Event, Thread +from types import SimpleNamespace from typing import TYPE_CHECKING from unittest.mock import patch @@ -206,7 +207,7 @@ super().__init__(*args, **kwargs) # FIXME: fix HTTPSession.request() # don't sleep on mocked HTTP request failures - self._patch_http_retry_sleep = patch("streamlink.session.http.time.sleep") + self._patch_http_retry_sleep = patch("streamlink.session.http.time", SimpleNamespace(sleep=lambda _: None)) self.mocker = requests_mock.Mocker() self.mocks = {} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/tests/session/test_http.py new/streamlink-8.6.3/tests/session/test_http.py --- old/streamlink-8.6.2/tests/session/test_http.py 2026-10-07 21:49:42.974742000 +0200 +++ new/streamlink-8.6.3/tests/session/test_http.py 2026-10-29 19:57:52.377873700 +0100 @@ -6,6 +6,7 @@ from operator import itemgetter from socket import AF_INET, AF_INET6 from ssl import SSLContext +from types import SimpleNamespace from typing import TYPE_CHECKING, Any from unittest.mock import Mock, PropertyMock, call @@ -169,7 +170,7 @@ res = method("http://localhost") assert isinstance(res, requests.Response) assert res.text == "OK" - assert mocked.called_once + assert mocked.call_count == 1 @pytest.mark.parametrize( ("params", "expected"), @@ -220,7 +221,7 @@ def test_read_timeout(self, monkeypatch: pytest.MonkeyPatch): mock_sleep = Mock() mock_request = Mock(side_effect=requests.Timeout) - monkeypatch.setattr("streamlink.session.http.time.sleep", mock_sleep) + monkeypatch.setattr("streamlink.session.http.time", SimpleNamespace(sleep=mock_sleep)) monkeypatch.setattr("streamlink.session.http.Session.request", mock_request) session = HTTPSession() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/tests/stream/hls/test_hls.py new/streamlink-8.6.3/tests/stream/hls/test_hls.py --- old/streamlink-8.6.2/tests/stream/hls/test_hls.py 2026-10-07 21:49:42.975564500 +0200 +++ new/streamlink-8.6.3/tests/stream/hls/test_hls.py 2026-10-29 19:57:52.378562000 +0100 @@ -7,7 +7,6 @@ import unittest from contextlib import nullcontext from datetime import datetime, timedelta, timezone -from threading import Event from typing import TYPE_CHECKING, NamedTuple from unittest.mock import Mock, patch @@ -608,14 +607,13 @@ self.await_playlist_wait(1) self.await_reload(1) - # FIXME: NO-GIL - # Closing only the worker thread when no new segments were queued keeps the writer thread and buffer still open, - # which is why the test's reader thread keeps running until the test teardown, - # but this somehow breaks the assertion down below, so close everything manually... - # These tests will have to be rewritten eventually in pytest-style, without having to mock log calls. - self.close() - self.await_close() + # wait for writer and worker threads to terminate first + self.thread.reader.writer.join(1) + self.thread.reader.worker.join(1) + assert not self.thread.reader.writer.is_alive() + assert not self.thread.reader.worker.is_alive() + # then make an assertion about the log record from the check_queue_deadline() call which terminated the worker assert [(record.name, record.levelname, record.getMessage()) for record in self.caplog.records] == [ ("streamlink.stream.segmented", "warning", "No new segments for more than 5.00s. Stopping..."), ] @@ -1602,115 +1600,139 @@ HLSStream.parse_variant_playlist(session, multivariant) -@patch("streamlink.stream.hls.hls.HLSStreamWorker.wait", Mock(return_value=True)) -class TestHlsReloadTime(TestMixinStreamHLS, unittest.TestCase): - segments = [ - Segment(0, duration=11), - Segment(1, duration=7), - Segment(2, duration=5), - Segment(3, duration=3), - ] - - def get_session(self, options=None, *args, **kwargs): - return super().get_session( - dict( - options or {}, - **{ - "hls-live-edge": 3, - "hls-playlist-reload-time": kwargs.pop("reload_time", None), - }, - ), - ) - - def subject(self, *args, **kwargs): - kwargs["start"] = False - super().subject(*args, **kwargs) - - # mock the worker thread's _playlist_reload_time method, so that the main thread can wait on its call - get_reload_time_called = Event() - orig_get_reload_time = self.thread.reader.worker._get_reload_time - - def mocked_get_reload_time(*args2, **kwargs2): - get_reload_time_called.set() - return orig_get_reload_time(*args2, **kwargs2) - - # immediately kill the writer thread as we don't need it and don't want to wait for its queue polling to end - def mocked_queue_get(): - return None - - with ( - patch.object(self.thread.reader.worker, "_get_reload_time", side_effect=mocked_get_reload_time), - patch.object(self.thread.reader.writer, "_queue_get", side_effect=mocked_queue_get), - ): - self.start() - - if not get_reload_time_called.wait(timeout=5): # pragma: no cover - raise RuntimeError("Missing _get_reload_time() call") - - # close threads first, so that deterministic assertions can be done about the reload time - self.close() - self.await_close() +class TestHlsReloadTime: + @pytest.fixture() + def playlist(self, request: pytest.FixtureRequest): + param = getattr(request, "param", {}) + playlist = M3U8[HLSSegment, HLSPlaylist]() + playlist.targetduration = param.get("targetduration") + playlist.segments = [ + HLSSegment(uri="", num=idx, init=False, duration=duration, title="", key=None, byterange=None, date=None, map=None) + for idx, duration in enumerate(param.get("segments", [11, 7, 5, 3])) + ] - return self.thread.reader.worker._reload_time + return playlist - def test_default(self): - time = self.subject([Playlist(0, self.segments, end=True, targetduration=4)], reload_time="default") - assert time == 4, "default sets the reload time to the playlist's target duration" - - def test_segment(self): - time = self.subject([Playlist(0, self.segments, end=True, targetduration=4)], reload_time="segment") - assert time == 3, "segment sets the reload time to the playlist's last segment" - - def test_segment_no_segments(self): - time = self.subject([Playlist(0, [], end=True, targetduration=4)], reload_time="segment") - assert time == 4, "segment sets the reload time to the targetduration if no segments are available" - - def test_segment_no_segments_no_targetduration(self): - time = self.subject([Playlist(0, [], end=True, targetduration=0)], reload_time="segment") - assert time == 6, "sets reload time to 6 seconds when no segments and no targetduration are available" - - def test_live_edge(self): - time = self.subject([Playlist(0, self.segments, end=True, targetduration=4)], reload_time="live-edge") - assert time == 8, "live-edge sets the reload time to the sum of the number of segments of the live-edge" - - def test_live_edge_no_segments(self): - time = self.subject([Playlist(0, [], end=True, targetduration=4)], reload_time="live-edge") - assert time == 4, "live-edge sets the reload time to the targetduration if no segments are available" - - def test_live_edge_no_segments_no_targetduration(self): - time = self.subject([Playlist(0, [], end=True, targetduration=0)], reload_time="live-edge") - assert time == 6, "sets reload time to 6 seconds when no segments and no targetduration are available" - - def test_number_int(self): - time = self.subject([Playlist(0, self.segments, end=True, targetduration=4)], reload_time="2") - assert time == 2, "number values override the reload time" - - def test_number_float(self): - time = self.subject([Playlist(0, self.segments, end=True, targetduration=4)], reload_time="2.5") - assert time == pytest.approx(2.5), "number values override the reload time" - - def test_number_invalid(self): - time = self.subject([Playlist(0, self.segments, end=True, targetduration=4)], reload_time="0") - assert time == 4, "invalid number values set the reload time to the playlist's targetduration" - - def test_number_error(self): - time = self.subject([Playlist(0, self.segments, end=True, targetduration=4)], reload_time="foo") - assert time == 4, "invalid number values set the reload time to the playlist's targetduration" - assert [(record.name, record.levelname, record.getMessage()) for record in self.caplog.records] == [ - ( - "streamlink.stream.hls", - "error", - "Failed parsing hls-playlist-reload-time value: could not convert string to float: 'foo'", + @pytest.mark.parametrize( + ("reload_time", "playlist", "expected", "logs"), + [ + pytest.param( + "default", + {"targetduration": 4.0}, + 4.0, # sets the reload time to the playlist's target duration + [], + id="default", ), - ] - - def test_no_target_duration(self): - time = self.subject([Playlist(0, self.segments, end=True, targetduration=0)], reload_time="default") - assert time == 8, "uses the live-edge sum if the playlist is missing the targetduration data" - - def test_no_data(self): - time = self.subject([Playlist(0, [], end=True, targetduration=0)], reload_time="default") - assert time == 6, "sets reload time to 6 seconds when no data is available" + pytest.param( + "segment", + {"targetduration": 4.0}, + 3.0, # sets the reload time to the playlist's last segment + [], + id="segment", + ), + pytest.param( + "segment", + {"targetduration": 4.0, "segments": []}, + 4.0, # sets the reload time to the targetduration if no segments are available + [], + id="segment-no-segments", + ), + pytest.param( + "segment", + {"targetduration": 0.0, "segments": []}, + 6.0, # sets reload time to 6 seconds if no segments and no targetduration are available + [], + id="segment-no-segments-no-targetduration", + ), + pytest.param( + "live-edge", + {"targetduration": 4.0}, + 8.0, # sets the reload time to the sum of the number of segments of the live-edge + [], + id="live-edge", + ), + pytest.param( + "live-edge", + {"targetduration": 4.0, "segments": []}, + 4.0, # sets the reload time to the targetduration if no segments are available + [], + id="live-edge-no-segments", + ), + pytest.param( + "live-edge", + {"targetduration": 0.0, "segments": []}, + 6.0, # sets reload time to 6 seconds when no segments and no targetduration are available + [], + id="live-edge-no-segments-no-targetduration", + ), + pytest.param( + "2", + {"targetduration": 4.0}, + 2.0, # number values override the reload time + [], + id="number-int", + ), + pytest.param( + "2.5", + {"targetduration": 4.0}, + 2.5, # number values override the reload time + [], + id="number-float", + ), + pytest.param( + "0", + {"targetduration": 4.0}, + 4.0, # invalid number values set the reload time to the playlist's targetduration + [], + id="number-invalid", + ), + pytest.param( + "foo", + {"targetduration": 4.0}, + 4.0, # invalid number values set the reload time to the playlist's targetduration + [ + ( + "streamlink.stream.hls", + "error", + "Failed parsing hls-playlist-reload-time value: could not convert string to float: 'foo'", + ), + ], + id="number-error", + ), + pytest.param( + "default", + {"targetduration": 0.0}, + 8.0, # uses the live-edge sum if the playlist is missing the targetduration data + [], + id="no-targetduration", + ), + pytest.param( + "default", + {"targetduration": 0.0, "segments": []}, + 6.0, # sets reload time to 6 seconds when no data is available + [], + id="no-data", + ), + ], + indirect=["playlist"], + ) + def test_reload_time( + self, + caplog: pytest.LogCaptureFixture, + session: Streamlink, + reload_time: str | float, + playlist: M3U8, + expected: float, + logs: list[tuple], + ): + session.options.update({ + "hls-live-edge": 3, + "hls-playlist-reload-time": reload_time, + }) + stream = HLSStream(session, "") + reader = HLSStreamReader(stream) + assert reader.worker._get_reload_time(playlist) == expected + assert [(record.name, record.levelname, record.getMessage()) for record in caplog.records] == logs @patch("streamlink.stream.hls.hls.HLSStreamWorker.wait", Mock(return_value=True)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/streamlink-8.6.2/tests/webbrowser/test_chromium.py new/streamlink-8.6.3/tests/webbrowser/test_chromium.py --- old/streamlink-8.6.2/tests/webbrowser/test_chromium.py 2026-10-07 21:49:42.978525200 +0200 +++ new/streamlink-8.6.3/tests/webbrowser/test_chromium.py 2026-10-29 19:57:52.380822700 +0100 @@ -3,6 +3,7 @@ from contextlib import nullcontext from pathlib import Path, PurePosixPath, PureWindowsPath from signal import SIGTERM +from types import SimpleNamespace from typing import TYPE_CHECKING, Any import pytest @@ -201,7 +202,7 @@ num: int, raises: nullcontext, ): - monkeypatch.setattr("time.sleep", lambda _: None) + monkeypatch.setattr("streamlink.session.http.time", SimpleNamespace(sleep=lambda _: None)) hostaddr = f"[{host}]" if ":" in host else host payload = {
