Re: [sqlalchemy] strange UnicodeEncodeError with MySQL + Google App Engine (0.9.1)

2015-01-02 Thread Staszek
On 2015-01-02 12:55, Staszek wrote: On 2014-12-04 18:04, Michael Bayer wrote: On Dec 4, 2014, at 3:46 AM, Staszek stf.list.ot...@eisenbits.com wrote: On 2014-12-04 08:23, Staszek wrote: On 2014-11-29 16:19, Michael Bayer wrote: SQLAlchemy shouldn’t be attempting to run this decode operation

Re: [sqlalchemy] strange UnicodeEncodeError with MySQL + Google App Engine (0.9.1)

2015-01-02 Thread Staszek
On 2014-12-04 18:04, Michael Bayer wrote: On Dec 4, 2014, at 3:46 AM, Staszek stf.list.ot...@eisenbits.com wrote: On 2014-12-04 08:23, Staszek wrote: On 2014-11-29 16:19, Michael Bayer wrote: SQLAlchemy shouldn’t be attempting to run this decode operation unless the MySQL driver used here

Re: [sqlalchemy] strange UnicodeEncodeError with MySQL + Google App Engine (0.9.1)

2014-12-04 Thread Staszek
On 2014-12-04 08:23, Staszek wrote: On 2014-11-29 16:19, Michael Bayer wrote: SQLAlchemy shouldn’t be attempting to run this decode operation unless the MySQL driver used here is acting in a flaky way, that is, SQLAlchemy did a test on first connect to see if a Unicode() type comes back as u

Re: [sqlalchemy] strange UnicodeEncodeError with MySQL + Google App Engine (0.9.1)

2014-11-29 Thread Staszek
On 2014-11-29 16:19, Michael Bayer wrote: opList = dbSession.query(PendingOperation).filter_by(opcode=opcode).all() looks easy enough to reproduce: import codecs x = u'\u0142' codecs.utf_8_decode(x) that is, in Py2K when you call decode() on a unicode object already,

Re: [sqlalchemy] StaleDataError/ObjectDeletedError

2014-07-12 Thread Staszek
On 2014-07-11 23:18, Mike Bayer wrote: On 7/11/14, 5:07 PM, Staszek wrote: On 2014-02-01 00:09, Michael Bayer wrote: On Jan 31, 2014, at 5:24 PM, lars van gemerden l...@rational-it.com mailto:l...@rational-it.com wrote: Hi, all I am running into these 2 errors and have run out of ideas

Re: [sqlalchemy] StaleDataError/ObjectDeletedError

2014-07-11 Thread Staszek
On 2014-02-01 00:09, Michael Bayer wrote: On Jan 31, 2014, at 5:24 PM, lars van gemerden l...@rational-it.com mailto:l...@rational-it.com wrote: Hi, all I am running into these 2 errors and have run out of ideas what to do about it (also because i don't what they mean); They seem to

[sqlalchemy] [missing feature] joined relationship + order by: table alias problem

2014-03-26 Thread Staszek
Hi I have a problem with joined relationships, which I will try to describe using an example: class User(Base): __tablename__ = 'users' __table_args__ = ... id = Column(BigInteger, autoincrement=True, primary_key=True) ... carId = Column(BigInteger, ForeignKey('cars.id'))

Re: [sqlalchemy] [missing feature] joined relationship + order by: table alias problem

2014-03-26 Thread Staszek
On 2014-03-26 18:16, Michael Bayer wrote: It's not totally clear which of the common use cases you have here, pick one: 1. I want to emit a JOIN from User to Car and order by Car.model - don't use eager loading, use query.join(): This one.

[sqlalchemy] MySQL's sql_mode (ORM)

2014-02-05 Thread Staszek
Hi How do you set sql_mode when using SQLAlchemy ORM with MySQL? For example, I would like to be able to do something equivalent to this: SET sql_mode = 'STRICT_ALL_TABLES'; so as to get an error (instead of a warning) when string length exceeds column size on INSERT. Ideally I would like to