These are chat archives for dropbox/pyston

7th
Oct 2016
An Long
@aisk
Oct 07 2016 04:35
While apply cpython2.7.8's tokenizer.c's diff patch, make run_test_tokenize used 40+s in debug mode, so the unit test is breaked because of timeout .(cpython2.7.8 used 6s, pyston without this patch used 8s, same test code). I'm compiling the codes in release mode to see how long it takes, but still no idea what to do, should we add the time out limit in test code?
here is the diff
An Long
@aisk
Oct 07 2016 04:53
in release mode with the pacth applied, make run_release_test_tokenize used 8s like before, I think we can increase the unit test timeout because it dose not slow down the code in release?
An Long
@aisk
Oct 07 2016 05:16
sorry, got the actual problem.
Kevin Modzelewski
@kmod
Oct 07 2016 05:22
Sorry what do you mean? was there a different issue?
An Long
@aisk
Oct 07 2016 05:25
I'm working on update cpython codes to v2.7.8, and most work was done, but I can't pass the travis ci check, because test_tokenize is much slower than before, and it caused a timeout. I thought it was because the changes in tokenizer.c, but I saw the codes just before in test_tokenize.py:
    >>> if not test_support.is_resource_enabled("cpu"):
    ...     testfiles = random.sample(testfiles, 10)
    ...
and there was a change in test_support.py, now test_support.is_resource_enabled always returns True in current Pyston test environment, and before it always returns False.
Kevin Modzelewski
@kmod
Oct 07 2016 05:28
oh interesting
An Long
@aisk
Oct 07 2016 05:29
another place have same code like this, with param network, I just disabled it with hard code. But I think this is not a good choice ...
Kevin Modzelewski
@kmod
Oct 07 2016 05:29
that's certainly an interesting way for them to reduce the test runtime :)
An Long
@aisk
Oct 07 2016 05:32
Yes, I think we can pass some params to tester.py to let it enable this resources automatically.
Kevin Modzelewski
@kmod
Oct 07 2016 05:35
I think for now it's probably fine to just change test_support.py back to the old behavior
It's not a great solution, but it's not any worse than the current situation on master
An Long
@aisk
Oct 07 2016 05:41
Ok, I'll change it to return False on default.
Sun
@Daetalus
Oct 07 2016 10:04
Hi, why we need to avoid assign val to "None" attribute but except builtin_module? https://github.com/dropbox/pyston/blob/master/src/runtime/objmodel.cpp#L1488