Repository: conan-io/conan

Issue:
improve wording when uncompressing an archive
Very minor issue, but since this method may call `untargz()`, it's better to reword as Uncompressing. Also this word is used when actually uncompressing a non-zip archive.

https://github.com/conan-io/conan/blob/65bef8bb7b086d8550e738fa522004563e3e5078/conan/tools/files/files.py#L369

Output example:

> qt/5.15.16: **Unzipping** qt-everywhere-opensource-src-5.15.16.tar.xz to qt5
> **Uncompressing** qt-everywhere-opensource-src-5.15.16.tar.xz: 18%

Discussion:
@memsharded: Closed by https://github.com/conan-io/conan/pull/18327for next 2.17

Solution patch:
diff --git a/conan/tools/files/files.py b/conan/tools/files/files.py
index d9527bcbd..54be9a9b8 100644
--- a/conan/tools/files/files.py
+++ b/conan/tools/files/files.py
@@ -366,7 +366,7 @@ def unzip(conanfile, filename, destination=".", keep_permissions=False, pattern=
 
     output = conanfile.output
     extract_filter = conanfile.conf.get("tools.files.unzip:filter") or extract_filter
-    output.info(f"Unzipping {filename} to {destination}")
+    output.info(f"Uncompressing {filename} to {destination}")
     if (filename.endswith(".tar.gz") or filename.endswith(".tgz") or
             filename.endswith(".tbz2") or filename.endswith(".tar.bz2") or
             filename.endswith(".tar")):


Test patch:
diff --git a/test/unittests/tools/files/test_zipping.py b/test/unittests/tools/files/test_zipping.py
index 4a9eafb0f..1d24632d5 100644
--- a/test/unittests/tools/files/test_zipping.py
+++ b/test/unittests/tools/files/test_zipping.py
@@ -99,14 +99,21 @@ def create_example_tar(root_file=True, subfolder=False):
 
 
 def test_untargz():
+    import io
+    from unittest.mock import patch
+
     archive = create_example_tar(subfolder=True)
     conanfile = ConanFileMock({})
 
-    # Unzip and check permissions are kept
-    dest_dir = temp_folder()
-    unzip(conanfile, archive, dest_dir)
-    assert exists(join(dest_dir, "foo.txt"))
-    assert exists(join(dest_dir, "src", "bar.txt"))
+    with patch('sys.stderr', new_callable=io.StringIO) as mock_stderr:
+        # Unzip and check permissions are kept
+        dest_dir = temp_folder()
+        unzip(conanfile, archive, dest_dir)
+        assert exists(join(dest_dir, "foo.txt"))
+        assert exists(join(dest_dir, "src", "bar.txt"))
+
+        stderr_output = mock_stderr.getvalue()
+        assert f"Uncompressing {archive} to {dest_dir}" in stderr_output
 
 
 def test_untargz_with_pattern():