@@ -43,27 +43,23 @@ Warnings can also be changed to errors::
43
43
.. note :: Not all deprecated features raise :exc:`DeprecationWarning` when
44
44
used. See `Removed features with no migration path `_.
45
45
46
- Database
47
- --------
46
+ Removed features with no migration path
47
+ ---------------------------------------
48
48
49
- The " eval" method and SystemJS class are removed
50
- ................................................
49
+ Database. eval, Database.system_js, and SystemJS are removed
50
+ ...........................................................
51
51
52
52
Removed :meth: `~pymongo.database.Database.eval `,
53
53
:data: `~pymongo.database.Database.system_js ` and
54
54
:class: `~pymongo.database.SystemJS `. The eval command was deprecated in
55
- MongoDB 3.0 and removed in MongoDB 4.2.
55
+ MongoDB 3.0 and removed in MongoDB 4.2. There is no replacement for eval with
56
+ MongoDB 4.2+.
56
57
57
- Code like this::
58
+ However, on MongoDB <= 4.0, code like this::
58
59
59
60
>>> result = database.eval('function (x) {return x;}', 3)
60
61
61
- can be changed to this with MongoDB <= 4.0 ::
62
+ can be changed to this::
62
63
63
64
>>> from bson.code import Code
64
65
>>> result = database.command('eval', Code('function (x) {return x;}'), args=[3]).get('retval')
65
-
66
- There is no replacement for eval with MongoDB 4.2+.
67
-
68
- Removed features with no migration path
69
- ---------------------------------------
0 commit comments