-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dbtoyaml failure #182
Comments
I do not have simple repro case, but I inserted pretty-print and found following: pyrseas/dbobject/constraint.py
There is single value:
i.e. you have dict instead of object. Probably it helps. |
I've reproduced the problem. The fix is to replace the |
@jmafc thank you very much for quick response! |
It needs more work (your other issue causes another error with this change), but it's solvable. |
This appears to be a difference in behavior between Python 2 and 3. Although your traceback shows 3.6, I'm wondering if you may be running it from Python 2 (in issue #184, it seems evident that is the case because under Python 3, we're able to show the view definition formatted, not as a single string). |
|
|
|
@jmafc seems like it's python 3.6 |
exactly the same problem if I'm running under python2.7 |
I'm getting different behavior under 2.7 and 3.6, depending on whether I used my own test (which didn't have a function or view but just two tables) or your test case for the other two issues. It seems that under 2.7 (with my test), one table gets mapped before the other and under 3.6, it's reversed (since the "maps" are dicts, this is not unusual). The problem is the Table.to_map code calls the UniqueConstraint.to_map code to get the column names (from column numbers) and what was a Python object gets converted to a dict in the process. We'll probably have to normalize the column names independently, like we already do for Constraint.alter. |
@jmafc behavior depends from dist key traversal order. |
This is taking a little longer than expected. The problem is when |
@jmafc thank you for keep me updated! |
@jmafc verified on my case, works fine, thank you! |
Yes, I suspected you would say that. We don't really have a maintenance release policy, but in the past we typically waited until we had three or more fixes in the maintenance branch and also until someone asked "could we have this or that fix?" Right now, this is the only change in r0.8, and although there are other file changes, the real fix--if I'm not mistaken--is in the two lines in |
No problem. |
Please be aware that using the top level directory gives you, by default, the |
python 3.6
osx
The text was updated successfully, but these errors were encountered: