diff options
| author | Henry Schreiner <HenrySchreinerIII@gmail.com> | 2023-03-13 02:45:47 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-13 11:45:47 +0200 |
| commit | 472e54eadb37ec9ae66a49711c3eb4c311c014e1 (patch) | |
| tree | 1302caa23bb58b9b6aaa07921de73473e9e29abc /src | |
| parent | 61e7eb86ba4cd24e8e32ec3a08aeaa053c0792c8 (diff) | |
| download | wheel-git-472e54eadb37ec9ae66a49711c3eb4c311c014e1.tar.gz | |
Fixed EncodingWarning when PYTHONWARNDEFAULTENCODING is set (#512)
Diffstat (limited to 'src')
| -rw-r--r-- | src/wheel/bdist_wheel.py | 2 | ||||
| -rw-r--r-- | src/wheel/metadata.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/wheel/bdist_wheel.py b/src/wheel/bdist_wheel.py index c059ddc..28a9050 100644 --- a/src/wheel/bdist_wheel.py +++ b/src/wheel/bdist_wheel.py @@ -547,7 +547,7 @@ class bdist_wheel(Command): # delete dependency_links if it is only whitespace dependency_links_path = os.path.join(distinfo_path, "dependency_links.txt") - with open(dependency_links_path) as dependency_links_file: + with open(dependency_links_path, encoding="utf-8") as dependency_links_file: dependency_links = dependency_links_file.read().strip() if not dependency_links: adios(dependency_links_path) diff --git a/src/wheel/metadata.py b/src/wheel/metadata.py index 61c0e4e..b391c96 100644 --- a/src/wheel/metadata.py +++ b/src/wheel/metadata.py @@ -152,7 +152,7 @@ def pkginfo_to_metadata(egg_info_path: str, pkginfo_path: str) -> Message: del pkg_info["Requires-Dist"] requires_path = os.path.join(egg_info_path, "requires.txt") if os.path.exists(requires_path): - with open(requires_path) as requires_file: + with open(requires_path, encoding="utf-8") as requires_file: requires = requires_file.read() parsed_requirements = sorted(split_sections(requires), key=lambda x: x[0] or "") |
