=== sarnold_ is now known as sarnold [18:50] hi, I have a question about the API [18:50] I am looking to build an app that scans certain packages in the supported releases of Ubuntu for new versions and if so, then prints a message [18:51] is there a way in the API to see a package version? [18:52] I see the entry for Xenial, with it being the current release, but how about implementing Trusty, Vivid, and Wily? [18:52] if someone could get back to me soon, that would be great. THanks! [18:52] I would suggest using https://launchpad.net/+apidoc/devel.html#archive-getPublishedSources with order_by_date=True, and work backward until you hit stuff you've previously seen (being aware that you might see the same publication twice) [18:52] trusty, vivid, and wily are perfectly well implemented :) [18:53] cjwatson: all I see is current_version, what about calling it for those previous codenames? [18:53] current_version on what object, please? [18:54] there is no object with an attribute by that name on the API [18:54] do you mean current_series? [18:54] this is my current code: https://raw.githubusercontent.com/tsimonq2/lububot/master/test.py [18:54] I have to go now, I will be back in a couple of hours, please let me know [18:54] thank you [18:54] tsimonq2: use ubuntu.getSeries(name_or_version='wily') etc. [18:55] ok, thanks [18:55] tsimonq2: that code will be extremely very very very slow on lots of packages [18:55] hmm pok [18:55] I mean, if you're calling it on lots of packages [18:55] s/pok/ok/ [18:55] many many round trips [18:55] yep :) [18:55] if it's only a few, that's ok [18:55] I have a plan ;) [18:55] but if you're intending to check lots of packages, my recommendation above standas [18:56] *stands [18:56] archive.getPublishedSources(order_by_date=True, status="Published") and iterate [18:57] also, you should probably be using status="Published" in any case === alai888 is now known as alai [23:10] cjwatson: hmm, what if I wanted to do a lot of packages? [23:10] cjwatson: any faster alternative? [23:12] tsimonq2: so, for that you're going to need to explain a bit more about exactly what your app is going to do [23:14] cjwatson: I would like my app(Python) to idle and print the package name when there is an update to a large amount of packages [23:14] or to that package [23:14] so when a package gets an update, I want an output [23:15] similar to queuebot [23:16] isn't there a -changes mail list of some sort that publishes updates and new packages? [23:16] e.g. https://lists.ubuntu.com/mailman/listinfo/trusty-changes [23:16] tsimonq2: so, there aren't currently good solutions that don't involve polling, but if you're prepared to poll every n minutes or something, then I gave you the faster alternative above - archive.getPublishedSources(order_by_date=True) basically tells you about everything recent in the archive, a bit like a fairly stupid RSS feed, and you walk back through it until you reach the thing you last heard of or a date cut-off [23:17] (or, yes, if you're prepared to subscribe to a mailing list as part of this then you can do that, but that's cumbersome from an app [23:17] ) [23:17] cjwatson: but then how would I parse that for the packages that I want? [23:18] What do you mean? [23:18] tsimonq2: each entry in the collection is a source_package_publishing_history, so you look at the source_name attribute or whatever it's called [23:18] It returns a list of entries, and you'd check the package name in each. [23:18] you don't need to "parse" [23:18] oh [23:18] ok [23:19] now, if you're planning for this app to be installed on lots and lots of systems, er, please warn us [23:19] 'cos maybe we want something more scalable in that kind of case ... [23:19] cjwatson: no, actually I plan on this being an IRC bot [23:19] (and you want status="Published" on that too, so that you don't get entries for things that are superseded etc.) [23:20] right, this should be fine for an IRC bot. it's what the ddebs.ubuntu.com publishing backend uses to keep up with the archive [23:20] cjwatson: so I want it to be as frequent as possible updates for that [23:20] and indeed we designed it for that purpose [23:21] cjwatson: so as I am not that familiar with working with APIs, how would I carry out that task(in code terms)? [23:24] cjwatson: so maybe source_package_publishing_history.sourcename? [23:25] cjwatson: or what? [23:28] cjwatson: but more specifically, when using the docs, how do I use the URLs given? [23:30] cjwatson: I just lack this knowledge, so if you could point me in the right direction, that would be awesome [23:36] or anyone else [23:39] tsimonq2: https://help.launchpad.net/API/launchpadlib [23:47] wgrant: thank you [23:53] https://bugs.launchpad.net/aptdaemon/+bug/659438 got some spam and fairly impolite replies from users; can this bug be made silent in some fashion? perhaps https://launchpad.net/~tegosfentasio and https://launchpad.net/~jc4 and https://launchpad.net/~ishani-infoware don't need to participate in launchpad any more either (comments 170, 172, 174) [23:54] sarnold: Well that's pretty spectacular. [23:55] pleasant people all around, right? [23:55] sarnold: I've removed the comments, let me know if it continues. [23:55] Indeed. [23:55] wgrant: thanks! [23:55] And all from some innocuous spam. [23:56] no kidding; even without understanding ukranian it was obviously spam.. sigh.