Skip to content

Releases: aerospike/aerospike-client-python

7.2.0

21 Aug 19:26
5610071
Compare
Choose a tag to compare

Breaking Changes

Improvements

  • [CLIENT-2258] Change send_bool_as default value to AS_BOOL.

Bug Fixes

  • [CLIENT-2258] client.put(): Fix bug where Python bytes bin values cannot be used if serializer parameter is set to SERIALIZER_NONE.

6.2.0

21 Aug 19:27
c41a23c
Compare
Choose a tag to compare

Breaking Changes

Improvements

  • [CLIENT-2258] Change send_bool_as default value to AS_BOOL.
  • [CLIENT-2258] Use OpenSSL 1.1.1v August 2023 and modify C client 5.2.6 dependency to use this OpenSSL version.

Bug Fixes

  • [CLIENT-2258] client.put(): Fix bug where Python bytes bin values cannot be used if serializer parameter is set to SERIALIZER_NONE.

11.2.0

21 Aug 19:25
1a12877
Compare
Choose a tag to compare

Breaking Changes

Improvements

  • [CLIENT-2258] Remove auto-serialization and auto-deserialization.

Bug Fixes

  • [CLIENT-1849] Fix bitwise add and subtract operations failing on Mac M1.
  • [CLIENT-2258] client.put(): Fix bug where Python bytes bin values cannot be used if serializer parameter is set to SERIALIZER_NONE.

12.0.0

28 Jul 19:40
0432d59
Compare
Choose a tag to compare

Breaking Changes

See Incompatible API Changes for details.

New Features

Improvements

Bug Fixes

  • [CLIENT-1304] Correct AEROSPIKE_ERR_BIN_NAME error message's character limit.
  • [CLIENT-2119] Fix type hints not being included in manylinux wheel distributions.
  • [CLIENT-1849] Fix bitwise add and subtract operations failing on Mac M1.
  • [CLIENT-2300] admin_set_quotas(): fix incorrect quota types not throwing an error.

Development

  • [CLIENT-1874] Remove Releases.md.
  • [CLIENT-1875] Remove api-changes.md.
  • [CLIENT-1838] CI/CD: Upload wheels to JFrog Artifactory and build Mac M1 wheels.
  • [CLIENT-1839] Add ability to build release wheels.
  • [CLIENT-1292] Update test to change a record's ttl value with a background query.
  • [CLIENT-2191] Remove old Python 2.7 code.
  • [CLIENT-2375] Update failing tests where server 6.4 release candidate raises IncompatibleBinType instead of InvalidRequest for operations accessing an invalid nested type.
  • [CLIENT-2218] Remove unused async code.

11.1.0

20 Apr 22:52
898a7a5
Compare
Choose a tag to compare

New Features

  • [CLIENT-2223] Add support for rack aware reads in an RF=3 deployment.
  • [CLIENT-2288] aerospike.client(): add client config options "max_error_rate" and "error_rate_window".
  • [CLIENT-2113] aerospike.client(): add min_conns_per_node support.
  • [CLIENT-2119] Show type hints in code editor.

Bug Fixes

  • [CLIENT-2159] Fix some memory leaks.
  • [CLIENT-2278] batch_operate(): update ttl using batch write policy.
  • [CLIENT-2286] aerospike.client(): fix client config batch policy not accepting "replica" value.
  • [CLIENT-2229] Docs: aerospike_helpers.expressions.hll.HLLMayContain: fix return value description.
  • [CLIENT-2269] Docs: fix some incorrect keyword arguments.
  • [CLIENT-2255] Docs: aerospike_helpers.operations: batch operations can also accept operations.
  • [CLIENT-1776] Docs: aerospike.client(): update some default client config values.

11.0.1

29 Mar 22:21
9001132
Compare
Choose a tag to compare

Breaking Changes

Revert adding base64 methods to aerospike module

These methods have been removed from the aerospike module due to memory errors when they are called:

  1. aerospike.get_expression_base64()
  2. aerospike.get_cdtctx_base64()

Course of action

Call these methods from a client instance instead of the aerospike module. Assuming client is an instance of aerospike.Client, the above calls should be replaced by:

  1. client.get_expression_base64()
  2. client.get_cdtctx_base64()

Bug Fixes

  • [CLIENT-2267] Revert adding base64 methods to aerospike module.

11.0.0

29 Mar 15:39
9272ceb
Compare
Choose a tag to compare

Breaking Changes

Batch methods: stop accepting a tuple of keys and bins

For the following functions:

  • client.get_many()
  • client.exists_many()

The keys parameter no longer takes in a tuple of keys. It only takes in a list of keys.

In addition, client.select_many() no longer takes in a tuple for the keys and bins parameters. Those parameters only take in a list of keys and bins, respectively.

Course of action:

Change code such as this:

keys = (("test", "demo", 1), ("test", "demo", 2))
bins = ("bin1", "bin2")
client.select_many(keys, bins)

...to this instead:

keys = [("test", "demo", 1), ("test", "demo", 2)]
bins = ["bin1", "bin2"]
client.select_many(keys, bins)

Expressions: add support for comparing KeyOrderedDicts (new server feature)

Before server 6.3, it is possible to compare maps in expressions if the maps were nested inside a list. For example, this code would work before server 6.3:

from aerospike_helpers.expressions import base as expr

client.put(key, {"bin": [{"a": 1}]})
exp = expr.Eq(expr.ListBin("bin"), [{"a": 1}]).compile()
record = client.get(key, {"expressions": exp})
print(record[2])
# {'bin': [{'a': 1}]}

This is now unsupported in server 6.3 because comparing unordered maps can potentially lead to inconsistent results. However, it is possible in server 6.3 to compare key-ordered maps in expressions.

Course of action:

For those using a server version < 6.3, no action is necessary. But it is recommended not to compare unordered maps in expressions.

For those upgrading to server 6.3, maps stored in the server must be key-ordered in order to be compared against in expressions. If the maps in the server are already key-ordered, and you would like to compare them in expressions, you must wrap any dictionaries in expressions with the KeyOrderedDict class.

For example, the code above must store the map as a key ordered map before comparing it in an expression:

from aerospike_helpers.expressions import base as expr
from aerospike import KeyOrderedDict

client.put(key, {"bin": [KeyOrderedDict({"a": 1})]})
exp = expr.Eq(expr.ListBin("bin"), [KeyOrderedDict({"a": 1})]).compile()
record = client.get(key, {"expressions": exp})
print(record[2])
# {'bin': [{'a': 1}]}

Return AEROSPIKE_ERR_NAMESPACE_NOT_FOUND instead of AEROSPIKE_ERR_CLIENT when a namespace cannot be found

Course of action:

Change code such as this:

from aerospike import exception as exc
key = ("nonexistent_namespace", "demo", 1)
try:
    client.get(key)
except exc.ClientError:
    print("Incorrect namespace")

...to this instead:

from aerospike import exception as exc
key = ("nonexistent_namespace", "demo", 1)
try:
    client.get(key)
except exc.NamespaceNotFound:
    print("Incorrect namespace")

Return last error code received when scan/query maxRetries is exceeded

When running a query or scan, if max_retries is exceeded, the transaction will return the last suberror that was received instead of a MaxRetriesExceeded error. For example, if you try to run a query on a non-indexed bin, the client will return an IndexNotFound error from the last attempt to query the bin.

This code will no longer work:

query = client.query("test", "demo")
query.select("bin_without_index")
query.where(p.equals("bin_without_index", 1))
def callback(input_tuple):
    pass

try:
    query.foreach(callback)
except exc.MaxRetriesExceeded:
    print("Query failed")

Course of action:

When handling a MaxRetriesExceeded exception, change it to the exact error that is expected to get thrown during the last query attempt. In this case, it is an IndexNotFound error:

try:
    query.foreach(callback)
except exc.IndexNotFound:
    print("Query failed")

New Features

  • [CLIENT-2176] Map operations: add support for MAP_ORDERED and MAP_UNORDERED return types.
  • [CLIENT-2144] Expressions: add support for comparing KeyOrderedDicts.
  • [CLIENT-2158] Add base64 API functions to aerospike module.

Improvements

  • [CLIENT-701] Batch methods: stop accepting a tuple of keys and bins.
  • [CLIENT-2197] Return AEROSPIKE_ERR_NAMESPACE_NOT_FOUND instead of AEROSPIKE_ERR_CLIENT when a namespace cannot be found.
  • [CLIENT-2143] Return last error code received when scan/query maxRetries is exceeded.
  • [CLIENT-2192] Add support for RHEL 9.

Bug Fixes

  • [CLIENT-1749] Documentation: add missing map return type MAP_RETURN_EXISTS.

10.0.1

07 Feb 16:27
2d607fa
Compare
Choose a tag to compare

Bug Fixes

  • [CLIENT-2157] - udf_put(): Stop hanging behavior when copying lua file to user path.

10.0.0

27 Jan 22:33
5285ae6
Compare
Choose a tag to compare

Important Note

  • A bug affecting this version of the Python client has been identified. On ARM chipsets only, disk space may increase until out of space, we strongly recommend that you upgrade to Python client 10.0.1 at the earliest opportunity.

Breaking Changes

Improvements

Bug Fixes

  • [CLIENT-2121] - query.apply(): make argument parameter optional.

9.0.0

04 Jan 18:44
Compare
Choose a tag to compare

Breaking Changes

  • Change default send_bool_as constant to AS_BOOL. See Incompatible API Changes for details.
  • batch_get_ops(): Remove meta field.
  • scan_apply(): Report correct error value and message if scan wait fails.

Improvements

  • [CLIENT-2074] - Change default send_bool_as constant to AS_BOOL.
  • [CLIENT-2004] - Add missing bin type for server booleans.
  • [CLIENT-2012] - scan_apply(): Report correct error value and message if scan wait fails.

Bug Fixes

  • [CLIENT-2005] - Docs: add missing batch policy "respond_all_keys".
  • [CLIENT-2075] - Docs: add missing batch policy "allow_inline_ssd".
  • [CLIENT-2008] - batch_get_ops(): Remove meta field.