{"action":"created","issue":{"url":"https://api.github.com/repos/ethereum/pydevp2p/issues/37","repository_url":"https://api.github.com/repos/ethereum/pydevp2p","labels_url":"https://api.github.com/repos/ethereum/pydevp2p/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/ethereum/pydevp2p/issues/37/comments","events_url":"https://api.github.com/repos/ethereum/pydevp2p/issues/37/events","html_url":"https://github.com/ethereum/pydevp2p/issues/37","id":133240495,"number":37,"title":"Test failures on PyPy","user":{"login":"ulope","id":55078,"avatar_url":"https://avatars.githubusercontent.com/u/55078?v=3","gravatar_id":"","url":"https://api.github.com/users/ulope","html_url":"https://github.com/ulope","followers_url":"https://api.github.com/users/ulope/followers","following_url":"https://api.github.com/users/ulope/following{/other_user}","gists_url":"https://api.github.com/users/ulope/gists{/gist_id}","starred_url":"https://api.github.com/users/ulope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ulope/subscriptions","organizations_url":"https://api.github.com/users/ulope/orgs","repos_url":"https://api.github.com/users/ulope/repos","events_url":"https://api.github.com/users/ulope/events{/privacy}","received_events_url":"https://api.github.com/users/ulope/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-02-12T13:21:53Z","updated_at":"2016-07-12T14:55:08Z","closed_at":null,"body":"Currently some tests fail on PyPy with a rather confusing error message and traceback.\r\n\r\nExample:\r\n\r\n```\r\n____________________________________________________ TestFullApp.test_inc_counter_app[6] _____________________________________________________\r\n\r\nself = <devp2p.tests.test_full_app.TestFullApp instance at 0x000000010bc9ae40>, num_nodes = 6\r\n\r\n    @pytest.mark.timeout(60)\r\n    def test_inc_counter_app(self, num_nodes):\r\n        class TestDriver(object):\r\n            NUM_NODES = num_nodes\r\n            COUNTER_LIMIT = 1024\r\n            NODES_PASSED_SETUP = set()\r\n            NODES_PASSED_INC_COUNTER = set()\r\n\r\n        ExampleServiceIncCounter.testdriver = TestDriver()\r\n\r\n        app_helper.run(\r\n            ExampleApp,\r\n            ExampleServiceIncCounter,\r\n            num_nodes=num_nodes,\r\n            min_peers=num_nodes-1,\r\n            max_peers=num_nodes-1,\r\n>           random_port=True  # Use a random port to avoid 'Address already in use' errors\r\n        )\r\n\r\ndevp2p/tests/test_full_app.py:175:\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\ndevp2p/app_helper.py:105: in run\r\n    serve_until_stopped(apps)\r\ndevp2p/app_helper.py:65: in serve_until_stopped\r\n    app.join()\r\ndevp2p/app.py:45: in join\r\n    service.join()\r\n/Users/ulo/.cache/tox/pydevp2p/pypy/site-packages/gevent/greenlet.py:482: in join\r\n    result = self.parent.switch()\r\n/Users/ulo/.cache/tox/pydevp2p/pypy/site-packages/gevent/hub.py:585: in switch\r\n    return greenlet.switch(self)\r\n/Users/ulo/.pythonz/pythons/PyPy-2.6.1/lib_pypy/greenlet.py:53: in switch\r\n    return self.__switch('switch', (args, kwds))\r\n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\r\n\r\ntarget = <Hub at 0x10a47a560 select default pending=0 ref=80 resolver=<gevent.resolver_...readPool at 0x10ad18758 0/2/10>> threadpool=<ThreadPool at 0x10ad18758 0/2/10>>\r\nmethodname = 'switch', baseargs = (((), {}),), current = <greenlet.greenlet object at 0x000000010a47ac80>\r\n\r\n    def __switch(target, methodname, *baseargs):\r\n        current = getcurrent()\r\n        #\r\n        while not (target.__main or _continulet.is_pending(target)):\r\n            # inlined __nonzero__ ^^^ in case it's overridden\r\n            if not target.__started:\r\n                if methodname == 'switch':\r\n                    greenlet_func = _greenlet_start\r\n                else:\r\n                    greenlet_func = _greenlet_throw\r\n                _continulet.__init__(target, greenlet_func, *baseargs)\r\n                methodname = 'switch'\r\n                baseargs = ()\r\n                target.__started = True\r\n                break\r\n            # already done, go to the parent instead\r\n            # (NB. infinite loop possible, but unlikely, unless you mess\r\n            # up the 'parent' explicitly.  Good enough, because a Ctrl-C\r\n            # will show that the program is caught in this loop here.)\r\n            target = target.parent\r\n            # convert a \"raise GreenletExit\" into \"return GreenletExit\"\r\n            if methodname == 'throw':\r\n                try:\r\n                    raise baseargs[0], baseargs[1]\r\n                except GreenletExit, e:\r\n                    methodname = 'switch'\r\n                    baseargs = (((e,), {}),)\r\n                except:\r\n                    baseargs = sys.exc_info()[:2] + baseargs[2:]\r\n        #\r\n        try:\r\n            unbound_method = getattr(_continulet, methodname)\r\n>           args, kwds = unbound_method(current, *baseargs, to=target)\r\nE           assert isinstance(256L, int)\r\n\r\n/Users/ulo/.pythonz/pythons/PyPy-2.6.1/lib_pypy/greenlet.py:91: AssertionError\r\n```"},"comment":{"url":"https://api.github.com/repos/ethereum/pydevp2p/issues/comments/232073439","html_url":"https://github.com/ethereum/pydevp2p/issues/37#issuecomment-232073439","issue_url":"https://api.github.com/repos/ethereum/pydevp2p/issues/37","id":232073439,"user":{"login":"utzig","id":107070,"avatar_url":"https://avatars.githubusercontent.com/u/107070?v=3","gravatar_id":"","url":"https://api.github.com/users/utzig","html_url":"https://github.com/utzig","followers_url":"https://api.github.com/users/utzig/followers","following_url":"https://api.github.com/users/utzig/following{/other_user}","gists_url":"https://api.github.com/users/utzig/gists{/gist_id}","starred_url":"https://api.github.com/users/utzig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utzig/subscriptions","organizations_url":"https://api.github.com/users/utzig/orgs","repos_url":"https://api.github.com/users/utzig/repos","events_url":"https://api.github.com/users/utzig/events{/privacy}","received_events_url":"https://api.github.com/users/utzig/received_events","type":"User","site_admin":false},"created_at":"2016-07-12T14:55:08Z","updated_at":"2016-07-12T14:55:08Z","body":"I removed the xfails from `test_peer` because they only seem to fail when `test_full_app` is run, so I temporarily changed `xfail` to `skipif` on the full app tests."}}
{"actor":{"display_login":"utzig"}}