cpython: c19752ea037f (original) (raw)
Mercurial > cpython
changeset 68950:c19752ea037f
Remove traces of division_warning left over from Python 2 (#10998) [#10998]
Éric Araujo merwok@netwok.org | |
---|---|
date | Sat, 26 Mar 2011 01:55:15 +0100 |
parents | 03c7a83bbdd3 |
children | 1e237063198c |
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 |
diffstat | 9 files changed, 10 insertions(+), 29 deletions(-)[+] [-] Doc/library/sys.rst 2 Doc/whatsnew/3.3.rst 4 Include/pydebug.h 1 Lib/test/test_cmd_line.py 6 Lib/test/test_sys.py 2 Misc/NEWS 3 Misc/python.man 13 Objects/object.c 2 Python/sysmodule.c 6 |
line wrap: on
line diff
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -232,8 +232,6 @@ always available.
+==============================+==========================================+
| :const:debug
| -d |
+------------------------------+------------------------------------------+
- | :const:
division_warning
| -Q | - +------------------------------+------------------------------------------+
| :const:
inspect
| -i | +------------------------------+------------------------------------------+ | :const:interactive
| -i |
--- a/Doc/whatsnew/3.3.rst
+++ b/Doc/whatsnew/3.3.rst
@@ -133,3 +133,7 @@ that may require changes to your code:
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
--- a/Include/pydebug.h +++ b/Include/pydebug.h @@ -16,7 +16,6 @@ PyAPI_DATA(int) Py_BytesWarningFlag; 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;
--- a/Lib/test/test_cmd_line.py +++ b/Lib/test/test_cmd_line.py @@ -31,12 +31,6 @@ class CmdLineTest(unittest.TestCase): self.verify_valid_flag('-O') self.verify_valid_flag('-OO')
- def test_q(self):
self.verify_valid_flag('-Qold')[](#l4.8)
self.verify_valid_flag('-Qnew')[](#l4.9)
self.verify_valid_flag('-Qwarn')[](#l4.10)
self.verify_valid_flag('-Qwarnall')[](#l4.11)
- def test_site_flag(self): self.verify_valid_flag('-S')
--- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -501,7 +501,7 @@ class SysModuleTest(unittest.TestCase): def test_sys_flags(self): self.assertTrue(sys.flags)
attrs = ("debug", "division_warning",[](#l5.7)
attrs = ("debug",[](#l5.8) "inspect", "interactive", "optimize", "dont_write_bytecode",[](#l5.9) "no_user_site", "no_site", "ignore_environment", "verbose",[](#l5.10) "bytes_warning", "quiet")[](#l5.11)
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ What's New in Python 3.3 Alpha 1? Core and Builtins ----------------- +- Issue #10998: Remove mentions of -Q, sys.flags.division_warning and
- Issue #11244: Remove an unnecessary peepholer check that was preventing negative zeros from being constant-folded properly.
--- a/Misc/python.man +++ b/Misc/python.man @@ -37,10 +37,6 @@ python - an interpreted, interactive, o .B -O0 ] [ -.B -Q -.I argument -] -[ .B -s ] [ @@ -152,15 +148,6 @@ Discard docstrings in addition to the \f 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
--- a/Objects/object.c +++ b/Objects/object.c @@ -29,8 +29,6 @@ Py_ssize_t } #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! */
--- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1312,7 +1312,6 @@ static PyTypeObject FlagsType; static PyStructSequence_Field flags_fields[] = { {"debug", "-d"},
- {"division_warning", "-Q"}, {"inspect", "-i"}, {"interactive", "-i"}, {"optimize", "-O or -OO"}, @@ -1336,9 +1335,9 @@ static PyStructSequence_Desc flags_desc flags__doc__, /* doc / flags_fields, / fields */
#endif }; @@ -1356,7 +1355,6 @@ make_flags(void) PyStructSequence_SET_ITEM(seq, pos++, PyLong_FromLong(flag)) SetFlag(Py_DebugFlag);