remove qs.slave_okay() that is deprecated since pymongo3
This commit is contained in:
		| @@ -10,6 +10,7 @@ Development | |||||||
| - Fixed a bug causing inaccurate query results, while combining ``__raw__`` and regular filters for the same field #2264 | - Fixed a bug causing inaccurate query results, while combining ``__raw__`` and regular filters for the same field #2264 | ||||||
| - Add support for the `elemMatch` projection operator in .fields() (e.g BlogPost.objects.fields(elemMatch__comments="test")) #2267 | - Add support for the `elemMatch` projection operator in .fields() (e.g BlogPost.objects.fields(elemMatch__comments="test")) #2267 | ||||||
| - DictField validate failed without default connection (bug introduced in 0.19.0) #2239 | - DictField validate failed without default connection (bug introduced in 0.19.0) #2239 | ||||||
|  | - Remove method queryset.slave_okay() that was deprecated a while ago and disappeared since pymongo3 | ||||||
|  |  | ||||||
| Changes in 0.19.1 | Changes in 0.19.1 | ||||||
| ================= | ================= | ||||||
|   | |||||||
| @@ -60,7 +60,6 @@ class BaseQuerySet(object): | |||||||
|         self._ordering = None |         self._ordering = None | ||||||
|         self._snapshot = False |         self._snapshot = False | ||||||
|         self._timeout = True |         self._timeout = True | ||||||
|         self._slave_okay = False |  | ||||||
|         self._read_preference = None |         self._read_preference = None | ||||||
|         self._iter = False |         self._iter = False | ||||||
|         self._scalar = [] |         self._scalar = [] | ||||||
| @@ -775,7 +774,6 @@ class BaseQuerySet(object): | |||||||
|             "_ordering", |             "_ordering", | ||||||
|             "_snapshot", |             "_snapshot", | ||||||
|             "_timeout", |             "_timeout", | ||||||
|             "_slave_okay", |  | ||||||
|             "_read_preference", |             "_read_preference", | ||||||
|             "_iter", |             "_iter", | ||||||
|             "_scalar", |             "_scalar", | ||||||
| @@ -1172,20 +1170,6 @@ class BaseQuerySet(object): | |||||||
|         queryset._timeout = enabled |         queryset._timeout = enabled | ||||||
|         return queryset |         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): |     def read_preference(self, read_preference): | ||||||
|         """Change the read_preference when querying. |         """Change the read_preference when querying. | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user