[BUG] _load_raw method of class PthDistributions has an issue from version 67.8.0 #4731
Labels
bug
deprecated
Deprecated functionality is *partially* supported in a "best effort" manner
Needs Triage
Issues that need to be evaluated for severity and status.
setuptools version
setuptools==67.8.0
Python version
Python3.11
OS
macOS
Additional environment information
No response
Description
just upgrade my python package with python setup.py install. but find that still link to old version package and find that the version was not deleted from easy-install.pth
looks like setuptools==67.7.2 is ok, but from setuptools==67.8.0, there is an issue in _load_raw method of class PthDistributions:
normalized_path = normalize_path(os.path.join(self.basedir, path)
it maybe should is paths[-1]=normalized_path = normalize_path(os.path.join(self.basedir, path))
the paths is not full path, so, there will be an issue in below find_distributions:
self.paths, self.dirty = self._load()
self._init_paths = self.paths[:]
super().init([], None, None)
for path in yield_lines(self.paths):
list(map(self.add, find_distributions(path, True)))
Expected behavior
when upgrade the package, the previous version should be remove from easy-install.pth and can link to the current version
How to Reproduce
Copying test_cli-1.0.28-py3.9.egg to /usr/local/lib/python3.9/site-packages
Removing test-cli 1.0.27 from easy-install.pth file
Adding test-cli 1.0.28 to easy-install.pth file
Output
Copying test_cli-1.0.28-py3.9.egg to /usr/local/lib/python3.9/site-packages
Removing test-cli 1.0.27 from easy-install.pth file
Adding test-cli 1.0.28 to easy-install.pth file
The text was updated successfully, but these errors were encountered: