mfenniak/pyPdf — Issue #31: pypy compatibility
Author: paparazzo
Created: 2011-10-08 18:18:06+00:00
State: open

Hi,
Today I've installed pyPdf 1.13 for PyPy 1.6 using easy_install.
It doesn't work, but the bug fix is increadibly simple. Just change line 200 of pyPdf/generic.py.

original one:
int.__init__(value)

bug fix:
super(int, self).__init__(value)

Sorry for not directly contributing patch, but I'm new to github.

BTW, the error that I got was:

Traceback (most recent call last):
File "app_main.py", line 53, in run_toplevel
File "crack_passwd.py", line 11, in
reader = PdfFileReader(file('ZAJECIA5-PRZYROWNANIE_SEKWENCJI.pdf', 'rb'))
File "/Users/tomek/pypy-1.6/site-packages/pyPdf/pdf.py", line 374, in __init__
self.read(stream)
File "/Users/tomek/pypy-1.6/site-packages/pyPdf/pdf.py", line 732, in read
num = readObject(stream, self)
File "/Users/tomek/pypy-1.6/site-packages/pyPdf/generic.py", line 87, in readObject
return NumberObject.readFromStream(stream)
File "/Users/tomek/pypy-1.6/site-packages/pyPdf/generic.py", line 236, in readFromStream
return NumberObject(name)
File "/Users/tomek/pypy-1.6/site-packages/pyPdf/generic.py", line 220, in __init__
int.__init__(value)

Now it's fixed!!!

Cheers,
paparazzo