[issue4909] incorrect renaming in imports

2009-01-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Ok. I will close this for now. This is a very common construct; if we get more bug reports, we can reconsider. (I'm attaching the patch I used to "fix" this for future reference.) -- keywords: +patch resolution: -> wont fix status: open -> closed Ad

[issue4909] incorrect renaming in imports

2009-01-10 Thread Martin v. Löwis
Martin v. Löwis added the comment: If there is no straight-forward solution, we should close it as "won't fix", and encourage users to work around. ___ Python tracker ___

[issue4909] incorrect renaming in imports

2009-01-10 Thread Benjamin Peterson
Benjamin Peterson added the comment: Tricky. I only solution I can think of is replacing cStringIO with _stringio or just refusing to replace StringIO usage once cStringIO has been seen. The latter seems like the best solutions. -- nosy: +benjamin.peterson _

[issue4909] incorrect renaming in imports

2009-01-10 Thread Martin v. Löwis
New submission from Martin v. Löwis : The fragment try: import cStringIO as StringIO except ImportError: import StringIO s=StringIO.StringIO() gets rewritten to try: import io as StringIO except ImportError: import io s=io.StringIO() Unfortunately, that code fails to work: the