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

[3.10] gh-102950: Implement PEP 706 – Filter for tarfile.extractall (GH-102953)#104327

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

Closed
encukou wants to merge7 commits intopython:3.10fromencukou:PEP706-for-py310
Closed
Changes from1 commit
Commits
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
Skip chmod checking on Windows
  • Loading branch information
@encukou
encukou committedMay 9, 2023
commit62602ff60ac0302a0d57cfde5da9c11b0aef9b0f
7 changes: 6 additions & 1 deletionLib/test/test_tarfile.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3284,9 +3284,14 @@ def expect_file(self, name, type=None, symlink_to=None, mode=None):
path = pathlib.Path(os.path.normpath(self.destdir / name))
self.assertIn(path, self.expected_paths)
self.expected_paths.remove(path)
if mode is not None:

# When checking mode, ignore Windows (which can only set user read and
# user write bits). Newer versions of Python use `os_helper.can_chmod()`
# instead of hardcoding Windows.
if mode is not None and sys.platform != 'win32':
got = stat.filemode(stat.S_IMODE(path.stat().st_mode))
self.assertEqual(got, mode)

if type is None and isinstance(name, str) and name.endswith('/'):
type = tarfile.DIRTYPE
if symlink_to is not None:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp