Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLIENT-1938] Remove aerospike.__version__ to single source the client's version #623

Merged
merged 3 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/actions/update-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ inputs:
runs:
using: "composite"
steps:
- name: Update __version__ in aerospike module
run: sed -i "s/const char version\[] = \".*\";/const char version\[] = \"${{ inputs.new_version }}\";/" src/main/aerospike.c
shell: bash

- name: Update VERSION metadata
run: echo ${{ inputs.new_version }} > VERSION
shell: bash
2 changes: 0 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ The local version identifier will appear in:
- The package version in the wheel name
- `python3 -m pip show aerospike` if you installed the wheel
The local version identifier will NOT show up in `aerospike.__version__`.
### Unoptimized builds (only Linux and macOS)
By default, the Python client and the C client submodule are built with optimizations, which can make debugging
Expand Down
6 changes: 0 additions & 6 deletions doc/aerospike.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1412,12 +1412,6 @@ Bin Types
Miscellaneous
-------------

.. data:: __version__

A :class:`str` containing the module's version.

.. versionadded:: 1.0.54

.. data:: UDF_TYPE_LUA

UDF type is LUA (which is the only UDF type).
Expand Down
2 changes: 1 addition & 1 deletion scripts/manylinux2014build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ done

for i in "${ADDR[@]}"; do
${i}/pip install aerospike -f /work/wheels/
${i}/python -c "import aerospike; print('Installed aerospike version{}'.format(aerospike.__version__))"
${i}/python -c "import aerospike; from importlib.metadata import version; print('Installed aerospike version{}'.format(version('aerospike')))"
done

echo "Building wheel $PYTHONS are done"
4 changes: 0 additions & 4 deletions src/main/aerospike.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,6 @@ static int Aerospike_Clear(PyObject *aerospike)

PyMODINIT_FUNC PyInit_aerospike(void)
{

const char version[] = "15.0.1rc3.dev3";
// Makes things "thread-safe"
Py_Initialize();
int i = 0;
Expand All @@ -161,8 +159,6 @@ PyMODINIT_FUNC PyInit_aerospike(void)

py_global_hosts = PyDict_New();

PyModule_AddStringConstant(aerospike, "__version__", version);

PyObject *exception = AerospikeException_New();
Py_INCREF(exception);
int retval = PyModule_AddObject(aerospike, "exception", exception);
Expand Down
6 changes: 0 additions & 6 deletions test/new_tests/test_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ def open_as_connection(config):
# adds cls.connection_config to this class
@pytest.mark.usefixtures("connection_config")
class TestConnect(object):
def test_version(self):
"""
Check for aerospike vrsion
"""
assert aerospike.__version__ is not None

def test_connect_positive(self):
"""
Invoke connect() with positive parameters.
Expand Down
Loading