10000 [3.12] gh-135034: Normalize link targets in tarfile, add `os.path.realpath(strict='allow_missing')` (GH-135037) by Yhg1s · Pull Request #135066 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.12] gh-135034: Normalize link targets in tarfile, add os.path.realpath(strict='allow_missing') (GH-135037) #135066

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

Merged
merged 10 commits into from
Jun 3, 2025
Merged
Prev Previous commit
Next Next commit
Don't export LinkFallbackError from tarfile.
  • Loading branch information
Yhg1s committed Jun 3, 2025
commit 8f53def844c5d10b221f52413a01590d1eec3549
2 changes: 1 addition & 1 deletion Lib/tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"DEFAULT_FORMAT", "open","fully_trusted_filter", "data_filter",
"tar_filter", "FilterError", "AbsoluteLinkError",
"OutsideDestinationError", "SpecialFileError", "AbsolutePathError",
"LinkOutsideDestinationError", "LinkFallbackError"]
"LinkOutsideDestinationError"]


#---------------------------------------------------------
A4E6 Expand Down
3 changes: 2 additions & 1 deletion Lib/test/test_tarfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2630,7 +2630,8 @@ def test__all__(self):
'PAX_NUMBER_FIELDS', 'stn', 'nts', 'nti', 'itn', 'calc_chksums',
'copyfileobj', 'filemode', 'EmptyHeaderError',
'TruncatedHeaderError', 'EOFHeaderError', 'InvalidHeaderError',
'SubsequentHeaderError', 'ExFileObject', 'main'}
'SubsequentHeaderError', 'ExFileObject', 'main',
"LinkFallbackError"}
support.check__all__(self, tarfile, not_exported=not_exported)

def test_useful_error_message_when_modules_missing(self):
Expand Down
Loading
0