Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests pass on pypy #427

Merged
merged 2 commits into from Aug 3, 2014
Merged

Tests pass on pypy #427

merged 2 commits into from Aug 3, 2014

Conversation

msabramo
Copy link
Contributor

This is #425 applied to master.

Make test_socket_manager tests pass on PyPy

by applying patch from @pjenvey on IRC:
http://paste.ofcode.org/a588X46F8gNdFDSHDtK5NP

Cc: @mcdonc, @gcarothers, @mnaberez , @pjenvey

@msabramo
Copy link
Contributor Author

Passing Travis CI build: https://travis-ci.org/Supervisor/supervisor/builds/23315595

Note that this passes on pypy now!. Thanks, @pjenvey!

It's an allowed failure on Python 3.4 because Travis CI doesn't support Python 3.4 yet. But when they add it (hopefully soon), we will see whether it works or not and then we can remove it from the list of allowed failures.

@mnaberez
Copy link
Member

Why does it call gc.collect three times in a row? Did it just start working when more calls were added or is there a rationale behind it? I don't see any reason not to merge this, but it would probably be a good idea to put a comment in there explaining it.

@msabramo
Copy link
Contributor Author

Hopefully @pjenvey can respond with the rationale on the 3x gc.collect. I more or less blindly applied his patch. 😄

@mcdonc mcdonc merged commit 5e58143 into Supervisor:master Aug 3, 2014
@mcdonc
Copy link
Member

mcdonc commented Aug 3, 2014

Thanks!

@pjenvey
Copy link

pjenvey commented Aug 4, 2014

The 3 collect's are along the lines of what the stdlib's test.support.gc_collect does, its docstring has a bit of an explanation:

https://bitbucket.org/mirror/cpython/src/c8ce5bca0fcda4307f7ac5d69103ce128a562705/Lib/test/support/__init__.py?at=default#cl-1359

Basically a 'full collection' with CPython's ref counting GC cleans up most objects immediately, whereas you don't get such a guarantee w/ a non ref counting GC. 3 calls pretty much does it for PyPy. The JVM's GC is even more fussy as you can see gc_collect makes an additional sleep on it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants