pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/textproc/py-tablib py-tablib: Python 3 compatibility f...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ba50326930f8
branches:  trunk
changeset: 378089:ba50326930f8
user:      adam <adam%pkgsrc.org@localhost>
date:      Fri Mar 30 06:35:44 2018 +0000

description:
py-tablib: Python 3 compatibility fixes

diffstat:

 textproc/py-tablib/distinfo                                      |   3 +-
 textproc/py-tablib/patches/patch-tablib_packages_dbfpy_dbfnew.py |  36 ++++++++++
 2 files changed, 38 insertions(+), 1 deletions(-)

diffs (52 lines):

diff -r 1ef4036d6946 -r ba50326930f8 textproc/py-tablib/distinfo
--- a/textproc/py-tablib/distinfo       Fri Mar 30 01:15:42 2018 +0000
+++ b/textproc/py-tablib/distinfo       Fri Mar 30 06:35:44 2018 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.1 2017/09/04 19:46:26 adam Exp $
+$NetBSD: distinfo,v 1.2 2018/03/30 06:35:44 adam Exp $
 
 SHA1 (tablib-0.12.1.tar.gz) = d00fa84c5fd8d9d38c4ccc03dae6105342720b98
 RMD160 (tablib-0.12.1.tar.gz) = c81838594d30d82c6c912f57b409a56379892f82
 SHA512 (tablib-0.12.1.tar.gz) = 5207f59dab59f465584fc6c55d6322150f550c50f50a35d6901a39ed05a624a52dfdb5a9a9ddf0d6bc7285e5a3a4972c458895e4cc204a365c3df0d9ada0228a
 Size (tablib-0.12.1.tar.gz) = 63420 bytes
+SHA1 (patch-tablib_packages_dbfpy_dbfnew.py) = 688f06aea1f5ecf70f5a76e971cb193d65a424f9
diff -r 1ef4036d6946 -r ba50326930f8 textproc/py-tablib/patches/patch-tablib_packages_dbfpy_dbfnew.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/textproc/py-tablib/patches/patch-tablib_packages_dbfpy_dbfnew.py  Fri Mar 30 06:35:44 2018 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-tablib_packages_dbfpy_dbfnew.py,v 1.1 2018/03/30 06:35:44 adam Exp $
+
+Python 3 compatibility.
+
+--- tablib/packages/dbfpy/dbfnew.py.orig       2018-03-30 06:31:28.000000000 +0000
++++ tablib/packages/dbfpy/dbfnew.py
+@@ -160,9 +160,9 @@ if __name__ == '__main__':
+     dbfn.add_field("date", 'D', 8)
+     dbfn.write("tst.dbf")
+     # test new dbf
+-    print "*** created tst.dbf: ***"
++    print("*** created tst.dbf: ***")
+     dbft = Dbf('tst.dbf', readOnly=0)
+-    print repr(dbft)
++    print(repr(dbft))
+     # add a record
+     rec = DbfRecord(dbft)
+     rec['name'] = 'something'
+@@ -177,13 +177,13 @@ if __name__ == '__main__':
+     rec.store()
+ 
+     # show the records
+-    print "*** inserted 2 records into tst.dbf: ***"
+-    print repr(dbft)
++    print("*** inserted 2 records into tst.dbf: ***")
++    print(repr(dbft))
+     for i1 in range(len(dbft)):
+         rec = dbft[i1]
+         for fldName in dbft.fieldNames:
+-            print '%s:\t %s' % (fldName, rec[fldName])
+-        print
++            print('%s:\t %s' % (fldName, rec[fldName]))
++        print()
+     dbft.close()
+ 
+     # vim: set et sts=4 sw=4 :



Home | Main Index | Thread Index | Old Index