On Sat, Aug 20, 2011 at 4:51 AM, Maciej Fijalkowski <[email protected]> wrote: > On Fri, Aug 19, 2011 at 10:07 PM, Serhat Sevki Dincer > <[email protected]> wrote: >> http://pypi.python.org/pypi/regex installs nicely on pypy-1.6 on my >> Ubuntu 11.04 i386 but >> >>>>>> from regex import sub >> Traceback (most recent call last): >> File "<console>", line 1, in <module> >> File "/var/Home/serhat/Program/pypy-1.6/site-packages/regex.py", >> line 343, in <module> >> from _regex_core import * >> File "/var/Home/serhat/Program/pypy-1.6/site-packages/_regex_core.py", >> line 21, in <module> >> import _regex >> ImportError: unable to load extension module >> '/var/Home/serhat/Program/pypy-1.6/site-packages/_regex.pypy-16.so': >> /var/Home/serhat/Program/pypy-1.6/site-packages/_regex.pypy-16.so: >> undefined symbol: Py_UNICODE_TOTITLE >> >> I dont see any (in)compatibility info on >> https://bitbucket.org/pypy/compatibility/wiki/regex. >> >> Also >> pypy-1.6$ grep -r 'Py_UNICODE_TO' include/ >> include/pypy_decl.h:PyAPI_FUNC(wchar_t) Py_UNICODE_TOLOWER(wchar_t arg0); >> include/pypy_decl.h:PyAPI_FUNC(wchar_t) Py_UNICODE_TOUPPER(wchar_t arg0); >> >> TOTITLE is missing? >> http://docs.python.org/release/2.7.2/library/stdtypes.html#str.title >> is working on (unicode) strings in pypy. I dont get it, what do u >> think is up? > > yes, TOTITLE is not implemented in cpyext, the cpython C compatibility > layer. Btw - what are you trying to achieve? If you want to compare > regex performance on pypy and cpython, it'll probably be much slower > on pypy. The C extensions layer is just a compatibility one (it's also > in beta).
This new regex module seems very interesting, seems a little to bloated and complex, but the one interesting feature is that it releases the gil. Does the one in pypy 1.6 does that? -- Leonardo Santagada _______________________________________________ pypy-dev mailing list [email protected] http://mail.python.org/mailman/listinfo/pypy-dev
