Hi,
I have (temporarily?) enabled posts by non-members to this list.
Below is a copy of the message that was dropped...
----- Forwarded message from psy...@li... -----
Date: Fri, 17 Jul 2009 08:27:45 +0200
From: Michael Brickenstein <bri...@mf...>
To: psy...@li...
Subject: Psyco compatibility
Hi!
First of all thank you for continuing the Psyco project and for your
engagement in PyPy.
Next, I would like to ask a stupid question regarding the
compatibility with peak.rules:
The web site of peak.rules clearly states, that psyco shouldn't be
used to optimize generic functions:
---
It generates custom bytecode for each generic function, to minimize
calling and interpreter overhead, and to potentially allow
compatibility with Psyco and PyPy in the future. (Currently, neither
Psyco nor PyPy support the "computed jump" trick used in the generated
code, so don't try to Psyco-optimize any generic functions yet - it'll
probably core dump!)
http://peak.telecommunity.com/DevCenter/RulesReadme
---
Okay, I still have many other functionality, which I would like to be
optimized, e.g. genshi, sqlalchemy:
So my plan was to bind these manually:
But it turned out, that it wasn't even possible to import psyco and
peak.rules at the same time:
python
Python 2.6 (r26:66714, Nov 30 2008, 13:50:14)
[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import psyco
>>> import peak.rules
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/michael/programming/owpdb4env/lib/python2.6/site-
packages/PEAK_Rules-0.5a1.dev_r2600-py2.6.egg/peak/rules/__init__.py",
line 3, in <module>
from peak.rules.core import *
File "/Users/michael/programming/owpdb4env/lib/python2.6/site-
packages/PEAK_Rules-0.5a1.dev_r2600-py2.6.egg/peak/rules/core.py",
line 207, in <module>
"when", "Extend a generic function with a new action"
TypeError: unbound method make_decorator() must be called with Method
instance as first argument (got str instance instead)
>>>
By the way, this does *not* occur, if I type the import commands in
ipython.
The used PEAK_RULES version is
PEAK_Rules-0.5a1.dev_r2600-py2.6.egg
freshly installed from PyPI.
Psyco 2.0 is affected as well as 1.6.
So, here is the actual question: Is there something special happening,
when importing psyco?
Michael
----- End forwarded message -----
|