-
Type:
Task
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: BSON, Python Support
-
None
-
Python Drivers
-
Completed
-
None
-
None
-
None
-
None
-
None
-
None
Context
bson/son.py contains three methods that were added for Python 2 compatibility but are no longer needed:
- has_key(key) — Python 2's dict.has_key(), replaced by key in son
- iterkeys() — Python 2's dict.iterkeys(), replaced by iter(son)
- itervalues() — Python 2's dict.itervalues(), replaced by iter(son.values())
Definition of done
Since SON is a public class with documented API, these should be deprecated before removal:
1. Add warnings.warn(..., DeprecationWarning, stacklevel=2) to each method
2. In a later release, remove the methods and their test coverage in test/test_son.py
Pitfalls
N/A