Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package texlive-specs-h for openSUSE:Factory 
checked in at 2021-07-16 22:12:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/texlive-specs-h (Old)
 and      /work/SRC/openSUSE:Factory/.texlive-specs-h.new.2632 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "texlive-specs-h"

Fri Jul 16 22:12:22 2021 rev:43 rq:905084 version:unknown

Changes:
--------
--- /work/SRC/openSUSE:Factory/texlive-specs-h/texlive-specs-h.changes  
2021-07-06 23:30:47.140357626 +0200
+++ 
/work/SRC/openSUSE:Factory/.texlive-specs-h.new.2632/texlive-specs-h.changes    
    2021-07-16 22:12:24.214973764 +0200
@@ -1,0 +2,10 @@
+Thu Jul  8 07:36:39 UTC 2021 - Dr. Werner Fink <[email protected]>
+
+- Add the patches to convert python2 helper scripts to python3
+  * ejpecp_p2top3.dif
+  * enctex_p2top3.dif
+  * latexdiff_p2top3.dif
+  * newcommand_p2top3.dif
+  * punknova_p2top3.dif
+
+-------------------------------------------------------------------

New:
----
  ejpecp_p2top3.dif
  enctex_p2top3.dif

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ texlive-specs-h.spec ++++++
++++ 1669 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/texlive-specs-h/texlive-specs-h.spec
++++ and 
/work/SRC/openSUSE:Factory/.texlive-specs-h.new.2632/texlive-specs-h.spec

++++++ ejpecp_p2top3.dif ++++++
---
 doc/latex/ejpecp/getmref.py |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--- texmf-dist/doc/latex/ejpecp/getmref.py
+++ texmf-dist/doc/latex/ejpecp/getmref.py      2021-06-30 06:22:02.886573183 
+0000
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
 # -*- coding: utf-8 -*-
 
##################################################################################
 #
@@ -46,14 +46,14 @@
 #
 
##################################################################################
 
+from functools import reduce
 __version__ = "GetMRef, v2.4"
 
 import sys
 import os
 import re
 import string
-import urllib
-import urllib2
+import six.moves.urllib.request, six.moves.urllib.parse
 import ssl
 import shutil
 import logging
@@ -276,7 +276,7 @@ class FilesHandler(RefTypes):
             File is opened and file object is added to the dictionary
             for later access
         """
-        self.files.update({suffix: file(self.get_fname(suffix), mask)})
+        self.files.update({suffix: open(self.get_fname(suffix), mask)})
 
     def read(self, suffix):
         """ Get the content of a file with the required suffix
@@ -1005,13 +1005,13 @@ class QueryHandler(RefTypes):
         """
 
         queryinfo = {'qdata': querystring}
-        queryval = urllib.urlencode(queryinfo)
+        queryval = six.moves.urllib.parse.urlencode(queryinfo)
         try:
             flog.debug("SENDING query ...")
-            req = urllib2.Request(url=self.address, data=queryval)
+            req = six.moves.urllib.request.Request(url=self.address, 
data=queryval)
             flog.debug(">> Query POST data: %s" % req.get_data())
             context = ssl._create_unverified_context()
-            batchmref = urllib2.urlopen(req, context=context)
+            batchmref = six.moves.urllib.request.urlopen(req, context=context)
             self.qcode = batchmref.getcode()
             flog.debug(">> Query result code: %s" % self.qcode)
             self.qresult = batchmref.read()
++++++ enctex_p2top3.dif ++++++
---
 doc/generic/enctex/unimap.py |   25 +++++++------------------
 1 file changed, 7 insertions(+), 18 deletions(-)

--- texmf-dist/doc/generic/enctex/unimap.py
+++ texmf-dist/doc/generic/enctex/unimap.py     2021-06-30 04:30:00.079549875 
+0000
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 ###################################################################
 # unimap.py
 # Generates utf8raw.tex file containing math character definitions
@@ -47,17 +47,6 @@ from time import asctime, gmtime
 database = 'unimap.txt'    # Input file
 output = 'utf8raw.tex'   # Output file
 
-# Compatibility with Pyhton-2.1
-if not __builtins__.__dict__.has_key('True'):
-    True = 1; False = 0
-if not __builtins__.__dict__.has_key('file'):
-    file = open
-if not __builtins__.__dict__.has_key('dict'):
-    def dict(l):
-        d = {}
-        for x in l: d[x[0]] = x[1]
-        return d
-
 charline_re = re.compile(r'^[0-9A-F]{4,}\t')
 comsect_re = re.compile(r'^@+\t')
 line_template = '\\mubyte %s %s\\endmubyte %% U+%04X %s\n'
@@ -91,12 +80,12 @@ def linetype(line):
         return LineType.Character, (int(line[:m.end()], 16),
                                     line[m.end():].strip().lower())
     if not line.startswith('\t'):
-        raise ValueError, 'Queer line doesn\'t start with @ or Tab'
+        raise ValueError('Queer line doesn\'t start with @ or Tab')
     line = line.strip()
     if not line:
         return LineType.Empty, None
-    if not LineType.map.has_key(line[0]):
-        raise ValueError, 'Queer character info line (marker %s)' % line[0]
+    if line[0] not in LineType.map:
+        raise ValueError('Queer character info line (marker %s)' % line[0])
     return line[0], line[1:].strip()
 
 def utf8chars(u):
@@ -112,7 +101,7 @@ def utf8chars(u):
                                    0x80 | (0x3f & (u >> 6)),
                                    0x80 | (0x3f & u))
 
-fh = file(database, 'r')
+fh = open(database, 'r')
 # skip some initial noise
 while True:
     line = fh.readline()
@@ -123,7 +112,7 @@ while True:
     if typ == LineType.Section:
         break
 
-fw = file(output, 'w')
+fw = open(output, 'w')
 fw.write('%% Generated from %s %s\n' % (database, asctime(gmtime())))
 while typ:
     if typ == LineType.Section:
@@ -132,7 +121,7 @@ while typ:
         char = val
     elif typ == LineType.TeX:
         if not val.startswith('\\'):
-            raise ValueError, '%s is not a control seq (U%X)' % (val, char[0])
+            raise ValueError('%s is not a control seq (U%X)' % (val, char[0]))
         if sect:
             fw.write('\n%% %s\n' % sect)
             sect = None

Reply via email to