On 04/06/2019 23:21, Mike Bayer wrote:
I'm not following all your code but if there are two sessions in play
I'd probably try to avoid that, there should be only one Session you
care about.
This comes back to something I asked you about on Twitter a while ago:
the code under test gets
On Tue, Jun 4, 2019, at 4:33 PM, Chris Withers wrote:
> On 04/06/2019 14:49, Mike Bayer wrote:
> >
> >
> > On Tue, Jun 4, 2019, at 2:15 AM, Chris Withers wrote:
> >> Now, what I'm trying to test is that I haven't forgotten to include
> >> the "with session.transaction". The problem is that,
On Tue, Jun 4, 2019, at 4:34 PM, Chris Withers wrote:
> On 04/06/2019 14:47, Mike Bayer wrote:
> >
> >
> > On Tue, Jun 4, 2019, at 3:05 AM, Chris Withers wrote:
> >> Hi All,
> >>
> >> What creates session.transaction? I can't spot get __getattr__ magic,
> >> but the only place in the code I
On 04/06/2019 14:47, Mike Bayer wrote:
On Tue, Jun 4, 2019, at 3:05 AM, Chris Withers wrote:
Hi All,
What creates session.transaction? I can't spot get __getattr__ magic,
but the only place in the code I see it being created is in .begin(...),
which has a docstring saying that it should no
On 04/06/2019 14:49, Mike Bayer wrote:
On Tue, Jun 4, 2019, at 2:15 AM, Chris Withers wrote:
Now, what I'm trying to test is that I haven't forgotten to include
the "with session.transaction". The problem is that, without the
transaction.rollback(), the test passes regardless of whether the
On Tue, Jun 4, 2019, at 2:15 AM, Chris Withers wrote:
> Hi All,
>
> I'm working with the pattern described at
> https://docs.sqlalchemy.org/en/13/orm/session_transaction.html#joining-a-session-into-an-external-transaction-such-as-for-test-suites
> along with pytest and FastAPI, an async web
On Tue, Jun 4, 2019, at 3:05 AM, Chris Withers wrote:
> Hi All,
>
> What creates session.transaction? I can't spot get __getattr__ magic,
> but the only place in the code I see it being created is in .begin(...),
> which has a docstring saying that it should no longer be used, so I feel
>
I think I get the idea. That's why the properties with
hybrid_property.expression defined are able to work as SQL SELECT fields in
the cases where a tuple is returned rather than an ORM model... because you
don't have to have a place in _dict__ to put it, it just goes into the
tuple.
My main
Hi All,
What creates session.transaction? I can't spot get __getattr__ magic,
but the only place in the code I see it being created is in .begin(...),
which has a docstring saying that it should no longer be used, so I feel
like I must be missing something?
cheers,
Chris
--
SQLAlchemy -
Hi All,
I'm working with the pattern described at
https://docs.sqlalchemy.org/en/13/orm/session_transaction.html#joining-a-session-into-an-external-transaction-such-as-for-test-suites
along with pytest and FastAPI, an async web app framework with good
support for running blocking code.
So,
10 matches
Mail list logo