New submission from Martin v. Löwis <mar...@v.loewis.de>:

There is an unfortunate interaction of two fixers to be observed in
django. django.util.text.py contains

from htmlentitydefs import name2codepoint

This gets fixed to

from .html.entities import name2codepoint

because there is also a local module django.util.html. This is
incorrect; it should have converted it to

from html.entities import name2codepoint

As a workaround, I now run

   name2codepoint = __import__('html.entities').entities.name2codepoint

on ImportError of the (converted) import statement. Is there a better
work-around?

----------
components: 2to3 (2.x to 3.0 conversion tool)
messages: 79395
nosy: loewis
severity: normal
status: open
title: Incorrect detection of module as local

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4876>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to