Re: [sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-09 Thread Mike Bayer
Unfortunately I don't have the resources to debug applications, I can only illustrate why a self-contained test script is doing what it does. You'd have to roll this into an MCVE. On 09/09/2016 05:32 PM, Dominik George wrote: Hi, Try setting PYTHONHASHSEED to a fixed integer number, and get

Re: [sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-09 Thread Dominik George
Hi, >Try setting PYTHONHASHSEED to a fixed integer number, and get the test >suite to fail with that number. Then you will see the same ordering >failure in each case, and you can then use pdb and logging to more >specifically isolate your issue. It is not only the test cases. All I do is:

Re: [sqlalchemy] Joining, if join not already done?

2016-09-09 Thread Iain Duncan
ok thanks. +1 for adding that in the long term! iain On Fri, Sep 9, 2016 at 2:17 PM, Mike Bayer wrote: > > > On 09/09/2016 05:13 PM, Iain Duncan wrote: > >> Hi all, I have a query that gets conditionally extending depending on >> what's going with a given request. I've got a section where it sh

Re: [sqlalchemy] Joining, if join not already done?

2016-09-09 Thread Mike Bayer
On 09/09/2016 05:13 PM, Iain Duncan wrote: Hi all, I have a query that gets conditionally extending depending on what's going with a given request. I've got a section where it should join something and search on that join, but if the same join has already happened, I get an error. I've figured

[sqlalchemy] Joining, if join not already done?

2016-09-09 Thread Iain Duncan
Hi all, I have a query that gets conditionally extending depending on what's going with a given request. I've got a section where it should join something and search on that join, but if the same join has already happened, I get an error. I've figured out i can do the following, which looks like I'

Re: [sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-09 Thread Mike Bayer
When something happens on some test runs, and doesn't happen on other test runs, the only thing that changes across Python interpreter runs is the ordering of dictionaries and sets (interesting side note, it's been announced yesterday/today that they are changing this in Python 3.6). The steps

Re: [sqlalchemy] Strange (Heisen)bug with dictionary association_proxy

2016-09-09 Thread Dominik George
Hi, thanks for your reply! make sure you set the environment variable PYTHONHASHSEED=random, then > run your tests repeatedly. This variable produces a random hash seed > for dictionaries and will smoke out dictionary-ordering based bugs more > clearly so that you can localize the source of i

[sqlalchemy] creating same structure of tables in multiple schemas

2016-09-09 Thread Srinivas Boppu
Hi, This is my first post in sqlalchemy and I am a newbie to sqlalchemy, so please bear with me. I wanted to create the same table structure in different schemas in postgresql. Let's say I have a public schema where I will have some tables common to all the other non-public schemas. In th

Re: [sqlalchemy] DeferredReflection with optional tables

2016-09-09 Thread bsdz
Thank you very much. That worked :) On Wednesday, 7 September 2016 14:56:25 UTC+1, Mike Bayer wrote: > > > > On 09/07/2016 05:08 AM, bsdz wrote: > > No worries and thanks for the suggestions/advice so far. > > > > Tbh I tried the mixin approach first as described in the docs but had > > probl