(original) (raw)
changeset: 68950:c19752ea037f parent: 68934:03c7a83bbdd3 user: Éric Araujo merwok@netwok.org date: Sat Mar 26 01:55:15 2011 +0100 files: Doc/library/sys.rst Doc/whatsnew/3.3.rst Include/pydebug.h Lib/test/test_cmd_line.py Lib/test/test_sys.py Misc/NEWS Misc/python.man Objects/object.c Python/sysmodule.c description: Remove traces of division_warning left over from Python 2 (#10998) diff -r 03c7a83bbdd3 -r c19752ea037f Doc/library/sys.rst --- a/Doc/library/sys.rst Fri Mar 25 16:20:16 2011 -0400 +++ b/Doc/library/sys.rst Sat Mar 26 01:55:15 2011 +0100 @@ -232,8 +232,6 @@ +==============================+==========================================+ | :const:`debug` | -d | +------------------------------+------------------------------------------+ - | :const:`division_warning` | -Q | - +------------------------------+------------------------------------------+ | :const:`inspect` | -i | +------------------------------+------------------------------------------+ | :const:`interactive` | -i | diff -r 03c7a83bbdd3 -r c19752ea037f Doc/whatsnew/3.3.rst --- a/Doc/whatsnew/3.3.rst Fri Mar 25 16:20:16 2011 -0400 +++ b/Doc/whatsnew/3.3.rst Sat Mar 26 01:55:15 2011 +0100 @@ -133,3 +133,7 @@ ``import site`` will not add site-specific paths to the module search paths. In previous versions, it did. See changeset for doc changes in various files. Contributed by Carl Meyer with editions by Éric Araujo. + +.. Issue #10998: -Q command-line flags are related artifacts have been + removed. Code checking sys.flags.division_warning will need updating. + Contributed by Éric Araujo. diff -r 03c7a83bbdd3 -r c19752ea037f Include/pydebug.h --- a/Include/pydebug.h Fri Mar 25 16:20:16 2011 -0400 +++ b/Include/pydebug.h Sat Mar 26 01:55:15 2011 +0100 @@ -16,7 +16,6 @@ PyAPI_DATA(int) Py_UseClassExceptionsFlag; PyAPI_DATA(int) Py_FrozenFlag; PyAPI_DATA(int) Py_IgnoreEnvironmentFlag; -PyAPI_DATA(int) Py_DivisionWarningFlag; PyAPI_DATA(int) Py_DontWriteBytecodeFlag; PyAPI_DATA(int) Py_NoUserSiteDirectory; PyAPI_DATA(int) Py_UnbufferedStdioFlag; diff -r 03c7a83bbdd3 -r c19752ea037f Lib/test/test_cmd_line.py --- a/Lib/test/test_cmd_line.py Fri Mar 25 16:20:16 2011 -0400 +++ b/Lib/test/test_cmd_line.py Sat Mar 26 01:55:15 2011 +0100 @@ -31,12 +31,6 @@ self.verify_valid_flag('-O') self.verify_valid_flag('-OO') - def test_q(self): - self.verify_valid_flag('-Qold') - self.verify_valid_flag('-Qnew') - self.verify_valid_flag('-Qwarn') - self.verify_valid_flag('-Qwarnall') - def test_site_flag(self): self.verify_valid_flag('-S') diff -r 03c7a83bbdd3 -r c19752ea037f Lib/test/test_sys.py --- a/Lib/test/test_sys.py Fri Mar 25 16:20:16 2011 -0400 +++ b/Lib/test/test_sys.py Sat Mar 26 01:55:15 2011 +0100 @@ -501,7 +501,7 @@ def test_sys_flags(self): self.assertTrue(sys.flags) - attrs = ("debug", "division_warning", + attrs = ("debug", "inspect", "interactive", "optimize", "dont_write_bytecode", "no_user_site", "no_site", "ignore_environment", "verbose", "bytes_warning", "quiet") diff -r 03c7a83bbdd3 -r c19752ea037f Misc/NEWS --- a/Misc/NEWS Fri Mar 25 16:20:16 2011 -0400 +++ b/Misc/NEWS Sat Mar 26 01:55:15 2011 +0100 @@ -10,6 +10,9 @@ Core and Builtins ----------------- +- Issue #10998: Remove mentions of -Q, sys.flags.division_warning and + Py_DivisionWarningFlag left over from Python 2. + - Issue #11244: Remove an unnecessary peepholer check that was preventing negative zeros from being constant-folded properly. diff -r 03c7a83bbdd3 -r c19752ea037f Misc/python.man --- a/Misc/python.man Fri Mar 25 16:20:16 2011 -0400 +++ b/Misc/python.man Sat Mar 26 01:55:15 2011 +0100 @@ -37,10 +37,6 @@ .B \-O0 ] [ -.B -Q -.I argument -] -[ .B \-s ] [ @@ -152,15 +148,6 @@ Do not print the version and copyright messages. These messages are also suppressed in non-interactive mode. .TP -.BI "\-Q " argument -Division control; see PEP 238. The argument must be one of "old" (the -default, int/int and long/long return an int or long), "new" (new -division semantics, i.e. int/int and long/long returns a float), -"warn" (old division semantics with a warning for int/int and -long/long), or "warnall" (old division semantics with a warning for -all use of the division operator). For a use of "warnall", see the -Tools/scripts/fixdiv.py script. -.TP .B \-s Don't add user site directory to sys.path. .TP diff -r 03c7a83bbdd3 -r c19752ea037f Objects/object.c --- a/Objects/object.c Fri Mar 25 16:20:16 2011 -0400 +++ b/Objects/object.c Sat Mar 26 01:55:15 2011 +0100 @@ -29,8 +29,6 @@ } #endif /* Py_REF_DEBUG */ -int Py_DivisionWarningFlag; - /* Object allocation routines used by NEWOBJ and NEWVAROBJ macros. These are used by the individual routines for object creation. Do not call them otherwise, they do not initialize the object! */ diff -r 03c7a83bbdd3 -r c19752ea037f Python/sysmodule.c --- a/Python/sysmodule.c Fri Mar 25 16:20:16 2011 -0400 +++ b/Python/sysmodule.c Sat Mar 26 01:55:15 2011 +0100 @@ -1312,7 +1312,6 @@ static PyStructSequence_Field flags_fields[] = { {"debug", "-d"}, - {"division_warning", "-Q"}, {"inspect", "-i"}, {"interactive", "-i"}, {"optimize", "-O or -OO"}, @@ -1336,9 +1335,9 @@ flags__doc__, /* doc */ flags_fields, /* fields */ #ifdef RISCOS - 13 + 12 #else - 12 + 11 #endif }; @@ -1356,7 +1355,6 @@ PyStructSequence_SET_ITEM(seq, pos++, PyLong_FromLong(flag)) SetFlag(Py_DebugFlag); - SetFlag(Py_DivisionWarningFlag); SetFlag(Py_InspectFlag); SetFlag(Py_InteractiveFlag); SetFlag(Py_OptimizeFlag); /merwok@netwok.org