Fixed #2677 -- Removed the need to import sre and hence avoid a
DeprecationWarning. Thanks, Tom Tobin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@3814 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
8f7ab8efed
commit
b05e5501a4
|
@ -3,12 +3,11 @@ Iterator based sre token scanner
|
|||
"""
|
||||
import sre_parse, sre_compile, sre_constants
|
||||
from sre_constants import BRANCH, SUBPATTERN
|
||||
from sre import VERBOSE, MULTILINE, DOTALL
|
||||
import re
|
||||
|
||||
__all__ = ['Scanner', 'pattern']
|
||||
|
||||
FLAGS = (VERBOSE | MULTILINE | DOTALL)
|
||||
FLAGS = (re.VERBOSE | re.MULTILINE | re.DOTALL)
|
||||
class Scanner(object):
|
||||
def __init__(self, lexicon, flags=FLAGS):
|
||||
self.actions = [None]
|
||||
|
|
Loading…
Reference in New Issue