Aerospike

Latest version: v16.0.2

Safety actively analyzes 722032 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 17

6.3

python
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:
python
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:
python
from aerospike import exception as exc
key = ("nonexistent_namespace", "demo", 1)
try:
client.get(key)
except exc.ClientError:
print("Incorrect namespace")

...to this instead:
python
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:
python
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:
python
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.

6.2.0

Breaking Changes
* Remove auto-serialization and auto-deserialization. See [Incompatible API Changes](https://developer.aerospike.com/client/incompatible?client=python#versions-1300-1120-720-and-620) for details.

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.

6.1.2

Fixes
CLIENT-1639 python pip install now fails with 6.1.0

Updates
* Upgraded to [Aerospike C Client 5.2.6](https://download.aerospike.com/download/client/c/notes.html#5.2.6)

6.1.0

Python Client 6.1.0

Breaking Changes
* Drop support for Manylinux2010 wheels.

New Features
* Add support for Manylinux2014 wheels build - Please refer manylinux compatibility chart for more info: https://github.com/pypa/manylinux
* [CLIENT-1193] - Add support partition scans.
* [CLIENT-1570] - Add client support for PKI auth.
* [CLIENT-1584] - Add support for batch read operations.
* [CLIENT-1541] - Add support for paging scans.
* [CLIENT-1558] - Add support for query user(s) info API.

Improvements
* [CLIENT-1555] - Remove dependency on c-client binary from python client source install.

Bug Fixes
* [CLIENT-1566] - Fix intermittent hangs in automation cluster.

Updates
* Upgraded to [Aerospike C Client 5.2.6](https://download.aerospike.com/download/client/c/notes.html#5.2.6)

6.0.0

<h1>Python Client 6.0.0</h1>
date: 2021-05-11

<h2>Breaking Changes:</h2>
- Breaking Change: Python 3.5 support has been removed - see Incompatible API Changes for details.<br />
- Breaking Change: Drop support for CentOS 6.<br />
- Breaking Change: Drop support for Ubuntu 16.04.<br />
- Breaking Change: Scan option, percent, has been removed.<br />
- Breaking Change: Scan/Query policy, fail_on_cluster_change, has been removed.<br />
- Breaking Change: Scan option, priority, has been removed.<br />
- Breaking Change: info_node() will no longer work when security is enabled because of client authentication changes, use info_single_node() instead.<br />

<h2>Features:</h2>
- [CLIENT-1437] - Add support for Python 3.9.<br />
- [CLIENT-1520] - Add the send_bool_as client config, configures how the client writes booleans.<br />
- [CLIENT-1236] - Add the max_records scan policy.<br />
- [CLIENT-1507] - Add info_single_node().<br />
- [CLIENT-1510] - Add info_random_node().<br />
- [CLIENT-1403] - Add aerospike.KeyOrderedDict.<br />
- [CLIENT-1517] - Add get_node_names().<br />
- [CLIENT-1462] - Support expressions added in server 5.6. Includes arithmetic, bitwise, control flow, and other expressions. Requires server >= 5.6.<br />
- [CLIENT-1497] - Support new read and write quotas including the admin_set_quotas() method. Requires server >= 5.6.<br />
- [CLIENT-1302] - Support IP whitelists including the admin_set_whitelist() method.<br />

<h2>Improvements:</h2>
- [CLIENT-1516] - Drop support for CentOS 6.<br />
- [CLIENT-1536] - Drop support for Ubuntu 16.04.<br />
- [CLIENT-1514] - Deprecate percent scan option.<br />
- [CLIENT-1515] - Deprecate fail_on_cluster_change scan/query policy.<br />
- [CLIENT-1508] - Deprecate info_node().<br />
- [CLIENT-1436] - Drop support for Python 3.5.<br />

<h2>Fixes:</h2>
- [CLIENT-1518] - Fix bug in set_xdr_filter that could truncate node names, sending commands to bad addresses.<br />
- [CLIENT-1535] - Fix memory allocation for more than 2 Python literals in expressions with variable argument length.<br />
- [CLIENT-1282] - Fix OSX installation openssl issues by statically linking openssl1.1 with OSX builds. See here for more info.<br />

<h2>Updates:</h2>
- [Aerospike C Client 5.2.0.](/download/client/c/notes.html5.2.0)<br />
- [OpenSSL1.1.1k](https://www.openssl.org/news/openssl-1.1.1-notes.html)<br />

5.0.0

<h1>Python Client 5.0.0</h1>
date: 2021-02-17

<h2>Breaking Changes:</h2>
- Python 2.7 and 3.4 support have been removed.<br />
- Aerospike Python Client 5.x MUST be used with Aerospike server 4.9 or greater.
Attempting to connect to a server older than 4.9 will yield error "-10, Failed to connect".<br />

<h2>Information</h2>
- Python 3.5 support will be removed in an upcoming release.<br />

<h2>Features:</h2>
- [CLIENT-1360] Support Aerospike expression filters.<br />
- [CLIENT-1409] Add set_xdr_filter() method.<br />
- [CLIENT-1383] Add cdt context map_create_key() and list_create_index() methods.<br />
- [CLIENT-1427] Add error 28, LOST_CONFLICT.

<h2>Improvements:</h2>
- [CLIENT-1384] Document the ability to use None to indicate, to end, or, from start, functionality.<br />

<h2>Fixes:</h2>
- [CLIENT-1431] Fix use after free bug when write operations are used with scans or queries.<br />
- [CLIENT-1426] Fix bytes usage with the append and prepend operations.<br />
- Fix syntax error in truncate.c. Thanks to indigo-tribe .

<h2>Updates:</h2>
- Upgrade C client to version 5.0.3.

Page 5 of 17

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.