Question about `save_virtual_workbook` deprecation
Created originally on Bitbucket by kote (Oleg Nykolyn)
Hi,
save_virtual_workbook()
has been re-implmented and deprecated in 2.6.0 with recommendation to use NamedTemporaryFile
:
https://bitbucket.org/openpyxl/openpyxl/commits/d71d1885cea7e7ec939ace80efb20e8a554ae74d
https://bitbucket.org/openpyxl/openpyxl/commits/2c8045bc3abf6a637f9f93400d8e0f603506a133
I haven't found any more details, just a code change. Could you please provide more info on these changes ?
In-memory workbook is a very useful feature for unit-testing and generating files directly to S3, etc. New implementation uses real TemporaryFile
, for some reason even without with
statement.
API usage with NamedTemporaryFile
will be less clear and probably will be worse performance-wise, compared to old save_virtual_workbook()
implementation.