Skip to content

Commit

Permalink
tests: do not use SdistBuilder method which is not static anymore (#9777
Browse files Browse the repository at this point in the history
)
  • Loading branch information
radoering authored Oct 18, 2024
1 parent 80d09c0 commit d31b3ac
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/repositories/fixtures/pypi.org/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
from typing import Iterator

from packaging.metadata import parse_email
from poetry.core.masonry.builders.sdist import SdistBuilder
from poetry.core.masonry.utils.helpers import normalize_file_permissions
from poetry.core.packages.package import Package

from poetry.repositories.pypi_repository import PyPiRepository
Expand Down Expand Up @@ -356,8 +356,12 @@ def process_tarfile(self, link: Link) -> ReleaseFileMetadata:
dst, mode="w", fileobj=gz, format=tarfile.PAX_FORMAT
) as dst_tf, tarfile.open(src, "r") as src_tf:
for member in src_tf.getmembers():
member.uid = 0
member.gid = 0
member.uname = ""
member.gname = ""
member.mtime = 0
member = SdistBuilder.clean_tarinfo(member)
member.mode = normalize_file_permissions(member.mode)

if member.isfile() and not is_protected(Path(member.name).name):
logger.debug("Stubbing file %s(%s)", link.filename, member.name)
Expand Down

0 comments on commit d31b3ac

Please sign in to comment.