From a6f91c626ac59f5c5563fbfdc5cb1e9ea961a024 Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Thu, 9 Apr 2026 08:27:46 +0300 Subject: [PATCH] python3-openpyxl: update to 3.1.5 Update package to 3.1.5. Changes since 3.0.10: 3.1.0: Added support for data table formulae; Rich Text in cells; Custom Document Properties; mapped chartspace graphical properties to charts. Breaking: removed deprecated workbook methods (get_named_range, add_named_range, remove_named_range) and several worksheet properties. Bug fixes: fixed table filters being overridden, various dataframe and multiindex alignment issues. 3.1.1: Fixed DocumentProperties times being set only at module import; fixed missing worksheet-specific definitions. 3.1.2: Fixed reading worksheets in read-only mode with locally scoped definitions; fixed empty custom properties causing invalid files. 3.1.3: Major performance fixes -- column name caching, pivot table loading, custom properties reading; fixed rich-text save without lxml; fixed file handler leaks; fixed timedelta reading in read-only mode; improved duplicate named styles handling. 3.1.4: Minor bug fixes and stability improvements. 3.1.5: Latest stable release with cumulative fixes. Add test.sh to verify write/read roundtrip of xlsx workbooks. Signed-off-by: Alexandru Ardelean --- lang/python/openpyxl/Makefile | 4 ++-- lang/python/openpyxl/test.sh | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 2 deletions(-) create mode 100755 lang/python/openpyxl/test.sh diff --git a/lang/python/openpyxl/Makefile b/lang/python/openpyxl/Makefile index 69a8e4097b..ee45cd1728 100644 --- a/lang/python/openpyxl/Makefile +++ b/lang/python/openpyxl/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=python-openpyxl -PKG_VERSION:=3.0.10 +PKG_VERSION:=3.1.5 PKG_RELEASE:=1 PKG_MAINTAINER:=Alexandru Ardelean @@ -17,7 +17,7 @@ PKG_LICENSE_FILES:=LICENCE.rst PKG_CPE_ID:=cpe:/a:python:openpyxl PYPI_NAME:=openpyxl -PKG_HASH:=e47805627aebcf860edb4edf7987b1309c1b3632f3750538ed962bbcc3bd7449 +PKG_HASH:=cf0e3cf56142039133628b5acffe8ef0c12bc902d2aadd3e0fe5878dc08d1050 include ../pypi.mk include $(INCLUDE_DIR)/package.mk diff --git a/lang/python/openpyxl/test.sh b/lang/python/openpyxl/test.sh new file mode 100755 index 0000000000..5548d6fac9 --- /dev/null +++ b/lang/python/openpyxl/test.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +[ "$1" = python3-openpyxl ] || exit 0 + +python3 - << 'EOF' +import openpyxl +import tempfile +import os + +# Create a workbook and write data +wb = openpyxl.Workbook() +ws = wb.active +ws.title = "TestSheet" +ws["A1"] = "Hello" +ws["B1"] = 42 +ws["A2"] = "World" +ws["B2"] = 3.14 + +# Save to a temp file and reload +with tempfile.NamedTemporaryFile(suffix=".xlsx", delete=False) as f: + path = f.name + +try: + wb.save(path) + wb2 = openpyxl.load_workbook(path) + ws2 = wb2["TestSheet"] + assert ws2["A1"].value == "Hello", f"Expected 'Hello', got {ws2['A1'].value}" + assert ws2["B1"].value == 42, f"Expected 42, got {ws2['B1'].value}" + assert ws2["A2"].value == "World" + assert abs(ws2["B2"].value - 3.14) < 1e-9 +finally: + os.unlink(path) +EOF