14
0
forked from pool/python-tablib

Accepting request 682351 from home:jayvdb:coala:python3-bears

- Add openpyxl-usage-fix.patch to workaround incompatibility with
  current releases of openpyxl
- Add HISTORY.rst to %doc
- Add minimum versions of dependencies from upstream
- Use %license
- Update to v0.12.1
  - Add Pandas DataFrame support

OBS-URL: https://build.opensuse.org/request/show/682351
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tablib?expand=0&rev=1
This commit is contained in:
Tomáš Chvátal
2019-03-07 10:11:57 +00:00
committed by Git OBS Bridge
commit 3845171dda
6 changed files with 204 additions and 0 deletions

23
openpyxl-usage-fix.patch Normal file
View File

@@ -0,0 +1,23 @@
From ac3cf67620c89f71b73bed891355e8dc0491a541 Mon Sep 17 00:00:00 2001
From: Gregory Bataille <gregory.bataille@gmail.com>
Date: Wed, 12 Sep 2018 13:34:55 +0200
Subject: [PATCH] fix(): remove openpyxl warning by properly accessing cells
(#296)
---
tablib/formats/_xlsx.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tablib/formats/_xlsx.py b/tablib/formats/_xlsx.py
index 20f55df..eb921f9 100644
--- a/tablib/formats/_xlsx.py
+++ b/tablib/formats/_xlsx.py
@@ -119,7 +119,7 @@ def dset_sheet(dataset, ws, freeze_panes=True):
row_number = i + 1
for j, col in enumerate(row):
col_idx = get_column_letter(j + 1)
- cell = ws.cell('%s%s' % (col_idx, row_number))
+ cell = ws['%s%s' % (col_idx, row_number)]
# bold headers
if (row_number == 1) and dataset.headers: