Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: Should the bson package be re-added to the project? #5246

Closed
italojohnny opened this issue Dec 13, 2024 · 4 comments
Closed

question: Should the bson package be re-added to the project? #5246

italojohnny opened this issue Dec 13, 2024 · 4 comments
Assignees
Labels
bug Something isn't working question Further information is requested

Comments

@italojohnny
Copy link
Member

Bug Description

Hello team,

While running the unit tests locally, I encountered the following error:

.venv/lib/python3.10/site-packages/astrapy/ids.py:19: in <module>
    from bson.objectid import ObjectId  # noqa: F401
ModuleNotFoundError: No module named 'bson.objectid'

It seems the code still requires the bson package, specifically for bson.objectid.ObjectId. However, I noticed that PR #3924 was created to remove it.

Could you clarify if bson should be re-added as a dependency, or if there’s an alternative approach to address this issue?

Thank you!

Reproduction

make unit_tests

Expected behavior

I hope the unit tests run without errors.

Who can help?

@ogabrielluiz
@jordanrfrazier

Operating System

macos

Langflow Version

1.1.1

Python Version

3.12

Screenshot

Screenshot 2024-12-13 at 10 41 31

Flow File

No response

@italojohnny italojohnny added bug Something isn't working question Further information is requested labels Dec 13, 2024
@ogabrielluiz
Copy link
Contributor

I think so. I'd expect it to be installed if it is a dependency of Astrapy's.

@jordanrfrazier
Copy link
Collaborator

bson should be installed via pymongo, and it is explicitly recommended to not install bson from pypi:

Do not install the “bson” package from pypi. PyMongo comes with its own bson package; doing “pip install bson” or “easy_install bson” installs a third-party package that is incompatible with PyMongo.

https://pymongo.readthedocs.io/en/stable/installation.html

Maybe the import change I made is incorrect, let me check

@jordanrfrazier
Copy link
Collaborator

astrapy removed bson in favor of pymongo about four months ago - datastax/astrapy#297

@italojohnny
Copy link
Member Author

The issue does not occur on the latest main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants