Skip to content

Fix optional union types in generated Python signatures - #7600

Open
huxiaoyi-ovo wants to merge 3 commits into
isl-org:mainfrom
huxiaoyi-ovo:fix/fpfh-optional-indices-stub
Open

huxiaoyi-ovo wants to merge 3 commits into
isl-org:mainfrom
huxiaoyi-ovo:fix/fpfh-optional-indices-stub

Conversation

@huxiaoyi-ovo

Copy link
Copy Markdown

Summary

Fix generated Python signatures for optional pybind11 arguments that use PEP 604 union syntax such as T | None.

Open3D's docstring parser did not allow | in argument types, so signatures emitted by pybind11 3 could be truncated before stub generation. For compute_fpfh_feature, this made the optional indices argument appear required in the generated type stub.

This change:

  • allows | in parsed argument type expressions;
  • adds a regression test for the optional compute_fpfh_feature(..., indices=None) signature.

Fixes #7583.

Validation

The branch was validated against Open3D's CI before submission:

  • full Python suite passed: 8435 passed, 21 skipped, 1 xfailed;
  • the new FPFH signature regression test passed;
  • Windows CPU/CUDA/XPU builds passed;
  • macOS builds and wheel test passed;
  • Ubuntu, SYCL, OpenBLAS, and ARM64 checks passed.

One fork CI job reported failure only in the final wheel artifact upload step after build/tests succeeded: the workflow searches for open3d-[0-9]*.whl, while the produced wheel is named open3d_cpu-*.whl. No code or test step failed.

@update-docs

update-docs Bot commented Oct 7, 2026

Copy link
Copy Markdown

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

@huxiaoyi-ovo huxiaoyi-ovo changed the title Fix/fpfh optional indices stub Fix optional union types in generated Python signatures Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compute_fpfh_feature stub incorrectly requires the optional indices argument

1 participant