remove qs.slave_okay() that is deprecated since pymongo3
This commit is contained in:
		| @@ -60,7 +60,6 @@ class BaseQuerySet(object): | ||||
|         self._ordering = None | ||||
|         self._snapshot = False | ||||
|         self._timeout = True | ||||
|         self._slave_okay = False | ||||
|         self._read_preference = None | ||||
|         self._iter = False | ||||
|         self._scalar = [] | ||||
| @@ -775,7 +774,6 @@ class BaseQuerySet(object): | ||||
|             "_ordering", | ||||
|             "_snapshot", | ||||
|             "_timeout", | ||||
|             "_slave_okay", | ||||
|             "_read_preference", | ||||
|             "_iter", | ||||
|             "_scalar", | ||||
| @@ -1172,20 +1170,6 @@ class BaseQuerySet(object): | ||||
|         queryset._timeout = enabled | ||||
|         return queryset | ||||
|  | ||||
|     # DEPRECATED. Has no more impact on PyMongo 3+ | ||||
|     def slave_okay(self, enabled): | ||||
|         """Enable or disable the slave_okay when querying. | ||||
|  | ||||
|         :param enabled: whether or not the slave_okay is enabled | ||||
|  | ||||
|         .. deprecated:: Ignored with PyMongo 3+ | ||||
|         """ | ||||
|         msg = "slave_okay is deprecated as it has no impact when using PyMongo 3+." | ||||
|         warnings.warn(msg, DeprecationWarning) | ||||
|         queryset = self.clone() | ||||
|         queryset._slave_okay = enabled | ||||
|         return queryset | ||||
|  | ||||
|     def read_preference(self, read_preference): | ||||
|         """Change the read_preference when querying. | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user