You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "vanshaj2023 (via GitHub)" <gi...@apache.org> on 2026/02/21 08:35:49 UTC

[PR] GH-49273: [Python] Move stub docstring script to _build_utils with gr… [arrow]

vanshaj2023 opened a new pull request, #49354:
URL: https://github.com/apache/arrow/pull/49354

   ### Rationale for this change
   
   Follow-up to #49235 and #49273. The `update_stub_docstrings.py` script was added to `MANIFEST.in` to fix nightly sdist builds, but it used a fragile `importlib.util.spec_from_file_location` pattern and forced `libcst` as a hard build dependency. This gives the script a proper home and makes builds more robust for users on exotic platforms who may not have `libcst`.
   
   ### What changes are included in this PR?
   
   - Move `scripts/update_stub_docstrings.py` to `pyarrow/_build_utils/update_stub_docstrings.py`
   - `_build_utils` is auto-included in sdist via existing `graft pyarrow`, excluded from wheels via `setuptools.packages.find.exclude`
   - Replace `importlib.util.spec_from_file_location` in `setup.py` with a normal import wrapped in `try/except ImportError`
   - Make `libcst` a soft build dependency in `pyproject.toml` (CI still installs it via `requirements-build.txt`)
   - Add `PYARROW_SKIP_STUB_DOCSTRINGS` env var for explicit opt-out
   - Keep `scripts/update_stub_docstrings.py` as a thin CLI wrapper
   
   ### Are these changes tested?
   
   No new tests. Verified that all modified files pass flake8, graceful degradation catches ImportError cleanly, and CI requirements files still include `libcst` so official wheels get docstrings.
   
   ### Are there any user-facing changes?
   
   No. Users building from sdist without `libcst` will now get stubs without docstrings instead of a build failure.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] GH-49273: [Python] Move stub docstring script to _build_utils with gr… [arrow]

Posted by "vanshaj2023 (via GitHub)" <gi...@apache.org>.
vanshaj2023 closed pull request #49354: GH-49273: [Python] Move stub docstring script to _build_utils with gr…
URL: https://github.com/apache/arrow/pull/49354


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org