-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
None
-
Affects Version/s: 3.7.2
-
Component/s: None
-
None
-
Environment:All
Upon installation of the package the 'bson' namespace is taken up.
I see there is a small warning hidden in the README to cover this scenario:
Do not install the "bson" package from pypi. PyMongo comes with its own bson package; doing "easy_install bson" installs a third-party package that is incompatible with PyMongo.
However it's not sufficient protection as since both are popular packages the change of both being installed is very high. I myself wasted a few hours figuring out this issue was breaking several projects I'm working on.
Possible solutions:
- Within the https://github.com/mongodb/mongo-python-driver/ repository. Rename the 'bson' package to 'pymongo_bson' or something else.
- Move the 'bson' package to within the 'pymongo' package and import bson components using absolute relative imports (e.g. 'from .bson import something')
- is duplicated by
-
PYTHON-3642 pymongo bundles bson as a non-package and stops bson installed as a package
- Closed
- is related to
-
PYTHON-4582 Reach out to bson pypi maintainers with offer of takeover
- Backlog