Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-102950: Implement PEP 706 – Filter for tarfile.extractall#102953

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
encukou merged 16 commits intopython:mainfromencukou:tarfile-dir-traversal-sqsq
Apr 24, 2023
Merged
Changes from1 commit
Commits
Show all changes
16 commits
Select commitHold shift + click to select a range
cde089c
Implement PEP 706 – Filter for tarfile.extractall
encukouJan 31, 2023
2395c92
Add a blurb
encukouMar 23, 2023
561a9d4
Remove unneeded backslashes in docs
encukouMar 27, 2023
54b5644
Fix typos in docs & comments
encukouMar 27, 2023
7867fc3
Clarify the arguments to register_unpack_format's +function* argument
encukouMar 27, 2023
734190d
tests: Clean up unused variables and unnecessary f-strings
encukouMar 27, 2023
d55ae42
Make filter keyword-only in shutil
encukouApr 6, 2023
c795bb3
Address documentation review
encukouApr 6, 2023
5d850cc
Fix ReST syntax
encukouApr 6, 2023
81e9050
Merge main branch to resolve conflict in Whatsnew
encukouApr 11, 2023
de11090
Remove typo
encukouApr 11, 2023
b0c0674
Improve errorlevel handling
encukouApr 18, 2023
3796fdf
Fix the tests to match the PEP update
encukouApr 19, 2023
08ab551
Document type of errorlevel
encukouApr 19, 2023
0474842
Skip symlink-related test failures on WASI
encukouApr 20, 2023
a255634
Ignore unrelated errors in NoneInfoTests_Misc.test_add
encukouApr 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
tests: Clean up unused variables and unnecessary f-strings
  • Loading branch information
@encukou
encukou committedMar 27, 2023
commit734190dec34c77ac907b90d42005f64271773f44
19 changes: 8 additions & 11 deletionsLib/test/test_tarfile.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,12 +6,9 @@
from random import Random
import pathlib
import shutil
import time
import re
import datetime
import warnings
import stat
import inspect

import unittest
import unittest.mock
Expand DownExpand Up@@ -3131,23 +3128,23 @@ def test_extractall_none_mode(self):
regular_file_mode)

def test_extractall_none_uid(self):
with self.extract_with_none('uid') as DIR:
with self.extract_with_none('uid'):
pass

def test_extractall_none_gid(self):
with self.extract_with_none('gid') as DIR:
with self.extract_with_none('gid'):
pass

def test_extractall_none_uname(self):
with self.extract_with_none('uname') as DIR:
with self.extract_with_none('uname'):
pass

def test_extractall_none_gname(self):
with self.extract_with_none('gname') as DIR:
with self.extract_with_none('gname'):
pass

def test_extractall_none_ownership(self):
with self.extract_with_none('uid', 'gid', 'uname', 'gname') as DIR:
with self.extract_with_none('uid', 'gid', 'uname', 'gname'):
pass

class NoneInfoExtractTests_Data(NoneInfoExtractTests, unittest.TestCase):
Expand DownExpand Up@@ -3541,7 +3538,7 @@ def test_absolute_symlink(self):
with self.check_context(arc.open(), 'data'):
self.expect_exception(
tarfile.AbsoluteLinkError,
f"'parent' is a symlink to an absolute path")
"'parent' is a symlink to an absolute path")

def test_sly_relative0(self):
# Inspired by 'relative0' in jwilk/traversal-archives
Expand DownExpand Up@@ -3572,8 +3569,8 @@ def test_sly_relative0(self):
with self.check_context(arc.open(), filter):
self.expect_exception(
tarfile.OutsideDestinationError,
f"'../moo' would be extracted to "
+f"'.*moo', which is outside "
"'../moo' would be extracted to "
+ "'.*moo', which is outside "
+ "the destination")

def test_sly_relative2(self):
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp