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
As a part of this commit the ClusterInfoV13 class was introduced to deal with the newer version of the cluster API. The previous form ClusterInfo had setters for each property (spot, security settings, ec2 settings etc) to update the specific parts of the cluster. Eg: If I needed to update only the spot instance properties I had only to call set_spot_instance_settings(..). Now I have to call the long form set_cluster_info(..) on each update. I cannot call the double underscored __set_spot_instance_settings(..) anymore since these are changed into _ClusterInfoV13__set_spot_instance_settings(..) because of python's name mangling. This is supremely frustrating and breaks a lot of test code that we have built up which needs to be rewritten as __Cluster_set_spot_instance_settings(..) or the long form update Cluster.set_cluster_info(..) for each update call to a cluster object.
Is it possible to convert these setters to @property-ies because that's how setters are exposed in Python. Was there a strong reason to hide the v1.3 setters deviating from the norm that was in v1.2 where setters were public?
The text was updated successfully, but these errors were encountered:
vogxn
pushed a commit
to vogxn/qds-sdk-py
that referenced
this issue
Mar 21, 2016
double underscored names are mangled by python as they are seen as
private fields. this is not suitable when importing the sdk and writing
factories for various qubole resources as there is no easy way to update
specific parts of the cluster info object.
As a part of this commit the
ClusterInfoV13
class was introduced to deal with the newer version of the cluster API. The previous formClusterInfo
had setters for each property (spot, security settings, ec2 settings etc) to update the specific parts of the cluster. Eg: If I needed to update only the spot instance properties I had only to callset_spot_instance_settings(..)
. Now I have to call the long formset_cluster_info(..)
on each update. I cannot call the double underscored__set_spot_instance_settings(..)
anymore since these are changed into_ClusterInfoV13__set_spot_instance_settings(..)
because of python's name mangling. This is supremely frustrating and breaks a lot of test code that we have built up which needs to be rewritten as__Cluster_set_spot_instance_settings(..)
or the long form updateCluster.set_cluster_info(..)
for each update call to a cluster object.Is it possible to convert these setters to
@property
-ies because that's how setters are exposed in Python. Was there a strong reason to hide the v1.3 setters deviating from the norm that was in v1.2 where setters were public?The text was updated successfully, but these errors were encountered: