From be1501b976aa36733e6ef0b86c4f8c6844df3181 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Thu, 8 May 2008 20:23:06 +0000 Subject: [PATCH] Fix sys.flags to properly expose bytes_warning. Closes issue #2790. --- Lib/test/test_sys.py | 2 +- Python/sysmodule.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 8befe7587e2..975795a8ef7 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -357,7 +357,7 @@ class SysModuleTest(unittest.TestCase): attrs = ("debug", "py3k_warning", "division_warning", "division_new", "inspect", "interactive", "optimize", "dont_write_bytecode", "no_site", "ignore_environment", "tabcheck", "verbose", - "unicode") + "unicode", "bytes_warning") for attr in attrs: self.assert_(hasattr(sys.flags, attr), attr) self.assertEqual(type(getattr(sys.flags, attr)), int, attr) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 8a1ef3c5d7b..c8842503bea 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -1178,9 +1178,9 @@ static PyStructSequence_Desc flags_desc = { flags__doc__, /* doc */ flags_fields, /* fields */ #ifdef RISCOS - 15 + 16 #else - 14 + 15 #endif };