Using python3.9 (default python of AlmaLinux9) there are two tests failing:
=========================== short test summary info ============================
FAILED tests/test_plugins/test_kiwi_builder.py::TestKiwiBuildTask::test_get_nrvp_correct - TypeError: NamedTemporaryFile() got an unexpected keyword argument 'delete_...
FAILED tests/test_plugins/test_kiwi_builder.py::TestKiwiBuildTask::test_get_nrvp_invalid_xml - TypeError: NamedTemporaryFile() got an unexpected keyword argument 'delete_...
================== 2 failed, 2694 passed in 63.92s (0:01:03) ===================
There is no delete_on_close option using python3.9 - https://docs.python.org/3.9/library/tempfile.html
In python3.12:
> If delete is true (the default) and delete_on_close is false, the file is deleted on context manager exit only, or else when the file-like object is finalized.
The aims of this PR is to use os.unlink instead of the delete option of NamedTemporaryFile and make it work regardless of python version:
======================= 2696 passed in 61.69s (0:01:01) ========================
Using python3.9 (default python of AlmaLinux9) there are two tests failing:
There is no
delete_on_closeoption using python3.9 - https://docs.python.org/3.9/library/tempfile.htmlIn python3.12:
> If delete is true (the default) and delete_on_close is false, the file is deleted on context manager exit only, or else when the file-like object is finalized.
The aims of this PR is to use os.unlink instead of the delete option of NamedTemporaryFile and make it work regardless of python version:
======================= 2696 passed in 61.69s (0:01:01) ========================Fixes https://pagure.io/koji/issue/4320