python: support passing `memoryview` to `bytes` fields
memoryview is not immutable, but a similar functionality is offered for similar types in other languages (e.g. Java's UnsafeByteOperations). An alternative way to implement this would be to provide a custom type (something like UnsafeBytes) to wrap buffer-like objects, and to let bytes field accept this object; so the user demonstrates to be well aware of what they are doing.
Fixes #6782
I've just ran the CI and it seems many tests are broken, for example with TypeError: '<' not supported between instances of 'memoryview' and 'memoryview', could you please take a look?
Are you having issues with your local bazel build? Could you try rebasing your PR, and using the latest supported Bazel version?
Hi @hlopko, thanks for your reply. I've managed to run the tests locally and fixed the problems you mentioned in a6a1b26. However, I still can't figure out how to run the tests with upb backend, do you have any suggestion? Thanks!
We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active, please add a comment.
This PR is labeled inactive because the last activity was over 90 days ago. This PR will be closed and archived after 14 additional days without activity.
Hi @hlopko, any chance we could resume the review of this PR? Thanks!
We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active, please add a comment.
This PR is labeled inactive because the last activity was over 90 days ago. This PR will be closed and archived after 14 additional days without activity.
We triage inactive PRs and issues in order to make it easier to find active work. If this PR should remain active or becomes active again, please reopen it.
This PR was closed and archived because there has been no new activity in the 14 days since the inactive label was added.