Skip to content

[FIX] Close opened worksheet file that preven't zip closure

Primož Godec requested to merge topic/3.1/fixes-2149 into branch/3.1

Issue

In newer Python versions >=3.11.8 or >=3.12.2, something seems to change in the garbage collection of the open archive file when the read_worksheets function finishes (the worksheet file seems to stay open when the function finishes - before it was closed by Python). It causes the archive not to close when self.archive.close() is called but Python closes it when the script finishes. More here: #2149 (comment 345410)

Change

This MR ensures that the worksheet file closes.

--HG-- branch : 3.1

Merge request reports

Loading