<pre style='margin:0'>
Renee Otten (reneeotten) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/2d9ef10c4a3d98f51d07acae604d5628e6a9c25f">https://github.com/macports/macports-ports/commit/2d9ef10c4a3d98f51d07acae604d5628e6a9c25f</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 2d9ef10c4a3 Itstool: fix invalid sequence for Python 3.12
</span>2d9ef10c4a3 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 2d9ef10c4a3d98f51d07acae604d5628e6a9c25f
</span>Author: christophecvr <stefansat@proximus.be>
AuthorDate: Sun Aug 11 18:58:52 2024 +0200
<span style='display:block; white-space:pre;color:#404040;'> Itstool: fix invalid sequence for Python 3.12
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/70527
</span>---
textproc/itstool/Portfile | 4 +-
.../itstool/files/invalid-sequence-pygte-312.patch | 118 +++++++++++++++++++++
2 files changed, 121 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/textproc/itstool/Portfile b/textproc/itstool/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 845a6670ead..2e6a11177fa 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/textproc/itstool/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/textproc/itstool/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,7 +5,7 @@ PortSystem 1.0
</span> name itstool
epoch 1
version 2.0.7
<span style='display:block; white-space:pre;background:#ffe0e0;'>-revision 2
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 3
</span> license GPL-3+
set branch [join [lrange [split ${version} .] 0 1] .]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -76,6 +76,8 @@ variant python312 conflicts python27 python38 python39 python310 python311 descr
</span> ${prefix}/bin/python3.12
depends_lib-append \
port:py312-libxml2
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ patchfiles-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ invalid-sequence-pygte-312.patch
</span> }
if {![variant_isset python27] && \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/textproc/itstool/files/invalid-sequence-pygte-312.patch b/textproc/itstool/files/invalid-sequence-pygte-312.patch
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..29dd586db5a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/textproc/itstool/files/invalid-sequence-pygte-312.patch
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,118 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- itstool.orig 2021-09-25 17:10:05.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ itstool 2024-08-11 11:07:26.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -220,7 +220,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if not isinstance(text, ustr_type):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ text = ustr(text, 'utf-8')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self._message[-1] += text.replace('&', '&').replace('<', '<').replace('>', '>')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if re.sub('\s+', ' ', text).strip() != '':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if re.sub('\\s+', ' ', text).strip() != '':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self._empty = False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def add_entity_ref (self, name):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -318,7 +318,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ message += '<_:%s-%i/>' % (msg.name, placeholder)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ placeholder += 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if not self._preserve:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- message = re.sub('\s+', ' ', message).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ message = re.sub('\\s+', ' ', message).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return message
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def get_preserve_space (self):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -456,9 +456,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if self._preserve_space:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return self.locnote
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return re.sub('\s+', ' ', self.locnote).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return re.sub('\\s+', ' ', self.locnote).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ elif self.locnoteref is not None:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return '(itstool) link: ' + re.sub('\s+', ' ', self.locnoteref).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return '(itstool) link: ' + re.sub('\\s+', ' ', self.locnoteref).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ''
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -889,7 +889,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ trans = translations.ugettext('_\x04translator-credits')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if trans is None or trans == 'translator-credits':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- regex = re.compile('(.*) \<(.*)\>, (.*)')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ regex = re.compile(r'(.*) \<(.*)\>, (.*)')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for credit in trans.split('\n'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ match = regex.match(credit)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if not match:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -924,7 +924,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ prevnode = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if node.prev is not None and node.prev.type == 'text':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ prevtext = node.prev.content
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if re.sub('\s+', '', prevtext) == '':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if re.sub('\\s+', '', prevtext) == '':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ prevnode = node.prev
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for lang in sorted(list(translations.keys()), reverse=True):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ locale = self.get_its_locale_filter(node)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1468,7 +1468,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ localei += 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-_locale_pattern = re.compile('([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\.[A-Za-z0-9]+)?')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++_locale_pattern = re.compile('([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\\.[A-Za-z0-9]+)?')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def convert_locale (locale):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Automatically convert POSIX-style locales to BCP47
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ match = _locale_pattern.match(locale)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- itstool.in.orig 2021-05-25 17:43:33.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ itstool.in 2024-08-11 11:06:01.000000000 +0200
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -220,7 +220,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if not isinstance(text, ustr_type):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ text = ustr(text, 'utf-8')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self._message[-1] += text.replace('&', '&').replace('<', '<').replace('>', '>')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if re.sub('\s+', ' ', text).strip() != '':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if re.sub('\\s+', ' ', text).strip() != '':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ self._empty = False
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def add_entity_ref (self, name):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -318,7 +318,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ message += '<_:%s-%i/>' % (msg.name, placeholder)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ placeholder += 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if not self._preserve:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- message = re.sub('\s+', ' ', message).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ message = re.sub('\\s+', ' ', message).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return message
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def get_preserve_space (self):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -456,9 +456,9 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if self._preserve_space:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return self.locnote
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ else:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return re.sub('\s+', ' ', self.locnote).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return re.sub('\\s+', ' ', self.locnote).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ elif self.locnoteref is not None:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- return '(itstool) link: ' + re.sub('\s+', ' ', self.locnoteref).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ return '(itstool) link: ' + re.sub('\\s+', ' ', self.locnoteref).strip()
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return ''
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -889,7 +889,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ trans = translations.ugettext('_\x04translator-credits')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if trans is None or trans == 'translator-credits':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- regex = re.compile('(.*) \<(.*)\>, (.*)')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ regex = re.compile(r'(.*) \<(.*)\>, (.*)')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for credit in trans.split('\n'):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ match = regex.match(credit)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if not match:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -924,7 +924,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ prevnode = None
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if node.prev is not None and node.prev.type == 'text':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ prevtext = node.prev.content
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- if re.sub('\s+', '', prevtext) == '':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ if re.sub('\\s+', '', prevtext) == '':
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ prevnode = node.prev
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for lang in sorted(list(translations.keys()), reverse=True):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ locale = self.get_its_locale_filter(node)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1468,7 +1468,7 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ localei += 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return True
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-_locale_pattern = re.compile('([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\.[A-Za-z0-9]+)?')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++_locale_pattern = re.compile('([a-zA-Z0-9-]+)(_[A-Za-z0-9]+)?(@[A-Za-z0-9]+)?(\\.[A-Za-z0-9]+)?')
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ def convert_locale (locale):
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Automatically convert POSIX-style locales to BCP47
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ match = _locale_pattern.match(locale)
</span></pre><pre style='margin:0'>
</pre>