From: Raymond Hettinger Date: Wed, 18 Feb 2009 23:12:48 +0000 (+0000) Subject: Py3k warnings now automatically include -Qwarn for division. X-Git-Tag: v2.6.2c1~157 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=32596523ed6c65e1b8b4717b4780b615c83dfecf;p=thirdparty%2FPython%2Fcpython.git Py3k warnings now automatically include -Qwarn for division. --- diff --git a/Misc/NEWS b/Misc/NEWS index 2ebd6cc32550..f95da43f0aae 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -12,6 +12,9 @@ What's New in Python 2.6.2 Core and Builtins ----------------- +- Running Python with the -3 option now also warns about classic division + for ints and longs. + - Issue #5013: Fixed a bug in FileHandler which occurred when the delay parameter was set. diff --git a/Modules/main.c b/Modules/main.c index 6ed2cd7abce7..1a58071c4673 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -317,6 +317,8 @@ Py_Main(int argc, char **argv) case '3': Py_Py3kWarningFlag++; + if (!Py_DivisionWarningFlag) + Py_DivisionWarningFlag = 1; break; case 'Q':