'AutogenContext' object has no attribute '__getitem__'

2015-10-13 Thread Fayaz Yusuf Khan
Hi, Looks like the autogen_context parameter has changed type recently. I'm getting this exception: Traceback (most recent call last): File "/home/fayaz/Programming/weaver-env/bin/weaver", line 9, in load_entry_point('weaver==2.12.1', 'console_scripts', 'weaver')() File

Re: Global variables from inside render_item

2015-09-02 Thread Fayaz Yusuf Khan
ut: This is a global: None This is not a global: On Wednesday, September 2, 2015 at 8:53:21 PM UTC+5:30, Michael Bayer wrote: > > > > On 9/2/15 3:13 AM, Fayaz Yusuf Khan wrote: > > Hi, > I'm seeing this weird issue where several global variables in env.py are > set as n

Re: [sqlalchemy] Support for pysqlcipher3

2015-06-14 Thread Fayaz Yusuf Khan
On Saturday 13 Jun 2015 7:42:51 AM Mike Bayer wrote: if that is the only test failing I wouldn't worry too hard.if you look at the test, you'll see this comment: # fails on newer versions of pysqlite due to unusual memory behvior # in pysqlite itself. background at: #

Re: [sqlalchemy] Support for pysqlcipher3

2015-06-13 Thread Fayaz Yusuf Khan
On Sunday 31 May 2015 11:36:12 PM Mike Bayer wrote: you can send in pysqlcipher3 to create_engine() using the dbapi argument: import pysqlcipher3 e = create_engine(sqlite+pysqlcipher:///file.db, dbapi=pysqlcipher3) feel free to submit a PR that returns this DBAPI from the dbapi method

Re: [sqlalchemy] Support for pysqlcipher3

2015-06-01 Thread Fayaz Yusuf Khan
Alright, thanks! I would try to submit the PR. But it does look like a transitional package to me. How do we generally handle such upstream changes anyway? On Monday, June 1, 2015 at 9:06:20 AM UTC+5:30, Michael Bayer wrote: On 5/31/15 8:58 PM, Fayaz Yusuf Khan wrote: On Sunday 31 May

Re: [sqlalchemy] Support for pysqlcipher3

2015-05-31 Thread Fayaz Yusuf Khan
On Sunday 31 May 2015 11:06:32 AM Mike Bayer wrote: pysqlcipher is right here: http://docs.sqlalchemy.org/en/rel_1_0/dialects/sqlite.html#module-sqlalchemy .dialects.sqlite.pysqlcipher SQLAlchemy supports Python 2K and Python 3K in place though the above dialect has probably not been

[sqlalchemy] Support for pysqlcipher3

2015-05-31 Thread Fayaz Yusuf Khan
Hi, pysqlcipher3 is a Python3 port for pysqlcipher (for SQLite). Does SQLA currently have support for this? (I wasn't able to get it running for my project.) If not, any chances it will, in the future? Thanks. -- You received this message because you are subscribed to the Google Groups

[sqlalchemy] Re: ...and MVC

2015-05-31 Thread Fayaz Yusuf Khan
On Tuesday, May 26, 2015 at 11:04:34 PM UTC+5:30, Jonathan Vanasco wrote: It is incredibly non-standard to have more than one transaction within a given request. It is also relatively non-standard to explicitly manage transactions in the application code. I do both of those (the former

Re: [sqlalchemy] Declarative: defining relationship and column in one line

2015-05-31 Thread Fayaz Yusuf Khan
Hi, On Tuesday, May 19, 2015 at 7:41:45 PM UTC+5:30, Michael Bayer wrote: http://techspot.zzzeek.org/2011/05/17/magic-a-new-orm/ I had tried this one before but it looked like those columns were never added to the underlying table. -- You received this message because you are subscribed

[sqlalchemy] Hybrid comparator vs expression

2012-07-18 Thread Fayaz Yusuf Khan
into the column return TruncatingComparator(cls._phone_number) @phone_number.expression ??? -- Fayaz Yusuf Khan Cloud architect, Dexetra SS, India fayaz.yusuf.khan_AT_gmail_DOT_com, fayaz_AT_dexetra_DOT_com +91-9746-830-823 -- You received this message because you are subscribed to the Google

[sqlalchemy] Re: Bug: Inefficient query being generated by relationship, mixin class combo

2012-06-19 Thread Fayaz Yusuf Khan
#Rewrittenrelationshipmechanics . -- Fayaz Yusuf Khan Cloud architect, Dexetra SS, India fayaz.yusuf.khan_AT_gmail_DOT_com, fayaz_AT_dexetra_DOT_com +91-9746-830-823 -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Bug: Inefficient query being generated by relationship, mixin class combo

2012-06-18 Thread Fayaz Yusuf Khan
sane. -- Fayaz Yusuf Khan Cloud architect, Dexetra SS, India fayaz.yusuf.khan_AT_gmail_DOT_com, fayaz_AT_dexetra_DOT_com +91-9746-830-823 -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy

[sqlalchemy] Connection events don't work on connection objects?

2012-06-17 Thread Fayaz Yusuf Khan
/sqlalchemy/event.py, line 40, in listen (identifier,target)) sqlalchemy.exc.InvalidRequestError: No such event 'before_execute' for target 'sqlalchemy.engine.base.Connection object at 0x2a31450' - -- Fayaz Yusuf Khan Cloud architect, Dexetra SS, India fayaz.yusuf.khan_AT_gmail_DOT_com

Re: [sqlalchemy] A hybrid_property with the same name as the attribute

2012-03-01 Thread Fayaz Yusuf Khan
common one to override, the 'title' attribute, underscore prefixed. That'll solve the problem at hand. This choice doesn't seem so extensible. Maybe, you should stick to the Special cases aren't special enough to break the rules. rule? import this I have learnt this the hard way. -- Fayaz Yusuf

[sqlalchemy] Delete failing with StaleDataError

2012-02-11 Thread Fayaz Yusuf Khan
'. I'm going to work around this by adding another ondelete='CASCADE' for User-A -- Fayaz Yusuf Khan Cloud developer and architect Dexetra SS, Bangalore, India fayaz.yusuf.khan_AT_gmail_DOT_com fayaz_AT_dexetra_DOT_com +91-9746-830-823 from sqlalchemy import * from sqlalchemy.ext.declarative import

Re: [sqlalchemy] Delete failing with StaleDataError

2012-02-11 Thread Fayaz Yusuf Khan
migrate script. -- Fayaz Yusuf Khan Cloud developer and architect Dexetra SS, Bangalore, India fayaz.yusuf.khan_AT_gmail_DOT_com fayaz_AT_dexetra_DOT_com +91-9746-830-823 signature.asc Description: This is a digitally signed message part.

Re: [sqlalchemy] SQLAlchemy 0.7.5 Released

2012-01-30 Thread Fayaz Yusuf Khan
On Saturday 28 Jan 2012 6:05:51 PM Michael Bayer wrote: SQLAlchemy 0.7.5 is now available. Where's the documentation (pdf)? Or has nothing changed there since 0.7.4? http://media.readthedocs.org/pdf/sqlalchemy/latest/sqlalchemy.pdf still gives the older pdf. -- Fayaz Yusuf Khan Cloud developer

[sqlalchemy] New error in table inheritance in 0.7.4

2012-01-27 Thread Fayaz Yusuf Khan
persists for single table inheritance too. You can see that I'm using Python 2.7(.2) -- Fayaz Yusuf Khan Cloud developer and architect Dexetra SS, Bangalore, India fayaz.yusuf.khan_AT_gmail_DOT_com fayaz_AT_dexetra_DOT_com +91-9746-830-823 from sqlalchemy import * from sqlalchemy.ext.declarative

Re: [sqlalchemy]Close database connection in SQLAlchemy

2012-01-26 Thread Fayaz Yusuf Khan
request and for the same request access data from the cache There's a beaker caching example in SQLA. http://docs.sqlalchemy.org/en/latest/orm/examples.html#beaker-caching I myself am looking forward to implement this pattern using memcached in my own app. -- Fayaz Yusuf Khan Cloud developer

[sqlalchemy] Enhancement request: Let __table_args__ accept empty tuples

2011-12-03 Thread Fayaz Yusuf Khan
Yusuf Khan Cloud developer and architect Dexetra SS, Bangalore, India fayaz.yusuf.khan_AT_gmail_DOT_com fayaz_AT_dexetra_DOT_com +91-9746-830-823diff -r 2b66b5abf755 lib/sqlalchemy/ext/declarative.py --- a/lib/sqlalchemy/ext/declarative.py Thu Dec 01 14:21:43 2011 -0500 +++ b/lib/sqlalchemy/ext

Re: [sqlalchemy] ondelete Cascade function not working in sqlalchemy

2011-09-05 Thread Fayaz Yusuf Khan
that entry in primary key column. Even the restrict is also not working. Can you provide example test code of what you were trying to acheive? We may be able to work from there. -- Fayaz Yusuf Khan Cloud developer and designer Dexetra SS, Kochi, India fayaz.yusuf.khan_AT_gmail_DOT_com

Re: [sqlalchemy] generic_repr for ImplicitForeignKeyConstraint

2011-08-30 Thread Fayaz Yusuf Khan
), it would be a little more of the public API. -- Fayaz Yusuf Khan Cloud developer and designer Dexetra SS, Kochi, India fayaz.yusuf.khan_AT_gmail_DOT_com fayaz_AT_dexetra_DOT_com +91-9746-830-823 signature.asc Description: This is a digitally signed message part.

Re: [sqlalchemy] discriminator_on_association.py - creating a Customer instance without specifying the addresses attribute

2011-08-27 Thread Fayaz Yusuf Khan
' It works if I specify addresses=[], but that sounds like too much work :P Is there a workaround for this? Thanks. You could simply override the __init__ method and pass a default argument. That would simplify your object constructions... Hope that helps. -- Fayaz Yusuf Khan Cloud developer

[sqlalchemy] Feature request: Multilevel inheritance mapping

2011-08-11 Thread Fayaz Yusuf Khan
||makes sense? -- Fayaz Yusuf Khan Cloud developer and designer Dexetra SS, Kochi, India fayaz.yusuf.khan_AT_gmail_DOT_com fayaz_AT_dexetra_DOT_com +91-9746-830-823 signature.asc Description: This is a digitally signed message part.

Re: [sqlalchemy] Need for ImplicitForeignKeyConstraint

2011-08-06 Thread Fayaz Yusuf Khan
that.Can you use table.add_constraint(fk) instead of _set_parent() ? On Aug 5, 2011, at 1:34 AM, Fayaz Yusuf Khan wrote: So I had been working on this tiny project now and then. And here's the poc. http://paste.pound-python.org/show/10578/ I think I'm somewhat misusing the _set_parent

Re: [sqlalchemy] Need for ImplicitForeignKeyConstraint

2011-08-04 Thread Fayaz Yusuf Khan
So I had been working on this tiny project now and then. And here's the poc. http://paste.pound-python.org/show/10578/ I think I'm somewhat misusing the _set_parent() here though. On Sunday, July 24, 2011 06:52:45 PM Michael Bayer wrote: On Jul 24, 2011, at 8:39 AM, Fayaz Yusuf Khan wrote

Re: [sqlalchemy] Delay in getting the response object and populating data to UI page using Python, SQLAlchemy, MySQL

2011-07-28 Thread Fayaz Yusuf Khan
? ;-) -- Fayaz Yusuf Khan Cloud developer and designer Dexetra SS, Kochi, India fayaz.yusuf.khan_AT_gmail_DOT_com fayaz_AT_dexetra_DOT_com +91-9746-830-823 signature.asc Description: This is a digitally signed message part.

Re: [sqlalchemy] Need for ImplicitForeignKeyConstraint

2011-07-24 Thread Fayaz Yusuf Khan
On Saturday 23 Jul 2011 8:24:31 PM Michael Bayer wrote: On Jul 23, 2011, at 7:54 AM, Fayaz Yusuf Khan wrote: When C inherits from CMixin and Timeline, Python's method resolution is going to put TMixin after Timeline, that is: (class '__main__.C', class '__main__.CMixin', class

Re: [sqlalchemy] Problem with class mixin hierarchy in joint table inheritance

2011-07-23 Thread Fayaz Yusuf Khan
On Thursday, July 21, 2011 09:27:21 PM Michael Bayer wrote: On Jul 21, 2011, at 10:48 AM, Michael Bayer wrote: On Jul 21, 2011, at 2:11 AM, Fayaz Yusuf Khan wrote: Hi, I have this declarative table model: http://paste.pound-python.org/show/9857/ The short answer is you can't do

[sqlalchemy] Problem with class mixin hierarchy in joint table inheritance

2011-07-21 Thread Fayaz Yusuf Khan
.__version__ = '0.7.1' And thanks in advance. -- Fayaz Yusuf Khan Cloud developer and designer Dexetra SS, Kochi, India fayaz.yusuf.khan_AT_gmail_DOT_com fayaz_AT_dexetra_DOT_com +91-9746-830-823 from sqlalchemy import Column, String, ForeignKeyConstraint, Integer from sqlalchemy.ext.declarative

Re: [sqlalchemy] Autocreate parent while inserting child

2011-06-22 Thread Fayaz Yusuf Khan
wrong. -- Fayaz Yusuf Khan Cloud developer and designer Dexetra SS, Kochi, India fayaz.yusuf.khan_AT_gmail_DOT_com fayaz_AT_dexetra_DOT_com +91-9746-830-823 signature.asc Description: This is a digitally signed message part.

[sqlalchemy] Autocreate parent while inserting child

2011-06-18 Thread Fayaz Yusuf Khan
(..., name='NewParent',...)) But on commit, it raises an IntegrityError. How can I make SQLA automatically insert a Parent in this case? -- Fayaz Yusuf Khan Cloud developer and designer Dexetra SS, Kochi, India fayaz.yusuf.khan_AT_gmail_DOT_com fayaz_AT_dexetra_DOT_com +91-9746-830-823