public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python-eyed3] rawhide: Fix Python 3.15 compatibility: strptime no longer allows %d without %Y
Date: Sat, 30 May 2026 13:30:00 GMT	[thread overview]
Message-ID: <178014780018.1.11767525921617187929.rpms-python-eyed3-5eeed201f391@fedoraproject.org> (raw)

            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

                 reply	other threads:[~2026-05-30 13:30 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=178014780018.1.11767525921617187929.rpms-python-eyed3-5eeed201f391@fedoraproject.org \
    --to=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