Skip to content
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

FAIL tests/test_postgresql.py::PostgresqlOpTest::()::test_create_exclude_constraint_quoted_column #431

Closed
sqlalchemy-bot opened this issue May 31, 2017 · 12 comments
Labels
bug Something isn't working

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Sandro Tosi (@sandrotosi)

Hello,
when building alembic 0.9.2 i got this error:

=========================== short test summary info ============================
FAIL tests/test_postgresql.py::PostgresqlOpTest::()::test_create_exclude_constraint_quoted_column

=================================== FAILURES ===================================
________ PostgresqlOpTest.test_create_exclude_constraint_quoted_column _________
Traceback (most recent call last):
  File "/build/alembic-0.9.2/tests/test_postgresql.py", line 112, in test_create_exclude_constraint_quoted_column
    where=column("SomeColumn") > 5, using="gist")
  File "<string>", line 8, in create_exclude_constraint
  File "<string>", line 3, in create_exclude_constraint
  File "/build/alembic-0.9.2/alembic/ddl/postgresql.py", line 349, in create_exclude_constraint
    return operations.invoke(op)
  File "/build/alembic-0.9.2/alembic/operations/base.py", line 318, in invoke
    return fn(self, operation)
  File "/build/alembic-0.9.2/alembic/operations/toimpl.py", line 135, in create_constraint
    operation.to_constraint(operations.migration_context)
  File "/build/alembic-0.9.2/alembic/ddl/postgresql.py", line 299, in to_constraint
    **self.kw
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/postgresql/constraints.py", line 87, in __init__
    if where:
  File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py", line 2746, in __bool__
    raise TypeError("Boolean value of this clause is not defined")
TypeError: Boolean value of this clause is not defined
============== 1 failed, 866 passed, 188 skipped in 6.39 seconds ===============

we're using sqlalchemy 1.0.8

@sqlalchemy-bot
Copy link
Author

Sandro Tosi (@sandrotosi) wrote:

that error goes away udpating to sqlalchemy 1.1.6, so maybe you should bump the requirements in setup.py to that version (or smth newer than the 0.7.6 currently there)

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

SQLAlchemy versions 0.7.X or so, through current, are supported. In this case you are hitting a bug that was repaired in 1.0.10, although the bug is not noted in the changelog (which is highly unusual). It was fixed in PR zzzeek/sqlalchemy#215.

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

(note the test in question is only supported for the 1.0.x series or higher)

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

if you could clarify for me your "build" where you need the test suite to run against an obsolete SQLAlchemy version, that would help. I can mark these tests with more specific "failing" in that case.

@sqlalchemy-bot
Copy link
Author

Sandro Tosi (@sandrotosi) wrote:

yeah but you dont check that! (and it's also not true as with 1.0.8 the bug is there only; so 1.0.x with x >= 10)

you need to guard that check with the version of sqla: if it's lower than X (with X the minimum version where the test can success) then skip it

@sqlalchemy-bot
Copy link
Author

Sandro Tosi (@sandrotosi) wrote:

i was building alembic against the debian jessie backport version of sqlalchemy; while it is not the most up-to-date, according to the requirement versions, it is supported, so tests shouldnt fail if running against taht version

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

https://gerrit.sqlalchemy.org/419

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to reopened

@sqlalchemy-bot
Copy link
Author

Sandro Tosi (@sandrotosi) wrote:

nice!! thanks a ton for the super-fast fix!

@sqlalchemy-bot
Copy link
Author

Michael Bayer (@zzzeek) wrote:

  • Fixed unit tests to run correctly under the SQLAlchemy 1.0.x series
    prior to version 1.0.10 where a particular bug involving Postgresql
    exclude constraints was fixed.

Change-Id: Ief64b19b75e4c2c3661ac95d5b03d0c8e0fe5619
Fixes: #431

b526a11

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (@zzzeek):

  • changed status to closed

@sqlalchemy-bot sqlalchemy-bot added the bug Something isn't working label Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant