Panel plugins problem with HORIZON_CONFIG

Bug #1312180 reported by Chad Roberts
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
Chad Roberts

Bug Description

I came across this while trying to implement an "enabled" folder for running the tests with some panels that are not otherwise registered.

Once someone has called utils.settings.update_dashboards() (and when there are updates made there, like adding a panel), any subsequent calls to copy.deepcopy(HORIZON_CONFIG) will fail. **The calls that failed for me were in test/test_plugins/panel_group_tests.py and panel_tests.py.

It looks like a call to update_dashboards() winds-up adding "__builtins__" which contains at least one (possibly more) item that can not be deep-copied by default.

It's my thought that __builtins__ is probably not intended to go in HORIZON_CONFIG, but if it is, then it needs to ensure that copy.deepcopy will still work.

In case it helps, here is what HORIZON_CONFIG looks like after I call update_dashboards()

{'dashboards': (),
 'default_dashboard': 'project',
 'exceptions': {'not_found': (<class 'keystoneclient.openstack.common.apiclient.exceptions.NotFound'>,
                              <class 'cinderclient.exceptions.NotFound'>,
                              <class 'novaclient.exceptions.NotFound'>,
                              <class 'glanceclient.exc.NotFound'>,
                              <class 'neutronclient.common.exceptions.NetworkNotFoundClient'>,
                              <class 'neutronclient.common.exceptions.PortNotFoundClient'>,
                              <class 'heatclient.exc.HTTPNotFound'>,
                              <class 'troveclient.exceptions.NotFound'>),
                'recoverable': (<class 'keystoneclient.openstack.common.apiclient.exceptions.ClientException'>,
                                <class 'keystoneclient.openstack.common.apiclient.exceptions.AuthorizationFailure'>,
                                <class 'cinderclient.exceptions.ClientException'>,
                                <class 'cinderclient.exceptions.ConnectionError'>,
                                <class 'novaclient.exceptions.ClientException'>,
                                <class 'glanceclient.exc.ClientException'>,
                                <class 'neutronclient.common.exceptions.NeutronClientException'>,
                                <class 'neutronclient.common.exceptions.NetworkInUseClient'>,
                                <class 'neutronclient.common.exceptions.PortInUseClient'>,
                                <class 'neutronclient.common.exceptions.AlreadyAttachedClient'>,
                                <class 'neutronclient.common.exceptions.StateInvalidClient'>,
                                <class 'swiftclient.exceptions.ClientException'>,
                                <class 'heatclient.exc.HTTPException'>,
                                <class 'troveclient.exceptions.ClientException'>),
                'unauthorized': (<class 'keystoneclient.openstack.common.apiclient.exceptions.Unauthorized'>,
                                 <class 'keystoneclient.openstack.common.apiclient.exceptions.Forbidden'>,
                                 <class 'cinderclient.exceptions.Unauthorized'>,
                                 <class 'cinderclient.exceptions.Forbidden'>,
                                 <class 'novaclient.exceptions.Unauthorized'>,
                                 <class 'novaclient.exceptions.Forbidden'>,
                                 <class 'glanceclient.exc.Unauthorized'>,
                                 <class 'neutronclient.common.exceptions.Unauthorized'>,
                                 <class 'neutronclient.common.exceptions.Forbidden'>,
                                 <class 'heatclient.exc.HTTPUnauthorized'>,
                                 <class 'heatclient.exc.HTTPForbidden'>,
                                 <class 'troveclient.exceptions.Unauthorized'>)},
 'help_url': 'http://docs.openstack.org',
 'panel_customization': [{'PANEL_GROUP': 'data_processing',
                          'PANEL_GROUP_DASHBOARD': 'project',
                          'PANEL_GROUP_NAME': 'Data Processing',
                          '__builtins__': {'ArithmeticError': <type 'exceptions.ArithmeticError'>,
                                           'AssertionError': <type 'exceptions.AssertionError'>,
                                           'AttributeError': <type 'exceptions.AttributeError'>,
                                           'BaseException': <type 'exceptions.BaseException'>,
                                           'BufferError': <type 'exceptions.BufferError'>,
                                           'BytesWarning': <type 'exceptions.BytesWarning'>,
                                           'DeprecationWarning': <type 'exceptions.DeprecationWarning'>,
                                           'EOFError': <type 'exceptions.EOFError'>,
                                           'Ellipsis': Ellipsis,
                                           'EnvironmentError': <type 'exceptions.EnvironmentError'>,
                                           'Exception': <type 'exceptions.Exception'>,
                                           'False': False,
                                           'FloatingPointError': <type 'exceptions.FloatingPointError'>,
                                           'FutureWarning': <type 'exceptions.FutureWarning'>,
                                           'GeneratorExit': <type 'exceptions.GeneratorExit'>,
                                           'IOError': <type 'exceptions.IOError'>,
                                           'ImportError': <type 'exceptions.ImportError'>,
                                           'ImportWarning': <type 'exceptions.ImportWarning'>,
                                           'IndentationError': <type 'exceptions.IndentationError'>,
                                           'IndexError': <type 'exceptions.IndexError'>,
                                           'KeyError': <type 'exceptions.KeyError'>,
                                           'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>,
                                           'LookupError': <type 'exceptions.LookupError'>,
                                           'MemoryError': <type 'exceptions.MemoryError'>,
                                           'NameError': <type 'exceptions.NameError'>,
                                           'None': None,
                                           'NotImplemented': NotImplemented,
                                           'NotImplementedError': <type 'exceptions.NotImplementedError'>,
                                           'OSError': <type 'exceptions.OSError'>,
                                           'OverflowError': <type 'exceptions.OverflowError'>,
                                           'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>,
                                           'ReferenceError': <type 'exceptions.ReferenceError'>,
                                           'RuntimeError': <type 'exceptions.RuntimeError'>,
                                           'RuntimeWarning': <type 'exceptions.RuntimeWarning'>,
                                           'StandardError': <type 'exceptions.StandardError'>,
                                           'StopIteration': <type 'exceptions.StopIteration'>,
                                           'SyntaxError': <type 'exceptions.SyntaxError'>,
                                           'SyntaxWarning': <type 'exceptions.SyntaxWarning'>,
                                           'SystemError': <type 'exceptions.SystemError'>,
                                           'SystemExit': <type 'exceptions.SystemExit'>,
                                           'TabError': <type 'exceptions.TabError'>,
                                           'True': True,
                                           'TypeError': <type 'exceptions.TypeError'>,
                                           'UnboundLocalError': <type 'exceptions.UnboundLocalError'>,
                                           'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>,
                                           'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>,
                                           'UnicodeError': <type 'exceptions.UnicodeError'>,
                                           'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>,
                                           'UnicodeWarning': <type 'exceptions.UnicodeWarning'>,
                                           'UserWarning': <type 'exceptions.UserWarning'>,
                                           'ValueError': <type 'exceptions.ValueError'>,
                                           'Warning': <type 'exceptions.Warning'>,
                                           'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>,
                                           '__debug__': True,
                                           '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.",
                                           '__import__': <built-in function __import__>,
                                           '__name__': '__builtin__',
                                           '__package__': None,
                                           'abs': <built-in function abs>,
                                           'all': <built-in function all>,
                                           'any': <built-in function any>,
                                           'apply': <built-in function apply>,
                                           'basestring': <type 'basestring'>,
                                           'bin': <built-in function bin>,
                                           'bool': <type 'bool'>,
                                           'buffer': <type 'buffer'>,
                                           'bytearray': <type 'bytearray'>,
                                           'bytes': <type 'str'>,
                                           'callable': <built-in function callable>,
                                           'chr': <built-in function chr>,
                                           'classmethod': <type 'classmethod'>,
                                           'cmp': <built-in function cmp>,
                                           'coerce': <built-in function coerce>,
                                           'compile': <built-in function compile>,
                                           'complex': <type 'complex'>,
                                           'copyright': Copyright (c) 2001-2013 Python Software Foundation.
All Rights Reserved.

Copyright (c) 2000 BeOpen.com.
All Rights Reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.,
                                           'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
    for supporting Python development. See www.python.org for more information.,
                                           'delattr': <built-in function delattr>,
                                           'dict': <type 'dict'>,
                                           'dir': <built-in function dir>,
                                           'divmod': <built-in function divmod>,
                                           'enumerate': <type 'enumerate'>,
                                           'eval': <built-in function eval>,
                                           'execfile': <built-in function execfile>,
                                           'exit': Use exit() or Ctrl-D (i.e. EOF) to exit,
                                           'file': <type 'file'>,
                                           'filter': <built-in function filter>,
                                           'float': <type 'float'>,
                                           'format': <built-in function format>,
                                           'frozenset': <type 'frozenset'>,
                                           'getattr': <built-in function getattr>,
                                           'globals': <built-in function globals>,
                                           'hasattr': <built-in function hasattr>,
                                           'hash': <built-in function hash>,
                                           'help': Type help() for interactive help, or help(object) for help about object.,
                                           'hex': <built-in function hex>,
                                           'id': <built-in function id>,
                                           'input': <built-in function input>,
                                           'int': <type 'int'>,
                                           'intern': <built-in function intern>,
                                           'isinstance': <built-in function isinstance>,
                                           'issubclass': <built-in function issubclass>,
                                           'iter': <built-in function iter>,
                                           'len': <built-in function len>,
                                           'license': Type license() to see the full license text,
                                           'list': <type 'list'>,
                                           'locals': <built-in function locals>,
                                           'long': <type 'long'>,
                                           'map': <built-in function map>,
                                           'max': <built-in function max>,
                                           'memoryview': <type 'memoryview'>,
                                           'min': <built-in function min>,
                                           'next': <built-in function next>,
                                           'object': <type 'object'>,
                                           'oct': <built-in function oct>,
                                           'open': <built-in function open>,
                                           'ord': <built-in function ord>,
                                           'pow': <built-in function pow>,
                                           'print': <built-in function print>,
                                           'property': <type 'property'>,
                                           'quit': Use quit() or Ctrl-D (i.e. EOF) to exit,
                                           'range': <built-in function range>,
                                           'raw_input': <built-in function raw_input>,
                                           'reduce': <built-in function reduce>,
                                           'reload': <built-in function reload>,
                                           'repr': <built-in function repr>,
                                           'reversed': <type 'reversed'>,
                                           'round': <built-in function round>,
                                           'set': <type 'set'>,
                                           'setattr': <built-in function setattr>,
                                           'slice': <type 'slice'>,
                                           'sorted': <built-in function sorted>,
                                           'staticmethod': <type 'staticmethod'>,
                                           'str': <type 'str'>,
                                           'sum': <built-in function sum>,
                                           'super': <type 'super'>,
                                           'tuple': <type 'tuple'>,
                                           'type': <type 'type'>,
                                           'unichr': <built-in function unichr>,
                                           'unicode': <type 'unicode'>,
                                           'vars': <built-in function vars>,
                                           'xrange': <type 'xrange'>,
                                           'zip': <built-in function zip>},
                          '__doc__': None,
                          '__file__': '/home/croberts/src/horizon/openstack_dashboard/test/enabled/_50_sahara.py',
                          '__name__': 'openstack_dashboard.test.enabled._50_sahara',
                          '__package__': None},
                         {'ADD_PANEL': 'openstack_dashboard.dashboards.project.plugins.panel.PluginsPanel',
                          'PANEL': 'Plugins',
                          'PANEL_DASHBOARD': 'project',
                          'PANEL_GROUP': 'data_processing',
                          '__builtins__': {'ArithmeticError': <type 'exceptions.ArithmeticError'>,
                                           'AssertionError': <type 'exceptions.AssertionError'>,
                                           'AttributeError': <type 'exceptions.AttributeError'>,
                                           'BaseException': <type 'exceptions.BaseException'>,
                                           'BufferError': <type 'exceptions.BufferError'>,
                                           'BytesWarning': <type 'exceptions.BytesWarning'>,
                                           'DeprecationWarning': <type 'exceptions.DeprecationWarning'>,
                                           'EOFError': <type 'exceptions.EOFError'>,
                                           'Ellipsis': Ellipsis,
                                           'EnvironmentError': <type 'exceptions.EnvironmentError'>,
                                           'Exception': <type 'exceptions.Exception'>,
                                           'False': False,
                                           'FloatingPointError': <type 'exceptions.FloatingPointError'>,
                                           'FutureWarning': <type 'exceptions.FutureWarning'>,
                                           'GeneratorExit': <type 'exceptions.GeneratorExit'>,
                                           'IOError': <type 'exceptions.IOError'>,
                                           'ImportError': <type 'exceptions.ImportError'>,
                                           'ImportWarning': <type 'exceptions.ImportWarning'>,
                                           'IndentationError': <type 'exceptions.IndentationError'>,
                                           'IndexError': <type 'exceptions.IndexError'>,
                                           'KeyError': <type 'exceptions.KeyError'>,
                                           'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>,
                                           'LookupError': <type 'exceptions.LookupError'>,
                                           'MemoryError': <type 'exceptions.MemoryError'>,
                                           'NameError': <type 'exceptions.NameError'>,
                                           'None': None,
                                           'NotImplemented': NotImplemented,
                                           'NotImplementedError': <type 'exceptions.NotImplementedError'>,
                                           'OSError': <type 'exceptions.OSError'>,
                                           'OverflowError': <type 'exceptions.OverflowError'>,
                                           'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>,
                                           'ReferenceError': <type 'exceptions.ReferenceError'>,
                                           'RuntimeError': <type 'exceptions.RuntimeError'>,
                                           'RuntimeWarning': <type 'exceptions.RuntimeWarning'>,
                                           'StandardError': <type 'exceptions.StandardError'>,
                                           'StopIteration': <type 'exceptions.StopIteration'>,
                                           'SyntaxError': <type 'exceptions.SyntaxError'>,
                                           'SyntaxWarning': <type 'exceptions.SyntaxWarning'>,
                                           'SystemError': <type 'exceptions.SystemError'>,
                                           'SystemExit': <type 'exceptions.SystemExit'>,
                                           'TabError': <type 'exceptions.TabError'>,
                                           'True': True,
                                           'TypeError': <type 'exceptions.TypeError'>,
                                           'UnboundLocalError': <type 'exceptions.UnboundLocalError'>,
                                           'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>,
                                           'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>,
                                           'UnicodeError': <type 'exceptions.UnicodeError'>,
                                           'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>,
                                           'UnicodeWarning': <type 'exceptions.UnicodeWarning'>,
                                           'UserWarning': <type 'exceptions.UserWarning'>,
                                           'ValueError': <type 'exceptions.ValueError'>,
                                           'Warning': <type 'exceptions.Warning'>,
                                           'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>,
                                           '__debug__': True,
                                           '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.",
                                           '__import__': <built-in function __import__>,
                                           '__name__': '__builtin__',
                                           '__package__': None,
                                           'abs': <built-in function abs>,
                                           'all': <built-in function all>,
                                           'any': <built-in function any>,
                                           'apply': <built-in function apply>,
                                           'basestring': <type 'basestring'>,
                                           'bin': <built-in function bin>,
                                           'bool': <type 'bool'>,
                                           'buffer': <type 'buffer'>,
                                           'bytearray': <type 'bytearray'>,
                                           'bytes': <type 'str'>,
                                           'callable': <built-in function callable>,
                                           'chr': <built-in function chr>,
                                           'classmethod': <type 'classmethod'>,
                                           'cmp': <built-in function cmp>,
                                           'coerce': <built-in function coerce>,
                                           'compile': <built-in function compile>,
                                           'complex': <type 'complex'>,
                                           'copyright': Copyright (c) 2001-2013 Python Software Foundation.
All Rights Reserved.

Copyright (c) 2000 BeOpen.com.
All Rights Reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.,
                                           'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
    for supporting Python development. See www.python.org for more information.,
                                           'delattr': <built-in function delattr>,
                                           'dict': <type 'dict'>,
                                           'dir': <built-in function dir>,
                                           'divmod': <built-in function divmod>,
                                           'enumerate': <type 'enumerate'>,
                                           'eval': <built-in function eval>,
                                           'execfile': <built-in function execfile>,
                                           'exit': Use exit() or Ctrl-D (i.e. EOF) to exit,
                                           'file': <type 'file'>,
                                           'filter': <built-in function filter>,
                                           'float': <type 'float'>,
                                           'format': <built-in function format>,
                                           'frozenset': <type 'frozenset'>,
                                           'getattr': <built-in function getattr>,
                                           'globals': <built-in function globals>,
                                           'hasattr': <built-in function hasattr>,
                                           'hash': <built-in function hash>,
                                           'help': Type help() for interactive help, or help(object) for help about object.,
                                           'hex': <built-in function hex>,
                                           'id': <built-in function id>,
                                           'input': <built-in function input>,
                                           'int': <type 'int'>,
                                           'intern': <built-in function intern>,
                                           'isinstance': <built-in function isinstance>,
                                           'issubclass': <built-in function issubclass>,
                                           'iter': <built-in function iter>,
                                           'len': <built-in function len>,
                                           'license': Type license() to see the full license text,
                                           'list': <type 'list'>,
                                           'locals': <built-in function locals>,
                                           'long': <type 'long'>,
                                           'map': <built-in function map>,
                                           'max': <built-in function max>,
                                           'memoryview': <type 'memoryview'>,
                                           'min': <built-in function min>,
                                           'next': <built-in function next>,
                                           'object': <type 'object'>,
                                           'oct': <built-in function oct>,
                                           'open': <built-in function open>,
                                           'ord': <built-in function ord>,
                                           'pow': <built-in function pow>,
                                           'print': <built-in function print>,
                                           'property': <type 'property'>,
                                           'quit': Use quit() or Ctrl-D (i.e. EOF) to exit,
                                           'range': <built-in function range>,
                                           'raw_input': <built-in function raw_input>,
                                           'reduce': <built-in function reduce>,
                                           'reload': <built-in function reload>,
                                           'repr': <built-in function repr>,
                                           'reversed': <type 'reversed'>,
                                           'round': <built-in function round>,
                                           'set': <type 'set'>,
                                           'setattr': <built-in function setattr>,
                                           'slice': <type 'slice'>,
                                           'sorted': <built-in function sorted>,
                                           'staticmethod': <type 'staticmethod'>,
                                           'str': <type 'str'>,
                                           'sum': <built-in function sum>,
                                           'super': <type 'super'>,
                                           'tuple': <type 'tuple'>,
                                           'type': <type 'type'>,
                                           'unichr': <built-in function unichr>,
                                           'unicode': <type 'unicode'>,
                                           'vars': <built-in function vars>,
                                           'xrange': <type 'xrange'>,
                                           'zip': <built-in function zip>},
                          '__doc__': None,
                          '__file__': '/home/croberts/src/horizon/openstack_dashboard/test/enabled/_51_sahara.py',
                          '__name__': 'openstack_dashboard.test.enabled._51_sahara',
                          '__package__': None},
                         {'ADD_PANEL': 'openstack_dashboard.dashboards.project.data_image_registry.panel.ImageRegistryPanel',
                          'PANEL': 'data_image_registry',
                          'PANEL_DASHBOARD': 'project',
                          'PANEL_GROUP': 'data_processing',
                          '__builtins__': {'ArithmeticError': <type 'exceptions.ArithmeticError'>,
                                           'AssertionError': <type 'exceptions.AssertionError'>,
                                           'AttributeError': <type 'exceptions.AttributeError'>,
                                           'BaseException': <type 'exceptions.BaseException'>,
                                           'BufferError': <type 'exceptions.BufferError'>,
                                           'BytesWarning': <type 'exceptions.BytesWarning'>,
                                           'DeprecationWarning': <type 'exceptions.DeprecationWarning'>,
                                           'EOFError': <type 'exceptions.EOFError'>,
                                           'Ellipsis': Ellipsis,
                                           'EnvironmentError': <type 'exceptions.EnvironmentError'>,
                                           'Exception': <type 'exceptions.Exception'>,
                                           'False': False,
                                           'FloatingPointError': <type 'exceptions.FloatingPointError'>,
                                           'FutureWarning': <type 'exceptions.FutureWarning'>,
                                           'GeneratorExit': <type 'exceptions.GeneratorExit'>,
                                           'IOError': <type 'exceptions.IOError'>,
                                           'ImportError': <type 'exceptions.ImportError'>,
                                           'ImportWarning': <type 'exceptions.ImportWarning'>,
                                           'IndentationError': <type 'exceptions.IndentationError'>,
                                           'IndexError': <type 'exceptions.IndexError'>,
                                           'KeyError': <type 'exceptions.KeyError'>,
                                           'KeyboardInterrupt': <type 'exceptions.KeyboardInterrupt'>,
                                           'LookupError': <type 'exceptions.LookupError'>,
                                           'MemoryError': <type 'exceptions.MemoryError'>,
                                           'NameError': <type 'exceptions.NameError'>,
                                           'None': None,
                                           'NotImplemented': NotImplemented,
                                           'NotImplementedError': <type 'exceptions.NotImplementedError'>,
                                           'OSError': <type 'exceptions.OSError'>,
                                           'OverflowError': <type 'exceptions.OverflowError'>,
                                           'PendingDeprecationWarning': <type 'exceptions.PendingDeprecationWarning'>,
                                           'ReferenceError': <type 'exceptions.ReferenceError'>,
                                           'RuntimeError': <type 'exceptions.RuntimeError'>,
                                           'RuntimeWarning': <type 'exceptions.RuntimeWarning'>,
                                           'StandardError': <type 'exceptions.StandardError'>,
                                           'StopIteration': <type 'exceptions.StopIteration'>,
                                           'SyntaxError': <type 'exceptions.SyntaxError'>,
                                           'SyntaxWarning': <type 'exceptions.SyntaxWarning'>,
                                           'SystemError': <type 'exceptions.SystemError'>,
                                           'SystemExit': <type 'exceptions.SystemExit'>,
                                           'TabError': <type 'exceptions.TabError'>,
                                           'True': True,
                                           'TypeError': <type 'exceptions.TypeError'>,
                                           'UnboundLocalError': <type 'exceptions.UnboundLocalError'>,
                                           'UnicodeDecodeError': <type 'exceptions.UnicodeDecodeError'>,
                                           'UnicodeEncodeError': <type 'exceptions.UnicodeEncodeError'>,
                                           'UnicodeError': <type 'exceptions.UnicodeError'>,
                                           'UnicodeTranslateError': <type 'exceptions.UnicodeTranslateError'>,
                                           'UnicodeWarning': <type 'exceptions.UnicodeWarning'>,
                                           'UserWarning': <type 'exceptions.UserWarning'>,
                                           'ValueError': <type 'exceptions.ValueError'>,
                                           'Warning': <type 'exceptions.Warning'>,
                                           'ZeroDivisionError': <type 'exceptions.ZeroDivisionError'>,
                                           '__debug__': True,
                                           '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.",
                                           '__import__': <built-in function __import__>,
                                           '__name__': '__builtin__',
                                           '__package__': None,
                                           'abs': <built-in function abs>,
                                           'all': <built-in function all>,
                                           'any': <built-in function any>,
                                           'apply': <built-in function apply>,
                                           'basestring': <type 'basestring'>,
                                           'bin': <built-in function bin>,
                                           'bool': <type 'bool'>,
                                           'buffer': <type 'buffer'>,
                                           'bytearray': <type 'bytearray'>,
                                           'bytes': <type 'str'>,
                                           'callable': <built-in function callable>,
                                           'chr': <built-in function chr>,
                                           'classmethod': <type 'classmethod'>,
                                           'cmp': <built-in function cmp>,
                                           'coerce': <built-in function coerce>,
                                           'compile': <built-in function compile>,
                                           'complex': <type 'complex'>,
                                           'copyright': Copyright (c) 2001-2013 Python Software Foundation.
All Rights Reserved.

Copyright (c) 2000 BeOpen.com.
All Rights Reserved.

Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.

Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.,
                                           'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands
    for supporting Python development. See www.python.org for more information.,
                                           'delattr': <built-in function delattr>,
                                           'dict': <type 'dict'>,
                                           'dir': <built-in function dir>,
                                           'divmod': <built-in function divmod>,
                                           'enumerate': <type 'enumerate'>,
                                           'eval': <built-in function eval>,
                                           'execfile': <built-in function execfile>,
                                           'exit': Use exit() or Ctrl-D (i.e. EOF) to exit,
                                           'file': <type 'file'>,
                                           'filter': <built-in function filter>,
                                           'float': <type 'float'>,
                                           'format': <built-in function format>,
                                           'frozenset': <type 'frozenset'>,
                                           'getattr': <built-in function getattr>,
                                           'globals': <built-in function globals>,
                                           'hasattr': <built-in function hasattr>,
                                           'hash': <built-in function hash>,
                                           'help': Type help() for interactive help, or help(object) for help about object.,
                                           'hex': <built-in function hex>,
                                           'id': <built-in function id>,
                                           'input': <built-in function input>,
                                           'int': <type 'int'>,
                                           'intern': <built-in function intern>,
                                           'isinstance': <built-in function isinstance>,
                                           'issubclass': <built-in function issubclass>,
                                           'iter': <built-in function iter>,
                                           'len': <built-in function len>,
                                           'license': Type license() to see the full license text,
                                           'list': <type 'list'>,
                                           'locals': <built-in function locals>,
                                           'long': <type 'long'>,
                                           'map': <built-in function map>,
                                           'max': <built-in function max>,
                                           'memoryview': <type 'memoryview'>,
                                           'min': <built-in function min>,
                                           'next': <built-in function next>,
                                           'object': <type 'object'>,
                                           'oct': <built-in function oct>,
                                           'open': <built-in function open>,
                                           'ord': <built-in function ord>,
                                           'pow': <built-in function pow>,
                                           'print': <built-in function print>,
                                           'property': <type 'property'>,
                                           'quit': Use quit() or Ctrl-D (i.e. EOF) to exit,
                                           'range': <built-in function range>,
                                           'raw_input': <built-in function raw_input>,
                                           'reduce': <built-in function reduce>,
                                           'reload': <built-in function reload>,
                                           'repr': <built-in function repr>,
                                           'reversed': <type 'reversed'>,
                                           'round': <built-in function round>,
                                           'set': <type 'set'>,
                                           'setattr': <built-in function setattr>,
                                           'slice': <type 'slice'>,
                                           'sorted': <built-in function sorted>,
                                           'staticmethod': <type 'staticmethod'>,
                                           'str': <type 'str'>,
                                           'sum': <built-in function sum>,
                                           'super': <type 'super'>,
                                           'tuple': <type 'tuple'>,
                                           'type': <type 'type'>,
                                           'unichr': <built-in function unichr>,
                                           'unicode': <type 'unicode'>,
                                           'vars': <built-in function vars>,
                                           'xrange': <type 'xrange'>,
                                           'zip': <built-in function zip>},
                          '__doc__': None,
                          '__file__': '/home/croberts/src/horizon/openstack_dashboard/test/enabled/_52_sahara.py',
                          '__name__': 'openstack_dashboard.test.enabled._52_sahara',
                          '__package__': None}],
 'password_validator': {'help_text': 'Password must be between 8 and 18 characters.',
                        'regex': '^.{8,18}$'},
 'user_home': None}

Revision history for this message
Chad Roberts (croberts) wrote :

Upon further review, the problem method call might actually be settings.import_dashboard_config(). It looks like it's grabbing the submodule.__dict__ for each, which is yielding the __builtins__. Perhaps a tweak to explicitly either not capture __builtins__ to begin with or to delete it if it does exist would work?

Revision history for this message
Zhenguo Niu (niu-zglinux) wrote :
Changed in horizon:
importance: Undecided → Low
assignee: nobody → Chad Roberts (croberts)
Chad Roberts (croberts)
Changed in horizon:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/90799
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=0f5c57f72f5feeb7423ced8264940838a48f7e85
Submitter: Jenkins
Branch: master

commit 0f5c57f72f5feeb7423ced8264940838a48f7e85
Author: Chad Roberts <email address hidden>
Date: Mon Apr 28 12:51:34 2014 -0400

    Preventing __builtins__ from being in HORIZON_CONFIG

    When we use the 'enabled' mechanism to add panels,
    __builtins__ is also getting added to HORIZON_CONFIG.
    Since that is undesirable, it is now prevented
    by stripping it out before it gets added.

    Change-Id: I3dc772210de8da9810795368df9bf1123388624d
    Closes-Bug: bug 1312180

Changed in horizon:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in horizon:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.