Aerospike

Latest version: v15.0.0

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

Scan your dependencies

Page 4 of 16

7.0.1

<h1>Python Client 7.0.1</h1>
date: 04/18/2022

<h2>Bug Fixes:</h2>

- [CLIENT-1708] Fix 'Unable to load batch_records module' error when batch_operate, batch_apply, or batch_remove are used without importing aerospike_helpers.batch.records.

7.0.0

<h1>Python Client 7.0.0</h1>
date: 4/06/2022

<h2>Breaking Changes:</h2>

- Old predexp support has been removed. See [Incompatible API Changes](https://developer.aerospike.com/client/python/usage/incompatible#version-700) for details.<br />
- Remove support for deprecated Debian 8.<br />
- IndexNotFound and IndexNotReadable errors can now trigger retries.<br />
- Bytes blobs read from the database will now be read as bytes instead of bytearray. See [Incompatible API Changes](https://developer.aerospike.com/client/python/usage/incompatible#version-700) for details.<br />
- Query policies max_records and records_per_second are now fields of the Query class. See [Incompatible API Changes](https://developer.aerospike.com/client/python/usage/incompatible#version-700) for details.<br />

<h2>Features:</h2>

- [CLIENT-1651] - Provide an API to extract an expression's base-64 representation.
- [CLIENT-1655] - Support new 6.0 truncate, udf-admin, and sindex-admin privileges. This feature requires server version 6.0+.
- [CLIENT-1659] - Support batch_write, batch_apply, batch_operate, and batch_remove client methods. This feature requires server version 6.0+.
- [CLIENT-1658] - Support partition queries. This feature requires server version 6.0+.
- [CLIENT-1690] - Support get_partitions_status for Scan objects.
- [CLIENT-1693] - Add short_query query policy. This feature requires server version 6.0+.

<h2>Improvements:</h2>

- [CLIENT-1687] - Deprecate send_set_name batch policy. Batch transactions now always send set name to the server.<br />
- [CLIENT-1681] - Drop predexp support.<br />
- [CLIENT-1683] - Add max retries exceeded exception.<br />
- [CLIENT-1691] - Document partition scan functionality.<br />
- [CLIENT-1692] - Update C client to 6.0.<br />
- [CLIENT-1657] - Move Python client CI tests to github actions.<br />
- [CLIENT-1694] - Make query policies max_records and records_per_second Query fields instead.<br />
- [CLIENT-1675] - Bytes blobs read from the database will now be read as bytes instead of bytearray.<br />
- [CLIENT-1634] - Remove support for deprecated Debian 8.<br />

<h2>Updates:</h2>

- [Aerospike C Client 6.0.0.](/download/client/c/notes.html6.0.0)<br />

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)

Page 4 of 16

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.