fwiw, i get the same error, and i've "easy_install"ed both SQLalchemy
and Elixir (on CentOS/RHEL5.1-2.6.18-53), and it does give me both
E052 and SA05b2 which are incompatible with each other due to this
failed import. reverting back to SA046 makes it work because that
variable exists there.

this incompatibility was due to this change:
http://www.sqlalchemy.org/trac/changeset/4632

as you can see from that patch, EXT_CONTINUE is the new name and
EXT_PASS was only kept around for backwards-compat (apparently until
0.5). for Elixir, someone should file a ticket to rev Elixir to be
SA050-compatible (i don't have access).

part 1 of the migration fixes would include simple search-n-replace
patch(es):

$ diff -ru elixir elixir-patch
Only in elixir-patch: elixir
diff -ru elixir/entity.py elixir-patch/entity.py
--- elixir/entity.py    2008-03-05 10:56:52.000000000 -0800
+++ elixir-patch/entity.py      2008-07-18 15:10:07.000000000 -0700
@@ -12,7 +12,7 @@
 from sqlalchemy                    import Table, Column, Integer, \
                                           desc, ForeignKey, and_
 from sqlalchemy.orm                import Query, MapperExtension,\
-                                          mapper, object_session,
EXT_PASS
+                                          mapper, object_session,
EXT_CONTINUE
 from sqlalchemy.ext.sessioncontext import SessionContext

 import elixir
@@ -301,14 +301,14 @@
                 for func in methods:
                     ret = func(instance)
                     # I couldn't commit myself to force people to
-                    # systematicaly return EXT_PASS in all their
event methods.
+                    # systematicaly return EXT_CONTINUE in all their
event methods.
                     # But not doing that diverge to how SQLAlchemy
works.
-                    # I should try to convince Mike to do EXT_PASS by
default,
+                    # I should try to convince Mike to do
EXT_CONTINUE by default,
                     # and stop processing as the special case.
-#                    if ret != EXT_PASS:
-                    if ret is not None and ret != EXT_PASS:
+#                    if ret != EXT_CONTINUE:
+                    if ret is not None and ret != EXT_CONTINUE:
                         return ret
-                return EXT_PASS
+                return EXT_CONTINUE
             return proxy_method

         # create a list of callbacks for each event
diff -ru elixir/ext/encrypted.py elixir-patch/ext/encrypted.py
--- elixir/ext/encrypted.py     2008-03-05 10:56:52.000000000 -0800
+++ elixir-patch/ext/encrypted.py       2008-07-18 15:11:58.000000000
-0700
@@ -28,7 +28,7 @@

 from Crypto.Cipher          import Blowfish
 from elixir.statements      import Statement
-from sqlalchemy.orm         import MapperExtension, EXT_PASS
+from sqlalchemy.orm         import MapperExtension, EXT_CONTINUE

 __all__ = ['acts_as_encrypted']
 __doc_all__ = []
@@ -72,11 +72,11 @@

             def before_insert(self, mapper, connection, instance):
                 perform_encryption(instance)
-                return EXT_PASS
+                return EXT_CONTINUE

             def before_update(self, mapper, connection, instance):
                 perform_encryption(instance)
-                return EXT_PASS
+                return EXT_CONTINUE

             def populate_instance(self, mapper, selectcontext, row,
instance,
                                   *args, **kwargs):
diff -ru elixir/ext/versioned.py elixir-patch/ext/versioned.py
--- elixir/ext/versioned.py     2008-03-25 09:36:36.000000000 -0800
+++ elixir-patch/ext/versioned.py       2008-07-18 15:10:32.000000000
-0700
@@ -49,7 +49,7 @@
 import inspect

 from sqlalchemy            import Table, Column, and_, desc
-from sqlalchemy.orm        import mapper, MapperExtension, EXT_PASS,
\
+from sqlalchemy.orm        import mapper, MapperExtension,
EXT_CONTINUE, \
                                   object_session

 from elixir                import Integer, DateTime
@@ -88,7 +88,7 @@
     def before_insert(self, mapper, connection, instance):
         instance.version = 1
         instance.timestamp = datetime.now()
-        return EXT_PASS
+        return EXT_CONTINUE

     def before_update(self, mapper, connection, instance):
         values =
instance.table.select(get_entity_where(instance)).execute().fetchone()
@@ -110,13 +110,13 @@
                 instance.timestamp = datetime.now()
                 break

-        return EXT_PASS
+        return EXT_CONTINUE

     def before_delete(self, mapper, connection, instance):
         connection.execute(instance.__history_table__.delete(
             get_history_where(instance)
         ))
-        return EXT_PASS
+        return EXT_CONTINUE

 versioned_mapper_extension = VersionedMapperExtension()

once this is done, the next thing would be to replace
sqlalchemy.ext.sessioncontext.SessionContext with sqlclchemy.orm.
{scoped_session, sessionmaker}. but one step at a time.  for everyone
else, including myself, just switch back to SA046 for now.

to see what else will break, check out 
http://www.sqlalchemy.org/trac/wiki/05Migration

hope this helps!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
 http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SQLElixir" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlelixir?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to