[issue10367] "python setup.py sdist upload --show-response" can fail with "UnboundLocalError: local variable 'result' referenced before assignment"
report at bugs.python.org
Wed Mar 2 11:58:41 CET 2011
Éric Araujo <merwok at netwok.org> added the comment:
Sorry for overlooking this. The test is good, I could trigger the bug with it and then fix it with the patch.
Would you mind adding the same test for upload_docs? The code was originally copied from upload, so we should test it too.
Philip: I understand your motives but respectfully disagree with them.
> The urgency was only that I didn't want the other contributors to
> this issue to feel as though the bar on their contributions were
> being raised higher every time they jumped the previous bar.
I try not to put off people by demanding a test, but asking if they want to write one and providing guidance. I think it’s worked quite well with a lot of our recent contributors from Montréal and other places, but I’m open to critiques about my tone or phrasing, I don’t want to sound like I require a huge amount of work from people who report bugs.
> I did it to make them feel like somebody was doing *something*. In
> hindsight, that was not necessarily the best tactic. ;-)
Well, I don’t really care about appearances or feelings; the truth of the situation is that there are a lot of easy and hard bugs and a few people to look at them, I don’t think we should mask it. Prior to December, I was reactive in this report.
> (Given the nature of the bugfix and the bugfix-only status of the 2.7
> line, I don't think the lack of an automated test is a big deal; the
> odds that anything other than trivial bugfixes will be applied to
> this module in the future seem negligible to me.
You know more about distutils than me, but from the short time I’ve worked with this codebase, read bug reports and mailing list archives, I’ve found that it’s too optimistic to change something without an automated test. I have committed a bug in upload.py once :) That’s why I decided to draw a line and stop guessing and hoping things would be right and rely on regression tests. This adds a bit of work for our contributors, but my intention is not to put off people, but to make things more robust. We owe that to our users and to future distutils contributors.
I do hope this explains why seemingly trivial changes require a test too. I’d also like to thank you for your help in this report.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list