-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
-
Minor Change
Two problems...
1. There is no way to encode Code with explicit empty scope to BSON type 0x0F. Code with explicit empty scope (Code("", {})) is always stored as BSON type 0x0D.
2. json_util always exports Code with $scope.
The solution is probably to set bson.code.Code.__scope to None when Code was created without an explicit scope, then have the bson encoder and json_util treat None and {} separately. Also add a warning in the changelog, since bson.code.Code.scope currently always returns a dict.
- is depended on by
-
PYTHON-1106 Implement BSON corpus test suite
- Closed