[Bug 1711197] Re: distro-info returns an object instead of a dictionary which breaks applications relying on it

Andres Rodriguez andreserl at ubuntu-pe.org
Wed Aug 16 22:13:55 UTC 2017


FWIW, while this change may things nicer moving forward, this makes it
very difficult to maintain code that needs to work on both, Xenial and
Artful+. Having the old API still available would allow applications to
continue to rely on the module without having to do any hackery,
specially, since the module doesn't seem to expose any versioning
information.

While I acknowledge that the change is for the better, to address these
cases it should at least expose version information so applications can
adapt the work on the different behavior of the module in a different
release.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to distro-info in Ubuntu.
https://bugs.launchpad.net/bugs/1711197

Title:
  distro-info returns an object instead of a dictionary which breaks
  applications relying on it

Status in distro-info package in Ubuntu:
  New

Bug description:
  A new version of distro-info has just broken all applications that
  rely on the python module. One of this applications is MAAS.

  Example:

  # In Xenial, you would do something like:

  from distro_info import UbuntuDistroInfo
  info = UbuntuDistroInfo()
  for row in info._avail(info._date):
      print(row['series'])

  # In Artful, this no longer works. It would have to be done like:

  from distro_info import UbuntuDistroInfo
  info = UbuntuDistroInfo()
  for row in info._avail(info._date):
      print(row.series)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/distro-info/+bug/1711197/+subscriptions



More information about the foundations-bugs mailing list