Re: [sqlalchemy] require explicit FROMs

2017-06-28 Thread Mike Bayer
On Mon, Jun 26, 2017 at 2:24 PM, Dave Vitek wrote: > In case anyone tries to use the compile visitor below, I'll document a > couple snags I ran into. For now, I think I'm satisfied to go back to my > original patch and deal with any merge conflicts during upgrades. > > The hook has false positi

Re: [sqlalchemy] require explicit FROMs

2017-06-26 Thread Dave Vitek
In case anyone tries to use the compile visitor below, I'll document a couple snags I ran into. For now, I think I'm satisfied to go back to my original patch and deal with any merge conflicts during upgrades. The hook has false positives when it runs on inner queries that correlate to tables

Re: [sqlalchemy] require explicit FROMs

2017-06-25 Thread Mike Bayer
On 06/25/2017 12:15 PM, Dave Vitek wrote: Mike, Thanks for the thorough feedback. It isn't surprising that there's a lot of code out there relying on the current behavior, but internal sqlalchemy reliance is certainly problematic. It sounds difficult to walk back the existing behavior at t

Re: [sqlalchemy] require explicit FROMs

2017-06-25 Thread Dave Vitek
Mike, Thanks for the thorough feedback. It isn't surprising that there's a lot of code out there relying on the current behavior, but internal sqlalchemy reliance is certainly problematic. It sounds difficult to walk back the existing behavior at this point and I understand the apprehension

Re: [sqlalchemy] require explicit FROMs

2017-06-24 Thread Mike Bayer
On 06/24/2017 10:53 AM, Dave Vitek wrote: Hi all, I'll start with an example. Assume A and B are Table objects: >>> print select([A.id], from_obj=[A], whereclause=(B.field == 123)) SELECT A.id FROM A, B WHERE B.id = 123 As a convenience, sqlalchemy has added B to the FROM clause on the as

[sqlalchemy] require explicit FROMs

2017-06-24 Thread Dave Vitek
Hi all, I'll start with an example. Assume A and B are Table objects: >>> print select([A.id], from_obj=[A], whereclause=(B.field == 123)) SELECT A.id FROM A, B WHERE B.id = 123 As a convenience, sqlalchemy has added B to the FROM clause on the assumption that I meant to do this. However, i