Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
be3bd57b
Commit
be3bd57b
authored
Mar 26, 2011
by
Éric Araujo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove traces of division_warning left over from Python 2 (#10998)
parent
79fe2a34
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
10 additions
and
29 deletions
+10
-29
Doc/library/sys.rst
Doc/library/sys.rst
+0
-2
Doc/whatsnew/3.3.rst
Doc/whatsnew/3.3.rst
+4
-0
Include/pydebug.h
Include/pydebug.h
+0
-1
Lib/test/test_cmd_line.py
Lib/test/test_cmd_line.py
+0
-6
Lib/test/test_sys.py
Lib/test/test_sys.py
+1
-1
Misc/NEWS
Misc/NEWS
+3
-0
Misc/python.man
Misc/python.man
+0
-13
Objects/object.c
Objects/object.c
+0
-2
Python/sysmodule.c
Python/sysmodule.c
+2
-4
No files found.
Doc/library/sys.rst
View file @
be3bd57b
...
...
@@ -232,8 +232,6 @@ always available.
+==============================+==========================================+
| :const:`debug` | -d |
+------------------------------+------------------------------------------+
| :const:`division_warning` | -Q |
+------------------------------+------------------------------------------+
| :const:`inspect` | -i |
+------------------------------+------------------------------------------+
| :const:`interactive` | -i |
...
...
Doc/whatsnew/3.3.rst
View file @
be3bd57b
...
...
@@ -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
removed. Code checking sys.flags.division_warning will need updating.
Contributed by Éric Araujo.
Include/pydebug.h
View file @
be3bd57b
...
...
@@ -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
;
...
...
Lib/test/test_cmd_line.py
View file @
be3bd57b
...
...
@@ -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'
)
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'
)
...
...
Lib/test/test_sys.py
View file @
be3bd57b
...
...
@@ -501,7 +501,7 @@ class SysModuleTest(unittest.TestCase):
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"
)
...
...
Misc/NEWS
View file @
be3bd57b
...
...
@@ -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
Py_DivisionWarningFlag left over from Python 2.
- Issue #11244: Remove an unnecessary peepholer check that was preventing
negative zeros from being constant-folded properly.
...
...
Misc/python.man
View file @
be3bd57b
...
...
@@ -37,10 +37,6 @@ python \- an interpreted, interactive, object-oriented programming language
.B \-O0
]
[
.B -Q
.I argument
]
[
.B \-s
]
[
...
...
@@ -152,15 +148,6 @@ Discard docstrings in addition to the \fB-O\fP optimizations.
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
...
...
Objects/object.c
View file @
be3bd57b
...
...
@@ -29,8 +29,6 @@ _Py_GetRefTotal(void)
}
#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! */
...
...
Python/sysmodule.c
View file @
be3bd57b
...
...
@@ -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 */
#ifdef RISCOS
13
#else
12
#else
11
#endif
};
...
...
@@ -1356,7 +1355,6 @@ make_flags(void)
PyStructSequence_SET_ITEM(seq, pos++, PyLong_FromLong(flag))
SetFlag
(
Py_DebugFlag
);
SetFlag
(
Py_DivisionWarningFlag
);
SetFlag
(
Py_InspectFlag
);
SetFlag
(
Py_InteractiveFlag
);
SetFlag
(
Py_OptimizeFlag
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment