[Checkins] SVN: Missing/branches/chameleon_fix/ Added __class__ attr
Patrick Gerken
do3ccqrv at gmail.com
Fri Jun 4 10:53:40 EDT 2010
Log message for revision 113113:
Added __class__ attr
Else chameleon fails pretty hard.
Also renamed python interpreter in buildout,
else it won't work with buildouts in virtualenv
Changed:
U Missing/branches/chameleon_fix/buildout.cfg
U Missing/branches/chameleon_fix/src/Missing/_Missing.c
U Missing/branches/chameleon_fix/src/Missing/tests.py
-=-
Modified: Missing/branches/chameleon_fix/buildout.cfg
===================================================================
--- Missing/branches/chameleon_fix/buildout.cfg 2010-06-04 14:36:29 UTC (rev 113112)
+++ Missing/branches/chameleon_fix/buildout.cfg 2010-06-04 14:53:40 UTC (rev 113113)
@@ -4,7 +4,7 @@
[interpreter]
recipe = zc.recipe.egg
-interpreter = python
+interpreter = local_python
eggs = Missing
[test]
Modified: Missing/branches/chameleon_fix/src/Missing/_Missing.c
===================================================================
--- Missing/branches/chameleon_fix/src/Missing/_Missing.c 2010-06-04 14:36:29 UTC (rev 113112)
+++ Missing/branches/chameleon_fix/src/Missing/_Missing.c 2010-06-04 14:53:40 UTC (rev 113113)
@@ -187,6 +187,11 @@
}
else legal=NULL;
+ if (strcmp(c,"__class__")==0)
+ {
+ return Py_FindAttrString(self, c);
+ }
+
if(! legal)
{
if(strcmp(c,"__reduce__")==0)
Modified: Missing/branches/chameleon_fix/src/Missing/tests.py
===================================================================
--- Missing/branches/chameleon_fix/src/Missing/tests.py 2010-06-04 14:36:29 UTC (rev 113112)
+++ Missing/branches/chameleon_fix/src/Missing/tests.py 2010-06-04 14:53:40 UTC (rev 113113)
@@ -32,6 +32,8 @@
1
>>> Value == Value + 1
1
+>>> Value.__class__
+<type 'Missing'>
$Id$
"""
More information about the checkins
mailing list