For information, some conversation occurred on this in ubuntu-devel at [1] 
continuing into [2].
  [1] http://irclogs.ubuntu.com/2013/11/20/%23ubuntu-devel.html#t22:21
  [2] http://irclogs.ubuntu.com/2013/11/21/%23ubuntu-devel.html

[19:20] <smoser> bdrung, thoughts? 
https://bugs.launchpad.net/ubuntu/+source/distro-info/+bug/1253208
[22:21] <bdrung> smoser: hi, i am happy to accept patches.
[22:22] <bdrung> smoser: returning a dict has the drawback that it could be 
hard to support if we want to change the internal
[22:22] <bdrung> smoser: we could add functions instead that take a series and 
return the fullname/version/etc
[01:07] <smoser> bdrung, i think its generally more functional to give me 
straightforward access to all data.
[01:08] <bdrung> smoser: i would prefer to keep a simple, supportable API.
[01:08] <smoser> how is returning a dict of data not supportable?
[01:10] <smoser> many times i've wanted data in the form that my function gets 
it.
[01:11] <smoser> its very common to want a release adjective, its version, and 
whether or not its an lts.
[01:29] <smoser> oh, i see. you're thinking about api other than python.
[01:29] <smoser> :-(.
[01:39] <bdrung> smoser: in case we want to change the file format, the content 
of the dict could change. the question is: which attributes would we guarantee 
to be present?
[01:41] <smoser> which of the ones i have there would you imply would not be 
present?
[01:41] <smoser> i didn't expose anything not already exposed
[01:41] <smoser> other than more conveniently
[01:42] <bdrung> we export codename, fullname, and release
[01:43] <bdrung> and codename
[01:43] <bdrung> how about accepting "all" as result to return a dict with 
these values?
[01:44] <bdrung> smoser: and you probably want a function that can map a 
codename to this kind of dict
[01:44] <bdrung> i'll go to bed now. good night.


** Changed in: distro-info (Ubuntu)
       Status: New => Confirmed

** Changed in: distro-info (Ubuntu)
   Importance: Undecided => Medium

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

Title:
  python-distro-info hard to use for some cases

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

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to