pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/textproc/itstool



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Tue Jan  2 06:17:15 UTC 2024

Modified Files:
        pkgsrc/textproc/itstool: Makefile distinfo
Added Files:
        pkgsrc/textproc/itstool/patches: patch-itstool.in

Log Message:
itstool: Fix runtime warnings with Python 3.12


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 pkgsrc/textproc/itstool/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/textproc/itstool/distinfo
cvs rdiff -u -r0 -r1.3 pkgsrc/textproc/itstool/patches/patch-itstool.in

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/textproc/itstool/Makefile
diff -u pkgsrc/textproc/itstool/Makefile:1.25 pkgsrc/textproc/itstool/Makefile:1.26
--- pkgsrc/textproc/itstool/Makefile:1.25       Mon Dec 18 22:49:15 2023
+++ pkgsrc/textproc/itstool/Makefile    Tue Jan  2 06:17:15 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.25 2023/12/18 22:49:15 thor Exp $
+# $NetBSD: Makefile,v 1.26 2024/01/02 06:17:15 ryoon Exp $
 
 DISTNAME=      itstool-2.0.7
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    textproc
 MASTER_SITES=  http://files.itstool.org/itstool/
 EXTRACT_SUFX=  .tar.bz2

Index: pkgsrc/textproc/itstool/distinfo
diff -u pkgsrc/textproc/itstool/distinfo:1.13 pkgsrc/textproc/itstool/distinfo:1.14
--- pkgsrc/textproc/itstool/distinfo:1.13       Tue Oct 26 11:22:12 2021
+++ pkgsrc/textproc/itstool/distinfo    Tue Jan  2 06:17:15 2024
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.13 2021/10/26 11:22:12 nia Exp $
+$NetBSD: distinfo,v 1.14 2024/01/02 06:17:15 ryoon Exp $
 
 BLAKE2s (itstool-2.0.7.tar.bz2) = ffdceacf15e35d1b806d0bfb0b1145c9c84203ae60f0ec05a97f221fcc6aefa7
 SHA512 (itstool-2.0.7.tar.bz2) = 710c188e518a7eccbf9d31df59692fd6acc79430589a93ef4333f33f74440c311c340614ca74cc43191830567a98024d0981325ccd83a8fd9b75410d9dd91992
 Size (itstool-2.0.7.tar.bz2) = 104648 bytes
+SHA1 (patch-itstool.in) = 08c015abf47ed42c61b42a703526d615f1f85608

Added files:

Index: pkgsrc/textproc/itstool/patches/patch-itstool.in
diff -u /dev/null pkgsrc/textproc/itstool/patches/patch-itstool.in:1.3
--- /dev/null   Tue Jan  2 06:17:15 2024
+++ pkgsrc/textproc/itstool/patches/patch-itstool.in    Tue Jan  2 06:17:15 2024
@@ -0,0 +1,64 @@
+$NetBSD: patch-itstool.in,v 1.3 2024/01/02 06:17:15 ryoon Exp $
+
+* Fix runtime warning with Python 3.12
+  From: https://github.com/itstool/itstool/pull/51/commits/32c7d07664dc37765100285d1202d488cd6a27e8
+
+--- itstool.in.orig    2021-05-25 15:43:33.000000000 +0000
++++ itstool.in
+@@ -220,7 +220,7 @@ class Message (object):
+         if not isinstance(text, ustr_type):
+             text = ustr(text, 'utf-8')
+         self._message[-1] += text.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
+-        if re.sub('\s+', ' ', text).strip() != '':
++        if re.sub(r'\s+', ' ', text).strip() != '':
+             self._empty = False
+ 
+     def add_entity_ref (self, name):
+@@ -318,7 +318,7 @@ class Message (object):
+                 message += '<_:%s-%i/>' % (msg.name, placeholder)
+                 placeholder += 1
+         if not self._preserve:
+-            message = re.sub('\s+', ' ', message).strip()
++            message = re.sub(r'\s+', ' ', message).strip()
+         return message
+ 
+     def get_preserve_space (self):
+@@ -456,9 +456,9 @@ class LocNote (object):
+             if self._preserve_space:
+                 return self.locnote
+             else:
+-                return re.sub('\s+', ' ', self.locnote).strip()
++                return re.sub(r'\s+', ' ', self.locnote).strip()
+         elif self.locnoteref is not None:
+-            return '(itstool) link: ' + re.sub('\s+', ' ', self.locnoteref).strip()
++            return '(itstool) link: ' + re.sub(r'\s+', ' ', self.locnoteref).strip()
+         return ''
+ 
+ 
+@@ -889,7 +889,7 @@ class Document (object):
+         trans = translations.ugettext('_\x04translator-credits')
+         if trans is None or trans == 'translator-credits':
+             return
+-        regex = re.compile('(.*) \<(.*)\>, (.*)')
++        regex = re.compile(r'(.*) \<(.*)\>, (.*)')
+         for credit in trans.split('\n'):
+             match = regex.match(credit)
+             if not match:
+@@ -924,7 +924,7 @@ class Document (object):
+             prevnode = None
+             if node.prev is not None and node.prev.type == 'text':
+                 prevtext = node.prev.content
+-                if re.sub('\s+', '', prevtext) == '':
++                if re.sub(r'\s+', '', prevtext) == '':
+                     prevnode = node.prev
+             for lang in sorted(list(translations.keys()), reverse=True):
+                 locale = self.get_its_locale_filter(node)
+@@ -1468,7 +1468,7 @@ def match_locale(extrange, locale):
+         localei += 1
+     return True
+ 
+-_locale_pattern = re.compile('([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\.[A-Za-z0-9]+)?')
++_locale_pattern = re.compile(r'([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\.[A-Za-z0-9]+)?')
+ def convert_locale (locale):
+     # Automatically convert POSIX-style locales to BCP47
+     match = _locale_pattern.match(locale)



Home | Main Index | Thread Index | Old Index