Skip to content
Open
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
7 changes: 4 additions & 3 deletions ci/scripts/python_wheel_validate_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,10 @@ def validate_wheel(path):
info.filename.split("/")[-1] == filename for info in wheel_zip.filelist
), f"{filename} is missing from the wheel."

assert any(
info.filename == "pyarrow/py.typed" for info in wheel_zip.filelist
), "pyarrow/py.typed is missing from the wheel."
# TODO(GH-48970): Uncomment when stubfiles are complete
# assert any(
# info.filename == "pyarrow/py.typed" for info in wheel_zip.filelist
# ), "pyarrow/py.typed is missing from the wheel."

source_root = Path(__file__).resolve().parents[2]
stubs_dir = source_root / "python" / "pyarrow-stubs" / "pyarrow"
Comment on lines 62 to 63

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rok I strongly recommend excluding the entire directory.

This is all that is in there? 🤨

from typing import Any
# TODO(GH-48970): remove __getattr__ before release as this
# will annotate non-existing attributes as Any.
# https://github.com/apache/arrow/issues/48970
def __getattr__(name: str) -> Any: ...

We've been pinning pyarrow<24 and the errors we see in (narwhals-dev/narwhals#3560) will still be there for type checkers that aren't mypy 😔

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll change this to do so. Sorry it's taking so long.

Expand Down
5 changes: 5 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
sdist.include = ["pyarrow/_generated_version.py", "cmake_modules/", "pyarrow-stubs/"]
wheel.packages = ["pyarrow"]
wheel.install-dir = "pyarrow"
# TODO(GH-48970): Remove this when stubfiles are complete
# Withhold the PEP 561 marker until the type stubs are complete. The .pyi files still ship
# and are tested in CI, but without py.typed type checkers ignore them, we don't break
# downstream users (GH-49831). The file is kept in-tree for CI type-checking.
wheel.exclude = ["pyarrow/py.typed"]
Comment thread
rok marked this conversation as resolved.

[tool.scikit-build.cmake.define]
PYARROW_BUNDLE_ARROW_CPP = {env = "PYARROW_BUNDLE_ARROW_CPP", default = "OFF"}
Expand Down
Loading