Re: [sqlalchemy] autoflush not working on issued query

2018-02-13 Thread Mike Bayer
On Sun, Feb 11, 2018 at 11:15 AM, Antoine Lizée wrote: > > Here is the short example. On the last line, a query is issued to retrieve > the object, but the pending DELETE operation is not triggered by the > autoflush, resulting in an existing object instead of `None`. Can

[sqlalchemy] autoflush not working on issued query

2018-02-13 Thread Antoine Lizée
Here is the short example. On the last line, a query is issued to retrieve the object, but the pending DELETE operation is not triggered by the autoflush, resulting in an existing object instead of `None`. Can somebody explain why? us = Country(name="USA") session.add(us) session.commit()

[sqlalchemy] Autoflush doesn't execute when issuing query after object deletion

2018-02-13 Thread Antoine Lizée
Here is a simple example: us = Country(name="USA") session.add(us) session.commit() session.delete(us) assert session.query(Country).get(us.id) is not None # Issues a SELECT query alone session.query(Country).get(us.id + 1) # Issues a SELECT with the flushed DELETE assert

[sqlalchemy] Autoflush doesn't work on a query that is issued after an object deletion

2018-02-13 Thread Antoine Lizée
Here is a simple example: us = Country(name="USA") session.add(us) session.commit() session.delete(us) assert session.query(Country).get(us.id) is not None # Issues a SELECT query alone session.query(Country).get(us.id + 1) # Issues a SELECT with the flushed DELETE assert

Re: [sqlalchemy] pass additional kwargs to execute into BulkUD _do_exec method

2018-02-13 Thread Антонио Антуан
I understand. Excuse me, drown in work. Going to test your code in a couple of days. вт, 13 февр. 2018 г., 20:32 Mike Bayer : > i don't plan to move on this until I get feedback. > > On Tue, Feb 6, 2018 at 7:32 PM, Mike Bayer > wrote: > > code

Re: [sqlalchemy] pass additional kwargs to execute into BulkUD _do_exec method

2018-02-13 Thread Mike Bayer
i don't plan to move on this until I get feedback. On Tue, Feb 6, 2018 at 7:32 PM, Mike Bayer wrote: > code review at https://gerrit.sqlalchemy.org/#/c/zzzeek/sqlalchemy/+/656 > and ideally would include basic ShardedQuery support > > On Tue, Feb 6, 2018 at 7:23 PM,

Re: [sqlalchemy] running py.test

2018-02-13 Thread su-sa
Hi Simon, I installed both pytest and mock using pip install py.test mock in the virtualenv. I am using anaconda python. Both the libraries are surely installed. On Friday, 9 February 2018 12:36:26 UTC+1, Simon King wrote: > On Wed, Feb 7, 2018 at 2:23 PM, su-sa >