-
Notifications
You must be signed in to change notification settings - Fork 15.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add GetDebugString to Python FileDescriptor interface. #7498
Add GetDebugString to Python FileDescriptor interface. #7498
Conversation
Not sure if there's any etiquette about tagging reviewers here, but I'm not sure whose attention to ask for for review. @TeBoring / @anandolee - you've reviewed one of my Python PRs before, any thoughts on who might be able to review this? |
Sorry for the delay and thanks for the contribution. Right now, this PR is failing a few python tests with this error: |
e246c68
to
ef0bd13
Compare
Thanks @deannagarcia! I've made an update that should fix things (although in the nearly two years since this pull request was opened, my local development environment can no longer run the tests cleanly without a bit more work). |
@unittest.skipIf( | ||
api_implementation.Type() != 'cpp', | ||
'GetDebugString is only available with the cpp implementation', | ||
) | ||
def testGetDebugString(self): | ||
self.assertEqual(self.my_file.GetDebugString(), TEST_FILE_DESCRIPTOR_DEBUG) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this test be executed in python too as this PR merged that feature?
(sry just needed that feature and debugged on an older python-protobuf and stumbled over this PR, pls just ignore if everything is as it should be :)!
…hon cpp extension. cpp extension added the API in #7498 Pure python and upb do not support it and filtered out the test This API does not exists in any other language except C++. PiperOrigin-RevId: 686192076
…hon cpp extension. cpp extension added the API in #7498 Pure python and upb do not support it and filtered out the test This API does not exists in any other language except C++. PiperOrigin-RevId: 686192076
…hon cpp extension. cpp extension added the API in #7498 Pure python and upb do not support it and filtered out the test This API does not exists in any other language except C++. PiperOrigin-RevId: 691870623
Closes #7484.
This PR exposes the C++
FileDescriptor
DebugString
method through to the Python C++ implementation, and adds a test for it.