public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/libsigrokdecode] rawhide: - fix Python warnings (rhbz#2530006)
Date: Tue, 08 Sep 2026 18:58:24 GMT	[thread overview]
Message-ID: <178889390441.1.8257327307000629345.rpms-libsigrokdecode-e33de8d31791@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/libsigrokdecode
Branch : rawhide
Commit : e33de8d317915e9834bab1a204e162148ee0c1df
Author : Dan Horák <dan@danny.cz>
Date   : 2026-09-08T20:56:43+02:00
Stats  : +80/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/libsigrokdecode/c/e33de8d317915e9834bab1a204e162148ee0c1df?branch=rawhide

Log:
- fix Python warnings (rhbz#2530006)

---
diff --git a/0001-Fix-escape-sequences-treated-as-unicode-laterals.patch b/0001-Fix-escape-sequences-treated-as-unicode-laterals.patch
new file mode 100644
index 0000000..50fc297
--- /dev/null
+++ b/0001-Fix-escape-sequences-treated-as-unicode-laterals.patch
@@ -0,0 +1,72 @@
+From d3a6effb4c7927370389f68edcab32cd2dcc3806 Mon Sep 17 00:00:00 2001
+From: Soeren Apel <soeren@apelpie.net>
+Date: Tue, 1 Oct 2024 17:24:42 +0200
+Subject: [PATCH] Fix escape sequences treated as unicode laterals
+
+Since Python 3.6, unrecognized escape sequences produce a DeprecationWarning.
+Since Python 3.12, unrecognized escape sequences produce a SyntaxWarning.
+In a future Python version they will be eventually a SyntaxError.
+
+https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals
+
+Fix these by using raw string literals.
+
+(cherry picked from commit 03dc5f85050301d31aa0803e85bdda1374109b49)
+---
+ decoders/arm_etmv3/pd.py | 8 ++++----
+ decoders/arm_itm/pd.py   | 6 +++---
+ decoders/ds1307/pd.py    | 2 +-
+ 3 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/decoders/arm_etmv3/pd.py b/decoders/arm_etmv3/pd.py
+index 6649b46..f1070af 100644
+--- a/decoders/arm_etmv3/pd.py
++++ b/decoders/arm_etmv3/pd.py
+@@ -212,10 +212,10 @@ def load_objdump(self):
+ 
+         disasm = disasm.decode('utf-8', 'replace')
+ 
+-        instpat = re.compile('\s*([0-9a-fA-F]+):\t+([0-9a-fA-F ]+)\t+([a-zA-Z][^;]+)\s*;?.*')
+-        branchpat = re.compile('(b|bl|b..|bl..|cbnz|cbz)(?:\.[wn])?\s+(?:r[0-9]+,\s*)?([0-9a-fA-F]+)')
+-        filepat = re.compile('[^\s]+[/\\\\]([a-zA-Z0-9._-]+:[0-9]+)(?:\s.*)?')
+-        funcpat = re.compile('[0-9a-fA-F]+\s*<([^>]+)>:.*')
++        instpat = re.compile(r'\s*([0-9a-fA-F]+):\t+([0-9a-fA-F ]+)\t+([a-zA-Z][^;]+)\s*;?.*')
++        branchpat = re.compile(r'(b|bl|b..|bl..|cbnz|cbz)(?:\.[wn])?\s+(?:r[0-9]+,\s*)?([0-9a-fA-F]+)')
++        filepat = re.compile(r'[^\s]+[/\\\\]([a-zA-Z0-9._-]+:[0-9]+)(?:\s.*)?')
++        funcpat = re.compile(r'[0-9a-fA-F]+\s*<([^>]+)>:.*')
+ 
+         prev_src = ''
+         prev_file = ''
+diff --git a/decoders/arm_itm/pd.py b/decoders/arm_itm/pd.py
+index 6414978..41e3013 100644
+--- a/decoders/arm_itm/pd.py
++++ b/decoders/arm_itm/pd.py
+@@ -113,9 +113,9 @@ def load_objdump(self):
+ 
+         disasm = disasm.decode('utf-8', 'replace')
+ 
+-        instpat = re.compile('\s*([0-9a-fA-F]+):\t+([0-9a-fA-F ]+)\t+([a-zA-Z][^;]+)\s*;?.*')
+-        filepat = re.compile('[^\s]+[/\\\\]([a-zA-Z0-9._-]+:[0-9]+)(?:\s.*)?')
+-        funcpat = re.compile('[0-9a-fA-F]+\s*<([^>]+)>:.*')
++        instpat = re.compile(r'\s*([0-9a-fA-F]+):\t+([0-9a-fA-F ]+)\t+([a-zA-Z][^;]+)\s*;?.*')
++        filepat = re.compile(r'[^\s]+[/\\\\]([a-zA-Z0-9._-]+:[0-9]+)(?:\s.*)?')
++        funcpat = re.compile(r'[0-9a-fA-F]+\s*<([^>]+)>:.*')
+ 
+         prev_file = ''
+         prev_func = ''
+diff --git a/decoders/ds1307/pd.py b/decoders/ds1307/pd.py
+index f8ebe19..53f602b 100644
+--- a/decoders/ds1307/pd.py
++++ b/decoders/ds1307/pd.py
+@@ -48,7 +48,7 @@
+ 
+ def regs_and_bits():
+     l = [('reg-' + r.lower(), r + ' register') for r in regs]
+-    l += [('bit-' + re.sub('\/| ', '-', b).lower(), b + ' bit') for b in bits]
++    l += [('bit-' + re.sub(r'\/| ', '-', b).lower(), b + ' bit') for b in bits]
+     return tuple(l)
+ 
+ class Decoder(srd.Decoder):
+-- 
+2.55.0
+

diff --git a/libsigrokdecode.spec b/libsigrokdecode.spec
index 528539d..7a6dfe4 100644
--- a/libsigrokdecode.spec
+++ b/libsigrokdecode.spec
@@ -1,6 +1,6 @@
 Name:           libsigrokdecode
 Version:        0.5.3
-Release:        31%{?dist}
+Release:        32%{?dist}
 Summary:        Basic API for running protocol decoders
 # Combined GPLv3+ and GPLv2+
 # Automatically converted from old format: GPLv3+ - review is highly recommended.
@@ -11,8 +11,11 @@ Source0:        %{url}/download/source/%{name}/%{name}-%{version}.tar.gz
 # https://github.com/sigrokproject/libsigrokdecode/commit/c4c10b89396fe21a622b8c38dd5815a496b007bf
 # https://github.com/sigrokproject/libsigrokdecode/commit/a6a5e2c8b0e9ecf5d69d0c237c8e8b717b82b36f
 Patch0:         %{name}-0.5.3-python3.patch
-# Upstream commit 0c35c5c5845d05e5f624c99d58af992d2f004446
+# https://github.com/sigrokproject/libsigrokdecode/commit/0c35c5c5845d05e5f624c99d58af992d2f004446
 Patch1:         0001-srd-drop-deprecated-PyEval_InitThreads-on-Python-3.9.patch
+# https://github.com/sigrokproject/libsigrokdecode/commit/03dc5f85050301d31aa0803e85bdda1374109b49 (backported)
+Patch2:         0001-Fix-escape-sequences-treated-as-unicode-laterals.patch
+
 
 BuildRequires:  gcc
 BuildRequires:  glib2-devel
@@ -67,6 +70,9 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
 
 
 %changelog
+* Tue Sep 08 2026 Dan Horák <dan[at]danny.cz> - 0.5.3-32
+- fix Python warnings (rhbz#2530006)
+
 * Wed Jul 22 2026 Python Maint <python-maint@redhat.com> - 0.5.3-31
 - Rebuilt for Python 3.15.0b4 ABI change
 

                 reply	other threads:[~2026-09-08 18:58 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=178889390441.1.8257327307000629345.rpms-libsigrokdecode-e33de8d31791@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