set is missing __r*__ (rand, ror...) methods

Create issue
Issue #3161 resolved
Michał Górny created an issue

While attempting to import snakeoil with PyPy3, I’ve been getting errors such as the following:

________________________________________________ ERROR collecting tests/module/test_containers.py _________________________________________________
tests/module/test_containers.py:5: in <module>
    from snakeoil import containers
.tox/pypy3/site-packages/snakeoil/containers.py:41: in <module>
    class SetMixin(object):
.tox/pypy3/site-packages/snakeoil/containers.py:59: in SetMixin
    @steal_docs(set)
.tox/pypy3/site-packages/snakeoil/klass.py:598: in inner
    obj = getattr(target, target_name)
E   AttributeError: type object 'set' has no attribute '__rand__'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

FWICS, the missing methods for set objects include __rand__, __ror__, __rxor__, __rsub__.

Comments (4)

  1. Armin Rigo

    Sets don't have __radd__ in CPython 2.7 or 3.6, but I confirm that the other four methods are missing in PyPy2 and PyPy3.

  2. Log in to comment