[sqlalchemy] Potential issue with SQLAlchemy/cx_Oracle (under Python 3)

2013-02-08 Thread Thijs Engels
Hello, I am currently investigating whether all my current Python work/scripts will work with Python 3 (v3.3.0). And I am running into an issue which seems to be related to this. I have made an example (or actually took the one from the documentation) to illustrate the issue. Currently running

Re: [sqlalchemy] Potential issue with SQLAlchemy/cx_Oracle (under Python 3)

2013-02-08 Thread Thijs Engels
On Fri, Feb 8, 2013, at 11:47, Thijs Engels wrote: Is it correct to assume this would be related to SQLAlchemy? I forgot to mention that a raw insert using cx_Oracle directly is fine for both Python 2.7 and 3.3. - import cx_Oracle connection =

Re: [sqlalchemy] Potential issue with SQLAlchemy/cx_Oracle (under Python 3)

2013-02-08 Thread Michael Bayer
On Feb 8, 2013, at 5:47 AM, Thijs Engels wrote: Running this script on 3.3 results in this error message: sqlalchemy.exc.IntegrityError: (IntegrityError) ORA-01400: cannot insert NULL into (SCOTT.USERS.ID) 'INSERT INTO users (id, name, extra) VALUES (:id, :name, :extra)' {'extra': 2013,

Re: [sqlalchemy] Potential issue with SQLAlchemy/cx_Oracle (under Python 3)

2013-02-08 Thread Thijs Engels
On Fri, Feb 8, 2013, at 15:49, Michael Bayer wrote: On Feb 8, 2013, at 5:47 AM, Thijs Engels wrote: Running this script on 3.3 results in this error message: sqlalchemy.exc.IntegrityError: (IntegrityError) ORA-01400: cannot insert NULL into (SCOTT.USERS.ID) 'INSERT INTO users

[sqlalchemy] orm_exc.NoResultFound safe with autoflush?

2013-02-08 Thread Kent
We often use this pattern: try: session.query().one() except orm_exc.NoResultFound: gracefully deal with it If the query() execution causes an autoflush, I just want to make sure that an autoflush will never raise orm_exc.NoResultFound, or we could be catching the wrong error. Were that

Re: [sqlalchemy] Potential issue with SQLAlchemy/cx_Oracle (under Python 3)

2013-02-08 Thread Thijs Engels
On Fri, Feb 8, 2013, at 18:43, Michael Bayer wrote: On Feb 8, 2013, at 12:31 PM, Michael Bayer wrote: On Feb 8, 2013, at 10:29 AM, Thijs Engels wrote: Works fine with both Python 2.7 and 3.3. Running the (even more) direct statement as in your email end up with the same results.