Skip to content

GH-49503: [Docs][Python] Documenting .pxi doctests are tested via lib.pyx#49515

Merged
AlenkaF merged 3 commits intoapache:mainfrom
bhavanaeh:docs-pxi-doctest-info
Mar 20, 2026
Merged

GH-49503: [Docs][Python] Documenting .pxi doctests are tested via lib.pyx#49515
AlenkaF merged 3 commits intoapache:mainfrom
bhavanaeh:docs-pxi-doctest-info

Conversation

@bhavanaeh
Copy link
Contributor

@bhavanaeh bhavanaeh commented Mar 15, 2026

Rationale for this change

Running python -m pytest --doctest-cython directly on .pxi files doesn't work because Cython .pxi files are included in .pyx files at compile time. This isn't documented, which could potentially confuse contributors.

Please see discussion in #49279 (comment) by @AlenkaF for additional context.

What changes are included in this PR?

Added a note to the Doctest section of the Developing PyArrow documentation explaining that:

  • .pxi files cannot be tested directly with --doctest-cython
  • Doctests should be run on the .pyx file they are included in (e.g., lib.pyx)
  • Errors will appear under the .pyx file, not the original .pxi filename

Are these changes tested?

Documentation-only change. No code changes.

Are there any user-facing changes?

No.

@github-actions
Copy link

⚠️ GitHub issue #49503 has been automatically assigned in GitHub to PR creator.

@bhavanaeh bhavanaeh changed the title GH-49503: [Python][Doc] Documenting .pxi doctests are tested via lib.pyx GH-49503: [Docs][Python] Documenting .pxi doctests are tested via lib.pyx Mar 15, 2026
@github-actions
Copy link

⚠️ GitHub issue #49503 has been automatically assigned in GitHub to PR creator.

@AlenkaF
Copy link
Member

AlenkaF commented Mar 19, 2026

@github-actions crossbow submit preview-docs

@github-actions
Copy link

Revision: ecff1a1

Submitted crossbow builds: ursacomputing/crossbow @ actions-bfd9f4b8a6

Task Status
preview-docs GitHub Actions

Copy link
Member

@AlenkaF AlenkaF left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
Adding one comment from my side.

@bhavanaeh
Copy link
Contributor Author

@AlenkaF thanks for the comment, addressed!

@AlenkaF AlenkaF merged commit 8a8e574 into apache:main Mar 20, 2026
10 checks passed
@AlenkaF AlenkaF removed the awaiting committer review Awaiting committer review label Mar 20, 2026
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 2 benchmarking runs that have been run so far on merge-commit 8a8e574.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 9 possible false positives for unstable benchmarks that are known to sometimes produce them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants