[Twisted-Python] Failure of twisted.test.test_plugin.DeveloperSetupTests.test_freshPyReplacesStalePyc under pypy2

Daniel Sutcliffe dansut at gmail.com
Fri Jul 14 09:47:22 MDT 2017


On Thu, Jul 13, 2017 at 4:22 PM, Daniel Sutcliffe <dansut at gmail.com> wrote:
>> - the FAIL goes away if the .py is not removed from the plugins dir
>> and it seems to me that the .py removal is not actually required to
>> strictly test what
>> twisted.test.test_plugin.DeveloperSetupTests.test_freshPyReplacesStalePyc
>> purports to be testing - so that could fix this test

On Thu, Jul 13, 2017 at 10:14 PM Glyph <glyph at twistedmatrix.com> wrote:
> It is totally fine to skip this test on PyPy.  It's testing the ability
> to interact with a particular feature of the CPython interpreter, which
> is intentionally absent on PyPy.  Ideally, the implementation would not
> enumerate that module on PyPy since it isn't going to be importable as a
> module.

On Fri, Jul 14, 2017 at 2:22 AM, Craig Rodrigues <rodrigc at crodrigues.org> wrote:
> OK.  Based on your analysis, and also Glyph's recommendation,
> I think it is OK for this test to skip if Pypy is used.
>
> Can you submit a patch for this test to skip on Pypy?
> I think you can get things rolling if you do something like:
>
> (1)  Learn the procedure to submit a patch by reading:
> https://twistedmatrix.com/trac/wiki/TwistedDevelopment#SubmittingaPatch .
>       There are a number of steps, but really it is not that bad.

Created a ticket to get this ball rolling:
https://twistedmatrix.com/trac/ticket/9219
This will be my second PR, but first for actual code, and have been
lurking for some while so already have some familiarity with the
process - let's see how badly I can screw it up though ;)

> (2)   Submit a patch that does the following:
>         - modify twisted/test/test_plugin.py so that you:
>         (a)  import _PYPY from twisted.python.compat
>         (b) and then do something like:
>
>          if _PYPY:
>              test_freshPyReplacesStalePyc.skip = "Does not work on PYPY"

I have an idea for a PR that goes a little bit further than this -
I'll submit to see if acceptable and if not I'll fall back to this
approach.

> I can help review the change to get it in.

Thanks Craig, appreciated.

Glyph wrote:
> In fact, many of the failing tests are for obscure corner cases which
> can and should be skipped so that we can declare PyPy a supported
> platform, then work on fixing them after the fact :-).

My intention is to look at each issue in turn if I can get this one
through - hoping to see PyPy declared as 'supported' sooner rather
than later :)

Cheers
/dan
-- 
Daniel Sutcliffe <dansut at gmail.com>




More information about the Twisted-Python mailing list