New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pypy: type object 'c_char' has no attribute 'from_buffer' #16
Comments
http://pythonhosted.org/cairocffi/api.html#cairocffi.ImageSurface
|
(I know "it’s documented" is not an excuse, I wrote both of these pieces of code :)) |
No excuse but good explanation :) |
The actual explanation is that PyPy has no "buffer API" like CPython’s. The GC reserves the right to move objects around in memory, and thus you can’t have a stable pointer to inside an object. |
@liZe , do you think the docs should be expanded on this? |
I've fixed the test in WeasyPrint (and you don't want to look at this commit) (no, really, you don't) (OK, this one). Adding an explicit message for this exception may be even better: if it looks like an expected behaviour, users will probably read the doc or look for an open feature request, and find the line of documentation. What about opening an issue? Someone may be interested in fixing it! (Just joking, at least for the second part.) |
Ok, leaving this open for now. Patches welcome ;) |
Launching WeasyPrint tests with pypy 2.0.2 gives this error:
The text was updated successfully, but these errors were encountered: