[sqlalchemy] Re: Postgresql 9.4 JSONB support

2014-06-26 Thread Damian Dimmich
On Tuesday, June 24, 2014 6:21:40 PM UTC+4, Jonathan Vanasco wrote: On Tuesday, June 24, 2014 3:32:41 AM UTC-4, Damian Dimmich wrote: I intend to develop further syntax/query support for this type on an as needed basis for now - suggestions and comments are much appreciated. 1. Nice

Re: [sqlalchemy] inheriting from mapped classes

2014-06-26 Thread Victor Olex
I read it, but could you illustrate it with a sample code based on the classic User/Addresses example? On Wednesday, June 25, 2014 11:45:12 AM UTC-4, Jonathan Vanasco wrote: On Tuesday, June 24, 2014 9:40:02 PM UTC-4, Victor Olex wrote: What I aiming for is to provide users a library of

Re: [sqlalchemy] inheriting from mapped classes

2014-06-26 Thread Jonathan Vanasco
On Thursday, June 26, 2014 10:38:50 AM UTC-4, Victor Olex wrote: I read it, but could you illustrate it with a sample code based on the classic User/Addresses example? This is some pseudocode just to get the point across. I use 2 files, one for the base class, the other for the user

Re: [sqlalchemy] Performance problem of simple orm usage

2014-06-26 Thread Mike Bayer
On 6/26/14, 11:49 AM, Hans-Peter Jansen wrote: Dear SQLAchemistas, I'm suffering from a performance problem from a simple sequence like this: rec is a sensor record coming redundantly from the network, enos is a sensor device, ev is a sensor value record: def store_enos_rec(self,

[sqlalchemy] AssertionError: Type class 'sqlalchemy.engine.interfaces.Connectable' is already registered

2014-06-26 Thread Dustin Oprea
I'm using SQLAlchemy with web.py, and have used it many times in the past. I'm working on a project using gevent/greenlets, and everything has been fine for a couple of months, until today. Suddenly, I'm getting these at a time when I'm not even receiving any requests. Does anyone have any

Re: [sqlalchemy] AssertionError: Type class 'sqlalchemy.engine.interfaces.Connectable' is already registered

2014-06-26 Thread Mike Bayer
that looks pretty much like modules are being reloaded in process. Either get web.py to not reload the sqlalchemy modules, or if it has to, then get it to fully load sqlalchemy completely. I see that reload(mod) right in the stack trace there. On 6/26/14, 1:14 PM, Dustin Oprea wrote: I'm

Re: [sqlalchemy] AssertionError: Type class 'sqlalchemy.engine.interfaces.Connectable' is already registered

2014-06-26 Thread Dustin Oprea
On Jun 26, 2014 1:34 PM, Mike Bayer mike...@zzzcomputing.com wrote: that looks pretty much like modules are being reloaded in process. Either get web.py to not reload the sqlalchemy modules, or if it has to, then get it to fully load sqlalchemy completely. I see that reload(mod) right in the

Re: [sqlalchemy] Performance problem of simple orm usage

2014-06-26 Thread Mike Bayer
On 6/26/14, 12:24 PM, Mike Bayer wrote: I'm not sure what kind of application this is but I would not be mixing transactional control, that is the commit/rollback, inside of a business method that only seeks to create some new objects. There'd be a containing pattern within which

Re: [sqlalchemy] AssertionError: Type class 'sqlalchemy.engine.interfaces.Connectable' is already registered

2014-06-26 Thread Mike Bayer
On 6/26/14, 1:49 PM, Dustin Oprea wrote: On Jun 26, 2014 1:34 PM, Mike Bayer mike...@zzzcomputing.com mailto:mike...@zzzcomputing.com wrote: that looks pretty much like modules are being reloaded in process.Either get web.py to not reload the sqlalchemy modules, or if it has to,

Re: [sqlalchemy] Performance problem of simple orm usage

2014-06-26 Thread Mike Bayer
On 6/26/14, 3:07 PM, Hans-Peter Jansen wrote: Okay, attached is a profile dump with .commit() out of the way. Here's the head of it: -- p = pstats.Stats('srelay.pstats') -- p.strip_dirs().sort_stats('cumulative').print_stats(100) Thu Jun 26 20:41:50 2014 srelay.pstats 55993702 function calls

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
On Thu, Jun 26, 2014 at 5:57 AM, Mike Bayer mike...@zzzcomputing.com wrote: On 6/25/14, 8:06 PM, Ken Lareau wrote: On Wed, Jun 25, 2014 at 6:28 AM, Mike Bayer mike...@zzzcomputing.com wrote: On 6/25/14, 2:26 AM, Ken Lareau wrote: On Tue, Jun 24, 2014 at 3:35 PM, Mike Bayer

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Mike Bayer
minimal mapping + the query against that mapping. On 6/26/14, 4:11 PM, Ken Lareau wrote: On Thu, Jun 26, 2014 at 5:57 AM, Mike Bayer mike...@zzzcomputing.com mailto:mike...@zzzcomputing.com wrote: On 6/25/14, 8:06 PM, Ken Lareau wrote: On Wed, Jun 25, 2014 at 6:28 AM, Mike Bayer

Re: [sqlalchemy] Performance problem of simple orm usage

2014-06-26 Thread Hans-Peter Jansen
Dear Mike, sorry for not coping with preferred reply behavior.. On Donnerstag, 26. Juni 2014 15:26:02 Mike Bayer wrote: On 6/26/14, 3:07 PM, Hans-Peter Jansen wrote: Obviously, some operation triggers the flush method with about the same consequences.. OK, turn off autoflush - either

Re: [sqlalchemy] Performance problem of simple orm usage

2014-06-26 Thread Mike Bayer
On 6/26/14, 5:18 PM, Hans-Peter Jansen wrote: Dear Mike, sorry for not coping with preferred reply behavior.. On Donnerstag, 26. Juni 2014 15:26:02 Mike Bayer wrote: On 6/26/14, 3:07 PM, Hans-Peter Jansen wrote: Obviously, some operation triggers the flush method with about the same

Re: [sqlalchemy] Performance problem of simple orm usage

2014-06-26 Thread Jonathan Vanasco
In case this helps... This reminds me slightly of some RFID work I did years ago. We had a lot of reads coming in from different units, several reads per unit per second. I found the best way to handle writing was to just access the db directly, but kept the ORM on the read side. I recall a

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
On Thu, Jun 26, 2014 at 1:45 PM, Mike Bayer mike...@zzzcomputing.com wrote: minimal mapping + the query against that mapping. Okay, for the other method I needed to change, I think I've put together complete enough examples and have attached the files. The 'before' file is what we have

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Mike Bayer
a self contained version of before is attached, seems to work as is (works in 0.8 too). Modify it to show me it not working. output: SELECT t_ordered.pkg_name AS t_ordered_pkg_name, t_ordered.version AS t_ordered_version, t_ordered.revision AS t_ordered_revision, t_ordered.appType AS

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
Done, new file attached (this gives the same error message as the one I showed initially, at least on my system). - Ken -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To unsubscribe from this group and stop receiving emails from it, send an email

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Mike Bayer
right, so a few emails ago I said: you need to put .label('environment') on that column before it finds its way into subq. I dont have the mappings here to review. here's that: @environment.expression def environment(cls): return select(

Re: [sqlalchemy] A question regarding hybrid properties, relationships and schema changes

2014-06-26 Thread Ken Lareau
On Jun 26, 2014 7:40 PM, Mike Bayer mike...@zzzcomputing.com wrote: right, so a few emails ago I said: you need to put .label('environment') on that column before it finds its way into subq. I dont have the mappings here to review. here's that: @environment.expression def

Re: Gratisan {?- Watch Godzilla (2014) Full Free Movie OnLine

2014-06-26 Thread Cheney brochu