public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-eyed3] rawhide: Fix Python 3.15 compatibility: strptime no longer allows %d without %Y
@ 2026-05-30 13:30
0 siblings, 0 replies; only message in thread
From: @ 2026-05-30 13:30 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-eyed3
Branch : rawhide
Commit : 5eeed201f391f174e37935de8883f308339a7c03
Author : Tomáš Hrnčiar <thrnciar@redhat.com>
Date : 2026-05-25T11:56:36+02:00
Stats : +44/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-eyed3/c/5eeed201f391f174e37935de8883f308339a7c03?branch=rawhide
Log:
Fix Python 3.15 compatibility: strptime no longer allows %d without %Y
Backport upstream PR https://github.com/nicfit/eyeD3/pull/697.
Assisted-by: Cursor
---
diff --git a/697.patch b/697.patch
new file mode 100644
index 0000000..8973aa5
--- /dev/null
+++ b/697.patch
@@ -0,0 +1,40 @@
+From 7df9ee52c781b29dc8a12e571c858d783995ccd2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
+Date: Mon, 25 May 2026 11:50:28 +0200
+Subject: [PATCH] Fix Python 3.15 compatibility: strptime no longer allows %d
+ without %Y
+
+Python 3.15 removed support for using the %d (day of month) directive
+without a %Y (year) directive in time.strptime(), raising ValueError
+instead (https://github.com/python/cpython/issues/70647).
+
+The "D%d-%m" format in TIME_STAMP_FORMATS is used to parse day-month
+strings for ID3v2.3 TDAT frames. Work around the restriction by
+prepending a dummy year for the strptime call; the year value is never
+extracted because "%Y" is not in the original format string.
+
+Assisted-by: Cursor
+---
+ eyed3/core.py | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/eyed3/core.py b/eyed3/core.py
+index b51410d2..63cd50f8 100644
+--- a/eyed3/core.py
++++ b/eyed3/core.py
+@@ -372,7 +372,14 @@ def _validateFormat(s):
+ pdate, fmt = None, None
+ for fmt in Date.TIME_STAMP_FORMATS:
+ try:
+- pdate = time.strptime(s, fmt)
++ if "%d" in fmt and "%Y" not in fmt:
++ # Python 3.15+ no longer allows %d without %Y in strptime
++ # (see https://github.com/python/cpython/issues/70647).
++ # Prepend a dummy year to satisfy the requirement; the year
++ # value is never extracted because "%Y" is not in fmt.
++ pdate = time.strptime("2000" + s, "%Y" + fmt)
++ else:
++ pdate = time.strptime(s, fmt)
+ break
+ except ValueError:
+ # date string did not match format.
diff --git a/python-eyed3.spec b/python-eyed3.spec
index 10ed36c..37fefd3 100644
--- a/python-eyed3.spec
+++ b/python-eyed3.spec
@@ -7,6 +7,9 @@ Summary: Python audio data toolkit (ID3 and MP3)
License: GPL-3.0-or-later
URL: https://github.com/nicfit/eyeD3
Source0: https://github.com/nicfit/eyeD3/releases/download/v%{version}/%{srcname}-%{version}.tar.gz
+# Fix Python 3.15 compatibility: strptime no longer allows %%d without %%Y
+# https://github.com/python/cpython/issues/70647
+Patch: https://github.com/nicfit/eyeD3/pull/697.patch
BuildArch: noarch
BuildRequires: python3-devel
@@ -34,7 +37,7 @@ Requires: python3-six
%prep
-%autosetup -n %{srcname}-%{version}
+%autosetup -p1 -n %{srcname}-%{version}
%build
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-30 13:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-30 13:30 [rpms/python-eyed3] rawhide: Fix Python 3.15 compatibility: strptime no longer allows %d without %Y
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox