Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c5c45ba

Browse files
committed
Use proper py3k syntax for relative import (from . import foo)
1 parent fe25e23 commit c5c45ba

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Lib/xml/etree/ElementInclude.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
##
5050

5151
import copy
52-
import ElementTree
52+
from . import ElementTree
5353

5454
XINCLUDE = "{http://www.w3.org/2001/XInclude}"
5555

Lib/xml/etree/ElementTree.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ def findall(self, element, tag):
133133
return result
134134

135135
try:
136-
import ElementPath
136+
from . import ElementPath
137137
except ImportError:
138138
# FIXME: issue warning in this case?
139+
# TODO: DEFINITELY issue warning here!!!
139140
ElementPath = _SimpleElementPath()
140141

141142
# TODO: add support for custom namespace resolvers/default namespaces

0 commit comments

Comments
 (0)