Hello community,

here is the log from the commit of package python3-xlwt for openSUSE:Factory 
checked in at 2017-02-22 13:54:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-xlwt (Old)
 and      /work/SRC/openSUSE:Factory/.python3-xlwt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python3-xlwt"

Changes:
--------
--- /work/SRC/openSUSE:Factory/python3-xlwt/python3-xlwt-doc.changes    
2016-06-25 02:23:56.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python3-xlwt.new/python3-xlwt-doc.changes       
2017-02-22 13:55:00.295763445 +0100
@@ -1,0 +2,13 @@
+Mon Feb 20 21:45:21 UTC 2017 - [email protected]
+
+- specfile:
+  * update copyright year
+
+- update to version 1.2.0:
+  * Remove "LOCALE" from regular expression that caused
+    :class:`DeprecationWarning` that become an exception in Python 3.6
+  * Add :meth:`Workbook.sheet_index` helper.
+  * :meth:`Workbook.get_sheet` now takes either a string name or an
+    integer index.
+
+-------------------------------------------------------------------
python3-xlwt.changes: same change

Old:
----
  xlwt-1.1.2.tar.gz

New:
----
  xlwt-1.2.0.tar.gz

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

Other differences:
------------------
++++++ python3-xlwt-doc.spec ++++++
--- /var/tmp/diff_new_pack.gQ1vUE/_old  2017-02-22 13:55:00.883679796 +0100
+++ /var/tmp/diff_new_pack.gQ1vUE/_new  2017-02-22 13:55:00.887679228 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python3-xlwt-doc
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           python3-xlwt-doc
-Version:        1.1.2
+Version:        1.2.0
 Release:        0
 Url:            https://secure.simplistix.co.uk/svn/xlwt/trunk
 Summary:        Documentation for python3-xlwt

python3-xlwt.spec: same change
++++++ xlwt-1.1.2.tar.gz -> xlwt-1.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.1.2/PKG-INFO new/xlwt-1.2.0/PKG-INFO
--- old/xlwt-1.1.2/PKG-INFO     2016-06-09 07:15:59.000000000 +0200
+++ new/xlwt-1.2.0/PKG-INFO     2017-01-04 17:17:15.000000000 +0100
@@ -1,7 +1,7 @@
 Metadata-Version: 1.1
 Name: xlwt
-Version: 1.1.2
-Summary: Library to create spreadsheet files compatible with MS Excel 
97/2000/XP/2003 XLS files, on any platform, with Python 2.6, 2.6, 3.3+
+Version: 1.2.0
+Summary: Library to create spreadsheet files compatible with MS Excel 
97/2000/XP/2003 XLS files, on any platform, with Python 2.6, 2.7, 3.3+
 Home-page: http://www.python-excel.org/
 Author: John Machin
 Author-email: [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.1.2/docs/changes.rst 
new/xlwt-1.2.0/docs/changes.rst
--- old/xlwt-1.1.2/docs/changes.rst     2016-06-09 07:15:28.000000000 +0200
+++ new/xlwt-1.2.0/docs/changes.rst     2017-01-04 17:16:40.000000000 +0100
@@ -3,6 +3,17 @@
 
 .. currentmodule:: xlwt
 
+1.2.0 (4 January 2017)
+----------------------
+
+- Remove ``LOCALE`` from regular expression that caused
+  :class:`DeprecationWarning` that become an exception in Python 3.6
+
+- Add :meth:`Workbook.sheet_index` helper.
+
+- :meth:`Workbook.get_sheet` now takes either a string name or an integer
+  index.
+
 1.1.2 (9 June 2016)
 -------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.1.2/setup.py new/xlwt-1.2.0/setup.py
--- old/xlwt-1.1.2/setup.py     2016-06-09 07:15:28.000000000 +0200
+++ new/xlwt-1.2.0/setup.py     2017-01-04 17:16:40.000000000 +0100
@@ -5,7 +5,7 @@
 DESCRIPTION = (
     'Library to create spreadsheet files compatible with '
     'MS Excel 97/2000/XP/2003 XLS files, '
-    'on any platform, with Python 2.6, 2.6, 3.3+'
+    'on any platform, with Python 2.6, 2.7, 3.3+'
     )
 
 CLASSIFIERS = [
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.1.2/tests/test_by_name_functions.py 
new/xlwt-1.2.0/tests/test_by_name_functions.py
--- old/xlwt-1.1.2/tests/test_by_name_functions.py      1970-01-01 
01:00:00.000000000 +0100
+++ new/xlwt-1.2.0/tests/test_by_name_functions.py      2017-01-04 
17:16:40.000000000 +0100
@@ -0,0 +1,30 @@
+import unittest
+import xlwt
+
+class TestByName(unittest.TestCase):
+    def setUp(self):
+        self.wb = xlwt.Workbook()
+        self.wb.add_sheet('Plan1')    
+        self.wb.add_sheet('Plan2')
+        self.wb.add_sheet('Plan3')
+        self.wb.add_sheet('Plan4')
+
+    def test_sheet_index(self):
+        'Return sheet index by sheet name'
+        idx = self.wb.sheet_index('Plan3')
+        self.assertEqual(2, idx)
+
+    def test_get_by_name(self):
+        'Get sheet by name'
+        ws = self.wb.get_sheet('Plan2')
+        self.assertEqual('Plan2', ws.name)
+    
+    def test_get_by_index(self):
+        'Get sheet by index'
+        ws = self.wb.get_sheet(1)
+        self.assertEqual('Plan2', ws.name)
+    
+    def test_invalid_sheet_parameter(self):
+        'Raises exception when sheet is not string or integer'
+        self.assertRaises(Exception, self.wb.get_sheet, 1.1)
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.1.2/xlwt/ExcelFormulaLexer.py 
new/xlwt-1.2.0/xlwt/ExcelFormulaLexer.py
--- old/xlwt-1.1.2/xlwt/ExcelFormulaLexer.py    2016-06-09 07:15:28.000000000 
+0200
+++ new/xlwt-1.2.0/xlwt/ExcelFormulaLexer.py    2017-01-04 17:16:40.000000000 
+0100
@@ -3,7 +3,7 @@
 
 from .antlr import EOF, CommonToken as Tok, TokenStream, TokenStreamException
 from . import ExcelFormulaParser
-from re import compile as recompile, LOCALE, IGNORECASE, VERBOSE
+from re import compile as recompile, IGNORECASE, VERBOSE
 
 
 int_const_pattern = r"\d+\b"
@@ -50,7 +50,7 @@
 
 _re = recompile(
     '(' + ')|('.join([i[0] for i in pattern_type_tuples]) + ')',
-    VERBOSE+LOCALE+IGNORECASE)
+    VERBOSE+IGNORECASE)
 
 _toktype = [None] + [i[1] for i in pattern_type_tuples]
 # need dummy at start because re.MatchObject.lastindex counts from 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.1.2/xlwt/Workbook.py 
new/xlwt-1.2.0/xlwt/Workbook.py
--- old/xlwt-1.1.2/xlwt/Workbook.py     2016-06-09 07:15:28.000000000 +0200
+++ new/xlwt-1.2.0/xlwt/Workbook.py     2017-01-04 17:16:40.000000000 +0100
@@ -40,7 +40,7 @@
 
 from . import BIFFRecords
 from . import Style
-from .compat import unicode_type
+from .compat import unicode_type, int_types, basestring
 
 class Workbook(object):
     """
@@ -373,8 +373,22 @@
         self.__worksheets.append(Worksheet(sheetname, self, cell_overwrite_ok))
         return self.__worksheets[-1]
 
-    def get_sheet(self, sheetnum):
-        return self.__worksheets[sheetnum]
+    def get_sheet(self, sheet):
+        if isinstance(sheet, int_types):
+            return self.__worksheets[sheet]
+        elif isinstance(sheet, basestring):
+            sheetnum = self.sheet_index(sheet)
+            return self.__worksheets[sheetnum]
+        else:
+            raise Exception("sheet must be integer or string")
+    
+    def sheet_index(self, sheetname):
+        try:
+            sheetnum = self.__worksheet_idx_from_name[sheetname.lower()] 
+        except KeyError:
+            self.raise_bad_sheetname(sheetname)
+            
+        return sheetnum       
 
     def raise_bad_sheetname(self, sheetname):
         raise Exception("Formula: unknown sheet name %s" % sheetname)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.1.2/xlwt/__init__.py 
new/xlwt-1.2.0/xlwt/__init__.py
--- old/xlwt-1.1.2/xlwt/__init__.py     2016-06-09 07:15:28.000000000 +0200
+++ new/xlwt-1.2.0/xlwt/__init__.py     2017-01-04 17:16:40.000000000 +0100
@@ -1,4 +1,4 @@
-__VERSION__ = '1.1.2'
+__VERSION__ = '1.2.0'
 
 from .Workbook import Workbook
 from .Worksheet import Worksheet
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.1.2/xlwt.egg-info/PKG-INFO 
new/xlwt-1.2.0/xlwt.egg-info/PKG-INFO
--- old/xlwt-1.1.2/xlwt.egg-info/PKG-INFO       2016-06-09 07:15:59.000000000 
+0200
+++ new/xlwt-1.2.0/xlwt.egg-info/PKG-INFO       2017-01-04 17:17:15.000000000 
+0100
@@ -1,7 +1,7 @@
 Metadata-Version: 1.1
 Name: xlwt
-Version: 1.1.2
-Summary: Library to create spreadsheet files compatible with MS Excel 
97/2000/XP/2003 XLS files, on any platform, with Python 2.6, 2.6, 3.3+
+Version: 1.2.0
+Summary: Library to create spreadsheet files compatible with MS Excel 
97/2000/XP/2003 XLS files, on any platform, with Python 2.6, 2.7, 3.3+
 Home-page: http://www.python-excel.org/
 Author: John Machin
 Author-email: [email protected]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.1.2/xlwt.egg-info/SOURCES.txt 
new/xlwt-1.2.0/xlwt.egg-info/SOURCES.txt
--- old/xlwt-1.1.2/xlwt.egg-info/SOURCES.txt    2016-06-09 07:15:59.000000000 
+0200
+++ new/xlwt-1.2.0/xlwt.egg-info/SOURCES.txt    2017-01-04 17:17:15.000000000 
+0100
@@ -57,6 +57,7 @@
 tests/simple.xls
 tests/test_biff_records.py
 tests/test_bitmaps.py
+tests/test_by_name_functions.py
 tests/test_compound_doc.py
 tests/test_easyxf.py
 tests/test_mini.py


Reply via email to