← Back to team overview

divmod-dev team mailing list archive

Re: [Merge] lp:~dobey/divmod.org/pyflakes-less-redef into lp:divmod.org

 

The only place where this will create a potential regression issue, is the example you provide here. However, it appears extremely unlikely that anyone will write such code; and if they do, will experience other issues as a result anyway. While I agree that it would be ideal to not have this happen, simply browsing Python code from various projects shows that

try:
   from new_module_name import foo
except:
   from old_module_name import foo

will occur significantly often. Similar examples even occur directly in the pyflakes code itself (which I presume does not consistently have pyflakes run on it; though it should). I think the pragmatic solution here is to fix the 99.999999+% cases first, and fix the more specific and much less likely to occur cases later, when the code can be refactored to handle them better; as it appears that fixing this "properly" will require such refactoring.

I'm happy to file a bug about this error case, and provide a "TODO" test case that references it, and even help fix it. But I don't think we should continue forcing people to write ugly workarounds to get around this error in pyflakes, as they currently must do, for the extremely common case.
-- 
https://code.launchpad.net/~dobey/divmod.org/pyflakes-less-redef/+merge/130183
Your team Divmod-dev is subscribed to branch lp:divmod.org.


References