public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Maxwell G <maxwell@gtmx.me>
To: git-commits@fedoraproject.org
Subject: [rpms/yt-dlp] f44: Add Python 3.15 support patches
Date: Fri, 19 Jun 2026 02:40:01 GMT [thread overview]
Message-ID: <178183680117.1.2166068864810007259.rpms-yt-dlp-5bb0cafe50ef@fedoraproject.org> (raw)
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
reply other threads:[~2026-06-19 2:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=178183680117.1.2166068864810007259.rpms-yt-dlp-5bb0cafe50ef@fedoraproject.org \
--to=maxwell@gtmx.me \
--cc=git-commits@fedoraproject.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