diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 27cbb52f21..68d3175659 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -52,12 +52,12 @@ jobs: fail-fast: false matrix: buildplat: - - [ubuntu-22.04, manylinux_x86_64] - - [ubuntu-24.04-arm, manylinux_aarch64] + - [ubuntu-26.04, manylinux_x86_64] + - [ubuntu-26.04-arm, manylinux_aarch64] - [macos-15-intel, macosx_x86_64] - [macos-26, macosx_arm64] - [windows-2022, win_amd64] - python: ${{ github.event_name == 'schedule' && fromJSON('["cp39", "cp314"]') || fromJSON('["cp39", "cp310", "cp311", "cp312", "cp313", "cp314"]') }} + python: ${{ github.event_name == 'schedule' && fromJSON('["cp311", "cp315"]') || fromJSON('["cp311", "cp312", "cp313", "cp314", "cp315"]') }} steps: - uses: actions/checkout@v6 @@ -134,7 +134,7 @@ jobs: brew install automake pkg-config ninja - name: Build wheels - uses: pypa/cibuildwheel@v3.2.1 + uses: pypa/cibuildwheel@v4.3.5 env: CIBW_BUILD_VERBOSITY: 3 CIBW_ENVIRONMENT_PASS_LINUX: > @@ -157,7 +157,6 @@ jobs: ${{ inputs.libtiledb_ref != '' && format('TILEDB_BIN_PATH={0}', env.TILEDB_BIN_PATH) || '' }} MACOSX_DEPLOYMENT_TARGET: "11.0" CIBW_ARCHS: all - CIBW_PRERELEASE_PYTHONS: True CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} CIBW_MANYLINUX_X86_64_IMAGE: "manylinux_2_28" CIBW_MANYLINUX_AARCH64_IMAGE: "manylinux_2_28" @@ -178,7 +177,7 @@ jobs: build_sdist: name: Build source distribution - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 env: RUNNER_TEMP: "" CI_WHEEL_BUILD: 0 @@ -209,9 +208,9 @@ jobs: - macos-15-intel - macos-26 - windows-2022 - - ubuntu-22.04 - - ubuntu-24.04-arm - python: ${{ github.event_name == 'schedule' && fromJSON('["3.9", "3.14"]') || fromJSON('["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]') }} + - ubuntu-26.04 + - ubuntu-26.04-arm + python: ${{ github.event_name == 'schedule' && fromJSON('["3.11", "3.15"]') || fromJSON('["3.11", "3.12", "3.13", "3.14", "3.15"]') }} runs-on: ${{ matrix.os }} env: CI_WHEEL_BUILD: 0 @@ -252,7 +251,7 @@ jobs: create_issue_on_fail: permissions: issues: write - runs-on: ubuntu-latest + runs-on: ubuntu-slim needs: [build_wheels, test_sdist] if: github.event_name == 'schedule' && (failure() || cancelled()) steps: @@ -267,7 +266,7 @@ jobs: upload_pypi: needs: [build_wheels, test_sdist] if: always() && (startsWith(github.ref, 'refs/tags/') || inputs.test_pypi) && needs.build_wheels.result == 'success' && needs.test_sdist.result == 'success' - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 environment: pypi permissions: id-token: write diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5802d7fda1..aa288660a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,11 +36,11 @@ jobs: strategy: matrix: os: - - ubuntu-latest + - ubuntu-26.04 - macos-15-intel - macos-26 - windows-latest - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] + python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"] fail-fast: false env: MACOSX_DEPLOYMENT_TARGET: "11" @@ -68,10 +68,6 @@ jobs: with: arch: x64 - - name: Install Ninja (VS 2022) - uses: seanmiddleditch/gha-setup-ninja@v4 - if: startsWith(matrix.os, 'windows') - - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: diff --git a/.github/workflows/daily-test-build-numpy.yml b/.github/workflows/daily-test-build-numpy.yml index 73bc8fec67..6886c4fd50 100644 --- a/.github/workflows/daily-test-build-numpy.yml +++ b/.github/workflows/daily-test-build-numpy.yml @@ -21,20 +21,18 @@ jobs: shell: bash strategy: matrix: - os: [ubuntu-latest, macos-15-intel, macos-26, windows-latest] + os: [ubuntu-26.04, macos-15-intel, macos-26, windows-latest] py_np_combo: - - { python-version: "3.9", numpy-version: "1.25.2" } - - { python-version: "3.9", numpy-version: "2.0.2" } - - { python-version: "3.10", numpy-version: "1.25.2" } - - { python-version: "3.10", numpy-version: "2.2.6" } - { python-version: "3.11", numpy-version: "1.25.2" } + - { python-version: "3.11", numpy-version: "2.0.2" } - { python-version: "3.11", numpy-version: "2.4.6" } - { python-version: "3.12", numpy-version: "1.26.4" } - - { python-version: "3.12", numpy-version: "2.5.0" } + - { python-version: "3.12", numpy-version: "2.5.4" } - { python-version: "3.13", numpy-version: "2.1.3" } - - { python-version: "3.13", numpy-version: "2.5.0" } + - { python-version: "3.13", numpy-version: "2.5.4" } - { python-version: "3.14", numpy-version: "2.3.5" } - - { python-version: "3.14", numpy-version: "2.5.0" } + - { python-version: "3.14", numpy-version: "2.5.4" } + - { python-version: "3.15", numpy-version: "2.5.4" } fail-fast: false env: TILEDB_VERSION: ${{ inputs.libtiledb_version }} @@ -50,10 +48,6 @@ jobs: with: arch: x64 - - name: Install Ninja (VS 2022) - uses: seanmiddleditch/gha-setup-ninja@v4 - if: startsWith(matrix.os, 'windows') - - name: Enable vcpkg binary caching uses: actions/github-script@v8 with: @@ -107,7 +101,7 @@ jobs: create_issue_on_fail: permissions: issues: write - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 needs: test if: failure() || cancelled() steps: diff --git a/.github/workflows/daily-test-build.yml b/.github/workflows/daily-test-build.yml index 600712da6d..611505dc6e 100644 --- a/.github/workflows/daily-test-build.yml +++ b/.github/workflows/daily-test-build.yml @@ -15,7 +15,7 @@ jobs: shell: bash strategy: matrix: - os: [ubuntu-latest, macos-15-intel, macos-26, windows-latest] + os: [ubuntu-26.04, macos-15-intel, macos-26, windows-latest] fail-fast: false env: @@ -37,10 +37,6 @@ jobs: core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); - - name: Install Ninja (VS 2022) - uses: seanmiddleditch/gha-setup-ninja@v4 - if: matrix.os == 'windows-latest' - - name: "Set CMAKE_GENERATOR" run: echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV if: matrix.os == 'windows-latest' @@ -81,7 +77,7 @@ jobs: create_issue_on_fail: permissions: issues: write - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 needs: test if: failure() || cancelled() steps: diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 9084a514fe..13e63267ce 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -4,7 +4,7 @@ on: [push, pull_request, workflow_dispatch] jobs: lint: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 steps: - uses: actions/checkout@v6 - uses: actions/setup-python@v6 diff --git a/pyproject.toml b/pyproject.toml index 01f2051874..ef0cf5a198 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ requires = [ build-backend = "scikit_build_core.build" [project] -requires-python = ">=3.9" +requires-python = ">=3.11" name = "tiledb" description = "Pythonic interface to the TileDB array storage manager" readme = "README.md" @@ -30,12 +30,11 @@ classifiers=[ "Operating System :: POSIX :: Linux", "Operating System :: MacOS :: MacOS X", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", ] dependencies = [ "numpy>=1.25", @@ -57,7 +56,7 @@ test = [ "hypothesis", "psutil", "pyarrow", - "pandas<3", + "pandas<3 ; python_version < '3.15'", "dask[distributed]", ] diff --git a/tiledb/filestore.py b/tiledb/filestore.py index b8f1c9cb49..fb5a49b9ab 100644 --- a/tiledb/filestore.py +++ b/tiledb/filestore.py @@ -1,5 +1,5 @@ import warnings -from typing import ByteString, Optional +from typing import Optional, Union import tiledb.libtiledb as lt @@ -21,11 +21,13 @@ def __init__(self, uri: str, ctx: Optional[Ctx] = None) -> None: self._ctx = ctx or default_ctx() self._filestore_uri = uri - def write(self, buffer: ByteString, mime_type: str = "AUTODETECT") -> None: + def write( + self, buffer: Union[bytes, bytearray, memoryview], mime_type: str = "AUTODETECT" + ) -> None: """ Import data from an object that supports the buffer protocol to a Filestore Array. - :param buffer ByteString: Data of type bytes, bytearray, memoryview, etc. + :param buffer: Data of type bytes, bytearray, memoryview, etc. :param str mime_type: MIME types are "AUTODETECT" (default), "image/tiff", "application/pdf" """ diff --git a/tiledb/tests/test_attribute.py b/tiledb/tests/test_attribute.py index eee185059f..bf51917e39 100644 --- a/tiledb/tests/test_attribute.py +++ b/tiledb/tests/test_attribute.py @@ -1,4 +1,3 @@ -import sys import xml.etree.ElementTree import numpy as np @@ -364,10 +363,7 @@ def test_modify_attribute_in_schema(self): with pytest.raises(AttributeError) as exc: A.schema.attr(0).name = "can't change" - if sys.version_info < (3, 11): - assert "can't set attribute" in str(exc.value) - else: - assert "object has no setter" in str(exc.value) + assert "object has no setter" in str(exc.value) def test_wkt_attribute(self): A = np.array( diff --git a/tiledb/tests/test_query_condition.py b/tiledb/tests/test_query_condition.py index dca40825ed..40ab638d6c 100644 --- a/tiledb/tests/test_query_condition.py +++ b/tiledb/tests/test_query_condition.py @@ -1,3 +1,4 @@ +import ast import string import numpy as np @@ -792,14 +793,16 @@ def test_attribute_with_dot(self): with tiledb.open(path, "r") as A: with pytest.raises(tiledb.TileDBError) as exc_info: A.query(cond="attr.one < 6")[:] + node = ast.dump(ast.parse("attr.one", mode="eval").body) assert ( - "TileDBError: Unhandled dot operator in Attribute(value=Name(id='attr', ctx=Load()), attr='one', ctx=Load()) -- if your attribute name has a dot in it, e.g. `orig.ident`, please wrap it with `attr(\"...\")`, e.g. `attr(\"orig.ident\")`" + f'TileDBError: Unhandled dot operator in {node} -- if your attribute name has a dot in it, e.g. `orig.ident`, please wrap it with `attr("...")`, e.g. `attr("orig.ident")`' in str(exc_info.value) ) with pytest.raises(tiledb.TileDBError) as exc_info: A.query(cond="attr.two >= 6")[:] + node = ast.dump(ast.parse("attr.two", mode="eval").body) assert ( - "TileDBError: Unhandled dot operator in Attribute(value=Name(id='attr', ctx=Load()), attr='two', ctx=Load()) -- if your attribute name has a dot in it, e.g. `orig.ident`, please wrap it with `attr(\"...\")`, e.g. `attr(\"orig.ident\")`" + f'TileDBError: Unhandled dot operator in {node} -- if your attribute name has a dot in it, e.g. `orig.ident`, please wrap it with `attr("...")`, e.g. `attr("orig.ident")`' in str(exc_info.value) ) with pytest.raises(tiledb.TileDBError) as exc_info: