mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
Fix packaging.database.Distribution.list_distinfo_files (#12785).
This method was supposed to return only the file under the dist-info directory, but it actually returned all installed files. The tests didn’t catch this because they were flawed; I updated them. Thanks to Nadeem Vawda and Jeremy Kloth for testing. As a bonus, the removal of os.path.relpath use should also fix the Windows buildbots.
This commit is contained in:
parent
86ca04ccc7
commit
37ccd6f794
2 changed files with 27 additions and 23 deletions
|
@ -263,7 +263,9 @@ class Distribution:
|
|||
:returns: iterator of paths
|
||||
"""
|
||||
for path, checksum, size in self._get_records(local):
|
||||
yield path
|
||||
# XXX add separator or use real relpath algo
|
||||
if path.startswith(self.path):
|
||||
yield path
|
||||
|
||||
def __eq__(self, other):
|
||||
return isinstance(other, Distribution) and self.path == other.path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue