We are attempting to move to CPython from PyPy (both version 2.7), but I'm 
seeing some baffling errors in the process. 
 
We are using SQLAlchemy 1.3.11, Flask-SqlAlchemy 2.4.11, psyocpg2cffi, 
postgres in our application. 


There is an "A" model with a post create hook like:

event.listen(A.__table__, "after_create", create_default_A)

def create_default_A():
  a = A(....)
  db.session.add(a)
  db.session.flush()
  b = B(...., a_id = a.id)
  db.session.add(b)
  db.session.commit()

This works fine with PyPy, however, with CPython, the commit fails with an 
error from postgres saying the "B" table does not exist.

As far as I understand there should be no difference. What is going wrong 
here?
 

-- 
SQLAlchemy - 
The Python SQL Toolkit and Object Relational Mapper

http://www.sqlalchemy.org/

To post example code, please provide an MCVE: Minimal, Complete, and Verifiable 
Example.  See  http://stackoverflow.com/help/mcve for a full description.
--- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sqlalchemy/8a0a9158-7b4f-44f5-9aec-0247b03c50edn%40googlegroups.com.

Reply via email to