packaging: don't use locale encoding to compute MD5 checksums

Open the file in binary mode or use UTF-8 encoding.
diff --git a/Lib/packaging/tests/test_command_install_distinfo.py b/Lib/packaging/tests/test_command_install_distinfo.py
index 3d33691..6d40f66 100644
--- a/Lib/packaging/tests/test_command_install_distinfo.py
+++ b/Lib/packaging/tests/test_command_install_distinfo.py
@@ -168,8 +168,8 @@
             else:
                 size = os.path.getsize(f)
                 md5 = hashlib.md5()
-                with open(f) as fp:
-                    md5.update(fp.read().encode())
+                with open(f, 'rb') as fp:
+                    md5.update(fp.read())
                 hash = md5.hexdigest()
                 expected.append([f, hash, str(size)])