Skip to content
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

Walk directories in sorted order for reproducibility #517

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
Next Next commit
Merge branch 'main' into pr/517
  • Loading branch information
mayeut committed Dec 8, 2024
commit a1633d3c647bddc0773b44e677f7ce7e64b257ee
6 changes: 3 additions & 3 deletions src/auditwheel/tools.py
Original file line number Diff line number Diff line change
@@ -4,9 +4,9 @@
import os
import subprocess
import zipfile
from collections.abc import Iterable
from collections.abc import Generator, Iterable
from datetime import datetime, timezone
from typing import Any, Generator, Iterable
from typing import Any


def unique_by_index(sequence: Iterable[Any]) -> list[Any]:
@@ -29,7 +29,7 @@ def unique_by_index(sequence: Iterable[Any]) -> list[Any]:
return uniques


def walk(topdir: str) -> Generator[tuple[str, list[str], list[str]], None, None]:
def walk(topdir: str) -> Generator[tuple[str, list[str], list[str]]]:
"""Wrapper for `os.walk` with outputs in reproducible order

Parameters
2 changes: 1 addition & 1 deletion src/auditwheel/wheeltools.py
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ def rewrite_record(bdist_dir: str) -> None:
if exists(sig_path):
os.unlink(sig_path)

def files() -> Generator[str, None, None]:
def files() -> Generator[str]:
for dir, _, files in walk(bdist_dir):
for file in files:
yield pjoin(dir, file)
You are viewing a condensed version of this merge commit. You can view the full changes here.