axiak / pyre2

Python wrapper for RE2
BSD 3-Clause "New" or "Revised" License
295 stars 39 forks source link

only init basestring in python2 #49

Open commutecat opened 7 years ago

commutecat commented 7 years ago

python3 will load this module first and throw exception on basestring before loading re2.pyx

rmax commented 7 years ago

The re2.cpp file is generated via cython from the re2.pyx file. Check if regenerating the file with cython fixes your issue by running make.

zedeus commented 7 years ago

I encountered this issue as well. This pull request fixes it.

leewz commented 6 years ago

The real problem is that src/re2.pyx was updated to support Python 3 (updated 2015 June), but src/re2.cpp wasn't regenerated (updated 2015 May). #49 modifies an outdated auto-generated file.