Hi, I tried the pypy 1.2 linux binary with our latest sympy git and this is what I got: $/tmp/pypy-1.2/bin/pypy -c "import sympy" 'import site' failed Traceback (most recent call last): File "?", line 33, in run_toplevel File "?", line 369, in run_it File "<string>", line 1, in <module> File "/home/ondrej/repos/sympy/sympy/__init__.py", line 43, in <module> from interactive import init_session, init_printing File "/home/ondrej/repos/sympy/sympy/interactive/__init__.py", line 5, in <module> f, g, h = map(Function, 'fgh') File "/home/ondrej/repos/sympy/sympy/core/multidimensional.py", line 122, in wrapper args[n] = structure_copy(entry) File "/home/ondrej/repos/sympy/sympy/core/multidimensional.py", line 54, in structure_copy return iter_copy(structure) File "/home/ondrej/repos/sympy/sympy/core/multidimensional.py", line 43, in iter_copy l.append(iter_copy(i)) File "/home/ondrej/repos/sympy/sympy/core/multidimensional.py", line 43, in iter_copy l.append(iter_copy(i)) [...] File "/home/ondrej/repos/sympy/sympy/core/multidimensional.py", line 43, in iter_copy l.append(iter_copy(i)) File "/home/ondrej/repos/sympy/sympy/core/multidimensional.py", line 42, in iter_copy if hasattr(i, "__iter__"): RuntimeError: internal error: <RuntimeError object at 0x868c778> It seems like some infinite recursion causes by some incompatibilities between python and pypy. (sympy is tested on all python 2.4, 2.5 and 2.6 and it works). Ondrej
On Sat, Apr 10, 2010 at 11:57 AM, Benjamin Peterson <benjamin@python.org> wrote:
2010/4/10 Ondrej Certik <ondrej@certik.cz>:
Hi, Hi
if hasattr(i, "__iter__"): RuntimeError: internal error: <RuntimeError object at 0x868c778>
Your code is probably assuming that strings don't have __iter__. They do in PyPy.
That could be it. I'll investigate it and report later. Thanks for the tip. Ondrej
On Sat, Apr 10, 2010 at 1:25 PM, Ondrej Certik <ondrej@certik.cz> wrote:
On Sat, Apr 10, 2010 at 11:57 AM, Benjamin Peterson <benjamin@python.org> wrote:
2010/4/10 Ondrej Certik <ondrej@certik.cz>:
Hi, Hi
if hasattr(i, "__iter__"): RuntimeError: internal error: <RuntimeError object at 0x868c778>
Your code is probably assuming that strings don't have __iter__. They do in PyPy.
That could be it. I'll investigate it and report later.
Thanks for the tip.
Ondrej _______________________________________________
Didn't we remove __iter__ after the release from strings?
On Sun, Apr 11, 2010 at 11:20 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Sat, Apr 10, 2010 at 1:25 PM, Ondrej Certik <ondrej@certik.cz> wrote:
On Sat, Apr 10, 2010 at 11:57 AM, Benjamin Peterson <benjamin@python.org> wrote:
2010/4/10 Ondrej Certik <ondrej@certik.cz>:
Hi, Hi
if hasattr(i, "__iter__"): RuntimeError: internal error: <RuntimeError object at 0x868c778>
Your code is probably assuming that strings don't have __iter__. They do in PyPy.
That could be it. I'll investigate it and report later.
Thanks for the tip.
Ondrej _______________________________________________
Didn't we remove __iter__ after the release from strings?
Yop we did. Ondrej: you can build new pypy and it should work (we also should do 1.2.1 release some time soon I believe). Also, I don't think it's wise to use hasattr(x, '__iter__') to decide whether stuff is string or not. Cheers, fijal
On Mon, Apr 12, 2010 at 6:22 AM, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Sun, Apr 11, 2010 at 11:20 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Sat, Apr 10, 2010 at 1:25 PM, Ondrej Certik <ondrej@certik.cz> wrote:
On Sat, Apr 10, 2010 at 11:57 AM, Benjamin Peterson <benjamin@python.org> wrote:
2010/4/10 Ondrej Certik <ondrej@certik.cz>:
Hi, Hi
if hasattr(i, "__iter__"): RuntimeError: internal error: <RuntimeError object at 0x868c778>
Your code is probably assuming that strings don't have __iter__. They do in PyPy.
That could be it. I'll investigate it and report later.
Thanks for the tip.
Ondrej _______________________________________________
Didn't we remove __iter__ after the release from strings?
Yop we did.
Ondrej: you can build new pypy and it should work (we also should do 1.2.1 release some time soon I believe).
Does anyone have a recent git repository of pypy that I could pull from? If not, I'll just use the svn.
Also, I don't think it's wise to use hasattr(x, '__iter__') to decide whether stuff is string or not.
I think it's not wise at all, I agree. We should fix it. Ondrej
On Sun, Apr 11, 2010 at 11:33 PM, Ondrej Certik <ondrej@certik.cz> wrote:
On Mon, Apr 12, 2010 at 6:22 AM, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Sun, Apr 11, 2010 at 11:20 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Sat, Apr 10, 2010 at 1:25 PM, Ondrej Certik <ondrej@certik.cz> wrote:
On Sat, Apr 10, 2010 at 11:57 AM, Benjamin Peterson <benjamin@python.org> wrote:
2010/4/10 Ondrej Certik <ondrej@certik.cz>:
Hi, Hi
if hasattr(i, "__iter__"): RuntimeError: internal error: <RuntimeError object at 0x868c778>
Your code is probably assuming that strings don't have __iter__. They do in PyPy.
That could be it. I'll investigate it and report later.
Thanks for the tip.
Ondrej _______________________________________________
Didn't we remove __iter__ after the release from strings?
Yop we did.
Ondrej: you can build new pypy and it should work (we also should do 1.2.1 release some time soon I believe).
Does anyone have a recent git repository of pypy that I could pull from? If not, I'll just use the svn.
svn sounds safer (I know problems with git mirrors)
Also, I don't think it's wise to use hasattr(x, '__iter__') to decide whether stuff is string or not.
I think it's not wise at all, I agree. We should fix it.
Ondrej
On Sun, Apr 11, 2010 at 11:44 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Sun, Apr 11, 2010 at 11:33 PM, Ondrej Certik <ondrej@certik.cz> wrote:
On Mon, Apr 12, 2010 at 6:22 AM, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Sun, Apr 11, 2010 at 11:20 PM, Maciej Fijalkowski <fijall@gmail.com> wrote:
On Sat, Apr 10, 2010 at 1:25 PM, Ondrej Certik <ondrej@certik.cz> wrote:
On Sat, Apr 10, 2010 at 11:57 AM, Benjamin Peterson <benjamin@python.org> wrote:
2010/4/10 Ondrej Certik <ondrej@certik.cz>: > Hi, Hi
> if hasattr(i, "__iter__"): > RuntimeError: internal error: <RuntimeError object at 0x868c778>
Your code is probably assuming that strings don't have __iter__. They do in PyPy.
That could be it. I'll investigate it and report later.
Thanks for the tip.
Ondrej _______________________________________________
Didn't we remove __iter__ after the release from strings?
Yop we did.
Ondrej: you can build new pypy and it should work (we also should do 1.2.1 release some time soon I believe).
Does anyone have a recent git repository of pypy that I could pull from? If not, I'll just use the svn.
svn sounds safer (I know problems with git mirrors)
Also, I don't think it's wise to use hasattr(x, '__iter__') to decide whether stuff is string or not.
I think it's not wise at all, I agree. We should fix it.
Ondrej
Oh, and btw, there are nightly builds here: http://buildbot.pypy.org/nightly/ you have to download it into a checkout somewhere below root of checkout.
participants (3)
-
Benjamin Peterson
-
Maciej Fijalkowski
-
Ondrej Certik