[sqlalchemy] Re: convert_unicode=True results in double encoding

2006-11-13 Thread Shannon -jj Behrens
On 11/12/06, Michael Bayer [EMAIL PROTECTED] wrote: since create_engine deals with class constructors, i went with this approach: def get_cls_kwargs(cls): return the full set of legal kwargs for the given cls kw = [] for c in cls.__mro__: cons = c.__init__ if

[sqlalchemy] Re: convert_unicode=True results in double encoding

2006-11-07 Thread Shannon -jj Behrens
The following results in correct data going into and coming out of the database, but the data in the database itself looks double encoded: import MySQLdb connection = MySQLdb.connect(host=fmapp03, user=foxmarks, passwd='ChunkyBacon', db=users) cursor =

[sqlalchemy] Re: convert_unicode=True results in double encoding

2006-11-07 Thread Shannon -jj Behrens
On 11/7/06, Michael Bayer [EMAIL PROTECTED] wrote: yeah, or use introspection to consume the args, i thought of that too. i guess we can do that. of course i dont like having to go there but i guess not a big deal. as far as kwargs collisions, yeah, thats a potential issue too. but the

[sqlalchemy] Re: convert_unicode=True results in double encoding

2006-11-07 Thread Michael Bayer
ugh, well i fixed that one. random doc bugs you can file tickets for, or ill just give you commit access if you want to knock some out yourself. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy

[sqlalchemy] Re: convert_unicode=True results in double encoding

2006-11-04 Thread Michael Bayer
Shannon -jj Behrens wrote: I'm using convert_unicode=True. Everything is fine as long as I'm the one reading and writing the data. However, if I look at what's actually being stored in the database, it's like the data has been encoded twiced. If I switch to use_unicode=True, which I

[sqlalchemy] Re: convert_unicode=True results in double encoding

2006-11-04 Thread Michael Bayer
Shannon -jj Behrens wrote: Changing from convert_unicode=True to use_unicode=True doesn't do what you'd expect. SQLAlchemy is passing keyword arguments all over the place, and use_unicode actually gets ignored. minor rantI personally think that you should be strict *somewhere* when you're

[sqlalchemy] Re: convert_unicode=True results in double encoding

2006-11-04 Thread Michael Bayer
Shannon - im trying to figure a way to make create_engine() behave the way you want. but let me show you a highly simplified version of how create_engine() works. how would you change it ? def create_engine(url, **kwargs): pool = pool.Pool(**kwargs) dialect = module.Dialect(url,

[sqlalchemy] Re: convert_unicode=True results in double encoding

2006-11-03 Thread Shannon -jj Behrens
On 11/3/06, Shannon -jj Behrens [EMAIL PROTECTED] wrote: I'm using convert_unicode=True. Everything is fine as long as I'm the one reading and writing the data. However, if I look at what's actually being stored in the database, it's like the data has been encoded twiced. If I switch to