diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-09 02:45:38 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2015-12-09 02:45:38 -0500 |
| commit | a377c191b9394376988029934ec26f1edaab1812 (patch) | |
| tree | 9c3877aa9fc3dc28bbf6e46b6038400209cd2e83 | |
| parent | 91afe3b30dd32d439ab8914ba3a80bbe2d9f293c (diff) | |
| download | external_python_setuptools-a377c191b9394376988029934ec26f1edaab1812.tar.gz external_python_setuptools-a377c191b9394376988029934ec26f1edaab1812.tar.bz2 external_python_setuptools-a377c191b9394376988029934ec26f1edaab1812.zip | |
Remove deprecated use of 'U' in io.open mode parameter. Fixes #472.
| -rw-r--r-- | CHANGES.txt | 2 | ||||
| -rw-r--r-- | pkg_resources/__init__.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index a48cd3e1..0fcf4c61 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -11,6 +11,8 @@ CHANGES package_index. * Issue #419: Avoid errors in FileMetadata when the metadata directory is broken. +* Issue #472: Remove deprecated use of 'U' in mode parameter + when opening files. ------ 18.7.1 diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2cb851b1..f65fef3e 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -2021,7 +2021,7 @@ class FileMetadata(EmptyProvider): def get_metadata(self, name): if name=='PKG-INFO': - with io.open(self.path, 'rU', encoding='utf-8') as f: + with io.open(self.path, encoding='utf-8') as f: metadata = f.read() return metadata raise KeyError("No metadata except PKG-INFO is available") |
