[issue3994] import fixer misses some symbols

Nick Edds report at bugs.python.org
Thu Oct 9 00:18:01 CEST 2008


Nick Edds <nedds at uchicago.edu> added the comment:

The problem is that fix_imports doesn't look at matches that are nested
within matches. So the _winreg.OpenKey part gets fixed, but the
_winreg.HKEY_LOCAL_MACHINE does not because it is nested within the
other node. I didn't make fix_imports so I don't know what the intention
was for not matching nested matches. When I removed that restriction,
the fixer works as expected. It also does not cause any of 2to3's tests
to fail nor does it have a noticeable impact on 2to3's runtime, so I'm
tempted to say that this is the fix to make, but I don't want to commit
to it until I've heard from it's author about it. I added Collin to the
Nosy List, so hopefully he can comment on the reasoning behind the
restriction.

----------
nosy: +collinwinter

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3994>
_______________________________________


More information about the Python-bugs-list mailing list