diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7e5053f27f..1f074678c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-12, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] fail-fast: false env: # 11.7 necessary due to: https://github.com/actions/setup-python/issues/682#issuecomment-1604261330 diff --git a/.github/workflows/daily-test-build-numpy.yml b/.github/workflows/daily-test-build-numpy.yml index b317b9578c..3fbfcc4cb7 100644 --- a/.github/workflows/daily-test-build-numpy.yml +++ b/.github/workflows/daily-test-build-numpy.yml @@ -16,9 +16,11 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-12, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] include: # https://github.com/scipy/oldest-supported-numpy/blob/main/setup.cfg + - python-version: "3.12" + numpy-version: "1.26.4" - python-version: "3.11" numpy-version: "1.23.2" - python-version: "3.10" diff --git a/misc/azure-release.yml b/misc/azure-release.yml index 22613bdecc..a0c0fe7d2c 100644 --- a/misc/azure-release.yml +++ b/misc/azure-release.yml @@ -65,7 +65,7 @@ stages: condition: always() variables: cibw_test_requires: "pytest" - USE_CIBW_VERSION: 2.12.3 + USE_CIBW_VERSION: 2.17.0 strategy: matrix: linux_py: @@ -79,7 +79,6 @@ stages: TILEDB_INSTALL: "$(Pipeline.Workspace)/.libtiledb_dist/$(LIBTILEDB_SHA)-macos-x86_64" CIBW_ARCHS_MACOS: "x86_64" CIBW_SKIP: "cp36-* cp37-* pp*" - CIBW_TEST_SKIP: "cp37-*" CIBW_BUILD_VERBOSITY: 3 macOS_arm64_py: imageName: "macOS-12" diff --git a/tiledb/query_condition.py b/tiledb/query_condition.py index 163e29b54a..7f71c02cf9 100644 --- a/tiledb/query_condition.py +++ b/tiledb/query_condition.py @@ -15,9 +15,7 @@ filtering query results on attribute and dimension values. """ -QueryConditionNodeElem = Union[ - ast.Name, ast.Constant, ast.Call, ast.Num, ast.Str, ast.Bytes -] +QueryConditionNodeElem = Union[ast.Name, ast.Constant, ast.Call] @dataclass @@ -280,8 +278,8 @@ def is_variable_node(self, variable: QueryConditionNodeElem) -> bool: return ( isinstance(variable.args[0], ast.Constant) - or isinstance(variable.args[0], ast.Str) - or isinstance(variable.args[0], ast.Bytes) + or isinstance(variable.args[0], ast.Constant) + or isinstance(variable.args[0], ast.Constant) ) return isinstance(variable, ast.Name) @@ -326,7 +324,9 @@ def get_variable_from_node(self, node: QueryConditionNodeElem) -> Any: variable = variable_node.id elif isinstance(variable_node, ast.Constant): variable = variable_node.value - elif isinstance(variable_node, ast.Str) or isinstance(variable_node, ast.Bytes): + elif isinstance(variable_node, ast.Constant) or isinstance( + variable_node, ast.Constant + ): # deprecated in 3.8 variable = variable_node.s else: @@ -363,13 +363,15 @@ def get_value_from_node(self, node: QueryConditionNodeElem) -> Any: if isinstance(value_node, ast.Constant): value = value_node.value - elif isinstance(value_node, ast.NameConstant): + elif isinstance(value_node, ast.Constant): # deprecated in 3.8 value = value_node.value - elif isinstance(value_node, ast.Num): + elif isinstance(value_node, ast.Constant): # deprecated in 3.8 value = value_node.n - elif isinstance(value_node, ast.Str) or isinstance(value_node, ast.Bytes): + elif isinstance(value_node, ast.Constant) or isinstance( + value_node, ast.Constant + ): # deprecated in 3.8 value = value_node.s else: @@ -491,7 +493,7 @@ def visit_UnaryOp(self, node: ast.UnaryOp, sign: int = 1): else: if isinstance(node.operand, ast.Constant): node.operand.value *= sign - elif isinstance(node.operand, ast.Num): + elif isinstance(node.operand, ast.Constant): node.operand.n *= sign else: raise TileDBError( @@ -500,18 +502,18 @@ def visit_UnaryOp(self, node: ast.UnaryOp, sign: int = 1): return node.operand - def visit_Num(self, node: ast.Num) -> ast.Num: + def visit_Num(self, node: ast.Constant) -> ast.Constant: # deprecated in 3.8 return node - def visit_Str(self, node: ast.Str) -> ast.Str: + def visit_Str(self, node: ast.Constant) -> ast.Constant: # deprecated in 3.8 return node - def visit_Bytes(self, node: ast.Bytes) -> ast.Bytes: + def visit_Bytes(self, node: ast.Constant) -> ast.Constant: # deprecated in 3.8 return node - def visit_NameConstant(self, node: ast.NameConstant) -> ast.NameConstant: + def visit_NameConstant(self, node: ast.Constant) -> ast.Constant: # deprecated in 3.8 return node