Re: [sqlalchemy] Combining yield_per and eager loading

2016-07-19 Thread Mike Bayer
On 07/19/2016 05:20 PM, Martijn van Oosterhout wrote: On 19 July 2016 at 18:42, Mike Bayer > wrote: On 07/19/2016 12:33 PM, Martijn van Oosterhout wrote: On Sunday, July 17, 2016 at 8:47:11 AM UTC+2, Martijn van

Re: [sqlalchemy] Combining yield_per and eager loading

2016-07-19 Thread Martijn van Oosterhout
On 19 July 2016 at 18:42, Mike Bayer wrote: > > > On 07/19/2016 12:33 PM, Martijn van Oosterhout wrote: > >> On Sunday, July 17, 2016 at 8:47:11 AM UTC+2, Martijn van Oosterhout >> wrote: >> >> But in any case, even this improves performance greatly. >> > > this is

[sqlalchemy] gevent.monkey.patch_all() breaks my Sqlalchemy connection...

2016-07-19 Thread Paul Becotte
Hi! So, I have a traditional Flask app using flask-sqlalchemy and sqlalchemy ORM, served with uwsgi. Uwsgi is set with processes=4 and threads=4. Yesterday I added grequests to improve a single area of the app a bit (I had to do a couple hundred external API calls to build a single data

Re: [sqlalchemy] Detecting relationship conflicts

2016-07-19 Thread Burak Arslan
On 07/19/16 20:37, Burak Arslan wrote: > > On 07/19/16 20:19, Burak Arslan wrote: >> On 07/19/16 19:38, Mike Bayer wrote: >>> this warning will be removed in 1.1, see >>> https://bitbucket.org/zzzeek/sqlalchemy/issues/3749 >> That's nice but am I to understand there is no easy way to test this?

Re: [sqlalchemy] Detecting relationship conflicts

2016-07-19 Thread Mike Bayer
On 07/19/2016 01:37 PM, Burak Arslan wrote: On 07/19/16 20:19, Burak Arslan wrote: On 07/19/16 19:38, Mike Bayer wrote: this warning will be removed in 1.1, see https://bitbucket.org/zzzeek/sqlalchemy/issues/3749 That's nice but am I to understand there is no easy way to test this? I

Re: [sqlalchemy] Detecting relationship conflicts

2016-07-19 Thread Burak Arslan
On 07/19/16 20:19, Burak Arslan wrote: > > On 07/19/16 19:38, Mike Bayer wrote: >> this warning will be removed in 1.1, see >> https://bitbucket.org/zzzeek/sqlalchemy/issues/3749 > That's nice but am I to understand there is no easy way to test this? I > still wouldn't prefer generating

Re: [sqlalchemy] Detecting relationship conflicts

2016-07-19 Thread Burak Arslan
On 07/19/16 19:38, Mike Bayer wrote: > this warning will be removed in 1.1, see > https://bitbucket.org/zzzeek/sqlalchemy/issues/3749 That's nice but am I to understand there is no easy way to test this? I still wouldn't prefer generating redundant properties. Best, Burak -- You received

Re: [sqlalchemy] Combining yield_per and eager loading

2016-07-19 Thread Mike Bayer
On 07/19/2016 12:33 PM, Martijn van Oosterhout wrote: On Sunday, July 17, 2016 at 8:47:11 AM UTC+2, Martijn van Oosterhout wrote: I'll play a bit and see what I can get to work. Thanks again. So, I have a chance to play and got something that actually works quite nicely, see below. Two

Re: [sqlalchemy] SAWarning shows not immediately, but after some time of app execution

2016-07-19 Thread Mike Bayer
On 07/19/2016 11:51 AM, TomS. wrote: Hi, We have Flask app which uses SQLAlchemy. Weird error started to happen recently. The difficulty is that we can't reproduce the error (/figure out conditions causing issue) - maybe someone could help. Any hints/tips would be appreciated. There is a

Re: [sqlalchemy] Detecting relationship conflicts

2016-07-19 Thread Mike Bayer
On 07/19/2016 08:52 AM, Burak Arslan wrote: Hi, Behold this test: https://github.com/plq/spyne/blob/be189784b02e204b031f25bc748d9236ef7dfc59/spyne/test/test_sqlalchemy.py#L314 This is for Spyne => SQLAlchemy object bridge so please ignore Spyne-specific stuff in there. I noticed that this

Re: [sqlalchemy] Combining yield_per and eager loading

2016-07-19 Thread Martijn van Oosterhout
On Sunday, July 17, 2016 at 8:47:11 AM UTC+2, Martijn van Oosterhout wrote: > > > I'll play a bit and see what I can get to work. Thanks again. > > So, I have a chance to play and got something that actually works quite nicely, see below. Two things: - I switched to referencing the primary key

Re: [sqlalchemy] SAWarning shows not immediately, but after some time of app execution

2016-07-19 Thread TomS.
my_ids = [] is initialized in the body of static method (on the top of it) which is run via Flask's route decorator. But I can't understand why following code: my_ids = [] MyModel.id.in_(my_ids) doesn't raise SAWarning if 'an empty sequence' causes warning. Cheers On 07/19/2016 06:14 PM,

Re: [sqlalchemy] SAWarning shows not immediately, but after some time of app execution

2016-07-19 Thread Антонио Антуан
Looks like `my_ids` become empty 'after some time of app execution'. How do you initialize the variable? вт, 19 июля 2016 г., 18:51 TomS. : > Hi, > > We have Flask app which uses SQLAlchemy. Weird error started to happen > recently. The difficulty is that we can't reproduce

[sqlalchemy] SAWarning shows not immediately, but after some time of app execution

2016-07-19 Thread TomS.
Hi, We have Flask app which uses SQLAlchemy. Weird error started to happen recently. The difficulty is that we can't reproduce the error (/figure out conditions causing issue) - maybe someone could help. Any hints/tips would be appreciated. There is a part in the code which constructs IN in

Re: [sqlalchemy] Error IM001 reflecting table

2016-07-19 Thread Mike Bayer
On 07/19/2016 04:50 AM, Angelo Bulone wrote: first of all, sorry if I'm not writing in the right place or I'm not providing enough info about the issue. Using SQL Alchemy, with pyodbc. I'm trying to reflect a table. When I try to do that, i get this message DBAPIError: (pyodbc.Error)

[sqlalchemy] Detecting relationship conflicts

2016-07-19 Thread Burak Arslan
Hi, Behold this test: https://github.com/plq/spyne/blob/be189784b02e204b031f25bc748d9236ef7dfc59/spyne/test/test_sqlalchemy.py#L314 This is for Spyne => SQLAlchemy object bridge so please ignore Spyne-specific stuff in there. I noticed that this produced warning like this:

[sqlalchemy] Error IM001 reflecting table

2016-07-19 Thread Angelo Bulone
first of all, sorry if I'm not writing in the right place or I'm not providing enough info about the issue. Using SQL Alchemy, with pyodbc. I'm trying to reflect a table. When I try to do that, i get this message DBAPIError: (pyodbc.Error) ('IM001', '[IM001] [unixODBC][Driver Manager]Driver