GH-49273: [Python] Move stub docstring script to _build_utils with gr…#49357
Open
vanshaj2023 wants to merge 1 commit intoapache:mainfrom
Open
GH-49273: [Python] Move stub docstring script to _build_utils with gr…#49357vanshaj2023 wants to merge 1 commit intoapache:mainfrom
vanshaj2023 wants to merge 1 commit intoapache:mainfrom
Conversation
…ith graceful degradation
Member
|
Thanks for working on this @vanshaj2023. I've kicked off a CI-workflow to see if it works on our CI. |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
Follow-up to #49235 and #49273. The
update_stub_docstrings.pyscript was added toMANIFEST.into fix nightly sdist builds, but it used a fragileimportlib.util.spec_from_file_locationpattern and forcedlibcstas a hard build dependency. This gives the script a proper home and makes builds more robust for users on exotic platforms who may not havelibcst.What changes are included in this PR?
scripts/update_stub_docstrings.pytopyarrow/_build_utils/update_stub_docstrings.py_build_utilsis auto-included in sdist via existinggraft pyarrow, excluded from wheels viasetuptools.packages.find.excludeimportlib.util.spec_from_file_locationinsetup.pywith a normal import wrapped intry/except ImportErrorlibcsta soft build dependency inpyproject.toml(CI still installs it viarequirements-build.txt)PYARROW_SKIP_STUB_DOCSTRINGSenv var for explicit opt-outscripts/update_stub_docstrings.pyas a thin CLI wrapperAre these changes tested?
No new tests. Verified that all modified files pass flake8, graceful degradation catches ImportError cleanly, and CI requirements files still include
libcstso official wheels get docstrings.Are there any user-facing changes?
No. Users building from sdist without
libcstwill now get stubs without docstrings instead of a build failure.