durin42 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REVISION SUMMARY Experimentally passing the pathlib.Path to zipfile.ZipFile fails on at least some Python versions. I've gotten frustrated enough I'd rather just force them to be strings and move on. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D6258 AFFECTED FILES contrib/packaging/hgpackaging/util.py CHANGE DETAILS diff --git a/contrib/packaging/hgpackaging/util.py b/contrib/packaging/hgpackaging/util.py --- a/contrib/packaging/hgpackaging/util.py +++ b/contrib/packaging/hgpackaging/util.py @@ -17,12 +17,12 @@ def extract_tar_to_directory(source: pathlib.Path, dest: pathlib.Path): - with tarfile.open(source, 'r') as tf: + with tarfile.open(str(source), 'r') as tf: tf.extractall(dest) def extract_zip_to_directory(source: pathlib.Path, dest: pathlib.Path): - with zipfile.ZipFile(source, 'r') as zf: + with zipfile.ZipFile(str(source), 'r') as zf: zf.extractall(dest) To: durin42, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel