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/ _________________________________________________
tests/module/ in <module>
    from snakeoil import containers
.tox/pypy3/site-packages/snakeoil/ in <module>
    class SetMixin(object):
.tox/pypy3/site-packages/snakeoil/ in SetMixin
.tox/pypy3/site-packages/snakeoil/ 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