Comment 2 for bug 1733388

Revision history for this message
Robie Basak (racb) wrote :

17:56 <rbasak> cjwatson or wgrant: could I have your opinion on bug 1733388 please? I've identified what's going on, but am not sure which component is making the wrong assumption.
17:57 <ubot5> bug 1733388 in usd-importer "py.test-3 test discovery hangs when importing ubuntutools.lp.lpapicache Launchpad object" [Undecided,New] https://launchpad.net/bugs/1733388
17:57 * rbasak will be EOD in the next few minutes though, so no rush.
18:04 <cjwatson> rbasak: Well, um, I guess my opinion is that ubuntutools is distressingly and excessively magical. We don't maintain it though ...
18:05 <cjwatson> I mean pytest also contains a lot of magic. (I prefer less magical test runners.)
18:05 * rbasak isn't entirely sure what benefit use of this gives us over launchpadlib.launchpad. Presumably caching
18:06 <cjwatson> I guess it must be.
18:06 <cjwatson> I normally only use ubuntutools for its handy question-asking thing in my code.
18:08 <cjwatson> One perhaps reasonable fix would be to cause ubuntutools to not do the login thing for attributes that begin with '_'?
18:09 <rbasak> I suppose. I'm not very keen on this auto-login-on-getattr behaviour. But perhaps that's fundamental to the module.
18:10 <rbasak> OTOH it leads to side-effects such as UI prompts, so perhaps it's bad and it should be explicit.
18:10 <rbasak> It seems that I can work around it by not importing the Launchpad object into the module namespace.
18:11 <rbasak> So I could just leave the bug open against python3-ubuntutools for now I suppose.
18:13 * rbasak EODs
18:13 <cjwatson> Yeah, to me this sort of thing makes it not suitable for general-purpose use.