diff options
| author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2021-09-12 15:06:18 +0300 |
|---|---|---|
| committer | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2021-09-12 15:06:18 +0300 |
| commit | e7be3a18b97f81b39954ca928cfc6bd0b401f400 (patch) | |
| tree | 76ec20f72b1d2fe3316a6ee19c9cef8f00f1ba89 | |
| parent | fdb818def5e262eee8edc4cc7ba1b79461096bfc (diff) | |
| download | python-setuptools-git-e7be3a18b97f81b39954ca928cfc6bd0b401f400.tar.gz | |
configparser: replace deprecated readfp with read_file
| -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'): |
