diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 7863e808a..9badfac7c 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -328,7 +328,7 @@ jobs: auditwheel repair -w {dest_dir} {wheel} && auditwheel show {dest_dir}/* && rm -rf $WHEEL_DIR - CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -vv --add-path ./aerospike-client-c/vs/x64/Release -w {dest_dir} {wheel}" + CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -vv --add-path ./aerospike-client-c/vs/x64/Debug --no-mangle-all --include-symbols -w {dest_dir} {wheel}" # We also want to verify the same thing on macos CIBW_REPAIR_WHEEL_COMMAND_MACOS: > delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel} && @@ -336,6 +336,7 @@ jobs: delocate-listdeps {dest_dir}/*.whl | grep libssl.3.dylib CIBW_TEST_COMMAND: ${{ env.TEST_COMMAND }} CIBW_DEBUG_KEEP_CONTAINER: 1 + VS_PROJECT_CONFIGURATION: debug # - name: Setup tmate session # if: ${{ !cancelled() }} @@ -424,7 +425,7 @@ jobs: echo PYTHON_VERSION="${PYTHON_VERSION/3/3.}" >> $GITHUB_ENV shell: bash - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ env.PYTHON_VERSION }} allow-prereleases: true @@ -437,10 +438,27 @@ jobs: working-directory: test shell: bash - - run: python3 -m pytest -vvs --full-trace new_tests/${{ inputs.test-file }} + - if: ${{ inputs.platform-tag == 'win_amd64' }} + id: run-tests + run: | + curl -O https://download.sysinternals.com/files/Procdump.zip + unzip Procdump.zip + mkdir dumps + ./procdump.exe -accepteula -e -x ./dumps python3 -m pytest -vvs --full-trace new_tests/${{ inputs.test-file }} working-directory: test shell: bash + - if: ${{ failure() && steps.run-tests.outcome == 'failure' }} + uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 + with: + path: ./test/dumps/* + name: dump-${{ matrix.python-tag }} + if-no-files-found: error + + # - run: python3 -m pytest -vvs --full-trace new_tests/${{ inputs.test-file }} + # working-directory: test + # shell: bash + - name: Show job status for commit if: ${{ always() && github.event_name != 'push' && github.event_name != 'pull_request' }} uses: myrotvorets/set-commit-status-action@3730c0a348a2ace3c110851bed53331bc6406e9f # v2.0.1 diff --git a/.github/workflows/doc-tests.yml b/.github/workflows/doc-tests.yml index fb407d505..058e228d6 100644 --- a/.github/workflows/doc-tests.yml +++ b/.github/workflows/doc-tests.yml @@ -44,7 +44,7 @@ jobs: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: submodules: recursive - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: 3.12 architecture: 'x64' diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4c2893813..a63d93fe0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 with: submodules: recursive - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ env.LOWEST_SUPPORTED_PY_VERSION }} architecture: 'x64' diff --git a/.github/workflows/requirements.txt b/.github/workflows/requirements.txt index 3f19b658d..752b55c81 100644 --- a/.github/workflows/requirements.txt +++ b/.github/workflows/requirements.txt @@ -1,4 +1,3 @@ parver==0.5 crudini==0.9.4 -delocate==0.10.4 -mypy==1.17.1 +mypy==1.19.1 diff --git a/.github/workflows/smoke-tests.yml b/.github/workflows/smoke-tests.yml index 0c180ba1f..a5e950df1 100644 --- a/.github/workflows/smoke-tests.yml +++ b/.github/workflows/smoke-tests.yml @@ -64,7 +64,7 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.py-version }} architecture: 'x64' @@ -108,7 +108,7 @@ jobs: submodules: recursive fetch-depth: 0 - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ env.LOWEST_SUPPORTED_PY_VERSION }} architecture: 'x64' @@ -227,7 +227,7 @@ jobs: with: submodules: recursive - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ env.LOWEST_SUPPORTED_PY_VERSION }} architecture: 'x64' @@ -242,7 +242,7 @@ jobs: - run: pip install mypy -c requirements.txt working-directory: .github/workflows - - run: stubtest aerospike --allowlist stubtest-allowlist + - run: stubtest aerospike --allowlist stubtest-allowlist --ignore-disjoint-bases test-full-suite: strategy: @@ -264,7 +264,7 @@ jobs: with: submodules: recursive - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ env.LOWEST_SUPPORTED_PY_VERSION }} architecture: 'x64' @@ -333,7 +333,7 @@ jobs: with: submodules: recursive - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.py-version }} architecture: 'x64' @@ -385,7 +385,7 @@ jobs: with: submodules: recursive - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: "3.13" architecture: 'x64' @@ -435,7 +435,7 @@ jobs: egress-policy: audit - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ env.LOWEST_SUPPORTED_PY_VERSION }} architecture: 'x64' @@ -466,7 +466,7 @@ jobs: egress-policy: audit - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ env.LOWEST_SUPPORTED_PY_VERSION }} architecture: 'x64' diff --git a/.github/workflows/stage-tests.yml b/.github/workflows/stage-tests.yml index fa73f2a24..ccee84fda 100644 --- a/.github/workflows/stage-tests.yml +++ b/.github/workflows/stage-tests.yml @@ -224,7 +224,7 @@ jobs: JFROG_ACCESS_TOKEN: ${{ secrets.JFROG_ACCESS_TOKEN }} JFROG_REPO_NAME: ${{ vars.JFROG_REPO_NAME }} - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/test-server-rc.yml b/.github/workflows/test-server-rc.yml index 669008b1e..8f60d77d7 100644 --- a/.github/workflows/test-server-rc.yml +++ b/.github/workflows/test-server-rc.yml @@ -97,7 +97,7 @@ jobs: name: ${{ matrix.python[1] }}-macosx_x86_64.build path: ./ - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: ${{ matrix.python[0] }} diff --git a/.github/workflows/update-manylinux-openssl-image.yml b/.github/workflows/update-manylinux-openssl-image.yml index c848b6c54..47ec90147 100644 --- a/.github/workflows/update-manylinux-openssl-image.yml +++ b/.github/workflows/update-manylinux-openssl-image.yml @@ -87,7 +87,7 @@ jobs: working-directory: cibuildwheel - name: Build and push - uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 + uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2 with: # Don't want to use default Git context or else it will clone the whole Python client repo again context: ${{ github.workspace }}/aerospike-client-python/.github/workflows diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml index 27df55b2a..6662ca817 100644 --- a/.github/workflows/valgrind.yml +++ b/.github/workflows/valgrind.yml @@ -146,7 +146,7 @@ jobs: run: echo PYTHON_VERSION=$(echo ${{ env.PYTHON_TAG }} | sed -e "s/cp3/cp3./" -e "s/cp//") >> $GITHUB_ENV shell: bash - - uses: actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v6.1.0 + - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 with: python-version: '${{ env.PYTHON_VERSION }}' architecture: 'x64' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3529e4fe6..52c569624 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,8 +33,8 @@ repos: - id: doc8 args: ["doc/", "--extension", ".rst"] pass_filenames: false -- repo: https://github.com/koalaman/shellcheck-precommit - rev: v0.11.0 +- repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.11.0.1 hooks: - id: shellcheck # Running on all files causes this issue: diff --git a/VERSION b/VERSION index 682c51e1e..8b4d9a71e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -19.1.0rc1.dev9 +19.1.0rc1.dev16 diff --git a/aerospike-stubs/aerospike.pyi b/aerospike-stubs/aerospike.pyi index 4e3a19611..d80dccfbd 100644 --- a/aerospike-stubs/aerospike.pyi +++ b/aerospike-stubs/aerospike.pyi @@ -327,11 +327,11 @@ EXP_LOOPVAR_INDEX: Literal[2] @final class CDTInfinite: - def __init__(self, *args, **kwargs) -> None: ... + def __init__(self) -> None: ... @final class CDTWildcard: - def __init__(self, *args, **kwargs) -> None: ... + def __init__(self) -> None: ... @final class Transaction: @@ -482,7 +482,7 @@ class Scan: @final class null: - def __init__(self, *args, **kwargs) -> None: ... + def __init__(self) -> None: ... def calc_digest(ns: str, set: str, key: Union[str, int, bytearray]) -> bytearray: ... def client(config: dict) -> Client: ... diff --git a/doc/requirements.txt b/doc/requirements.txt index 26973d407..4662a7248 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,7 +1,7 @@ # sphinx version requirement for readthedocs. sphinx==9.1.0 sphinx-rtd-theme==3.1.0 -sphinxcontrib-spelling==8.0.0 +sphinxcontrib-spelling==8.0.2 certifi>=2023.7.22 # not directly required, pinned by Snyk to avoid a vulnerability jinja2>=3.1.3 # not directly required, pinned by Snyk to avoid a vulnerability pygments>=2.15.0 # not directly required, pinned by Snyk to avoid a vulnerability diff --git a/pyproject.toml b/pyproject.toml index ce259d992..e003d578e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ "setuptools", - "versioningit==3.1.0", + "versioningit==3.3.0", # Used by our versioningit script that modifies the version "parver==0.5" ] diff --git a/setup.py b/setup.py index 4298d9e30..ce5b9a2a9 100644 --- a/setup.py +++ b/setup.py @@ -40,6 +40,7 @@ BASEPATH = os.path.dirname(os.path.abspath(__file__)) AEROSPIKE_C_HOME = os.path.join(BASEPATH, 'aerospike-client-c') +VS_PROJECT_CONFIGURATION = os.getenv("VS_PROJECT_CONFIGURATION", "Release") AEROSPIKE_C_TARGET = None PLATFORM = platform.platform(1) LINUX = 'Linux' in PLATFORM @@ -119,8 +120,15 @@ extra_compile_args.append('-ftest-coverage') extra_link_args.append('-lgcov') +data_files = [] + if UNOPTIMIZED: - extra_compile_args.append('-O0') + if WINDOWS: + extra_compile_args.append('/Zi') + extra_link_args.append('/DEBUG') + data_files.append("*.pdb") + else: + extra_compile_args.append('-O0') ################################################################################ # STATIC SSL LINKING BUILD SETTINGS @@ -166,7 +174,10 @@ libraries = libraries + ['rt'] AEROSPIKE_C_TARGET = AEROSPIKE_C_HOME + '/target/Linux-' + machine elif WINDOWS: - libraries.append("pthreadVC2") + if VS_PROJECT_CONFIGURATION == "Release": + libraries.append("pthreadVC2") + else: + libraries.append("pthreadVC2d") extra_compile_args.append("-DAS_SHARED_IMPORT") include_dirs.append(f"{AEROSPIKE_C_TARGET}/vs/packages/aerospike-client-c-dependencies.{c_client_dependencies_version}/build/native/include") else: @@ -184,9 +195,9 @@ ] else: include_dirs.append(AEROSPIKE_C_TARGET + '/src/include') - library_dirs.append(f"{AEROSPIKE_C_TARGET}/vs/packages/aerospike-client-c-dependencies.{c_client_dependencies_version}/build/native/lib/x64/Release") + library_dirs.append(f"{AEROSPIKE_C_TARGET}/vs/packages/aerospike-client-c-dependencies.{c_client_dependencies_version}/build/native/lib/x64/{VS_PROJECT_CONFIGURATION}") # Needed for linking the Python client with the C client - extra_objects.append(AEROSPIKE_C_TARGET + "/vs/x64/Release/aerospike.lib") + extra_objects.append(AEROSPIKE_C_TARGET + f"/vs/x64/{VS_PROJECT_CONFIGURATION}/aerospike.lib") os.putenv('CPATH', ':'.join(include_dirs)) os.environ['CPATH'] = ':'.join(include_dirs) @@ -230,7 +241,7 @@ def clean(): cmd = [ 'msbuild', 'vs/aerospike.sln', - '/property:Configuration=Release' + f"/property:Configuration={VS_PROJECT_CONFIGURATION}" ] else: cmd = [ @@ -324,5 +335,6 @@ def clean(): cmdclass={ 'build': CClientBuild, 'clean': CClientClean - } + }, + data_files=data_files ) diff --git a/test/new_tests/conftest.py b/test/new_tests/conftest.py index 514ff0f50..ef57dbbb6 100644 --- a/test/new_tests/conftest.py +++ b/test/new_tests/conftest.py @@ -239,7 +239,7 @@ def invalid_key(request): yield request.param -# aerospike.set_log_level(aerospike.LOG_LEVEL_DEBUG) +aerospike.set_log_level(aerospike.LOG_LEVEL_DEBUG) # aerospike.set_log_handler(None) def verify_record_ttl(client: aerospike.Client, key, expected_ttl: int): diff --git a/test/new_tests/test_dynamic_config.py b/test/new_tests/test_dynamic_config.py index 857ded21e..ec2bfdc12 100644 --- a/test/new_tests/test_dynamic_config.py +++ b/test/new_tests/test_dynamic_config.py @@ -42,7 +42,7 @@ def show_more_logs(self): # TODO: currently there is no way to restore the log handler and level before running this test # These are the defaults in the implementation - aerospike.set_log_level(aerospike.LOG_LEVEL_ERROR) + # aerospike.set_log_level(aerospike.LOG_LEVEL_ERROR) @pytest.fixture def cleanup_metrics_logs(self): diff --git a/test/new_tests/test_log.py b/test/new_tests/test_log.py index 0a222eef8..1ec737011 100644 --- a/test/new_tests/test_log.py +++ b/test/new_tests/test_log.py @@ -22,7 +22,7 @@ def teardown_class(cls): """ Set the class level logger to a no-op to ensure no problems later """ - aerospike.set_log_level(aerospike.LOG_LEVEL_ERROR) + aerospike.set_log_level(aerospike.LOG_LEVEL_DEBUG) aerospike.set_log_handler(None) def test_set_log_level_with_correct_argument(self):