You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am seeing that when working with it in Python, on my local machine (which is Ubuntu linux, also using Python 3.11, more details below) the custom element is registered as a google._upb._message.ScalarMapContainer, but on the remote Composer (Airflow) environment, the custom element is registered as a google.protobuf.internal.containers.ScalarMap.
Both of these environments are as exactly matched as possible: both are unix, both are using protobuf version 4.25.3, and both are using Python 3.11.
Problem
I need to perform introspection: I am creating some fake data, generating it using the faker library when I have hit a primitive element (str, int, etc), but introspecting further to get to a lower leaf when I have a protobuf Message, ScalarMapContainer, or some other protobuf (non-primitive) type.
It is difficult to debug this introspection since there is inconsistency even across the same Major.Minor.Patch.
I understand that these are supposed to be internals, but with no way to perform introspection, I am forced to work this way. I simply need to understand when and why google._upb._message... is used over google.protobuf.internal.containers.... I read that this happened with the change to protobuf 4.*, but this is clearly not the case, since I have the exact same version in both cases, and they are using the two different underlying libraries.
Anything else we should know about your project / environment
My linux machine details:
> uname -a
Linux <my-account> 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 10:22:43 UTC 2 x86_64 x86_64 x86_64 GNU/Linux`
As mentioned above, the remote machine is a Google Cloud Composer image, version composer-2.6.6-airflow-2.7.3. It's details can be found here.
Here is an output of python -m pip show protobuf across the two environments:
What version of protobuf and what language are you using?
Protobuf version: 4.25.3
Python version: 3.11
What operating system (Linux, Windows, ...) and version?
[local] Linux and [remote] Google Composer (Airflow) environment with image: composer-2.6.6-airflow-2.7.3
More details on this below.
What runtime / compiler are you using (e.g., python version or gcc version)
Python 3.11
What did you do?
When I create a protobuf message that contains a map type, for instance:
I am seeing that when working with it in Python, on my local machine (which is Ubuntu linux, also using Python 3.11, more details below) the
custom
element is registered as agoogle._upb._message.ScalarMapContainer
, but on the remote Composer (Airflow) environment, thecustom
element is registered as agoogle.protobuf.internal.containers.ScalarMap
.Both of these environments are as exactly matched as possible: both are unix, both are using protobuf version 4.25.3, and both are using Python 3.11.
Problem
I need to perform introspection: I am creating some fake data, generating it using the
faker
library when I have hit a primitive element (str
,int
, etc), but introspecting further to get to a lower leaf when I have a protobufMessage
,ScalarMapContainer
, or some other protobuf (non-primitive) type.It is difficult to debug this introspection since there is inconsistency even across the same Major.Minor.Patch.
I understand that these are supposed to be internals, but with no way to perform introspection, I am forced to work this way. I simply need to understand when and why
google._upb._message...
is used overgoogle.protobuf.internal.containers...
. I read that this happened with the change to protobuf4.*
, but this is clearly not the case, since I have the exact same version in both cases, and they are using the two different underlying libraries.Anything else we should know about your project / environment
My linux machine details:
As mentioned above, the remote machine is a Google Cloud Composer image, version composer-2.6.6-airflow-2.7.3. It's details can be found here.
Here is an output of
python -m pip show protobuf
across the two environments:My local:
Cloud Composer:
The text was updated successfully, but these errors were encountered: