@@ -729,8 +729,7 @@ def _update(self, sock_info, criteria, document, upsert=False,
729729 if collation is not None :
730730 if sock_info .max_wire_version < 5 :
731731 raise ConfigurationError (
732- 'Specifying a collation is unsupported with a max wire '
733- 'version of %d.' % (sock_info .max_wire_version ,))
732+ 'Must be connected to MongoDB 3.4+ to use collations.' )
734733 elif not acknowledged :
735734 raise ConfigurationError (
736735 'Collation is unsupported for unacknowledged writes.' )
@@ -976,8 +975,7 @@ def _delete(
976975 if collation is not None :
977976 if sock_info .max_wire_version < 5 :
978977 raise ConfigurationError (
979- 'Specifying a collation is unsupported with a max wire '
980- 'version of %d.' % (sock_info .max_wire_version ,))
978+ 'Must be connected to MongoDB 3.4+ to use collations.' )
981979 elif not acknowledged :
982980 raise ConfigurationError (
983981 'Collation is unsupported for unacknowledged writes.' )
@@ -1420,8 +1418,7 @@ def __create_index(self, keys, index_options):
14201418 if collation is not None :
14211419 if sock_info .max_wire_version < 5 :
14221420 raise ConfigurationError (
1423- 'Specifying a collation is unsupported with a max wire '
1424- 'version of %d.' % (sock_info .max_wire_version ,))
1421+ 'Must be connected to MongoDB 3.4+ to use collations.' )
14251422 else :
14261423 index ['collation' ] = collation
14271424 cmd = SON ([('createIndexes' , self .name ), ('indexes' , [index ])])
0 commit comments