Hello community,

here is the log from the commit of package python-XlsxWriter for 
openSUSE:Factory checked in at 2017-04-14 13:34:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-XlsxWriter (Old)
 and      /work/SRC/openSUSE:Factory/.python-XlsxWriter.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-XlsxWriter"

Fri Apr 14 13:34:52 2017 rev:4 rq:483979 version:0.9.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-XlsxWriter/python-XlsxWriter.changes      
2016-08-17 12:05:19.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.python-XlsxWriter.new/python-XlsxWriter.changes 
2017-04-14 13:34:52.735491668 +0200
@@ -1,0 +2,18 @@
+Thu Mar  2 09:01:52 UTC 2017 - sor.ale...@meowr.ru
+
+- Update to version 0.9.6 (changes since 0.9.3):
+  * Add user definable removal of timezones in datetimes
+    (gh#jmcnamara/XlsxWriter#257).
+  * Fix a duplicate header warning in add_table when there is only
+    one user defined header (gh#jmcnamara/XlsxWriter#380).
+  * A fix for the center_across property in add_format
+    (gh#jmcnamara/XlsxWriter#381).
+  * A fix for a missing remove_timezone option in the Chart class
+    (gh#jmcnamara/XlsxWriter#404).
+  * A fix for a table with data but without a header
+    (gh#jmcnamara/XlsxWriter#405>).
+  * Add a warning when the number of series in a chart exceeds
+    Excel's limit of 255 (gh#jmcnamara/XlsxWriter#399).
+- Update for the multipython build.
+
+-------------------------------------------------------------------

Old:
----
  XlsxWriter-0.9.3.tar.gz

New:
----
  XlsxWriter-0.9.6.tar.gz

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

Other differences:
------------------
++++++ python-XlsxWriter.spec ++++++
--- /var/tmp/diff_new_pack.HPtfz9/_old  2017-04-14 13:34:53.711353754 +0200
+++ /var/tmp/diff_new_pack.HPtfz9/_new  2017-04-14 13:34:53.715353188 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-XlsxWriter
 #
-# 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
@@ -16,26 +16,32 @@
 #
 
 
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
+%define oldpython python
 Name:           python-XlsxWriter
-Version:        0.9.3
+Version:        0.9.6
 Release:        0
 Summary:        Python module for writing OOXML spreadsheet files
 License:        BSD-2-Clause
 Group:          Development/Languages/Python
 Url:            https://xlsxwriter.readthedocs.org/
 Source:         
https://files.pythonhosted.org/packages/source/X/XlsxWriter/XlsxWriter-%{version}.tar.gz
-BuildRequires:  python-devel
-BuildRequires:  python-setuptools
+BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module setuptools}
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
 Requires(post): update-alternatives
-Requires(preun): update-alternatives
-# python-xlsxwriter was last used in openSUSE Leap 42.1.
-Provides:       python-xlsxwriter = %{version}
-Obsoletes:      python-xlsxwriter < %{version}
-%if 0%{?suse_version} >= 1120
+Requires(postun): update-alternatives
 BuildArch:      noarch
-%else
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-%py_requires
+%ifpython2
+# python-xlsxwriter was last used in openSUSE Leap 42.1.
+Provides:       %{oldpython}-xlsxwriter = %{version}
+Obsoletes:      %{oldpython}-xlsxwriter < %{version}
+%endif
+%ifpython3
+# python3-xlsxwriter was last used in openSUSE Leap 42.1.
+Provides:       python3-xlsxwriter = %{version}
+Obsoletes:      python3-xlsxwriter < %{version}
 %endif
 
 %description
@@ -44,38 +50,33 @@
 numbers, formulas and hyperlinks to multiple worksheets and it
 supports features such as formatting and many more.
 
+%python_subpackages
+
 %prep
 %setup -q -n XlsxWriter-%{version}
 
 %build
-python2 setup.py build
+%python_build
 
 %install
-python2 setup.py install \
-  --root=%{buildroot} --prefix=%{_prefix}
+%{python_expand %$python_install && \
+  mv %{buildroot}%{_bindir}/vba_extract.py \
+   %{buildroot}%{_bindir}/vba_extract-%$python_bin_suffix}
 
-# Prepare for update-alternatives usage.
-mkdir -p %{buildroot}%{_sysconfdir}/alternatives
-mv %{buildroot}%{_bindir}/vba_extract.py \
-  %{buildroot}%{_bindir}/vba_extract-%{py_ver}
-ln -sf %{_sysconfdir}/alternatives/vba_extract 
%{buildroot}%{_bindir}/vba_extract
+%prepare_alternative vba_extract
+%fdupes %{buildroot}%{python_sitelib}/
 
 %post
-%_sbindir/update-alternatives \
-  --install %{_bindir}/vba_extract vba_extract 
%{_bindir}/vba_extract-%{py_ver} 30
+%python_install_alternative vba_extract
 
-%preun
-if [ $1 -eq 0 ] ; then
-    %_sbindir/update-alternatives --remove vba_extract 
%{_bindir}/vba_extract-%{py_ver}
-fi
+%postun
+%python_uninstall_alternative vba_extract
 
-%files
+%files %{python_files}
 %defattr(-,root,root)
 %doc Changes LICENSE.txt README.rst
-%{_bindir}/vba_extract
-%{_bindir}/vba_extract-%{py_ver}
-%ghost %{_sysconfdir}/alternatives/vba_extract
+%python_alternative %{_bindir}/vba_extract
 %{python_sitelib}/xlsxwriter/
-%{python_sitelib}/XlsxWriter-%{version}-py*.egg-info
+%{python_sitelib}/XlsxWriter-%{version}-py%{python_version}.egg-info
 
 %changelog

++++++ XlsxWriter-0.9.3.tar.gz -> XlsxWriter-0.9.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/Changes new/XlsxWriter-0.9.6/Changes
--- old/XlsxWriter-0.9.3/Changes        2016-07-09 00:15:36.000000000 +0200
+++ new/XlsxWriter-0.9.6/Changes        2016-12-26 13:06:27.000000000 +0100
@@ -1,4 +1,39 @@
 
+Release 0.9.6 - Dec 26 2016
+---------------------------
+
+* Fix for table with data but without a header.
+  Issue `#405 <https://github.com/jmcnamara/XlsxWriter/issues/405>`_.
+
+* Add a warning when the number of series in a chart exceeds Excel's limit
+  of 255.
+  Issue `#399 <https://github.com/jmcnamara/XlsxWriter/issues/399>`_.
+
+
+Release 0.9.5 - Dec 24 2016
+---------------------------
+
+* Fix for missing `remove_timezone` option in Chart class.
+  PR from Thomas Arnhold
+  `#404 <https://github.com/jmcnamara/XlsxWriter/issues/404>`_.
+
+
+Release 0.9.4 - Dec 2 2016
+--------------------------
+
+* Added user definable removal of timezones in datetimes. See the
+  :func:`Workbook` constructor option ``remove_timezone`` and :ref:`Timezone
+  Handling in XlsxWriter <timezone_handling>`.
+  Issue `#257 <https://github.com/jmcnamara/XlsxWriter/issues/257>`_.
+
+* Fix duplicate header warning in :func:`add_table` when there is only one
+  user defined header.
+  Issue `#380 <https://github.com/jmcnamara/XlsxWriter/issues/380>`_.
+
+* Fix for `center_across` property in :func:`add_format`.
+  Issue `#381 <https://github.com/jmcnamara/XlsxWriter/issues/381>`_.
+
+
 Release 0.9.3 - July 8 2016
 ---------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/PKG-INFO 
new/XlsxWriter-0.9.6/PKG-INFO
--- old/XlsxWriter-0.9.3/PKG-INFO       2016-07-09 15:06:15.000000000 +0200
+++ new/XlsxWriter-0.9.6/PKG-INFO       2016-12-26 13:22:15.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: XlsxWriter
-Version: 0.9.3
+Version: 0.9.6
 Summary: A Python module for creating Excel XLSX files.
 Home-page: https://github.com/jmcnamara/XlsxWriter
 Author: John McNamara
@@ -68,9 +68,9 @@
         
         .. image:: 
https://raw.github.com/jmcnamara/XlsxWriter/master/dev/docs/source/_images/demo.png
         
-        See the full documentation at: http://xlsxwriter.readthedocs.org
+        See the full documentation at: https://xlsxwriter.readthedocs.io
         
-        Release notes: http://xlsxwriter.readthedocs.org/changes.html
+        Release notes: https://xlsxwriter.readthedocs.io/changes.html
         
         
 Platform: UNKNOWN
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/README.rst 
new/XlsxWriter-0.9.6/README.rst
--- old/XlsxWriter-0.9.3/README.rst     2016-01-05 22:06:35.000000000 +0100
+++ new/XlsxWriter-0.9.6/README.rst     2016-10-13 00:06:22.000000000 +0200
@@ -60,7 +60,7 @@
 
 .. image:: 
https://raw.github.com/jmcnamara/XlsxWriter/master/dev/docs/source/_images/demo.png
 
-See the full documentation at: http://xlsxwriter.readthedocs.org
+See the full documentation at: https://xlsxwriter.readthedocs.io
 
-Release notes: http://xlsxwriter.readthedocs.org/changes.html
+Release notes: https://xlsxwriter.readthedocs.io/changes.html
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/docs/readme.html 
new/XlsxWriter-0.9.6/docs/readme.html
--- old/XlsxWriter-0.9.3/docs/readme.html       2016-01-12 22:34:38.000000000 
+0100
+++ new/XlsxWriter-0.9.6/docs/readme.html       2016-10-13 00:06:22.000000000 
+0200
@@ -126,7 +126,7 @@
 <div class="section" id="documentation">
 <h1>Documentation</h1>
 <p>The full version of XlsxWriter documentation is hosted on
-<a class="reference external" href="http://xlsxwriter.readthedocs.org";>Read 
The Docs</a>. It is
+<a class="reference external" href="https://xlsxwriter.readthedocs.io";>Read 
The Docs</a>. It is
 also available as a
 <a class="reference external" 
href="https://github.com/jmcnamara/XlsxWriter/raw/master/docs/XlsxWriter.pdf";>PDF</a>.</p>
 </div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/examples/vba_extract.py 
new/XlsxWriter-0.9.6/examples/vba_extract.py
--- old/XlsxWriter-0.9.3/examples/vba_extract.py        2016-01-12 
22:33:19.000000000 +0100
+++ new/XlsxWriter-0.9.6/examples/vba_extract.py        2016-10-13 
00:06:22.000000000 +0200
@@ -22,7 +22,7 @@
     print("\nUtility to extract a vbaProject.bin binary from an Excel 2007+ "
           "xlsm macro file for insertion into an XlsxWriter file."
           "\n"
-          "See: http://xlsxwriter.readthedocs.org/working_with_macros.html\n";
+          "See: https://xlsxwriter.readthedocs.io/working_with_macros.html\n";
           "\n"
           "Usage: vba_extract file.xlsm\n")
     exit()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/setup.py 
new/XlsxWriter-0.9.6/setup.py
--- old/XlsxWriter-0.9.3/setup.py       2016-07-09 00:38:55.000000000 +0200
+++ new/XlsxWriter-0.9.6/setup.py       2016-12-26 13:13:18.000000000 +0100
@@ -28,7 +28,7 @@
 
 setup(
     name='XlsxWriter',
-    version='0.9.3',
+    version='0.9.6',
     author='John McNamara',
     author_email='jmcnam...@cpan.org',
     url='https://github.com/jmcnamara/XlsxWriter',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/xlsxwriter/__init__.py 
new/XlsxWriter-0.9.6/xlsxwriter/__init__.py
--- old/XlsxWriter-0.9.3/xlsxwriter/__init__.py 2016-07-09 00:38:55.000000000 
+0200
+++ new/XlsxWriter-0.9.6/xlsxwriter/__init__.py 2016-12-26 13:13:18.000000000 
+0100
@@ -1,3 +1,3 @@
-__version__ = '0.9.3'
+__version__ = '0.9.6'
 __VERSION__ = __version__
 from .workbook import Workbook
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/xlsxwriter/chart.py 
new/XlsxWriter-0.9.6/xlsxwriter/chart.py
--- old/XlsxWriter-0.9.3/xlsxwriter/chart.py    2016-06-07 22:31:15.000000000 
+0200
+++ new/XlsxWriter-0.9.6/xlsxwriter/chart.py    2016-12-26 13:20:11.000000000 
+0100
@@ -98,6 +98,7 @@
         self.title_none = False
         self.date_category = False
         self.date_1904 = False
+        self.remove_timezone = False
         self.label_positions = {}
         self.label_position_default = ''
         self.already_inserted = False
@@ -126,6 +127,12 @@
         if self.requires_category and 'categories' not in options:
             warn("Must specify 'categories' in add_series() "
                  "for this chart type")
+            return
+
+        if len(self.series) == 255:
+            warn("The maximum number of series that can be added to an "
+                 "Excel Chart is 255")
+            return
 
         # Convert list into a formula string.
         values = self._list_to_formula(options.get('values'))
@@ -740,13 +747,16 @@
         # Convert datetime args if required.
         if axis.get('min') and supported_datetime(axis['min']):
             axis['min'] = datetime_to_excel_datetime(axis['min'],
-                                                     self.date_1904)
+                                                     self.date_1904,
+                                                     self.remove_timezone)
         if axis.get('max') and supported_datetime(axis['max']):
             axis['max'] = datetime_to_excel_datetime(axis['max'],
-                                                     self.date_1904)
+                                                     self.date_1904,
+                                                     self.remove_timezone)
         if axis.get('crossing') and supported_datetime(axis['crossing']):
             axis['crossing'] = datetime_to_excel_datetime(axis['crossing'],
-                                                          self.date_1904)
+                                                          self.date_1904,
+                                                          self.remove_timezone)
 
         # Set the font properties if present.
         axis['num_font'] = self._convert_font_args(options.get('num_font'))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/xlsxwriter/format.py 
new/XlsxWriter-0.9.6/xlsxwriter/format.py
--- old/XlsxWriter-0.9.3/xlsxwriter/format.py   2016-04-15 22:36:02.000000000 
+0200
+++ new/XlsxWriter-0.9.6/xlsxwriter/format.py   2016-12-02 22:14:03.000000000 
+0100
@@ -151,12 +151,12 @@
         """
         self.font_color = self._get_color(font_color)
 
-    def set_bold(self, bold=1):
+    def set_bold(self, bold=True):
         """
         Set the Format bold property.
 
         Args:
-            bold: Default is 1, turns property on.
+            bold: Default is True, turns property on.
 
         Returns:
             Nothing.
@@ -164,12 +164,12 @@
         """
         self.bold = bold
 
-    def set_italic(self, italic=1):
+    def set_italic(self, italic=True):
         """
         Set the Format italic property.
 
         Args:
-            italic: Default is 1, turns property on.
+            italic: Default is True, turns property on.
 
         Returns:
             Nothing.
@@ -190,12 +190,12 @@
         """
         self.underline = underline
 
-    def set_font_strikeout(self, font_strikeout=1):
+    def set_font_strikeout(self, font_strikeout=True):
         """
         Set the Format font_strikeout property.
 
         Args:
-            font_strikeout: Default is 1, turns property on.
+            font_strikeout: Default is True, turns property on.
 
         Returns:
             Nothing.
@@ -216,12 +216,12 @@
         """
         self.font_script = font_script
 
-    def set_font_outline(self, font_outline=1):
+    def set_font_outline(self, font_outline=True):
         """
         Set the Format font_outline property.
 
         Args:
-            font_outline: Default is 1, turns property on.
+            font_outline: Default is True, turns property on.
 
         Returns:
             Nothing.
@@ -229,12 +229,12 @@
         """
         self.font_outline = font_outline
 
-    def set_font_shadow(self, font_shadow=1):
+    def set_font_shadow(self, font_shadow=True):
         """
         Set the Format font_shadow property.
 
         Args:
-            font_shadow: Default is 1, turns property on.
+            font_shadow: Default is True, turns property on.
 
         Returns:
             Nothing.
@@ -255,12 +255,12 @@
         """
         self.num_format = num_format
 
-    def set_locked(self, locked=1):
+    def set_locked(self, locked=True):
         """
         Set the Format locked property.
 
         Args:
-            locked: Default is 1, turns property on.
+            locked: Default is True, turns property on.
 
         Returns:
             Nothing.
@@ -268,12 +268,12 @@
         """
         self.locked = locked
 
-    def set_hidden(self, hidden=1):
+    def set_hidden(self, hidden=True):
         """
         Set the Format hidden property.
 
         Args:
-            hidden: Default is 1, turns property on.
+            hidden: Default is True, turns property on.
 
         Returns:
             Nothing.
@@ -332,7 +332,7 @@
         if alignment == 'vdistributed':
             self.set_text_v_align(5)
 
-    def set_center_across(self):
+    def set_center_across(self, align_type=None):
         """
         Set the Format center_across property.
 
@@ -342,12 +342,12 @@
         """
         self.set_text_h_align(6)
 
-    def set_text_wrap(self, text_wrap=1):
+    def set_text_wrap(self, text_wrap=True):
         """
         Set the Format text_wrap property.
 
         Args:
-            text_wrap: Default is 1, turns property on.
+            text_wrap: Default is True, turns property on.
 
         Returns:
             Nothing.
@@ -385,7 +385,7 @@
         Set the Format indent property.
 
         Args:
-            indent: Default is 1, turns property on.
+            indent: Default is 1, first indentation level.
 
         Returns:
             Nothing.
@@ -393,12 +393,12 @@
         """
         self.indent = indent
 
-    def set_shrink(self, shrink=1):
+    def set_shrink(self, shrink=True):
         """
         Set the Format shrink property.
 
         Args:
-            shrink: Default is 1, turns property on.
+            shrink: Default is True, turns property on.
 
         Returns:
             Nothing.
@@ -406,12 +406,12 @@
         """
         self.shrink = shrink
 
-    def set_text_justlast(self, text_justlast=1):
+    def set_text_justlast(self, text_justlast=True):
         """
         Set the Format text_justlast property.
 
         Args:
-            text_justlast: Default is 1, turns property on.
+            text_justlast: Default is True, turns property on.
 
         Returns:
             Nothing.
@@ -642,11 +642,11 @@
     #
     ###########################################################################
 
-    def set_has_font(self, has_font=1):
+    def set_has_font(self, has_font=True):
         # Set the has_font property.
         self.has_font = has_font
 
-    def set_has_fill(self, has_fill=1):
+    def set_has_fill(self, has_fill=True):
         # Set the has_fill property.
         self.has_fill = has_fill
 
@@ -674,7 +674,7 @@
         # Set the text_v_align property.
         self.text_v_align = text_v_align
 
-    def set_reading_order(self, reading_order=1):
+    def set_reading_order(self, reading_order=True):
         # Set the reading_order property.
         self.reading_order = reading_order
 
@@ -708,7 +708,7 @@
         # Set the Format theme property.
         self.theme = theme
 
-    def set_hyperlink(self, hyperlink=1):
+    def set_hyperlink(self, hyperlink=True):
         # Set the properties for the hyperlink style. This doesn't
         # currently work. To be fixed when styles are supported.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/xlsxwriter/packager.py 
new/XlsxWriter-0.9.6/xlsxwriter/packager.py
--- old/XlsxWriter-0.9.3/xlsxwriter/packager.py 2016-05-29 16:51:36.000000000 
+0200
+++ new/XlsxWriter-0.9.6/xlsxwriter/packager.py 2016-09-23 10:38:40.000000000 
+0200
@@ -15,17 +15,17 @@
 from .compatibility import BytesIO
 
 # Package imports.
-from xlsxwriter.app import App
-from xlsxwriter.contenttypes import ContentTypes
-from xlsxwriter.core import Core
-from xlsxwriter.custom import Custom
-from xlsxwriter.relationships import Relationships
-from xlsxwriter.sharedstrings import SharedStrings
-from xlsxwriter.styles import Styles
-from xlsxwriter.theme import Theme
-from xlsxwriter.vml import Vml
-from xlsxwriter.table import Table
-from xlsxwriter.comments import Comments
+from .app import App
+from .contenttypes import ContentTypes
+from .core import Core
+from .custom import Custom
+from .relationships import Relationships
+from .sharedstrings import SharedStrings
+from .styles import Styles
+from .theme import Theme
+from .vml import Vml
+from .table import Table
+from .comments import Comments
 
 
 class Packager(object):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/xlsxwriter/utility.py 
new/XlsxWriter-0.9.6/xlsxwriter/utility.py
--- old/XlsxWriter-0.9.3/xlsxwriter/utility.py  2016-04-20 00:30:37.000000000 
+0200
+++ new/XlsxWriter-0.9.6/xlsxwriter/utility.py  2016-12-02 21:51:56.000000000 
+0100
@@ -609,7 +609,23 @@
                            datetime.timedelta)))
 
 
-def datetime_to_excel_datetime(dt_obj, date_1904):
+def remove_datetime_timezone(dt_obj, remove_timezone):
+    # Excel doesn't support timezones in datetimes/times so we remove the
+    # tzinfo from the object if the user has specified that option in the
+    # constructor.
+    if remove_timezone:
+        dt_obj = dt_obj.replace(tzinfo=None)
+    else:
+        if dt_obj.tzinfo:
+            raise TypeError(
+                "Excel doesn't support timezones in datetimes. "
+                "Set the tzinfo in the datetime/time object to None or "
+                "use the 'remove_timezone' Workbook() option")
+
+    return dt_obj
+
+
+def datetime_to_excel_datetime(dt_obj, date_1904, remove_timezone):
     # Convert a datetime object to an Excel serial date and time. The integer
     # part of the number stores the number of days since the epoch and the
     # fractional part stores the percentage of the day.
@@ -624,12 +640,14 @@
     # We handle datetime .datetime, .date and .time objects but convert
     # them to datetime.datetime objects and process them in the same way.
     if isinstance(dt_obj, datetime.datetime):
+        dt_obj = remove_datetime_timezone(dt_obj, remove_timezone)
         delta = dt_obj - epoch
     elif isinstance(dt_obj, datetime.date):
         dt_obj = datetime.datetime.fromordinal(dt_obj.toordinal())
         delta = dt_obj - epoch
     elif isinstance(dt_obj, datetime.time):
         dt_obj = datetime.datetime.combine(epoch, dt_obj)
+        dt_obj = remove_datetime_timezone(dt_obj, remove_timezone)
         delta = dt_obj - epoch
     elif isinstance(dt_obj, datetime.timedelta):
         delta = dt_obj
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/xlsxwriter/workbook.py 
new/XlsxWriter-0.9.6/xlsxwriter/workbook.py
--- old/XlsxWriter-0.9.3/xlsxwriter/workbook.py 2016-06-13 01:16:07.000000000 
+0200
+++ new/XlsxWriter-0.9.6/xlsxwriter/workbook.py 2016-12-24 18:08:56.000000000 
+0100
@@ -19,21 +19,21 @@
 
 # Package imports.
 from . import xmlwriter
-from xlsxwriter.worksheet import Worksheet
-from xlsxwriter.chartsheet import Chartsheet
-from xlsxwriter.sharedstrings import SharedStringTable
-from xlsxwriter.format import Format
-from xlsxwriter.packager import Packager
+from .worksheet import Worksheet
+from .chartsheet import Chartsheet
+from .sharedstrings import SharedStringTable
+from .format import Format
+from .packager import Packager
 from .utility import xl_cell_to_rowcol
-from xlsxwriter.chart_area import ChartArea
-from xlsxwriter.chart_bar import ChartBar
-from xlsxwriter.chart_column import ChartColumn
-from xlsxwriter.chart_doughnut import ChartDoughnut
-from xlsxwriter.chart_line import ChartLine
-from xlsxwriter.chart_pie import ChartPie
-from xlsxwriter.chart_radar import ChartRadar
-from xlsxwriter.chart_scatter import ChartScatter
-from xlsxwriter.chart_stock import ChartStock
+from .chart_area import ChartArea
+from .chart_bar import ChartBar
+from .chart_column import ChartColumn
+from .chart_doughnut import ChartDoughnut
+from .chart_line import ChartLine
+from .chart_pie import ChartPie
+from .chart_radar import ChartRadar
+from .chart_scatter import ChartScatter
+from .chart_stock import ChartStock
 
 
 class Workbook(xmlwriter.XMLwriter):
@@ -69,6 +69,7 @@
         self.optimization = options.get('constant_memory', False)
         self.in_memory = options.get('in_memory', False)
         self.excel2003_style = options.get('excel2003_style', False)
+        self.remove_timezone = options.get('remove_timezone', False)
         self.default_format_properties = \
             options.get('default_format_properties', {})
 
@@ -256,6 +257,7 @@
 
         chart.embedded = True
         chart.date_1904 = self.date_1904
+        chart.remove_timezone = self.remove_timezone
 
         self.charts.append(chart)
 
@@ -648,6 +650,7 @@
             'default_date_format': self.default_date_format,
             'default_url_format': self.default_url_format,
             'excel2003_style': self.excel2003_style,
+            'remove_timezone': self.remove_timezone,
         }
 
         if is_chartsheet:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/XlsxWriter-0.9.3/xlsxwriter/worksheet.py 
new/XlsxWriter-0.9.6/xlsxwriter/worksheet.py
--- old/XlsxWriter-0.9.3/xlsxwriter/worksheet.py        2016-07-08 
22:56:26.000000000 +0200
+++ new/XlsxWriter-0.9.6/xlsxwriter/worksheet.py        2016-12-26 
01:05:09.000000000 +0100
@@ -333,6 +333,7 @@
 
         self.default_date_format = None
         self.default_url_format = None
+        self.remove_timezone = False
 
         self.row_data_filename = None
         self.row_data_fh = None
@@ -1879,6 +1880,8 @@
             'min_color': True,
             'mid_color': True,
             'max_color': True,
+            'min_length': True,
+            'max_length': True,
             'multi_range': True,
             'bar_color': 1}
 
@@ -2300,10 +2303,10 @@
         first_data_row = first_row
         last_data_row = last_row
 
-        if 'header_row' in options:
+        if options.get('header_row'):
             first_data_row += 1
 
-        if 'total_row' in options:
+        if options.get('total_row'):
             last_data_row -= 1
 
         # Set the table and autofilter ranges.
@@ -2344,6 +2347,8 @@
                 # Check if there are user defined values for this column.
                 if col_id <= len(options['columns']):
                     user_data = options['columns'][col_id - 1]
+                else:
+                    user_data = None
 
                 if user_data:
                     # Get the column format.
@@ -3372,6 +3377,7 @@
         self.default_date_format = init_data['default_date_format']
         self.default_url_format = init_data['default_url_format']
         self.excel2003_style = init_data['excel2003_style']
+        self.remove_timezone = init_data['remove_timezone']
 
         if self.excel2003_style:
             self.original_row_height = 12.75
@@ -3523,7 +3529,9 @@
 
     def _convert_date_time(self, dt_obj):
         # Convert a datetime object to an Excel serial date and time.
-        return datetime_to_excel_datetime(dt_obj, self.date_1904)
+        return datetime_to_excel_datetime(dt_obj,
+                                          self.date_1904,
+                                          self.remove_timezone)
 
     def _convert_name_area(self, row_num_1, col_num_1, row_num_2, col_num_2):
         # Convert zero indexed rows and columns to the format required by
@@ -6022,7 +6030,15 @@
 
     def _write_data_bar(self, param):
         # Write the <dataBar> element.
-        self._xml_start_tag('dataBar')
+        attributes = []
+
+        if 'min_length' in param:
+            attributes.append(('minLength', param['min_length']))
+
+        if 'max_length' in param:
+            attributes.append(('maxLength', param['max_length']))
+
+        self._xml_start_tag('dataBar', attributes)
 
         self._write_cfvo(param['min_type'], param['min_value'])
         self._write_cfvo(param['max_type'], param['max_value'])


Reply via email to