fix(types): Buffer type hint - #5662
Merged
Merged
Conversation
collections.abc.Buffer was added in Python 3.12. The previous behaviour should be used prior to this version.
henryiii
approved these changes
May 14, 2025
aaron-skydio
added a commit
to symforce-org/symforce
that referenced
this pull request
Sep 30, 2026
3.0.0 replaced CLIArgs.module_name with module_names, and run() now takes the module names and output dir directly. The symforce wheel tests install the unpinned dev extras, so they picked up 3.0.0 and the cc_sym stubs codegen test failed. Update both stubgen callers to the new API and require >=3.0.0. Value comments are now opt-in, so pass --print-value-comments to keep them. Remove monkeypatches that are now redundant. Current-module prefix stripping and nested-parameter imports are handled upstream in 3.0.0. The typing.Buffer -> typing_extensions.Buffer rewrite is unneeded since pybind11 3.0.0 (pybind/pybind11#5662) never emits typing.Buffer. Regenerating with each of these disabled produces no change. Topic: pybind11-stubgen-3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Aaron Miller <aaron@skydio.com> GitOrigin-RevId: a5f55ed3319031e4f580e650bc2022e9a05af47b
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.
Description
Fix a type hint regression introduced in #5566.
collections.abc.Bufferwas added in Python 3.12.If the Python version being compiled against is less than this it uses
typing_extensions.Buffer.Fixes #5660
Suggested changelog entry: