Skip to content

Releases: aerospike/aerospike-client-python

3.2.0

01 May 17:17
c7b4793
Compare
Choose a tag to compare

Features

  • Update to C Client version 4.3.11 .
  • Support LDAP authentication for future server versions.
  • Add auth_mode, and login_timeout_ms as config parameters for the client constructor.
  • Add for_login_only config option as an optional field in the TLS config dictionary.
  • Added client.map_get_by_value_list method.
  • Added client. map_get_by_key_list method.

Fixes

  • Fix u_int32_t type preventing installation on Alpine.
  • Fix possible crash when client object is created without using a non default constructor.

3.1.1

21 Mar 16:43
27ecf26
Compare
Choose a tag to compare

Features

  • Update to C Client version 4.3.8

Fixes

  • Fix error preventing individual policies being set from constructor.

3.1.0

14 Mar 16:49
239d2c9
Compare
Choose a tag to compare

Features

  • Update to C Client version 4.3.6 .
  • Support LDAP authentication for future server versions.
  • Add in_doubt to args passed to exceptions internally. This information may be accessed by checking the 5th argument to the exception e.g.: e.args[4]
  • Add exists option entry to operate policies

Documentation

  • Add Documentation for default values of policy options.
  • Add Missing policy description for POLICY_REPLICA_SEQUENCE

3.0.2

21 Feb 16:48
860911b
Compare
Choose a tag to compare

Features

  • Update to C Client version 4.3.5
  • Add in_doubt to args passed to exceptions internally. This information may be accessed by checking the 5th argument to the exception e.g.: e.args[4]

Fixes

  • Empty record returned from server may cause System error in list_pop, list_pop_range, list_get (Client-992)
  • Error message overwritten in info_node (Client-991)

3.0.1

24 Jan 19:14
4340e42
Compare
Choose a tag to compare

Features

  • Update to C Client version 4.3.3
  • Add in_doubt property to exception classes.

Fixes

  • Fix: Memory Leak with Query Objects with GeoJSON predicate (CLIENT-979)
  • Fix: Memory leak in list_trim (CLIENT-980)
  • Fix: Reference count leak in get_many, select_many (CLIENT-988)

3.0.0

10 Jan 18:16
bd6c4d0
Compare
Choose a tag to compare

Features

  • Update to C Client version 4.3.1

  • Added a new list increment operation OP_LIST_INCREMENT . It can be used to increase an element of a list by a provided amount.

  • Added the option to specify a specific node to run on a scan on, via a new optional nodename parameter Client-939

  • Added the option to specify that Query.results and Query.foreach should not return bins, via a new optional parameter options to both methods. Client-915

  • Added aerospike.info_all() to allow sending of an info command to all nodes in the current cluster.

  • Added linearize_read option to read policies. Client-951. Requires Enterprise server >= 4.0.0

  • Enable aerospike.get_nodes() to run when connected to a TLS enabled server.

  • Enable aerospike.info_node() to function when using a TLS enabled server. View the documentation for the method to see the steps necessary for contacting a TLS enabled server.

  • Add additional policy values which can be specified during client construction, or via arguments to functions.

  • Add stricter typechecking of policy values passed in to constructor.

  • Add finer granularity to constructor policy options, adding support for setting base policies for Read, Write, Operate, Apply, Scan, Batch, Remove, and Query methods individually.

  • Simplified installation on Debian 9

Fixes

  • Fix: large malloc in UDF exceptions, memory leaks in remove_bins, and query_apply (CLIENT-944)
  • Fix bugs in query_apply (CLIENT-945)
  • Fix: Incorrect values for predicate in query apply causes system error, crash in debug builds of python
  • Fix: get_many, exists_many, select_many crash with byte array keys (CLIENT-954)
  • Fix: Invalid key tuple when utilizing batch direct leads to invalid free (Client-955)
  • Fix: Non integer values passed as arguments to query_apply inside of numeric_range_predicate, will be cast to 0.
  • Fix: Allow meta=None to be passed to arguments with an optional metadata dictionary parameter. Setting it to None will have the same effect as not providing the argument.

Documentation

  • Improved Doc strings for Client methods. Thanks to @dundee for this contribution!
  • Added api-changes.md to the github repository to give detailed information on changes between client versions
  • Updated documentation for the client policies to show new field names and defaults.
  • Updated the documentation for certain CDT methods: list_get, list_get_range, list_size, map_size, map_get_by_key, map_get_by_key_range, map_get_by_value, map_get_by_value_range, map_get_by_index, map_get_by_index_range, map_get_by_rank, map_get_by_rank_range to accurately specify that the meta argument is currently unused in those methods.
  • Update BUILD.md to include downloading the python client.( CLIENT-940)
  • Fix documentation error: OS environment variables are not passed into the python setup.py build --force command (Client-942)
  • Fix incorrect import of errors in code snippets.

Backwards Incompatible Changes

  • Added a new file to the github repository: https://github.com/aerospike/aerospike-client-python/blob/master/api-changes.md . Giving more detailed information about changes between client versions.

  • Removed LDT (Llist) support and related methods.

  • Methods which create indexes will now raise an error if the specified bin has already been indexed, or if an index with the same name already exists.

  • Methods which drop indexes, will now raise an error if the named index does not exist.

  • Shared memory layout has changed, and as such the default shm key has changed to '0xA7000000' . If manually specifiying an

  • shm key, it is crucial to ensure that a separate key is used in order to prevent this version's client from sharing memory with a previous version.

  • The names of certain policy fields has changed. See the documentation for up to date information. Specifically: 'timeout' has been changed into two separate fields total_timeout and socket_timeout for all policies besides 'admin' and 'info'. Currently timeout will act as an alias for total_timeout, but that should be considered deprecated, and will be removed in the future.

  • retry as a key in policy dicts has been removed in favor of max_retries, and the default number of retries for read operations is now 2.
    WARNING: Database writes that are not idempotent (such as an aerospike.increment) should not be retried because the write operation may be performed multiple times if the client timed out previous transaction attempts. It's important to use a distinct policy for non-idempotent writes which sets max_retries = 0;

Deprecations

  • client.info has been deprecated. In order to send requests to the entire cluster, the new method client.info_all should be used. In order to send requests to hosts specified in a list, we recommend a loop invoking multiple calls to aerospike.info_node. See the api-changes file for an example of such code.

  • Setting of global policy defaults via entries in the policies dictionary in the constructor config dict has been deprecated. See the constructor documentation for the new recommended method of specifying defaults.

2.2.3

10 Oct 22:44
Compare
Choose a tag to compare

Fixes

  • Ensures consistent setting of permission bits for pip distributions.

2.2.2

05 Oct 18:14
Compare
Choose a tag to compare

Fixes

  • Add support for C client resolution when compiling on Amazon Linux.

2.2.1

23 Sep 00:35
Compare
Choose a tag to compare

Changes

  • Updated to C client version 4.1.8
  • Allowed setting of the max_socket_idle for all connections instead of only being configurable for TLS connections. Parameter has been moved from the tls config dictionary to the main config dictionary. Although the previous syntax will not raise an exception, it will not set the value.
# Version 2.2.1:
config = {
    'hosts': hostlist,
    'max_socket_idle': 55
}
client = aerospike.client(config)

# Previous versions
config = {
    'hosts': hostlist,
    'tls': {'max_socket_idle': 55}
}
client = aerospike.client(config)
  • Improved the distribution of the client. Support files will be stored in the same location regardless of whether a binary or source wheel was the source.

  • Changed installation of system Lua files:

The default location of the Lua files needed for stream UDF aggregation was moved from: /usr/local/aerospike/lua to the directory aerospike/lua inside of the Python installation directory for storing system dependent packages. This directory can be found by running: Python -c "import sys; print(sys.exec_prefix);" Or if the extension was installed via pip: pip show -f aerospike

By default the client will look for the system .lua files in /usr/local/aerospike/lua
we recommend either moving the files from aerospike/lua to that directory or specifying the path to those files in the client constructor.

If you did not specify an installation location, and Python -c "import sys; print(sys.exec_prefix);" returned /home/user/.virtualenvs/aerospike-py
This means that the system lua files are located in: /home/user/.virtualenvs/aerospike-py/aerospike/lua/ and that is the directory which should be specified in the constructor.

So if installing the Python client for Aerospike stored the data files in /home/user/.virtualenvs/aerospike-py/aerospike/lua

lua_config = {"system_path": "/path/to/lua_dir", "user_path": "/path/to/usr-lua-dir"}

2.1.3

10 Aug 22:07
Compare
Choose a tag to compare

Fixes

  • Setting use_batch_direct in get_many causes an error. CLIENT-909
  • Memory corruption caused by long role names in admin methods. CLIENT-910
  • Memory leak in client.info with unicode request strings. CLIENT-912
  • Modify operate_ordered to perform operations in a single transaction.
  • Update the SHM documentation.
  • Update documentation for operate and operate_ordered