1010from .treebuilders ._base import Marker
1111
1212from .import utils
13- from .import constants
14- from .constants import spaceCharacters ,asciiUpper2Lower
15- from .constants import specialElements
16- from .constants import headingElements
17- from .constants import cdataElements ,rcdataElements
18- from .constants import tokenTypes ,ReparseException ,namespaces
19- from .constants import htmlIntegrationPointElements ,mathmlTextIntegrationPointElements
20- from .constants import adjustForeignAttributes as adjustForeignAttributesMap
21- from .constants import E
13+ from .constants import (
14+ spaceCharacters ,asciiUpper2Lower ,
15+ specialElements ,headingElements ,cdataElements ,rcdataElements ,
16+ tokenTypes ,tagTokenTypes ,
17+ namespaces ,
18+ htmlIntegrationPointElements ,mathmlTextIntegrationPointElements ,
19+ adjustForeignAttributes as adjustForeignAttributesMap ,
20+ E ,
21+ ReparseException
22+ )
2223
2324
2425def parse (doc ,treebuilder = "etree" ,encoding = None ,
@@ -434,7 +435,7 @@ def getPhases(debug):
434435def log (function ):
435436"""Logger that records which phase processes each token"""
436437type_names = dict ((value ,key )for key ,value in
437- constants . tokenTypes .items ())
438+ tokenTypes .items ())
438439
439440def wrapped (self ,* args ,** kwargs ):
440441if function .__name__ .startswith ("process" )and len (args )> 0 :
@@ -443,7 +444,7 @@ def wrapped(self, *args, **kwargs):
443444info = {"type" :type_names [token ['type' ]]}
444445except :
445446raise
446- if token ['type' ]in constants . tagTokenTypes :
447+ if token ['type' ]in tagTokenTypes :
447448info ["name" ]= token ['name' ]
448449
449450self .parser .log .append ((self .parser .tokenizer .state .__name__ ,