[PATCH] tests: fix builtin module test on pypy

timeless timeless at gmail.com
Wed Mar 30 17:01:10 EDT 2016

On Wed, Mar 30, 2016 at 3:34 PM, Pierre-Yves David
<pierre-yves.david at ens-lyon.org> wrote:
>> diff -r ff0d3b6b287f -r 6057e466307e contrib/import-checker.py
>> --- a/contrib/import-checker.py Tue Mar 29 12:29:00 2016 -0500
>> +++ b/contrib/import-checker.py Wed Mar 30 21:31:45 2016 +0200
>> @@ -182,6 +182,8 @@
>>       yield 'builtins' # python3 only
>>       for m in 'fcntl', 'grp', 'pwd', 'termios':  # Unix only
>>           yield m
>> +    for m in 'cPickle', 'datetime':
>> +        yield m

i have an alternative to this patch

> The for above have a small comment explaining why these value make sense,
> Can you add the same thing for the pypy on?

instead of searching the current python and trying to guess what's "standardlib"
i have hardcoded a list
but it makes the py3 stuff work much better
basically what we're doing is a heuristic, and it's really bad
it doesn't work well w/ virtualenv, and it doesn't work well w/ py3,
and it sounds like it doesn't work well w/ pypy :)


note that as is, it doesn't actually "fix" pypy, but once people are
comfortable with it, we could switch away from the heuristic we
currently have to just using the list there (currently for py3) for
all py flavors.

More information about the Mercurial-devel mailing list