Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in python API: 'int' should be 'int64' #27

Closed
wants to merge 6 commits into from

Commits on Apr 18, 2012

  1. Typo in python API: 'int' should be 'int64'

    This caused the python API to incorrectly raise the exception:
    
    TypeError: Cannot store heterogeneous maps
    
    when one tries to put() a map attribute with key and/or value being of
    type 'int64' and the map contains > 1 entries.
    neikos committed Apr 18, 2012
    Copy the full SHA
    3ba474d View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2012

  1. This commit and all previous that I have authored are signed off by me

    Signed-off-by: Nick Tolomiczenko <nick.tolomiczenko@gmail.com>
    neikos committed Apr 19, 2012
    Copy the full SHA
    520a519 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2012

  1. Copy the full SHA
    31293d5 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2012

  1. Python API: map_atomic_xxx() fix.

    Setup:
    
    space phonebook
    dimensions username, first, last, phone (map (string, int64))
    key username auto 1 3
    subspace first, last auto 2 3
    
    Symtom:
    python
    
    Python 2.7.2 (default, Oct 27 2011, 01:40:22)
    [GCC 4.6.1 20111003 (Red Hat 4.6.1-10)] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import hyperclient
    >>> c = hyperclient.Client('127.0.0.1', 1234)
    >>> c.put('phonebook', 'jsmith1', {'first': 'John', 'last': 'Smith',
    >>> 'phone': {'home': 4165551024, 'work': 4165551025, 'other':
    >>> 4165551026}})
    True
    >>> c.get('phonebook', 'jsmith1')
    {'phone': {'home': 4165551024, 'work': 4165551025, 'other': 4165551026},
    'last': 'Smith', 'first': 'John'}
    >>> c.map_atomic_add('phonebook', 'jsmith1', {'phone': {'home': 10,
    >>> 'work': 100, 'other': 1000}})
    True
    >>> c.get('phonebook', 'jsmith1')
    {'phone': {'home': 4165551034, 'work': 4165551025, 'other': 4165551026},
    'last': 'Smith', 'first': 'John'}
    >>>
    
    Expected the last c.get(), above, to return:
    {'phone': {'home': 4165551034, 'work': 4165551125, 'other': 4165552026},
    'last': 'Smith', 'first': 'John'}
    
    To wit, each phone number (home,work,other) should have been incremented
    by (10,100,1000) repectively. But, clearly, only the first 'home' number
    was incremented by 10. The rest were untouched.
    
    This commit fixes the problem.
    
    Signed-off-by: Nick Tolomiczenko <nick.tolomiczenko@gmail.com>
    neikos committed Apr 24, 2012
    Copy the full SHA
    23e5b7e View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    b5330df View commit details
    Browse the repository at this point in the history
  3. Merge remote-tracking branch 'upstream/master'

    Conflicts:
    	hyperclient/python/hyperclient.pyx
    
    Signed-off-by: Nick Tolomiczenko <nick.tolomiczenko@gmail.com>
    neikos committed Apr 24, 2012
    Copy the full SHA
    2f9f143 View commit details
    Browse the repository at this point in the history