public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/yt-dlp] f44: Add Python 3.15 support patches
@ 2026-06-19 2:40 Maxwell G
0 siblings, 0 replies; only message in thread
From: Maxwell G @ 2026-06-19 2:40 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/yt-dlp
Branch : f44
Commit : 5bb0cafe50ef7316dd7368a41dc896fa233badf9
Author : Maxwell G <maxwell@gtmx.me>
Date : 2026-06-05T16:52:53-05:00
Stats : +72/-0 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/yt-dlp/c/5bb0cafe50ef7316dd7368a41dc896fa233badf9?branch=f44
Log:
Add Python 3.15 support patches
---
diff --git a/16884.patch b/16884.patch
new file mode 100644
index 0000000..c280981
--- /dev/null
+++ b/16884.patch
@@ -0,0 +1,26 @@
+From 7673da16c5a554099b3fa0764397d8c4eac22a7f Mon Sep 17 00:00:00 2001
+From: Simon Sawicki <contact@grub4k.dev>
+Date: Fri, 5 Jun 2026 22:39:00 +0200
+Subject: [PATCH] Fix tests for python3.15
+
+---
+ yt_dlp/extractor/youtube/pot/_director.py | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/yt_dlp/extractor/youtube/pot/_director.py b/yt_dlp/extractor/youtube/pot/_director.py
+index 9e467c809255..a33d48a144e8 100644
+--- a/yt_dlp/extractor/youtube/pot/_director.py
++++ b/yt_dlp/extractor/youtube/pot/_director.py
+@@ -438,9 +438,11 @@ def clean_pot(po_token: str):
+ if not mobj:
+ raise ValueError('Invalid PO Token')
+
++ # compat: <=py3.14: padded was added in 3.15 and the default for urlsafe is false
++ data = mobj.group(1).translate(str.maketrans('-_', '+/'))
+ try:
+ return base64.urlsafe_b64encode(
+- base64.urlsafe_b64decode(mobj.group(1))).decode()
++ base64.b64decode(data)).decode()
+ except (binascii.Error, ValueError):
+ raise ValueError('Invalid PO Token')
+
diff --git a/9c1f3cf3373620c593c4e315f276ac134f6beb20.patch b/9c1f3cf3373620c593c4e315f276ac134f6beb20.patch
new file mode 100644
index 0000000..5a36f1a
--- /dev/null
+++ b/9c1f3cf3373620c593c4e315f276ac134f6beb20.patch
@@ -0,0 +1,40 @@
+From 9c1f3cf3373620c593c4e315f276ac134f6beb20 Mon Sep 17 00:00:00 2001
+From: Deltadroid <syphyr@gmail.com>
+Date: Sat, 11 Apr 2026 01:31:55 +0200
+Subject: [PATCH] [ie/youtube] Fix PO token sanitization for Python>=3.14.4
+ (#16453)
+
+Ref: https://github.com/python/cpython/issues/145264
+
+Authored by: syphyr
+---
+ yt_dlp/extractor/youtube/pot/_director.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/yt_dlp/extractor/youtube/pot/_director.py b/yt_dlp/extractor/youtube/pot/_director.py
+index 26e7a6ac1f1b..ae1edc46aeb8 100644
+--- a/yt_dlp/extractor/youtube/pot/_director.py
++++ b/yt_dlp/extractor/youtube/pot/_director.py
+@@ -6,6 +6,7 @@
+ import datetime as dt
+ import hashlib
+ import json
++import re
+ import traceback
+ import typing
+ import urllib.parse
+@@ -433,9 +434,13 @@ def provider_display_name(provider):
+ def clean_pot(po_token: str):
+ # Clean and validate the PO Token. This will strip invalid characters off
+ # (e.g. additional url params the user may accidentally include)
++ mobj = re.match(r'([^?&#]+)', urllib.parse.unquote(po_token))
++ if not mobj:
++ raise ValueError('Invalid PO Token')
++
+ try:
+ return base64.urlsafe_b64encode(
+- base64.urlsafe_b64decode(urllib.parse.unquote(po_token))).decode()
++ base64.urlsafe_b64decode(mobj.group(1))).decode()
+ except (binascii.Error, ValueError):
+ raise ValueError('Invalid PO Token')
+
diff --git a/yt-dlp.spec b/yt-dlp.spec
index 371281b..43f7bbf 100644
--- a/yt-dlp.spec
+++ b/yt-dlp.spec
@@ -15,6 +15,12 @@ License: Unlicense
URL: https://github.com/yt-dlp/yt-dlp
Source: %{url}/archive/%{version}/yt-dlp-%{version}.tar.gz
+# Python 3.15 support patches
+# [ie/youtube] Fix PO token sanitization for Python>=3.14.4 (#16453)
+Patch: https://github.com/yt-dlp/yt-dlp/commit/9c1f3cf3373620c593c4e315f276ac134f6beb20.patch
+# Fix tests for python3.15 (#16884)
+Patch: https://github.com/yt-dlp/yt-dlp/pull/16884.patch
+
BuildArch: noarch
BuildRequires: python3-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-19 2:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-19 2:40 [rpms/yt-dlp] f44: Add Python 3.15 support patches Maxwell G
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox