Hello community,

here is the log from the commit of package python-xlwt for openSUSE:Factory 
checked in at 2017-05-09 18:01:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-xlwt (Old)
 and      /work/SRC/openSUSE:Factory/.python-xlwt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-xlwt"

Tue May  9 18:01:53 2017 rev:7 rq:490834 version:1.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-xlwt/python-xlwt.changes  2015-05-19 
23:47:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-xlwt.new/python-xlwt.changes     
2017-05-09 18:02:00.302599937 +0200
@@ -1,0 +2,23 @@
+Mon Apr 24 04:12:51 UTC 2017 - [email protected]
+
+- 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.
+- update to version 1.1.2:
+  * Fix failure in style compression under Python 3.
+  * Officially support Python 3.5
+  * Documentation tweaks.
+- update to version 1.1.1:
+  * Fix release problems.
+- update to version 1.1.0:
+  * Fix SST BIFF record in Python 3.
+  * Fix for writing :class:`ExternSheetRecord` in Python 3.
+  * Add the ability to insert bitmap images from buffers as well as
+    files.
+  * Official support for Python 3.5.
+- Implement single-spec version
+
+-------------------------------------------------------------------

Old:
----
  xlwt-1.0.0.tar.gz

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

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

Other differences:
------------------
++++++ python-xlwt.spec ++++++
--- /var/tmp/diff_new_pack.kuB17q/_old  2017-05-09 18:02:03.670124068 +0200
+++ /var/tmp/diff_new_pack.kuB17q/_new  2017-05-09 18:02:03.674123502 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-xlwt
 #
-# Copyright (c) 2015 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
@@ -16,25 +16,28 @@
 #
 
 
+%bcond_without tests
+
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-xlwt
-Version:        1.0.0
+Version:        1.2.0
 Release:        0
 Url:            https://secure.simplistix.co.uk/svn/xlwt/trunk
 Summary:        Library to Create Spreadsheet Files Compatible With MS Excel 
97/2000/XP/2003
 License:        BSD-4-Clause and BSD-3-Clause and LGPL-2.1+
 Group:          Development/Languages/Python
-Source:         
http://pypi.python.org/packages/source/x/xlwt/xlwt-%{version}.tar.gz
+Source:         
https://files.pythonhosted.org/packages/source/x/xlwt/xlwt-%{version}.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-BuildRequires:  python-Sphinx
-BuildRequires:  python-devel
-BuildRequires:  python-nose
-BuildRequires:  python-pkginfo
-BuildRequires:  python-setuptools
-%if 0%{?suse_version} && 0%{?suse_version} <= 1110
-%{!?python_sitelib: %global python_sitelib %(python -c "from 
distutils.sysconfig import get_python_lib; print get_python_lib()")}
-%else
-BuildArch:      noarch
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
+BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  python3-Sphinx
+%if %{with tests}
+BuildRequires:  %{python_module nose}
 %endif
+BuildArch:      noarch
+%python_subpackages
 
 %description
 xlwt is a library for generating spreadsheet files that are compatible
@@ -49,18 +52,23 @@
 sed -i 's/\r$//' 
examples/{numbers_demo.py,panes2.py,image_chg_col_wid.py,zoom_magnification.py}
 
 %build
-python setup.py build
+%python_build
 cd docs && make html && rm _build/html/.buildinfo
 
 %install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 
+%if %{with tests}
 %check
 nosetests
+%endif
 
-%files
+%files %{python_files}
 %defattr(-,root,root,-)
-%doc docs/_build/html examples
+%doc README.rst
+%doc docs/_build/html/
+%doc examples/
 %{python_sitelib}/*
 
 %changelog

++++++ xlwt-1.0.0.tar.gz -> xlwt-1.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/.gitignore new/xlwt-1.2.0/.gitignore
--- old/xlwt-1.0.0/.gitignore   2015-04-15 03:29:03.000000000 +0200
+++ new/xlwt-1.2.0/.gitignore   2017-01-04 17:16:40.000000000 +0100
@@ -5,3 +5,7 @@
 /tests/output
 .coverage
 /docs/_build
+.tox
+/bin
+/include
+/lib
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/.travis.yml new/xlwt-1.2.0/.travis.yml
--- old/xlwt-1.0.0/.travis.yml  2015-04-15 22:34:50.000000000 +0200
+++ new/xlwt-1.2.0/.travis.yml  2017-01-04 17:16:40.000000000 +0100
@@ -1,6 +1,10 @@
+# for container-y goodness:
+sudo: false
+
 language: python
 
 python:
+  - "3.5"
   - "3.4"
   - "3.3"
   - "2.7"
@@ -14,3 +18,15 @@
 
 after_success:
   - coveralls
+
+deploy:
+  provider: pypi
+  user: chrisw
+  password:
+    secure: 
HZ9DRsLpeNMBZc3Sjj2X/KF/fJxaDjINqbeUzJ7FnqcJ5A5ECDHZ/2Bxx/crdpfXwqHDPEcZvatu+LhtpBFu+HCUFAc00V0qvmq34RZDes9WNmnh5Kx97kXxdN0scoM1V7JXeDffhEUZJkL6EQJfJqUWvl9nq4SnC5wOlJBR3QE=
+  on:
+    tags: true
+    repo: python-excel/xlwt
+    python: "3.5"
+  skip_cleanup: true
+  distributions: "sdist bdist_wheel"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/PKG-INFO new/xlwt-1.2.0/PKG-INFO
--- old/xlwt-1.0.0/PKG-INFO     2015-04-15 23:24:18.000000000 +0200
+++ new/xlwt-1.2.0/PKG-INFO     2017-01-04 17:17:15.000000000 +0100
@@ -1,23 +1,26 @@
 Metadata-Version: 1.1
 Name: xlwt
-Version: 1.0.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.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]
 License: BSD
 Download-URL: http://pypi.python.org/pypi/xlwt
-Description: |Travis|_ |Coveralls|_ |Docs|_
+Description: |Travis|_ |Coveralls|_ |Docs|_ |PyPI|_
         
-        .. |Travis| image:: 
https://api.travis-ci.org/python-excel/xlwt.png?branch=master
+        .. |Travis| image:: 
https://api.travis-ci.org/python-excel/xlwt.svg?branch=master
         .. _Travis: https://travis-ci.org/python-excel/xlwt
         
-        .. |Coveralls| image:: 
https://coveralls.io/repos/python-excel/xlwt/badge.png?branch=master
+        .. |Coveralls| image:: 
https://coveralls.io/repos/python-excel/xlwt/badge.svg?branch=master
         .. _Coveralls: https://coveralls.io/r/python-excel/xlwt?branch=master
         
         .. |Docs| image:: 
https://readthedocs.org/projects/xlwt/badge/?version=latest
         .. _Docs: http://xlwt.readthedocs.org/en/latest/
         
+        .. |PyPI| image:: https://badge.fury.io/py/xlwt.svg
+        .. _PyPI: https://badge.fury.io/py/xlwt
+            
         xlwt
         ====
         
@@ -37,7 +40,7 @@
         Quick start
         ===========
         
-        ::
+        .. code-block:: python
         
             import xlwt
             from datetime import datetime
@@ -102,3 +105,4 @@
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.3
 Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/README.rst new/xlwt-1.2.0/README.rst
--- old/xlwt-1.0.0/README.rst   2015-04-15 23:06:59.000000000 +0200
+++ new/xlwt-1.2.0/README.rst   2017-01-04 17:16:40.000000000 +0100
@@ -1,14 +1,17 @@
-|Travis|_ |Coveralls|_ |Docs|_
+|Travis|_ |Coveralls|_ |Docs|_ |PyPI|_
 
-.. |Travis| image:: 
https://api.travis-ci.org/python-excel/xlwt.png?branch=master
+.. |Travis| image:: 
https://api.travis-ci.org/python-excel/xlwt.svg?branch=master
 .. _Travis: https://travis-ci.org/python-excel/xlwt
 
-.. |Coveralls| image:: 
https://coveralls.io/repos/python-excel/xlwt/badge.png?branch=master
+.. |Coveralls| image:: 
https://coveralls.io/repos/python-excel/xlwt/badge.svg?branch=master
 .. _Coveralls: https://coveralls.io/r/python-excel/xlwt?branch=master
 
 .. |Docs| image:: https://readthedocs.org/projects/xlwt/badge/?version=latest
 .. _Docs: http://xlwt.readthedocs.org/en/latest/
 
+.. |PyPI| image:: https://badge.fury.io/py/xlwt.svg
+.. _PyPI: https://badge.fury.io/py/xlwt
+    
 xlwt
 ====
 
@@ -28,7 +31,7 @@
 Quick start
 ===========
 
-::
+.. code-block:: python
 
     import xlwt
     from datetime import datetime
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/docs/changes.rst 
new/xlwt-1.2.0/docs/changes.rst
--- old/xlwt-1.0.0/docs/changes.rst     2015-04-15 23:06:07.000000000 +0200
+++ new/xlwt-1.2.0/docs/changes.rst     2017-01-04 17:16:40.000000000 +0100
@@ -3,9 +3,48 @@
 
 .. currentmodule:: xlwt
 
-1.0.0 (xx yyy 2015)
+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)
+-------------------
+
+- Fix failure in style compression under Python 3.
+
+- Officially support Python 3.5
+
+- Documentation tweaks.
+
+1.1.1 (2 June 2016)
 -------------------
 
+- Fix release problems.
+
+1.1.0 (2 June 2016)
+-------------------
+
+- Fix SST BIFF record in Python 3.
+
+- Fix for writing :class:`ExternSheetRecord` in Python 3.
+
+- Add the ability to insert bitmap images from buffers as well as files.
+
+- Official support for Python 3.5.
+
+Thanks to "thektulu" and Lele Gaifax for the Python 3 fixes.
+Thanks to Ross Golder for the support for inserting images from buffers.
+
+1.0.0 (15 April 2015)
+---------------------
+
 - Python 3 support.
 
 - Initial set of unit tests.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/docs/development.rst 
new/xlwt-1.2.0/docs/development.rst
--- old/xlwt-1.0.0/docs/development.rst 2015-04-15 22:34:06.000000000 +0200
+++ new/xlwt-1.2.0/docs/development.rst 2017-01-04 17:16:40.000000000 +0100
@@ -25,6 +25,7 @@
 
   $ virtualenv .
   $ bin/pip install -Ur requirements.txt
+  $ bin/pip install -e .
 
 Running the tests
 -----------------
@@ -33,6 +34,15 @@
 
   $ bin/nosetests
 
+To run tests on all the versions of Python that are supported, you can do::
+
+  $ bin/tox
+
+If you change the supported python versions in ``.travis.yml``, please remember
+to do the following to update ``tox.ini``::
+
+  $ bin/panci --to=tox .travis.yml > tox.ini
+
 Building the documentation
 --------------------------
 
@@ -42,3 +52,14 @@
   $ cd docs
   $ make html
 
+Making a release
+----------------
+
+To make a release, just update the version in ``xlwt/__init__.py``,
+update the change log, tag it
+and push to https://github.com/python-excel/xlwt
+and Travis CI should take care of the rest.
+
+Once the above is done, make sure to go to
+https://readthedocs.org/projects/xlwt/versions/
+and make sure the new release is marked as an Active Version.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/docs/index.rst 
new/xlwt-1.2.0/docs/index.rst
--- old/xlwt-1.0.0/docs/index.rst       2015-04-15 20:11:50.000000000 +0200
+++ new/xlwt-1.2.0/docs/index.rst       2017-01-04 17:16:40.000000000 +0100
@@ -11,7 +11,7 @@
 
    api.rst
 
-Perhaps more useful is to consul the `tutorial`__ and the examples in the
+Perhaps more useful is to consult the `tutorial`__ and the examples in the
 `examples` folder of the distribution.
 
 __ https://github.com/python-excel/tutorial
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/examples/image.py 
new/xlwt-1.2.0/examples/image.py
--- old/xlwt-1.0.0/examples/image.py    2015-04-15 03:29:03.000000000 +0200
+++ new/xlwt-1.2.0/examples/image.py    2017-01-04 17:16:40.000000000 +0100
@@ -7,6 +7,10 @@
 w = Workbook()
 ws = w.add_sheet('Image')
 ws.insert_bitmap('python.bmp', 2, 2)
-ws.insert_bitmap('python.bmp', 10, 2)
+
+# Also works if you already have the image bitmap data in memory...
+with open ("python.bmp", "r") as bmpfile:
+    bmpdata = bmpfile.read()
+    ws.insert_bitmap_data(bmpdata, 10, 2)
 
 w.save('image.xls')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/requirements.txt 
new/xlwt-1.2.0/requirements.txt
--- old/xlwt-1.0.0/requirements.txt     2015-04-15 23:17:10.000000000 +0200
+++ new/xlwt-1.2.0/requirements.txt     2017-01-04 17:16:40.000000000 +0100
@@ -1,13 +1,15 @@
--e .
 # for testing
 nose
 nose_fixes
 nose-cov
 coveralls
+tox
 # for docs
 sphinx
 pkginfo
+six
 # for build
+panci
 setuptools-git
 wheel
 twine
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/setup.py new/xlwt-1.2.0/setup.py
--- old/xlwt-1.0.0/setup.py     2015-04-15 23:20:51.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 = [
@@ -24,6 +24,7 @@
     'Programming Language :: Python :: 3',
     'Programming Language :: Python :: 3.3',
     'Programming Language :: Python :: 3.4',
+    'Programming Language :: Python :: 3.5',
     ]
 
 KEYWORDS = (
Binary files old/xlwt-1.0.0/tests/bitmaps.xls and 
new/xlwt-1.2.0/tests/bitmaps.xls differ
Binary files old/xlwt-1.0.0/tests/less_simple.xls and 
new/xlwt-1.2.0/tests/less_simple.xls differ
Binary files old/xlwt-1.0.0/tests/python.bmp and 
new/xlwt-1.2.0/tests/python.bmp differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/tests/test_biff_records.py 
new/xlwt-1.2.0/tests/test_biff_records.py
--- old/xlwt-1.0.0/tests/test_biff_records.py   2015-04-15 22:00:37.000000000 
+0200
+++ new/xlwt-1.2.0/tests/test_biff_records.py   2017-01-04 17:16:40.000000000 
+0100
@@ -1,12 +1,24 @@
 # coding:utf-8
 
+from io import BytesIO
 import unittest
 
-from xlwt import BIFFRecords
+import xlwt
 
 class TestSharedStringTable(unittest.TestCase):
     def test_shared_string_table(self):
         expected_result = 
b'\xfc\x00\x11\x00\x01\x00\x00\x00\x01\x00\x00\x00\x03\x00\x01\x1e\x04;\x04O\x04'
-        string_record = BIFFRecords.SharedStringTable(encoding='cp1251')
+        string_record = xlwt.BIFFRecords.SharedStringTable(encoding='cp1251')
         string_record.add_str(u'Оля')
         self.assertEqual(expected_result, string_record.get_biff_record())
+
+class TestIntersheetsRef(unittest.TestCase):
+    def test_intersheets_ref(self):
+        book = xlwt.Workbook()
+        sheet_a = book.add_sheet('A')
+        sheet_a.write(0, 0, 'A1')
+        sheet_a.write(0, 1, 'A2')
+        sheet_b = book.add_sheet('B')
+        sheet_b.write(0, 0, xlwt.Formula("'A'!$A$1&'A'!$A$2"))
+        out = BytesIO()
+        book.save(out)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/tests/test_bitmaps.py 
new/xlwt-1.2.0/tests/test_bitmaps.py
--- old/xlwt-1.0.0/tests/test_bitmaps.py        1970-01-01 01:00:00.000000000 
+0100
+++ new/xlwt-1.2.0/tests/test_bitmaps.py        2017-01-04 17:16:40.000000000 
+0100
@@ -0,0 +1,41 @@
+# -*- coding: utf-8 -*-
+
+import sys
+import os
+import unittest
+import filecmp
+from datetime import datetime
+
+from utils import in_tst_dir, in_tst_output_dir
+
+import xlwt
+
+class TestBitmaps(unittest.TestCase):
+    def test_create_bitmap_from_memory(self):
+        book = xlwt.Workbook()
+        sheet = book.add_sheet('bitmap test')
+        
+        with open ("tests/python.bmp", "rb") as bmpfile:
+            bmpdata = bmpfile.read()
+            sheet.insert_bitmap_data(bmpdata, 1, 1)
+        
+        book.save(in_tst_output_dir('bitmaps.xls'))
+        
+        self.assertTrue(filecmp.cmp(in_tst_dir('bitmaps.xls'),
+                                    in_tst_output_dir('bitmaps.xls'),
+                                    shallow=False))
+
+    def test_create_bitmap_from_file(self):
+        book = xlwt.Workbook()
+        sheet = book.add_sheet('bitmap test')
+        
+        sheet.insert_bitmap("tests/python.bmp", 1, 1)
+        
+        book.save(in_tst_output_dir('bitmaps.xls'))
+        
+        self.assertTrue(filecmp.cmp(in_tst_dir('bitmaps.xls'),
+                                    in_tst_output_dir('bitmaps.xls'),
+                                    shallow=False))
+
+if __name__=='__main__':
+    unittest.main()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/tests/test_by_name_functions.py 
new/xlwt-1.2.0/tests/test_by_name_functions.py
--- old/xlwt-1.0.0/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.0.0/tests/test_simple.py 
new/xlwt-1.2.0/tests/test_simple.py
--- old/xlwt-1.0.0/tests/test_simple.py 2015-04-15 20:18:51.000000000 +0200
+++ new/xlwt-1.2.0/tests/test_simple.py 2017-01-04 17:16:40.000000000 +0100
@@ -1,3 +1,5 @@
+# -*- coding: utf-8 -*-
+
 import sys
 import os
 import unittest
@@ -8,8 +10,12 @@
 
 import xlwt
 
+LOREM_IPSUM = u'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
+
+
 class TestSimple(unittest.TestCase):
-    def create_simple_xls(self):
+
+    def create_simple_xls(self, **kw):
         font0 = xlwt.Font()
         font0.name = 'Times New Roman'
         font0.colour_index = 2
@@ -21,7 +27,7 @@
         style1 = xlwt.XFStyle()
         style1.num_format_str = 'D-MMM-YY'
 
-        wb = xlwt.Workbook()
+        wb = xlwt.Workbook(**kw)
         ws = wb.add_sheet('A Test Sheet')
 
         ws.write(0, 0, 'Test', style0)
@@ -29,11 +35,33 @@
         ws.write(2, 0, 1)
         ws.write(2, 1, 1)
         ws.write(2, 2, xlwt.Formula("A3+B3"))
-
-        wb.save(in_tst_output_dir('simple.xls'))
+        return wb, ws
 
     def test_create_simple_xls(self):
-        self.create_simple_xls()
+        wb, _ = self.create_simple_xls()
+        wb.save(in_tst_output_dir('simple.xls'))
         self.assertTrue(filecmp.cmp(in_tst_dir('simple.xls'),
                                     in_tst_output_dir('simple.xls'),
                                     shallow=False))
+
+    def test_create_less_simple_xls(self):
+        wb, ws = self.create_simple_xls()
+        more_content=[
+            [
+                u'A{0}'.format(i),
+                u'Zażółć gęślą jaźń {0} {1}'.format(i, LOREM_IPSUM),
+            ]
+            for idx, i in enumerate(range(1000, 1050))
+        ]
+        for r_idx, content_row in enumerate(more_content, 3):
+            for c_idx, cell in enumerate(content_row):
+                ws.write(r_idx, c_idx, cell)
+        wb.save(in_tst_output_dir('less_simple.xls'))
+        self.assertTrue(filecmp.cmp(in_tst_dir('less_simple.xls'),
+                                    in_tst_output_dir('less_simple.xls'),
+                                    shallow=False))
+
+    def test_font_compression(self):
+        wb, ws = self.create_simple_xls(style_compression = 2)
+        wb.save(in_tst_output_dir('simple.xls'), )
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/tox.ini new/xlwt-1.2.0/tox.ini
--- old/xlwt-1.0.0/tox.ini      1970-01-01 01:00:00.000000000 +0100
+++ new/xlwt-1.2.0/tox.ini      2017-01-04 17:16:40.000000000 +0100
@@ -0,0 +1,13 @@
+# Tox (http://tox.testrun.org/) is a tool for running tests
+# in multiple virtualenvs. This configuration file will run the
+# test suite on all supported python versions. To use it, "pip install tox"
+# and then run "tox" from this directory.
+
+[tox]
+envlist = py35, py34, py33, py27, py26
+
+[testenv]
+commands = 
+    pip install -Ur requirements.txt
+    nosetests --with-cov --cov=xlwt
+        
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/xlwt/BIFFRecords.py 
new/xlwt-1.2.0/xlwt/BIFFRecords.py
--- old/xlwt-1.0.0/xlwt/BIFFRecords.py  2015-04-15 02:11:44.000000000 +0200
+++ new/xlwt-1.2.0/xlwt/BIFFRecords.py  2017-01-04 17:16:40.000000000 +0100
@@ -91,7 +91,7 @@
     def _add_to_sst(self, s):
         u_str = upack2(s, self.encoding)
 
-        is_unicode_str = u_str[2] == b'\x01'
+        is_unicode_str = u_str[2] == b'\x01'[0]
         if is_unicode_str:
             atom_len = 5 # 2 byte -- len,
                          # 1 byte -- options,
@@ -106,7 +106,7 @@
        
     def _add_rt_to_sst(self, rt):
         rt_str, rt_fr = upack2rt(rt, self.encoding)
-        is_unicode_str = rt_str[2] == b'\x09'
+        is_unicode_str = rt_str[2] == b'\x09'[0]
         if is_unicode_str:
             atom_len = 7 # 2 byte -- len,
                          # 1 byte -- options,
@@ -2383,7 +2383,7 @@
                 header = pack("<HHH", self._REC_ID, 6 * krefs + 2, nrefs)
             res.append(header)
             res.extend([pack("<HHH", *r) for r in chunk])
-        return ''.join(res)
+        return b''.join(res)
 
 class SupBookRecord(BiffRecord):
     """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/xlwt/Bitmap.py 
new/xlwt-1.2.0/xlwt/Bitmap.py
--- old/xlwt-1.0.0/xlwt/Bitmap.py       2015-04-14 22:44:27.000000000 +0200
+++ new/xlwt-1.2.0/xlwt/Bitmap.py       2017-01-04 17:16:40.000000000 +0100
@@ -195,7 +195,9 @@
     with open(bitmap, "rb") as fh:
         # Slurp the file into a string.
         data = fh.read()
+    return _process_bitmap_data(data)
 
+def _process_bitmap_data(data):
     # Check that the file is big enough to be a bitmap.
     if len(data) <= 0x36:
         raise Exception("bitmap doesn't contain enough data.")
@@ -240,21 +242,34 @@
     return (width, height, size, data)
 
 
-class ImDataBmpRecord(BiffRecord):
+class ImRawDataBmpRecord(BiffRecord):
     _REC_ID = 0x007F
 
-    def __init__(self, filename):
+    def __init__(self, data):
         """Insert a 24bit bitmap image in a worksheet. The main record 
required is
         IMDATA but it must be proceeded by a OBJ record to define its position.
 
         """
         BiffRecord.__init__(self)
 
-        self.width, self.height, self.size, data = _process_bitmap(filename)
+        self.width, self.height, self.size, data = _process_bitmap_data(data)
+        self._write_imdata(data)
+
+    def _write_imdata(self, data):
         # Write the IMDATA record to store the bitmap data
         cf = 0x09
         env = 0x01
         lcb = self.size
         self._rec_data = pack("<HHL", cf, env, lcb) + data
 
+class ImDataBmpRecord(ImRawDataBmpRecord):
+    def __init__(self, filename):
+        """Insert a 24bit bitmap image in a worksheet. The main record 
required is
+        IMDATA but it must be proceeded by a OBJ record to define its position.
+
+        """
+        BiffRecord.__init__(self)
+
+        self.width, self.height, self.size, data = _process_bitmap(filename)
+        self._write_imdata(data)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/xlwt/ExcelFormulaLexer.py 
new/xlwt-1.2.0/xlwt/ExcelFormulaLexer.py
--- old/xlwt-1.0.0/xlwt/ExcelFormulaLexer.py    2015-04-14 22:44:27.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.0.0/xlwt/Style.py new/xlwt-1.2.0/xlwt/Style.py
--- old/xlwt-1.0.0/xlwt/Style.py        2015-04-15 03:29:03.000000000 +0200
+++ new/xlwt-1.2.0/xlwt/Style.py        2017-01-04 17:16:40.000000000 +0100
@@ -190,11 +190,10 @@
     def _all_fonts(self):
         result = b''
         if self.style_compression:
-            alist = self._font_x2id.items()
+            fonts = self._font_x2id.items()
         else:
-            alist = [(x, o) for o, x in self._font_id2x.items()]
-        alist.sort()
-        for font_idx, font in alist:
+            fonts = [(x, o) for o, x in self._font_id2x.items()]
+        for font_idx, font in sorted(fonts):
             result += font.get_biff_record().get()
         return result
 
@@ -215,11 +214,10 @@
         for i in range(0, 16):
             result += XFRecord(self._default_xf, 'style').get()
         if self.style_compression == 2:
-            alist = self._xf_x2id.items()
+            styles = self._xf_x2id.items()
         else:
-            alist = [(x, o) for o, x in self._xf_id2x.items()]
-        alist.sort()
-        for xf_idx, xf in alist:
+            styles = [(x, o) for o, x in self._xf_id2x.items()]
+        for xf_idx, xf in sorted(styles):
             result += XFRecord(xf).get()
         return result
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/xlwt/Workbook.py 
new/xlwt-1.2.0/xlwt/Workbook.py
--- old/xlwt-1.0.0/xlwt/Workbook.py     2015-04-15 03:29:03.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.0.0/xlwt/Worksheet.py 
new/xlwt-1.2.0/xlwt/Worksheet.py
--- old/xlwt-1.0.0/xlwt/Worksheet.py    2015-04-15 03:29:03.000000000 +0200
+++ new/xlwt-1.2.0/xlwt/Worksheet.py    2017-01-04 17:16:40.000000000 +0100
@@ -1124,6 +1124,12 @@
 
         self.__bmp_rec += obj.get() + bmp.get()
 
+    def insert_bitmap_data(self, data, row, col, x = 0, y = 0, scale_x = 1, 
scale_y = 1):
+        bmp = Bitmap.ImRawDataBmpRecord(data)
+        obj = Bitmap.ObjBmpRecord(row, col, self, bmp, x, y, scale_x, scale_y)
+
+        self.__bmp_rec += obj.get() + bmp.get()
+
     def col(self, indx):
         if indx not in self.__cols:
             self.__cols[indx] = self.Column(indx, self)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/xlwt/__init__.py 
new/xlwt-1.2.0/xlwt/__init__.py
--- old/xlwt-1.0.0/xlwt/__init__.py     2015-04-15 21:27:08.000000000 +0200
+++ new/xlwt-1.2.0/xlwt/__init__.py     2017-01-04 17:16:40.000000000 +0100
@@ -1,4 +1,4 @@
-__VERSION__ = '1.0.0'
+__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.0.0/xlwt.egg-info/PKG-INFO 
new/xlwt-1.2.0/xlwt.egg-info/PKG-INFO
--- old/xlwt-1.0.0/xlwt.egg-info/PKG-INFO       2015-04-15 23:24:18.000000000 
+0200
+++ new/xlwt-1.2.0/xlwt.egg-info/PKG-INFO       2017-01-04 17:17:15.000000000 
+0100
@@ -1,23 +1,26 @@
 Metadata-Version: 1.1
 Name: xlwt
-Version: 1.0.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.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]
 License: BSD
 Download-URL: http://pypi.python.org/pypi/xlwt
-Description: |Travis|_ |Coveralls|_ |Docs|_
+Description: |Travis|_ |Coveralls|_ |Docs|_ |PyPI|_
         
-        .. |Travis| image:: 
https://api.travis-ci.org/python-excel/xlwt.png?branch=master
+        .. |Travis| image:: 
https://api.travis-ci.org/python-excel/xlwt.svg?branch=master
         .. _Travis: https://travis-ci.org/python-excel/xlwt
         
-        .. |Coveralls| image:: 
https://coveralls.io/repos/python-excel/xlwt/badge.png?branch=master
+        .. |Coveralls| image:: 
https://coveralls.io/repos/python-excel/xlwt/badge.svg?branch=master
         .. _Coveralls: https://coveralls.io/r/python-excel/xlwt?branch=master
         
         .. |Docs| image:: 
https://readthedocs.org/projects/xlwt/badge/?version=latest
         .. _Docs: http://xlwt.readthedocs.org/en/latest/
         
+        .. |PyPI| image:: https://badge.fury.io/py/xlwt.svg
+        .. _PyPI: https://badge.fury.io/py/xlwt
+            
         xlwt
         ====
         
@@ -37,7 +40,7 @@
         Quick start
         ===========
         
-        ::
+        .. code-block:: python
         
             import xlwt
             from datetime import datetime
@@ -102,3 +105,4 @@
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.3
 Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/xlwt-1.0.0/xlwt.egg-info/SOURCES.txt 
new/xlwt-1.2.0/xlwt.egg-info/SOURCES.txt
--- old/xlwt-1.0.0/xlwt.egg-info/SOURCES.txt    2015-04-15 23:24:18.000000000 
+0200
+++ new/xlwt-1.2.0/xlwt.egg-info/SOURCES.txt    2017-01-04 17:17:15.000000000 
+0100
@@ -4,6 +4,7 @@
 requirements.txt
 setup.cfg
 setup.py
+tox.ini
 docs/Makefile
 docs/api.rst
 docs/changes.rst
@@ -49,9 +50,14 @@
 examples/wsprops.py
 examples/xlwt_easyxf_simple_demo.py
 examples/zoom_magnification.py
+tests/bitmaps.xls
+tests/less_simple.xls
 tests/mini.xls
+tests/python.bmp
 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