Releases: aerospike/aerospike-client-python
8.0.0
Improvements
- [CLIENT-1850] Support ARM64 and Mac M1 (#315)
Breaking Changes
- [CLIENT-1877] Remove support for Python 3.6 in version 8.0 (#306)
- [CLIENT-1854] Connect when calling client constructor and conditionally no-op connect() (#297)
- See more details below.
Bug Fixes
- [CLIENT-1849] Fix failing bitwise operations on M1 (#315)
- [CLIENT-1853] Add missing info policy parameter to job_info() in docs (#292)
- [CLIENT-1935] Add metadata ttl and gen fields for BatchRecord Read and Write (#321 and #316)
Development
- [CLIENT-1863] Build using pyproject.toml (#298)
- The build commands have changed. See more details below.
- [CLIENT-1939] Replace references of test/run script (#311)
- To run tests, run
python3 -m pytest new_tests
instead of./run
- To run tests, run
- [CLIENT-1857] Update test instructions and remove test/run script (#296)
- [CLIENT-1930] Remove unneeded commands from Github Actions test workflow (#309)
- [CLIENT-1876] Lint C wrapper code using Github actions (#305)
- [CLIENT-1843] Lint test code (#301)
- [CLIENT-1962] Split up github actions test workflow into multiple jobs
- Use flake8 config file instead of command line arguments (and update instructions)
- Run build, install, and integration tests on all supported Python versions
- Show preview of ReadTheDocs docs for PRs
Breaking Changes
[CLIENT-1854] Python client crashes while doing IO during server upgrade/downgrade (#297)
- Calling the
aerospike.Client
constructor establishes the connection.- If user authentication is required, pass in a username and password in the client configuration dictionary by using the keys
"username"
and"password"
.
- If user authentication is required, pass in a username and password in the client configuration dictionary by using the keys
aerospike.Client.connect()
only runs if the connection was closed by callingclose()
beforehand. Otherwise, usingconnect()
does nothing.
Before version 8.0.0:
config = {
'hosts': hosts,
'policies': {'auth_mode': aerospike.AUTH_INTERNAL},
}
client = aerospike.client(config)
client.connect(user, password)
At version 8.0.0:
config = {
'hosts': hosts,
'policies': {'auth_mode': aerospike.AUTH_INTERNAL},
'user': user,
'password': password
}
client = aerospike.client(config)
# following is no-op
client.connect(user, password)
Having the client connect to the server when the constructor is called makes the Python client's behavior more
consistent with our other clients, and it also removes the possibility of an application trying to perform server
operations with the client without a connection.
If you are using a try/except
block and have the constructor call outside of the try
block, move
the constructor call into the try
block. If an exception happens, it would be coming from the
constructor and not the connect() method.
This line of code:
client = aerospike.client(config).connect()
should not have an issue.
But code such as this:
client = aerospike.client(config)
try:
client.connect()
except Exception:
# eat exception and do something
Should be changed to this instead:
try:
client = aerospike.client(config)
except Exception:
# eat exception and do something
[CLIENT-1863] Build using pyproject.toml (#298)
The commands to build and install the client for developers has changed from:
python3 setup.py build --force
python3 setup.py install --force
to:
# pip install build
python3 -m build
pip install .
7.1.1
Python Client 7.1.1
date: 10/03/2022Bug Fixes:
- [CLIENT-1784] - Potential Memory leak with Python client.
Improvements:
- [CLIENT-1830] - Add CDT CTX base64 method for using sindex-create info command.
- [CLIENT-1825] - Expose ttl as part query object attributes.
7.1.0
Python Client 7.1.0
date: 09/09/2022Bug Fixes:
- [CLIENT-1810] - Read policy POLICY_KEY_SEND is not respected when set at the client level.
New Features:
- [CLIENT-1799] - Support batch read operations.
Improvements:
- [CLIENT-1749] - Add 'EXISTS' return type for CDT read operations.
- [CLIENT-1801] - Support creating an secondary index on elements within a CDT using context.
- [CLIENT-1795] - Make c-client "fail_if_not_connected" option configurable.
- [CLIENT-1791] - Review and clean up Sphinx documentation.
- [CLIENT-1792] - Update build instructions.
7.0.2
Python Client 7.0.2
date: 05/31/2022Bug Fixes:
- [CLIENT-1742] - Fix reference count leaks in client 7.x Batch APIs.
- [CLIENT-1753] - Fix reference count leak in cdt_ctx map_key_create and list_index_create cases.
- [CLIENT-1710] - Change BatchRecords default argument from an empty list to None.
7.0.1
Python Client 7.0.1
date: 04/18/2022Bug Fixes:
- [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
Python Client 7.0.0
date: 4/06/2022Breaking Changes:
- Old predexp support has been removed. See Incompatible API Changes for details.
- Remove support for deprecated Debian 8.
- IndexNotFound and IndexNotReadable errors can now trigger retries.
- Bytes blobs read from the database will now be read as bytes instead of bytearray. See Incompatible API Changes for details.
- Query policies max_records and records_per_second are now fields of the Query class. See Incompatible API Changes for details.
Features:
- [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+.
Improvements:
- [CLIENT-1687] - Deprecate send_set_name batch policy. Batch transactions now always send set name to the server.
- [CLIENT-1681] - Drop predexp support.
- [CLIENT-1683] - Add max retries exceeded exception.
- [CLIENT-1691] - Document partition scan functionality.
- [CLIENT-1692] - Update C client to 6.0.
- [CLIENT-1657] - Move Python client CI tests to github actions.
- [CLIENT-1694] - Make query policies max_records and records_per_second Query fields instead.
- [CLIENT-1675] - Bytes blobs read from the database will now be read as bytes instead of bytearray.
- [CLIENT-1634] - Remove support for deprecated Debian 8.
Updates:
6.1.2
Version 6.1.2
Fixes
CLIENT-1639 python pip install now fails with 6.1.0
Updates
- Upgraded to Aerospike C Client 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
6.0.0
Python Client 6.0.0
date: 2021-05-11Breaking Changes:
- Breaking Change: Python 3.5 support has been removed - see Incompatible API Changes for details.- Breaking Change: Drop support for CentOS 6.
- Breaking Change: Drop support for Ubuntu 16.04.
- Breaking Change: Scan option, percent, has been removed.
- Breaking Change: Scan/Query policy, fail_on_cluster_change, has been removed.
- Breaking Change: Scan option, priority, has been removed.
- Breaking Change: info_node() will no longer work when security is enabled because of client authentication changes, use info_single_node() instead.
Features:
- [CLIENT-1437] - Add support for Python 3.9.- [CLIENT-1520] - Add the send_bool_as client config, configures how the client writes booleans.
- [CLIENT-1236] - Add the max_records scan policy.
- [CLIENT-1507] - Add info_single_node().
- [CLIENT-1510] - Add info_random_node().
- [CLIENT-1403] - Add aerospike.KeyOrderedDict.
- [CLIENT-1517] - Add get_node_names().
- [CLIENT-1462] - Support expressions added in server 5.6. Includes arithmetic, bitwise, control flow, and other expressions. Requires server >= 5.6.
- [CLIENT-1497] - Support new read and write quotas including the admin_set_quotas() method. Requires server >= 5.6.
- [CLIENT-1302] - Support IP whitelists including the admin_set_whitelist() method.
Improvements:
- [CLIENT-1516] - Drop support for CentOS 6.- [CLIENT-1536] - Drop support for Ubuntu 16.04.
- [CLIENT-1514] - Deprecate percent scan option.
- [CLIENT-1515] - Deprecate fail_on_cluster_change scan/query policy.
- [CLIENT-1508] - Deprecate info_node().
- [CLIENT-1436] - Drop support for Python 3.5.
Fixes:
- [CLIENT-1518] - Fix bug in set_xdr_filter that could truncate node names, sending commands to bad addresses.- [CLIENT-1535] - Fix memory allocation for more than 2 Python literals in expressions with variable argument length.
- [CLIENT-1282] - Fix OSX installation openssl issues by statically linking openssl1.1 with OSX builds. See here for more info.
Updates:
- [Aerospike C Client 5.2.0.](/download/client/c/notes.html#5.2.0)- [OpenSSL1.1.1k](https://www.openssl.org/news/openssl-1.1.1-notes.html)
5.0.0
Python Client 5.0.0
date: 2021-02-17Breaking Changes:
- Python 2.7 and 3.4 support have been removed.- 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".
Information
- Python 3.5 support will be removed in an upcoming release.Features:
- [CLIENT-1360] Support Aerospike expression filters.- [CLIENT-1409] Add set_xdr_filter() method.
- [CLIENT-1383] Add cdt context map_create_key() and list_create_index() methods.
- [CLIENT-1427] Add error 28, LOST_CONFLICT.
Improvements:
- [CLIENT-1384] Document the ability to use None to indicate, to end, or, from start, functionality.Fixes:
- [CLIENT-1431] Fix use after free bug when write operations are used with scans or queries.- [CLIENT-1426] Fix bytes usage with the append and prepend operations.
- Fix syntax error in truncate.c. Thanks to @indigo-tribe .