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

[python] Work around pyarrow>=13 issue on MacOS, release-1.12 branch #2739

Closed
wants to merge 1 commit 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
8 changes: 1 addition & 7 deletions apis/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,7 @@ def run(self):
"attrs>=22.2",
"numba>=0.58.0",
"pandas",
# TODO: once we no longer support Python 3.7, remove this and pin to pyarrow >= 14.0.1
# https://github.com/single-cell-data/TileDB-SOMA/issues/1926
"pyarrow_hotfix",
# MacOS issue with import pyarrow before import tiledb at >= 13.0:
# https://github.com/single-cell-data/TileDB-SOMA/issues/1926#issuecomment-1834695149
"pyarrow>=9.0.0,<13.0.0; platform_system=='Darwin'",
"pyarrow>=9.0.0; platform_system!='Darwin'",
"pyarrow>=14.0.0",
"scanpy>=1.9.2",
"scipy",
# Note: the somacore version is in .pre-commit-config.yaml too
Expand Down
12 changes: 7 additions & 5 deletions apis/python/src/tiledbsoma/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@
:class:`ValueError`.
"""

# This ABSOLUTELY MUST be imported before pyarrow to avoid abort-traps on MacOS
# with any pyarrow >= 13. And the pre-commit hook, isort, et al. MUST NOT be
# allowed to reorder this. See also
# https://github.com/single-cell-data/TileDB-SOMA/issues/1926
# https://github.com/single-cell-data/TileDB-SOMA/issues/1849
import tiledb # noqa E402

# ^^ the rest is autogen whether viewed from Python on-line help, Sphinx/readthedocs, etc. It's
# crucial that we include a separator (e.g. "Classes and functions") to make an entry in the
# readthedocs table of contents.
Expand Down Expand Up @@ -138,11 +145,6 @@
from somacore import AxisColumnNames, AxisQuery, ExperimentAxisQuery
from somacore.options import ResultOrder

# TODO: once we no longer support Python 3.7, remove this and pin to pyarrow >= 14.0.1
# https://github.com/single-cell-data/TileDB-SOMA/issues/1926
# ruff: noqa
import pyarrow_hotfix

from ._collection import Collection
from ._constants import SOMA_JOINID
from ._dataframe import DataFrame
Expand Down
7 changes: 7 additions & 0 deletions apis/python/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# This ABSOLUTELY MUST be imported before pyarrow to avoid abort-traps on MacOS
# with any pyarrow >= 13. And the pre-commit hook, isort, et al. MUST NOT be
# allowed to reorder this. See also
# https://github.com/single-cell-data/TileDB-SOMA/issues/1926
# https://github.com/single-cell-data/TileDB-SOMA/issues/1849
import tiledb # noqa E402

import pyarrow as pa
from typeguard import install_import_hook

Expand Down
Loading