Remove deprecation shim around str/bytes in Token.

This commit is contained in:
Matthew Honnibal 2016-10-17 14:02:47 +02:00
parent b67697a97b
commit 7fd98fc91c
1 changed files with 2 additions and 12 deletions

View File

@ -43,20 +43,10 @@ cdef class Token:
return self.c.lex.length return self.c.lex.length
def __unicode__(self): def __unicode__(self):
# Users can toggle this on to preserve former buggy semantics. return self.text
# Remove this in future versions.
if _STR_TRAILING_WHITESPACE:
return self.text_with_ws
else:
return self.text
def __bytes__(self): def __bytes__(self):
# Users can toggle this on to preserve former buggy semantics. return self.text.encode('utf8')
# Remove this in future versions.
if _STR_TRAILING_WHITESPACE:
return self.text_with_ws.encode('utf8')
else:
return self.text.encode('utf8')
def __str__(self): def __str__(self):
if six.PY3: if six.PY3: