-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Collection.__getitem__ is supposed to only support string names, like this:
>>> coll = client.db.coll >>> coll.name 'coll' >>> coll["foo"].name 'coll.foo'
However in PYTHON-3084 we discovered that it accidentally supports non-string names as well:
>>> coll[0].name 'coll.0' >>> coll[{}].name 'coll.{}'
We should deprecate remove this behavior in PyMongo 5.0.
- depends on
-
PYTHON-3196 Deprecate non-string collection names in Collection.__getitem__
- Backlog
- related to
-
PYTHON-3084 Collection is defined like Iterable but actually isn’t
- Closed