[08:04] Morning! Another LP API question - I would like to easily get a count of overall people with main_archive upload rights, possibly counting core-devs, MOTUs and per-package uploaders [08:05] Wanted to use the main_archive.getAllPermissions() for that possibly, but even though I get a set of archive permissions (over 700) those are not accessible for me [08:05] I can't read their contents [08:05] What would be the best and easiest way to achieve that? [08:14] sil2100: What do you mean when you say they are inaccessible? [08:15] wgrant: strange thing, I get a collection, can check its length but if I try to access its individual archive_permission objects it says it's out of bounds, e.g. main_archive.getAllPermissions()[0] [08:15] sil2100: Ah, what if you log in? [08:16] wgrant: is this not available anonymously? Since that would be my requirement [08:16] sil2100: It's very easy to accidentally export something that's available to all authenticated users but not anonymous ones. [08:16] It's also easy to fix. [08:17] hm, since otherwise it'll be quite hard for me to get the number of all uploaders to Ubuntu, hmm [08:18] Sure [08:18] I'm just saying you should do that now to a) verify that it's the problem and b) have a workaround until we can fix it in LP. [08:21] wgrant: confirmed, when logged in it works [08:21] sil2100: Great. Can you file a bug? [08:21] Sure thing [08:26] https://bugs.launchpad.net/launchpadlib/+bug/1705996 [08:26] Bug #1705996: Unable to access archive_permission for archive when not logged in [08:26] Thanks! [08:32] wgrant: while thinking about it, can I actually get a real number of *actual* users that have upload rights to an archive? [08:34] sil2100: You'd need to expand all the team participants and exclude robots and such. [08:50] wgrant: thanks [08:51] wgrant: one (hopefully) last question: is there a way I could check a given user's team memberships? I don't see that straight away from the docs - I'd be mostly interested in the data of 'if this user part of canonical', since the ~canonical team seems to be private [08:51] And I can't access it when not logged in [08:55] sil2100: It's deliberately not possible to determine someone's Canonical employment status anonymously. [08:56] And membership in that team doesn't guarantee Canonical employment, either. [08:57] (Most of those are corner cases that usually aren't relevant, though.) [08:58] oh! [08:59] Indeed, I didn't know that when I'm not logged in I can't see my canonical membership [08:59] Ok, today is a day where things that seemed easy just get a bit more complicated ;) [09:03] I'll just have to do some fancy guess-work [14:41] hey, I was wondering what needs to happen for lp:948857. I don't know how to do that, so I made a junk repo to experiment on. https://code.launchpad.net/~codersquid/+junk/oops-datedir-no-pruning [14:46] I've not used zope.interface, but when working in Java I've used interfaces and dependency injection. so, I imagine it is a similar principle. I just haven't done it in python before [14:52] Well, I mean I guess an abstract interface is the ideally correct way to do it, but that code isn't using zope.interface (or indeed zope.component) more than trivially at the moment so it may not be worth it. Perhaps just try / except ImportError: instead? [14:53] We'd need to review in a bit more detail but your "hack" doesn't seem obviously wrong. [14:53] cjwatson: that is what I did in my junk branch. I made a wheel for my own use. [14:53] Don't use junk branches when a project already exists though, as they mean you won't be able to propose a merge ... [14:54] I wasn't sure I'd ever propose one since it is hacky [14:54] mine is hacky [14:54] if you want it, I'll make a real branch [14:54] Doesn't seem overly hacky :) [14:55] You probably want a bit more effort into telling the user they don't have the right stuff to use that feature. [14:58] would you want a separate branch for changing setup.py to use setuptools instead of distutils.core? that part is unrelated to making prune optional. [15:00] it was just for personal use. seems like I shouldn't mix things if someone's going to review [15:14] I don't really know this codebase particularly well, but on general principles I think that ought to be a separate branch [16:40] cjwatson and anyone, I made https://code.launchpad.net/~codersquid/python-oops-datedir-repo/optional-prune-dependencies/+merge/327978 for making prune optional, but this is not ready to land since I couldn't get tests to run [16:41] see my comment. I followed the README bit on development and I'm missing a step somewhere [16:41] I haven't used testr before, so perhaps I've missed something obvious