John Hagen added the comment: @martin.panter My new patch fixes Lib/test_optparse.py by suppressing the warning like test_imp does as you suggested.
@serhiy.storchaka I don't have a strong preference that it be a DeprecationWarning vs. PendingDeprecationWarning since to me, both get the point across to the end-user to avoid it. I do, however, feel that it is important raise some kind of warning since it seems clear from the docs that is deprecated. In my new patch I changed the type of warning to a PendingDeprecationWarning, as there seems to be at least some notion that optparse is a special case. I don't have a strong opinion about which type of deprecation warning is used. My new patch works when test_optparse.py is run with -Werror on 3.6.0a0. ---------- Added file: http://bugs.python.org/file40921/optparse_and_test_deprecationwarning.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25521> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com