diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2022-05-09 10:42:04 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2022-05-09 10:42:56 -0400 |
commit | 9116c7eb52504bec77d26881d2c28e427dc52143 (patch) | |
tree | 6becb88401eb15bdff6fc924211894e6d9c277d1 /setuptools/package_index.py | |
parent | 8d12d6196c369c7cf0164a1202e968dd68a2cb6c (diff) | |
parent | e009a87b5578cb16099b697ba8395c8f6bdd70f3 (diff) | |
download | python-setuptools-git-debt/remove-easy-install.tar.gz |
Merge branch 'main' into debt/remove-easy-installdebt/remove-easy-install
Diffstat (limited to 'setuptools/package_index.py')
-rw-r--r-- | setuptools/package_index.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 270e7f3c..14881d29 100644 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -285,7 +285,7 @@ class PackageIndex(Environment): self, index_url="https://pypi.org/simple/", hosts=('*',), ca_bundle=None, verify_ssl=True, *args, **kw ): - Environment.__init__(self, *args, **kw) + super().__init__(*args, **kw) self.index_url = index_url + "/" [:not index_url.endswith('/')] self.scanned_urls = {} self.fetched_urls = {} @@ -680,8 +680,7 @@ class PackageIndex(Environment): # Make sure the file has been downloaded to the temp dir. if os.path.dirname(filename) != tmpdir: dst = os.path.join(tmpdir, basename) - from setuptools.command.easy_install import samefile - if not samefile(filename, dst): + if not (os.path.exists(dst) and os.path.samefile(filename, dst)): shutil.copy2(filename, dst) filename = dst @@ -1002,7 +1001,7 @@ class PyPIConfig(configparser.RawConfigParser): Load from ~/.pypirc """ defaults = dict.fromkeys(['username', 'password', 'repository'], '') - configparser.RawConfigParser.__init__(self, defaults) + super().__init__(defaults) rc = os.path.join(os.path.expanduser('~'), '.pypirc') if os.path.exists(rc): |