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 .