[Twisted-Python] "twistd" in Twisted 16.4.0 can't import modules/packages from current working directory

Craig Rodrigues rodrigc at crodrigues.org
Sun Feb 12 12:08:37 MST 2017


On Tue, Feb 7, 2017 at 11:29 AM, Glyph Lefkowitz <glyph at twistedmatrix.com>
wrote:

>
> On Feb 7, 2017, at 6:59 AM, Jean-Paul Calderone <exarkun at twistedmatrix.com>
> wrote:
>
> On Fri, Jan 13, 2017 at 1:13 AM, Glyph Lefkowitz <glyph at twistedmatrix.com>
> wrote:
>
>> Thanks for highlighting those.  I've put the link in the other direction
>> as well.
>>
>>
> Craig seems eager to go ahead with reverting this change in behavior.
>
> https://github.com/twisted/twisted/pull/672#issuecomment-275956265
>
> As far as I can tell, no one has weighed in on the other side.  So I'm
> inclined to go along with the reversion.
>
>
> My 2ยข for the other side is: if trial does this, but twist and twistd
> don't, then it will be possible to get a passing test run for a plugin that
> doesn't get loaded.  I think it would be simpler and easier to debug to
> leave these consistent.
>
>

This is an interesting corner case, but I think the twistd and twist issues
should be pursued in
separate discussions and tickets.

For trial, I would like to proceed with
https://github.com/twisted/twisted/pull/672/ .  With my conversion
of trial to a console script, the new behavior was unintentional on my
part.  Since all the unit tests
passed, I did not notice.  In this ticket:
https://twistedmatrix.com/trac/ticket/8978
Job-Evers-Meltzer provided a use-case where the new behavior of trial
broke existing usage.

trial can be used as a general-purpose tool for running unittest-style
tests,
much like pytest or nose.  The new behavior is disruptive, for minimal
benefit,
so I would like to restore the old behavior.

I added a unit test for this, so in future, if this breaks again, we will
catch it.

--
Craig
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20170212/57c610be/attachment-0002.html>


More information about the Twisted-Python mailing list