-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filter tar in extract_archive() for Python>=3.12 #163
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
|
@sourcery-ai review |
Reviewer's Guide by SourceryThe PR updates the Class diagram for extract_archive() function updateclassDiagram
class ExtractArchive {
+extract_archive()
}
class TarFile {
+extract(member, destination, numeric_owner=True)
}
ExtractArchive --|> TarFile : uses
note for ExtractArchive "Updated to include filter parameter for Python >= 3.12"
note for TarFile "Python 3.12 introduces filter argument"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @hagenw - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version-specific choice of a sane default for the filter
argument has been discussed in a separate thread that is settled now.
Therefore it feels safe to approve right now.
In Python 3.12 the
filter
argument was introduced toTarFile.extract()
, see tarfile.TarFile.extract and tarfile-extraction-filter.When testing with Python 3.13 it raises the following deprecation warning:
To avoid this, and make it also safe when Python 3.14 is introduced, this pull requests adds
filter="tar"
when extracting a tar archive inaudeer.extract_archive()
in Python >=3.12.Summary by Sourcery
Bug Fixes: