Author: Brian Kearns <[email protected]>
Branch:
Changeset: r61049:daff78b35e66
Date: 2013-02-10 16:10 -0500
http://bitbucket.org/pypy/pypy/changeset/daff78b35e66/
Log: kill this old unused flag
diff --git a/pypy/interpreter/app_main.py b/pypy/interpreter/app_main.py
--- a/pypy/interpreter/app_main.py
+++ b/pypy/interpreter/app_main.py
@@ -310,8 +310,6 @@
"warnoptions",
"unbuffered"), 0)
-PYTHON26 = True
-
def simple_option(options, name, iterargv):
options[name] += 1
@@ -341,38 +339,34 @@
cmdline_options = {
# simple options just increment the counter of the options listed above
+ 'b': (simple_option, 'bytes_warning'),
+ 'B': (simple_option, 'dont_write_bytecode'),
'd': (simple_option, 'debug'),
+ 'E': (simple_option, 'ignore_environment'),
'i': (simple_option, 'interactive'),
'O': (simple_option, 'optimize'),
+ 'R': (simple_option, 'hash_randomization'),
+ 's': (simple_option, 'no_user_site'),
'S': (simple_option, 'no_site'),
- 'E': (simple_option, 'ignore_environment'),
't': (simple_option, 'tabcheck'),
- 'v': (simple_option, 'verbose'),
'U': (simple_option, 'unicode'),
'u': (simple_option, 'unbuffered'),
+ 'v': (simple_option, 'verbose'),
+ '3': (simple_option, 'py3k_warning'),
# more complex options
- 'Q': (div_option, Ellipsis),
'c': (c_option, Ellipsis),
+ 'h': (print_help, None),
+ '--help': (print_help, None),
'm': (m_option, Ellipsis),
'W': (W_option, Ellipsis),
'V': (print_version, None),
'--version': (print_version, None),
+ 'Q': (div_option, Ellipsis),
'--info': (print_info, None),
- 'h': (print_help, None),
- '--help': (print_help, None),
'--jit': (set_jit_option, Ellipsis),
'--': (end_options, None),
}
-if PYTHON26:
- cmdline_options.update({
- '3': (simple_option, 'py3k_warning'),
- 'B': (simple_option, 'dont_write_bytecode'),
- 's': (simple_option, 'no_user_site'),
- 'b': (simple_option, 'bytes_warning'),
- 'R': (simple_option, 'hash_randomization'),
- })
-
def handle_argument(c, options, iterargv, iterarg=iter(())):
function, funcarg = cmdline_options[c]
@@ -434,11 +428,10 @@
if not options["ignore_environment"]:
if os.getenv('PYTHONUNBUFFERED'):
options["unbuffered"] = 1
- if PYTHON26:
- if os.getenv('PYTHONNOUSERSITE'):
- options["no_user_site"] = 1
- if os.getenv('PYTHONDONTWRITEBYTECODE'):
- options["dont_write_bytecode"] = 1
+ if os.getenv('PYTHONNOUSERSITE'):
+ options["no_user_site"] = 1
+ if os.getenv('PYTHONDONTWRITEBYTECODE'):
+ options["dont_write_bytecode"] = 1
if (options["interactive"] or
(not options["ignore_environment"] and os.getenv('PYTHONINSPECT'))):
@@ -450,7 +443,7 @@
## print >> sys.stderr, (
## "Warning: pypy does not implement hash randomization")
- if PYTHON26 and we_are_translated():
+ if we_are_translated():
flags = [options[flag] for flag in sys_flags]
sys.flags = type(sys.flags)(flags)
sys.py3kwarning = bool(sys.flags.py3k_warning)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit