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

Release test sc 37726.py312 #1954

Closed
wants to merge 3 commits into from
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/daily-test-build-numpy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions misc/azure-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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"
Expand Down
30 changes: 16 additions & 14 deletions tiledb/query_condition.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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(
Expand All @@ -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
Loading