This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: list_distinfo_file is wrong
Type: behavior Stage: resolved
Components: Distutils2 Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: eric.araujo Nosy List: alexis, eric.araujo, higery, jkloth, michael.mulich, nadeem.vawda, python-dev
Priority: high Keywords: patch

Created on 2011-08-19 15:56 by eric.araujo, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix-list_distinfo_files.diff eric.araujo, 2011-09-13 12:49 review
Messages (12)
msg142469 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-08-19 15:56
The list_distinfo_files method does not fulfills its mission.  I changed the test file to be more stupid (and therefore not use high-level functions that we can’t trust) when building the expected list and discovered that list_distinfo_files returned too many files!

I would need someone to test the attached patch on Windows to see if I need to replace '/' in self.path or not (the code before the XXX comment).
msg142642 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2011-08-21 19:58
With the patch applied, I still get failures in test_old_record_extensions
and test_record_basic, so it doesn't seem to work.
msg142773 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-08-22 23:31
Thanks.  Can you test again after removing these two lines:

        # XXX see first if we need to convert at all
        prefix = self.path
msg142775 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-08-22 23:32
Ahem, I read your message too fast.

> With the patch applied, I still get failures in test_old_record_extensions
> and test_record_basic, so it doesn't seem to work.
These are unrelated, I’m only interested in test_database for this patch.
msg142781 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2011-08-23 05:49
> These are unrelated, I’m only interested in test_database for this patch.

I see. I'll re-run the tests this evening, and see whether that failure
crops up.
msg143156 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-08-29 16:17
The tests using build_ext now pass \o/  I would love for someone with Windows and a 3.3 clone to test this patch (and if it does not fix, try with the two lines mentioned in msg142773 removed).
msg143191 - (view) Author: Nadeem Vawda (nadeem.vawda) * (Python committer) Date: 2011-08-29 22:54
I've tested the attached patch against 3.3 on Windows XP, and it seems to
fix the test_database failures. There were some merge conflicts when I
applied the patch (because some of the docstring and comment changes had
already been committed in fixes from the other issue), so I've uploaded
the exact diff of what I tested with.

I tested both with and without the change you suggested in msg142773 -
the tests pass in both cases.
msg143261 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-08-31 15:21
> I've tested the attached patch against 3.3 on Windows XP, and it
> seems to fix the test_database failures.
Thanks.

> I've uploaded the exact diff of what I tested with.
Your diff matches the one I get after updating my clone, we’re good.

> I tested both with and without the change you suggested in msg142773 -
> the tests pass in both cases.
I have to have another look at the code to make sure this makes sense and take the right approach.
msg143962 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-09-13 12:49
I have added tests to make sure the return value (depending on the local parameter) is correct.  Please test when you have a free slot.  If it fails, the usual line after the XXX comment should be deleted and the test re-run.
msg143982 - (view) Author: Jeremy Kloth (jkloth) * Date: 2011-09-13 17:56
The attached patch seems to work as-is.  That is, just testing for `self.path` as the prefix.  On Windows, at least, the paths in RECORD are always absolute.

Further changes will be necessary, of course, once changes for alternative paths (--prefix, --home, and so on) are incorporated.
msg144086 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-09-15 16:19
New changeset c6d52971dd2a by Éric Araujo in branch 'default':
Fix packaging.database.Distribution.list_distinfo_files (#12785).
http://hg.python.org/cpython/rev/c6d52971dd2a
msg144272 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-09-19 13:35
Backported to distutils2 as 5e49c9bc43eb.
History
Date User Action Args
2022-04-11 14:57:20adminsetgithub: 56994
2011-09-19 13:35:26eric.araujosetmessages: + msg144272
2011-09-17 15:25:32eric.araujosetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2011-09-15 16:19:42python-devsetnosy: + python-dev
messages: + msg144086
2011-09-13 17:56:15jklothsetnosy: + jkloth
messages: + msg143982
2011-09-13 12:52:30eric.araujosetfiles: - fix-list_distinfo_files-2.diff
2011-09-13 12:52:27eric.araujosetfiles: - fix-list_distinfo_files.diff
2011-09-13 12:49:15eric.araujosetfiles: + fix-list_distinfo_files.diff

messages: + msg143962
2011-08-31 15:21:28eric.araujosetmessages: + msg143261
2011-08-29 22:54:34nadeem.vawdasetfiles: + fix-list_distinfo_files-2.diff

messages: + msg143191
2011-08-29 16:17:16eric.araujosetmessages: + msg143156
2011-08-23 05:49:58nadeem.vawdasetmessages: + msg142781
2011-08-22 23:32:43eric.araujosetmessages: + msg142775
2011-08-22 23:31:16eric.araujosetmessages: + msg142773
2011-08-21 19:58:50nadeem.vawdasetnosy: + nadeem.vawda
messages: + msg142642
2011-08-19 15:57:40eric.araujolinkissue12678 dependencies
2011-08-19 15:57:29eric.araujosetfiles: + fix-list_distinfo_files.diff
keywords: + patch
2011-08-19 15:56:50eric.araujocreate