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

fix bson so MongoDB and AstraDB dependencies are compatible #3049

Closed
MthwRobinson opened this issue May 17, 2024 · 0 comments · Fixed by #3104
Closed

fix bson so MongoDB and AstraDB dependencies are compatible #3049

MthwRobinson opened this issue May 17, 2024 · 0 comments · Fixed by #3104
Labels
packaging Issues with building and installing `unstructured`

Comments

@MthwRobinson
Copy link
Contributor

Mongo ingest jobs like this one are failing because pymongo ships with its own version of bson, and install bson from pip breaks pymongo, as documented by MongoDB here. bson is a dependency of AstraDB, as seen in the Astra requirements file. The goal of this issue is to figure out a way to make these two sets of dependencies compatible, then reenable the MongoDB tests in test-ingest-src.sh and test-ingest-dest.sh

@MthwRobinson MthwRobinson added the packaging Issues with building and installing `unstructured` label May 17, 2024
github-merge-queue bot pushed a commit that referenced this issue May 19, 2024
### Summary

Closes #2959. Updates the dependency and CI to add support for Python
3.12.

The MongoDB ingest tests were disabled due to jobs like [this
one](https://github.com/Unstructured-IO/unstructured/actions/runs/9133383127/job/25116767333)
failing due to issues with the `bson` package. `bson` is a dependency
for the AstraDB connector, but `pymongo` does not work when `bson` is
installed from `pip`. This issue is documented by MongoDB
[here](https://pymongo.readthedocs.io/en/stable/installation.html). Spun
off #3049 to resolve this. Issue seems unrelated to Python 3.12, though
unsure why this didn't surface previously.

Disables the `argilla` tests because `argilla` does not yet support
Python 3.12. We can add the `argilla` tests back in once the PR
references below is merged. You can still use the `stage_for_argilla`
function if you're on `python<3.12` and you install `argilla` yourself.
- argilla-io/argilla#4837

---------

Co-authored-by: Nicolò Boschi <boschi1997@gmail.com>
github-merge-queue bot pushed a commit that referenced this issue May 28, 2024
### Summary

Closes #3049. Reenables the MongoDB connector test, which was disabled
previously in #3047 due to incompatibility between the `pymongo` and the
`bson` package from `pip`, which is a dependency for the Astra
connector. Per the `pymongo` docs below, `pymongo` ships with its own
version of `bson` and installing `bson` from `pip` breaks `pymongo`.

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

### Testing

Ingest tests ran successfully for the [source
connector](https://github.com/Unstructured-IO/unstructured/actions/runs/9273154676/job/25512636315)
and the [destination
connector](https://github.com/Unstructured-IO/unstructured/actions/runs/9273154676/job/25512635546).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
packaging Issues with building and installing `unstructured`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant