From: Mike Bayer Date: Fri, 25 Jul 2014 22:51:44 +0000 (-0400) Subject: - restore non_updating_cascade to test_manytomany_nonpassive, but also X-Git-Tag: rel_0_9_8~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=07d332453ba977623321e95c6ad58298ff959e0a;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - restore non_updating_cascade to test_manytomany_nonpassive, but also add sane_multi_rowcount requirement, as pg8000 doesn't do "multi" row count. --- diff --git a/lib/sqlalchemy/orm/dependency.py b/lib/sqlalchemy/orm/dependency.py index c1cf66f141..d10a383941 100644 --- a/lib/sqlalchemy/orm/dependency.py +++ b/lib/sqlalchemy/orm/dependency.py @@ -1119,6 +1119,7 @@ class ManyToManyDP(DependencyProcessor): if c.key in associationrow ])) result = connection.execute(statement, secondary_update) + if result.supports_sane_multi_rowcount() and \ result.rowcount != len(secondary_update): raise exc.StaleDataError( diff --git a/test/orm/test_naturalpks.py b/test/orm/test_naturalpks.py index 5a72881a0f..ac5e723c70 100644 --- a/test/orm/test_naturalpks.py +++ b/test/orm/test_naturalpks.py @@ -393,6 +393,8 @@ class NaturalPKTest(fixtures.MappedTest): def test_manytomany_passive(self): self._test_manytomany(True) + @testing.requires.non_updating_cascade + @testing.requires.sane_multi_rowcount def test_manytomany_nonpassive(self): self._test_manytomany(False)