diff -r 9beeb4c1375d Lib/optparse.py --- a/Lib/optparse.py Sat Oct 31 13:07:44 2015 -0700 +++ b/Lib/optparse.py Sat Oct 31 17:07:23 2015 -0400 @@ -74,6 +74,11 @@ import sys, os import textwrap +import warnings + +warnings.warn("The optparse module is deprecated and will not be developed " + "further; development will continue with the argparse module.", + DeprecationWarning, stacklevel=2) def _repr(self): return "<%s at 0x%x: %s>" % (self.__class__.__name__, id(self), self)