Backport of r72946. This closes Issue 6100 and 6951 for the 2.6 branch.
Backport of r72946. This closes Issue 6100 and 6951 for
the 2.6 branch.

sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator