Add .tar.zst support to unzip() - #20140
Merged
Merged
Conversation
memsharded
reviewed
Jul 8, 2026
| filename.endswith(".tar") or filename.endswith(".tar.xz") or | ||
| filename.endswith(".txz") or filename.endswith(".tar.zst")): | ||
| if filename.endswith(".tar.zst") and sys.version_info.minor < 14: | ||
| raise ConanException(f"File {os.path.basename(filename)} compressed with 'zst', " |
Member
There was a problem hiding this comment.
Sounds good, just be aware of using this for ConanCenter recipes, as it will trigger this.
Contributor
Author
There was a problem hiding this comment.
Yes, that is right, we may need to upgrade to 3.14 eventually!
memsharded
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog: Feature: Add
.tar.zst(Zstandard) archive support to theunzip()tool function.Docs: omit
When creating a recipe (currently private) for
tensorrt, I found that Conan was not yet capable of unziping (fromget()method).tar.zstcompressed files.This PR simple redirects
.tar.zstfiles tountargzPython's function, protecting it from Python <3.14 versions, same as we did in #19337.Also, I've folded .tar.xz/.txz into the main tar-format check.
It used to live in its own if block only because it carried a Python 2 guard (#3197).
That guard was removed in #8397 when Python 2 support was dropped, but the block was never merged back.
No behavior change, just removing dead structure while touching this code for .tar.zst support