Skip to content

UPSTREAM PR #26957: Propagate descriptor errors from MessageMeta#148

Open
loci-dev wants to merge 1 commit into
mainfrom
loci/pr-26957-fix-message-meta-getattr-errors
Open

UPSTREAM PR #26957: Propagate descriptor errors from MessageMeta#148
loci-dev wants to merge 1 commit into
mainfrom
loci/pr-26957-fix-message-meta-getattr-errors

Conversation

@loci-dev
Copy link
Copy Markdown

Note

Source pull request: protocolbuffers/protobuf#26957

Summary

  • stop rewriting non-AttributeError failures to AttributeError in PyUpb_MessageMeta_GetAttr
  • add a focused regression test covering KeyboardInterrupt, MemoryError, and SystemExit

Impact

  • message class descriptors can currently hide control-flow and fatal exceptions behind a missing-attribute error
  • this keeps the protobuf dynamic attribute fallback for real misses while preserving descriptor-raised exceptions

Testing

  • cmake -S . -B build-cmake -G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_STANDARD=17 -Dprotobuf_BUILD_TESTS=ON -Dprotobuf_BUILD_CONFORMANCE=OFF -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF -Dprotobuf_WITH_ZLIB=ON
  • cmake --build build-cmake --parallel 8
  • ctest --test-dir build-cmake --output-on-failure -R '^(lite-test|full-test|upb-test)$'
  • build-cmake/protoc --version
  • in a temporary Python 3.10 venv using a repo-backed _message build sourced from this checkout:
    • python setup.py build_ext --inplace
    • python python/google/protobuf/internal/message_meta_getattr_test.py

Notes

  • this addresses bug 2 from #26596

@loci-dev loci-dev force-pushed the loci/pr-26957-fix-message-meta-getattr-errors branch from 47a5514 to 580ea4e Compare April 17, 2026 23:44
@loci-review
Copy link
Copy Markdown

loci-review Bot commented Apr 17, 2026

No summary available at this time.

@loci-review
Copy link
Copy Markdown

loci-review Bot commented Apr 18, 2026

No meaningful performance changes were detected across 10155 analyzed functions in the following binaries: build.protoc-stable.

💬 Questions? Tag @loci-dev

@loci-dev loci-dev force-pushed the main branch 24 times, most recently from 8b66a5e to 7a184e2 Compare April 22, 2026 19:52
@loci-dev loci-dev force-pushed the main branch 20 times, most recently from f292971 to 1fdfb93 Compare April 29, 2026 07:16
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.

2 participants