py.test-3 test discovery hangs when importing ubuntutools.lp.lpapicache Launchpad object
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-ubuntu |
Fix Released
|
Low
|
Unassigned | ||
ubuntu-dev-tools (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
In an Artful container, I am unable to run tests with:
py.test-3 gitubuntu/*.py
This is against 0.6.2-30-gb1551b1.
Instead of a regular test run, the run hangs at test collection stage:
$ py.test-3 gitubuntu/*.py
=======
platform linux -- Python 3.6.3, pytest-3.1.3, py-1.4.34, pluggy-0.4.0
rootdir: /home/ubuntu/
collecting 35 items
Running with --fulltrace gets me the attached.
AFAICT, the problem is that "from ubuntutools.
The actual hang is at the end of the backtrace, in make_end_
This is an unexpected side effect. I do not expect that merely "from ubuntutools.
I'm not sure whether an assumption in py.test-3 is wrong, or if an assumption in ubuntutools.
Related branches
- Andreas Hasenack: Approve
- Server Team CI bot: Approve (continuous-integration)
- git-ubuntu developers: Pending requested
-
Diff: 24 lines (+5/-2)1 file modifiedgitubuntu/source_information.py (+5/-2)
Changed in usd-importer: | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in ubuntu-dev-tools (Ubuntu): | |
status: | Invalid → New |
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. lp.lpapicache Launchpad object" [Undecided,New] https:/ /launchpad. net/bugs/ 1733388 launchpad. Presumably caching on-getattr behaviour. But perhaps that's fundamental to the module.
17:57 <ubot5> bug 1733388 in usd-importer "py.test-3 test discovery hangs when importing ubuntutools.
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.
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-
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.