irmen / Pyro5

Pyro 5 - Python remote objects
https://pyro5.readthedocs.io
MIT License
303 stars 36 forks source link

Pyro5-5.14 fails tests with pypy3-7.3.11 #78

Closed ceamac closed 1 year ago

ceamac commented 1 year ago
_________________________________________________________________________________________ TestServerOnce.testRegisterWeak _________________________________________________________________________________________

self = <test_server.TestServerOnce object at 0x0000555628165a98>

    def testRegisterWeak(self):
        obj=ServerTestObject()
        uri=self.daemon.register(obj,weak=True)
        with Pyro5.client.Proxy(uri) as p:
            result = p.getDict()
            assert isinstance(result, dict), "getDict() is proxied normally"
            del obj # weak registration should not prevent the obj from being garbage-collected
            with pytest.raises(Pyro5.errors.DaemonError):
>               result = p.getDict()
E               Failed: DID NOT RAISE <class 'Pyro5.errors.DaemonError'>

p          = <Pyro5.client.Proxy at 0x7fb059630fe0; not connected; for PYRO:obj_432c62e539724a21b64ea8836ddbc5e0@localhost:42569; owner <greenlet.greenlet object at 0x00007fb059e9ece0>>
result     = {'number': 42}
self       = <test_server.TestServerOnce object at 0x0000555628165a98>
uri        = <Pyro5.core.URI at 0x7fb0596310f8; PYRO:obj_432c62e539724a21b64ea8836ddbc5e0@localhost:42569>

tests/test_server.py:463: Failed
irmen commented 1 year ago

on first glance this seems like a difference in behavior within Pypy v.s. regular CPython, regarding weakrefs.

I think you can ignore this test failure because on all CPythons it runs fine

ceamac commented 1 year ago

Thanks.

irmen commented 1 year ago

in the past there have been a couple of other peculiarities in the unit tests that only failed on Pypy, unfortunately. In the end I decided to just remove pypy from the unit test matrix, it was too flimsy to try to work around the kinks.....