Don't raise deprecation warning in property. Closes #1813, #1712

This commit is contained in:
Matthew Honnibal 2018-01-14 14:55:58 +01:00
parent 5081f8a2b4
commit 5cbe913b6f

View File

@ -341,13 +341,14 @@ cdef class Token:
property sent_start:
def __get__(self):
util.deprecated(
"Token.sent_start is now deprecated. Use Token.is_sent_start "
"instead, which returns a boolean value or None if the answer "
"is unknown instead of a misleading 0 for False and 1 for "
"True. It also fixes a quirk in the old logic that would "
"always set the property to 0 for the first word of the "
"document.")
# Raising a deprecation warning causes errors for autocomplete
#util.deprecated(
# "Token.sent_start is now deprecated. Use Token.is_sent_start "
# "instead, which returns a boolean value or None if the answer "
# "is unknown instead of a misleading 0 for False and 1 for "
# "True. It also fixes a quirk in the old logic that would "
# "always set the property to 0 for the first word of the "
# "document.")
# Handle broken backwards compatibility case: doc[0].sent_start
# was False.
if self.i == 0: