diff options
| -rw-r--r-- | changelog.d/2785-change.rst | 2 | ||||
| -rw-r--r-- | setuptools/command/easy_install.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/changelog.d/2785-change.rst b/changelog.d/2785-change.rst new file mode 100644 index 00000000..7e9631b7 --- /dev/null +++ b/changelog.d/2785-change.rst @@ -0,0 +1,2 @@ +Replace confirparser's readfp with read_file, deprecated since Python 3.2. +-- by :user:`hugovk` diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py index 43bd2952..5e0f97cf 100644 --- a/setuptools/command/easy_install.py +++ b/setuptools/command/easy_install.py @@ -1508,7 +1508,7 @@ def extract_wininst_cfg(dist_filename): # Now the config is in bytes, but for RawConfigParser, it should # be text, so decode it. config = config.decode(sys.getfilesystemencoding()) - cfg.readfp(io.StringIO(config)) + cfg.read_file(io.StringIO(config)) except configparser.Error: return None if not cfg.has_section('metadata') or not cfg.has_section('Setup'): |
