[pypy-issue] Issue #2907: iterator objects in PyPy3? (pypy/pypy)

Tom Booth issues-reply at bitbucket.org
Tue Oct 30 18:58:17 EDT 2018


New issue 2907: iterator objects in PyPy3?
https://bitbucket.org/pypy/pypy/issues/2907/iterator-objects-in-pypy3

Tom Booth:

I was evaluating mypy3 and found some issues with the bitarray project and mypy3. In particular, issues with iterator objects.

```
# example test:
    def test_decode_empty(self):
        d = {'a': bitarray('1')}
        a = bitarray()
        self.assertEqual(a.decode(d), [])
        self.assertEqual(d, {'a': bitarray('1')})
        # test decode iterator
        self.assertEqual(list(a.iterdecode(d)), [])
        self.assertEqual(d, {'a': bitarray('1')})
        self.assertEqual(len(a), 0)

RPython traceback:
  File "pypy_interpreter.c", line 39292, in BuiltinCodePassThroughArguments1_funcrun_obj
  File "pypy_module_cpyext_5.c", line 56874, in generic_cpy_call__StdObjSpaceConst_funcPtr_SomeI_6
  File "pypy_module_cpyext_1.c", line 35682, in from_ref
  File "pypy_module_cpyext_1.c", line 35661, in from_ref

Error
Traceback (most recent call last):
  File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/usr/local/Cellar/pypy3/6.0.0/libexec/lib-python/3/unittest/case.py", line 601, in run
    testMethod()
  File "/Users/tbooth/bitarray/test_bitarray.py", line 2019, in test_decode_empty
    self.assertEqual(list(a.iterdecode(d)), [])
  File "/Users/tbooth/bitarray/bitarray/__init__.py", line 110, in iterdecode
    return self._iterdecode(_mk_tree(codedict))
SystemError: unexpected internal exception (please report a bug): <InvalidPointerException object at 0x105eed3e0>; internal traceback was dumped to stderr
```

https://github.com/ilanschnell/bitarray

...otherwise works fine in CPython and PyPy2 6.0.0




More information about the pypy-issue mailing list