Re: [sqlalchemy] In-memory object duplication

2011-03-21 Thread Jacques Naude
Hi, Simon You nailed it! Thanks a million for the guidance and suggestion - it worked like a bomb. I simply removed the offending append statement and my double entries have disappeared, end the entry still persists to the database. (It seems so simple and obvious with the benefit of insight and

[sqlalchemy] Relationship operator vs join and filter

2011-03-21 Thread Wouter Overmeire
New to sql and sqlalchemy. Using an in memory sqlite database. Trying to do some queries based on the examples in the sqlalchemy documentation. I have classes: Tag, Article, Author, Award article -- tag: many to many article -- author: many to many (so one article can have multiple authors)

[sqlalchemy] Python 3.1 + SQLAlchemy 0.6 or 0.7

2011-03-21 Thread ddarko
Python 3.1 SQLAlchemy 0.6.6 (and tested with 0.7b3) psycopg2 2.4 postgresql 8.4 Has anyone tested this configuration? psycopg2 alone work for me great, but in spite of installing the current version of SQLAlchemy accordance with the instructions README.py3k connection is not working properly:

Re: [sqlalchemy] Python 3.1 + SQLAlchemy 0.6 or 0.7

2011-03-21 Thread Michael Bayer
Yeah psycopg2 with python 3 / sqlalchemy is not supported yet. The python 3 supported version of psycopg2 came out like, in the past two weeks.It will be 0.7 where its supported at all, hopefully soon as its a matter of setting up some flags in the dialects. In the meantime if you want

[sqlalchemy] Re: Python 3.1 + SQLAlchemy 0.6 or 0.7

2011-03-21 Thread ddarko
Everything is clear - so wait for 0.7 finall. Meanwhile, would use pg8000. Pity that does not support pgarray :/ thx On Mar 21, 3:31 pm, Michael Bayer mike...@zzzcomputing.com wrote: Yeah psycopg2 with python 3 / sqlalchemy is not supported yet.  The python 3 supported version of psycopg2 came

Re: [sqlalchemy] Pypi release policy

2011-03-21 Thread Michael Bayer
On Feb 14, 2011, at 5:22 AM, Tarek Ziadé wrote: userid = Column(Integer(11), primary_key=True, nullable=False) TypeError: __init__() takes exactly 1 argument (2 given) The code: http://hg.mozilla.org/services/server-storage/file/78762deede5d/syncstorage/storage/sqlmappers.py#l55 I

[sqlalchemy] Re: trouble with metaclass

2011-03-21 Thread farcat
Hi Chris, The short answer is that I want to dynamically create classes/tables and I want to implement multiple inheritance (simplified version: just data and no overrides = no diamond problem), so I need some extra work like a extra tables for polymorphism. I think it would be most elegant to do

Re: [sqlalchemy] Relationship operator vs join and filter

2011-03-21 Thread Michael Bayer
On Mar 21, 2011, at 7:21 AM, Wouter Overmeire wrote: New to sql and sqlalchemy. Using an in memory sqlite database. Trying to do some queries based on the examples in the sqlalchemy documentation. I have classes: Tag, Article, Author, Award article -- tag: many to many article --

Re: [sqlalchemy] Re: trouble with metaclass

2011-03-21 Thread Chris Withers
On 21/03/2011 19:29, farcat wrote: Hi Chris, The short answer is that I want to dynamically create classes/tables Why? and I want to implement multiple inheritance That's fine, that's what mixins give you. If you have more than one class with a __tablename__ in the class hierarchy, then