requirements: Update sqlalchemy to 1.2.4.

This requires updating one of the tests for the group_pm_with feature
in test_narrow to use the new style of tautology generated by SQLAlchemy.

Thanks to Sinwar for investigating this.

Fixes #8381.
This commit is contained in:
Tim Abbott 2018-02-26 15:12:39 -08:00
parent 227e5fdcc2
commit 68664acf1f
4 changed files with 5 additions and 9 deletions

View File

@ -23,7 +23,7 @@ ipython==6.2.1
Pillow==5.0.0
# Needed for building complex DB queries
SQLAlchemy==1.1.14
SQLAlchemy==1.2.4
# Needed for password hashing
argon2-cffi==18.1.0

View File

@ -158,7 +158,7 @@ sourcemap==0.2.1
sphinx-rtd-theme==0.2.4
sphinx==1.7.0
sphinxcontrib-websupport==1.0.1 # via sphinx
sqlalchemy==1.1.14
sqlalchemy==1.2.4
statsd==3.2.1 # via django-statsd-mozilla
stripe==1.77.2
tblib==1.3.2

View File

@ -108,7 +108,7 @@ social-auth-app-django==2.1.0
social-auth-core==1.5.0 # via social-auth-app-django
sockjs-tornado==1.0.3
sourcemap==0.2.1
sqlalchemy==1.1.14
sqlalchemy==1.2.4
statsd==3.2.1 # via django-statsd-mozilla
stripe==1.77.2
tornado==4.5.3

View File

@ -221,11 +221,7 @@ class NarrowBuilderTest(ZulipTestCase):
def test_add_term_using_group_pm_operator_and_not_the_same_user_as_operand(self) -> None:
# Test wtihout any such group PM threads existing
term = dict(operator='group-pm-with', operand=self.example_email("othello"))
with mock.patch("sqlalchemy.util.warn") as mock_warn:
self._do_add_term_test(term, 'WHERE recipient_id != recipient_id')
# SQLalchemy warns because this query is a tautology.
mock_warn.assert_called_once()
self._do_add_term_test(term, 'WHERE 1 != 1')
# Test with at least one such group PM thread existing
self.send_huddle_message(self.user_profile.email, [self.example_email("othello"),
@ -237,7 +233,7 @@ class NarrowBuilderTest(ZulipTestCase):
def test_add_term_using_group_pm_operator_not_the_same_user_as_operand_and_negated(
self) -> None: # NEGATED
term = dict(operator='group-pm-with', operand=self.example_email("othello"), negated=True)
self._do_add_term_test(term, 'WHERE recipient_id = recipient_id')
self._do_add_term_test(term, 'WHERE 1 = 1')
def test_add_term_using_group_pm_operator_with_non_existing_user_as_operand(self) -> None:
term = dict(operator='group-pm-with', operand='non-existing@zulip.com')