Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 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
Prev Previous commit
formatting of review suggestions
Signed-off-by: Alessandro Molina <[email protected]>
  • Loading branch information
amol- committed Aug 14, 2025
commit 152672a34b5882e1816214b34cd6b79cb2c45c9e
3 changes: 1 addition & 2 deletions src/pip/_internal/utils/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,7 @@ def format_directory_size(path: str) -> str:

def copy_directory_permissions(directory: str, target_file: BinaryIO) -> None:
mode = (
os.stat(directory).st_mode
& 0o666 # select read/write permissions of directory
os.stat(directory).st_mode & 0o666 # select read/write permissions of directory
| 0o600 # set owner read/write permissions
)
# Change permissions only if there is no risk of following a symlink.
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_self_check_outdated.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_writes_expected_statefile(self, tmpdir: Path) -> None:
"last_check": "2000-01-01T00:00:00+00:00",
"pypi_version": "1.0.0",
}
# Check that the self-check cache entries inherit the root cache permissions.
# Check that the self-check cache entries inherit the root cache permissions.
statefile_permissions = os.stat(expected_path).st_mode & 0o666
selfcheckdir_permissions = os.stat(cache_dir / "selfcheck").st_mode & 0o666
cache_permissions = os.stat(cache_dir).st_mode & 0o666
Expand Down
Loading