Hello community,

here is the log from the commit of package python-reportlab for 
openSUSE:Factory checked in at 2019-10-22 15:41:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-reportlab (Old)
 and      /work/SRC/openSUSE:Factory/.python-reportlab.new.2352 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-reportlab"

Tue Oct 22 15:41:24 2019 rev:22 rq:741216 version:3.5.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-reportlab/python-reportlab.changes        
2019-07-28 10:19:10.088601549 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-reportlab.new.2352/python-reportlab.changes  
    2019-10-22 15:42:02.949484452 +0200
@@ -1,0 +2,6 @@
+Sat Oct 19 11:42:52 CEST 2019 - Matej Cepl <mc...@suse.com>
+
+- Add python38_build.patch to work around depreceated (and now
+  removed) function time.clock()
+
+-------------------------------------------------------------------

New:
----
  python38_build.patch

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

Other differences:
------------------
++++++ python-reportlab.spec ++++++
--- /var/tmp/diff_new_pack.WQ32LM/_old  2019-10-22 15:42:03.741485355 +0200
+++ /var/tmp/diff_new_pack.WQ32LM/_new  2019-10-22 15:42:03.745485359 +0200
@@ -28,6 +28,8 @@
 Source0:        
https://files.pythonhosted.org/packages/source/r/reportlab/reportlab-%{version}.tar.gz
 Source1:        encryption.gif
 Patch0:         reportlab-missing-includes.patch
+# https://bitbucket.org/rptlab/reportlab/pull-requests/60
+Patch1:         python38_build.patch
 BuildRequires:  %{python_module Pillow >= 4.0.0}
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
@@ -51,7 +53,7 @@
 
 %prep
 %setup -q -n reportlab-%{version}
-%patch0
+%autopatch -p1
 sed -i "1d" 
src/reportlab/lib/{formatters,fonts,corp,units,pagesizes,__init__,randomtext,logger,normalDate}.py
 sed -i "1d" 
src/reportlab/graphics/{widgets/table,barcode/test,testdrawings,testshapes}.py 
# Fix non-executable bits
 


++++++ python38_build.patch ++++++
--- a/src/reportlab/lib/fontfinder.py
+++ b/src/reportlab/lib/fontfinder.py
@@ -67,6 +67,11 @@ try:
 except ImportError:
     from md5 import md5
 
+try:
+    from time import clock
+except ImportError:
+    from time import process_time as clock
+
 EXTENSIONS = ['.ttf','.ttc','.otf','.pfb','.pfa']
 
 # PDF font flags (see PDF Reference Guide table 5.19)
@@ -229,7 +234,7 @@ class FontFinder:
         self.__dict__.update(finder2.__dict__)
 
     def search(self):
-        started = time.clock()
+        started = clock()
         if not self._dirs:
             raise ValueError("Font search path is empty!  Please specify 
search directories using addDirectory or addDirectories")
 
@@ -311,7 +316,7 @@ class FontFinder:
         if self.useCache:
             self.save(cfn)
 
-        finished = time.clock()
+        finished = clock()
 ##        print "found %d fonts; skipped %d; bad %d.  Took %0.2f seconds" % (
 ##            len(self._fonts), len(self._skippedFiles), len(self._badFiles),
 ##            finished - started
--- a/src/reportlab/pdfbase/cidfonts.py
+++ b/src/reportlab/pdfbase/cidfonts.py
@@ -16,6 +16,11 @@ try:
 except ImportError:
     from md5 import md5
 
+try:
+    from time import clock
+except ImportError:
+    from time import process_time as clock
+
 import reportlab
 from reportlab.pdfbase import pdfmetrics
 from reportlab.pdfbase._cidfontdata import allowedTypeFaces, allowedEncodings, 
CIDFontInfo, \
@@ -97,7 +102,7 @@ class CIDEncoding(pdfmetrics.Encoding):
         """This is a tricky one as CMAP files are Postscript
         ones.  Some refer to others with a 'usecmap'
         command"""
-        #started = time.clock()
+        #started = clock()
         cmapfile = findCMapFile(name)
         # this will CRAWL with the unicode encodings...
         rawdata = open(cmapfile, 'r').read()
@@ -155,7 +160,7 @@ class CIDEncoding(pdfmetrics.Encoding):
 
             else:
                 words = words[1:]
-        #finished = time.clock()
+        #finished = clock()
         #print 'parsed CMAP %s in %0.4f seconds' % (self.name, finished - 
started)
 
     def translate(self, text):
@@ -204,14 +209,14 @@ class CIDEncoding(pdfmetrics.Encoding):
         f.close()
 
     def fastLoad(self, directory):
-        started = time.clock()
+        started = clock()
         f = open(os.path.join(directory, self.name + '.fastmap'), 'rb')
         self._mapFileHash = marshal.load(f)
         self._codeSpaceRanges = marshal.load(f)
         self._notDefRanges = marshal.load(f)
         self._cmap = marshal.load(f)
         f.close()
-        finished = time.clock()
+        finished = clock()
         #print 'loaded %s in %0.4f seconds' % (self.name, finished - started)
 
     def getData(self):
--- a/tests/test_multibyte_jpn.py
+++ b/tests/test_multibyte_jpn.py
@@ -19,6 +19,11 @@ from reportlab.pdfbase.cidfonts import C
 global VERBOSE
 VERBOSE = 0
 
+try:
+    from time import clock
+except ImportError:
+    from time import process_time as clock
+
 
 class JapaneseFontTests(unittest.TestCase):
 
@@ -343,7 +348,7 @@ class JapaneseFontTests(unittest.TestCas
 
         #try with Unicode truetype - Mincho for starters
 ##        import time
-##        started = time.clock()
+##        started = clock()
 ##        c.showPage()
 ##        c.setFont('Helvetica',16)
 ##        c.drawString(100,750, 'About to say Tokyo in MS Gothic...')
@@ -360,9 +365,9 @@
 ##
 ##
 ##        #tokyoUCS2 = '\x67\x71\x4E\xAC'
-##        finished = time.clock()
-        
-        
+##        finished = clock()
+
+
 
 
 
++++++ reportlab-missing-includes.patch ++++++
--- /var/tmp/diff_new_pack.WQ32LM/_old  2019-10-22 15:42:03.821485446 +0200
+++ /var/tmp/diff_new_pack.WQ32LM/_new  2019-10-22 15:42:03.821485446 +0200
@@ -1,7 +1,5 @@
-Index: src/rl_addons/renderPM/gt1/gt1-namecontext.c
-===================================================================
---- src/rl_addons/renderPM/gt1/gt1-namecontext.c.orig
-+++ src/rl_addons/renderPM/gt1/gt1-namecontext.c
+--- a/src/rl_addons/renderPM/gt1/gt1-namecontext.c
++++ b/src/rl_addons/renderPM/gt1/gt1-namecontext.c
 @@ -1,6 +1,10 @@
  /* A module for a simple "name context", i.e. lisp-style atoms */
  


Reply via email to