[pypy-issue] Issue #2313: Weird AssertionError with lxml and time modules (pypy/pypy)

Andrey Kashlak issues-reply at bitbucket.org
Sun May 29 09:59:32 EDT 2016


New issue 2313: Weird AssertionError with lxml and time modules
https://bitbucket.org/pypy/pypy/issues/2313/weird-assertionerror-with-lxml-and-time

Andrey Kashlak:


```
#!python

import time

import lxml.html


def main():
    info = lxml.html.fragments_fromstring('<ul><li><a></a></li><li></li></ul>')[0]

    # Comment one of these lines — segfault will disappear
    info.findall("li")
    time.strptime('1970-01-01T03:00:00', "%Y-%m-%dT%H:%M:%S")

    print('before segfault')
    info.findall('li')  # <-- SEGFAULT HERE
    print('after segfault')


if __name__ == '__main__':
    main()

```


```
$ pypy pypytest.py 
before segfault
RPython traceback:
  File "pypy_interpreter.c", line 39039, in BuiltinCodePassThroughArguments1_funcrun_obj
  File "pypy_module_cpyext_5.c", line 12787, in wrap_next
  File "pypy_module_cpyext_5.c", line 28060, in generic_cpy_call__StdObjSpaceConst_funcPtr_SomeI_13
Fatal RPython error: AssertionError
Aborted (core dumped)
```

I don't know is it pypy or lxml problem, please redirect me if needed :)

Arch Linux x86_64, pypy installed from repo

Python 2.7.10 (b0a649e90b66, May 15 2016, 19:57:00)

[PyPy 5.1.1 with GCC 6.1.1 20160501] on linux2

-----

P.S. pypy3 segfaults on "import lxml.html", but i think it is lxml bug

P.P.S. Is there an instruction how to run the nightly build?




More information about the pypy-issue mailing list