HUE-2043 [core] database options keys have unicode keys

Review Request #4309 — Created April 9, 2014 and submitted

abec
old-hue-rw
HUE-2043
hue
enricoberti, romain
commit ef515335908d537891d8d4560e8daa8a760ac76d
Author: Abraham Elmahrek <abraham@elmahrek.com>
Date:   Wed Apr 9 12:29:38 2014 -0700

    HUE-2043 [core] database options keys have unicode keys
    
    Moved the dictionary logic from librdbms to python_util.

:100644 100644 878f145... 32a605f... M	desktop/core/src/desktop/lib/python_util.py
:100644 100644 067ead3... 57bd40d... M	desktop/core/src/desktop/lib/python_util_test.py
:100644 100644 371c308... 218d950... M	desktop/core/src/desktop/settings.py
:100644 100644 0158d83... 91e5265... M	desktop/libs/librdbms/src/librdbms/server/dbms.py
Tested manually and added a test case for the utility method.
romain
  1. 
      
  2. desktop/core/src/desktop/settings.py (Diff revision 1)
     
     
    Seems weird first but indeed, this is good to go I think!
    
    
    
        OPTIONS=Config(
          key='options',
          help=_('Database options to send to the server when connecting.'),
          type=coerce_json_dict,
          default='{}'
        )
    
    http://stackoverflow.com/questions/956867/how-to-get-string-objects-instead-of-unicode-ones-from-json-in-python
    1. I am in general +1 to this suggestion. The biggest issue I see is that we need to do this after deserialization since we don't know if we should be representing key/value paris as a series of bytes or as properly encoded strings.
  3. 
      
abec
Review request changed

Status: Closed (submitted)

Loading...