Matt?: #1274 and TravisCI

24 views
Skip to first unread message

Edward K. Ream

unread,
Aug 5, 2019, 11:02:59 AM8/5/19
to leo-editor
#1274 recommends that leoQt.py should return None for everything when in g.in_bridge is true.

That can easily be done by setting fail = g.in_bridge at the start of leoQt.py.  However, the code presently is:

fail = False
   
# New for TravisCI tests: allow imports from the Leo Bridge.

so I suspect the proposed change would cause TravisCI to barf.

Thinking out loud

So now we have a dilemma.  #1274 arises because it's actually not reasonable, in general, to attempt Qt imports from the bridge.  But it appears we must do so in order to support TravisCI.

Could we just ignore this issue and leave leoQt as it is?  I can only get the failure in the specific case of calling PyzoInterface.patch_pyzo from inside pyzo.start.

Summary

The hacks in the bridge branch make imports aware of g.in_bridge.  This is the worst kind of special case.

I would rather live with the present code than tolerate these hacks.

Any comments or suggestions?

Edward

Matt Wilkie

unread,
Aug 5, 2019, 11:55:12 AM8/5/19
to leo-editor

#1274 recommends that leoQt.py should return None for everything when in g.in_bridge is true.

That can easily be done by setting fail = g.in_bridge at the start of leoQt.py.  However, the code presently is:

fail = False
   
# New for TravisCI tests: allow imports from the Leo Bridge.

so I suspect the proposed change would cause TravisCI to barf.

Hmmm. Is that there because Travis would barf, or is it from a desire to have Travis run complete unit tests and report on them?

I think the only time travis failing is a real problem is when we want a release published.

-matt

Edward K. Ream

unread,
Aug 5, 2019, 1:45:08 PM8/5/19
to leo-editor
On Mon, Aug 5, 2019 at 10:55 AM Matt Wilkie <map...@gmail.com> wrote:

so I suspect the proposed change would cause TravisCI to barf.

Hmmm. Is that there because Travis would barf, or is it from a desire to have Travis run complete unit tests and report on them?

Sheesh. The penultimate commit to leoQt.py is rev 3a233a52: Edward K. Ream, 2018-10-09 10:34:04:

"...An important change to Leo's core: The leoQt module now *always* allows qt imports, even from the bridge..."

I don't have any memory of why this is important.  I'll revert to the previous way:

    fail = g.in_bridge

And we'll see what TravisCI says.

Edward

Edward K. Ream

unread,
Aug 5, 2019, 2:01:47 PM8/5/19
to leo-editor
On Monday, August 5, 2019 at 12:45:08 PM UTC-5, Edward K. Ream wrote:

I'll revert to the previous way:

    fail = g.in_bridge

And we'll see what TravisCI says.

TravisCI passes, and #1274 is closed.

Edward
Reply all
Reply to author
Forward
0 new messages