Closed rth closed 5 years ago
Hmm, no actually creating a PyList
from Vec<&str>
works but segfaults on Windows (probably due to the use of unsafe
in Pyo3) and the fact that lifetimes are not right. Revering the change to tokenizers, unfortunately, though it should be possible to optimize this further.
Edit: or rather it seems to be a regression in pyo3 as vectorization tests segfault.
Managed to reproduce the error on Windows. It's unrelated to tokenizers,
and only happens when building a wheel (as opposed to installing in developement mode).
Using the latest rust nightly (nightly-2019-02-28 was used before) appears to resolve the previous rust-numpy error. Merging.
This updates to the lastest PyO3, which allows using lifetimes in pymethods. As result tokenization in Python is a bit faster by avoiding string copies.
On master,
after this PR,