Skip to content

Remove broken/redundant Connection.get_fqdn

Pytango's Connection.get_fqdn() (i.e. DeviceProxy.get_fqdn() etc) is broken; it returns the empty string.

In cppTango, Connection::get_fqdn is a private method. It takes an FQDN as input, and returns that FQDN in a canonical form. It would be better named something like get_canonical_form_fqdn.(https://gitlab.com/tango-controls/cppTango/-/blob/main/cppapi/client/devapi_base.cpp#L1022)

In pyTango, we implement get_fqdn by creating an empty string, and then passing it to Connection::get_fqdn. Thus we get back a canonical form of that empty string, which is still just an empty string.(https://gitlab.com/tango-controls/pytango/-/blob/develop/ext/connection.cpp#L81)

Moreover, not only is it broken, it is redundant. Its nominal purpose is to retrieve the FQDN of the DeviceProxy's device. But we can already use DeviceProxy.dev_name() to get that FQDN from the local proxy, or we can use DeviceProxy.name() to retrieve the FQDN from the device itself.

Given that get_fqdn:

  • is broken, and has no test coverage, so presumably has always been broken;
  • wraps a private cppTango method that doesn't do what pytango expects it to do;
  • is presumably not in use by the pytango community, since it is broken and no-one has complained
  • is redundant to other methods

I am proposing to remove it altogether.

Edited by Drew Devereux

Merge request reports

Loading