From 10713a78136e6b2e54b128defae74762824a7d31 Mon Sep 17 00:00:00 2001 From: Julian Berman Date: Tue, 29 Nov 2022 14:44:08 -0500 Subject: [PATCH] Fix twine( check) with the newly released pkginfo 1.9. It (the pkginfo release) removes `distribution.must_decode`, though that function was questionably public as it was an "exposed" compatibility function (removed as part of pkginfo dropping 2.7 support). See https://bazaar.launchpad.net/~tseaver/pkginfo/trunk/revision/205 --- twine/wheel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twine/wheel.py b/twine/wheel.py index 109de97b..cf90eab7 100644 --- a/twine/wheel.py +++ b/twine/wheel.py @@ -86,6 +86,6 @@ def read_file(name: str) -> bytes: def parse(self, data: bytes) -> None: super().parse(data) - fp = io.StringIO(distribution.must_decode(data)) + fp = io.StringIO(data.decode("utf-8", errors="replace")) msg = distribution.parse(fp) self.description = msg.get_payload()