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

v0.8.3: PyMongo 4+ #46

Closed
wants to merge 9 commits into from
Closed

v0.8.3: PyMongo 4+ #46

wants to merge 9 commits into from

Conversation

jkassemi
Copy link

@jkassemi jkassemi commented Jan 2, 2025

Ports from upstream mongoengine and minor independent changes to support pymongo 4.

We worked through the migration guide to determine potential issues. Where possible we ported the solution adopted by the upstream mongoengine project. Maintains backwards compatibility.

We now require pymongo>=3.13.

Additionally:

  1. Transitioned CI to GitHub Actions (given issues with the expanded test matrix configuration)
  2. Transitioned to pytest from nose (given ...)
  3. Coverage reports were consulted to bolster key areas that were lacking
  4. Updated the benchmarks
  5. Addressed a bug with hint, limit, skip, and batch_size persistence on cursors that would impact services during upgrade

My sincere apologies for the size of this commit; there wasn't a clear candidate for release until this point. Commits are structured to provide a sense of order to this work.

@jkassemi jkassemi force-pushed the jk-pymongo-upgrade branch 2 times, most recently from 4902beb to abad703 Compare January 2, 2025 22:29
@jkassemi jkassemi changed the title MongoDB support 5.x (<= 5.0.23) exploration MongoDB support 5.x (<= 5.0.23) Jan 2, 2025
@jkassemi jkassemi force-pushed the jk-pymongo-upgrade branch 3 times, most recently from a9026fe to e284090 Compare January 7, 2025 17:44
@jkassemi jkassemi changed the title MongoDB support 5.x (<= 5.0.23) MongoDB <= 7.0.16, python <= 3.13.1 support Jan 7, 2025
@jkassemi jkassemi force-pushed the jk-pymongo-upgrade branch 2 times, most recently from c6d3b6e to d3cd0f3 Compare January 9, 2025 17:10
@jkassemi jkassemi changed the title MongoDB <= 7.0.16, python <= 3.13.1 support pymongo 4+ support Jan 9, 2025
@jkassemi jkassemi force-pushed the jk-pymongo-upgrade branch from d3cd0f3 to 918331c Compare January 9, 2025 17:20
@jkassemi jkassemi changed the title pymongo 4+ support version 0.8.3: PyMongo 4+ Jan 9, 2025
@jkassemi jkassemi changed the title version 0.8.3: PyMongo 4+ v0.8.3: PyMongo 4+ Jan 9, 2025
@jkassemi jkassemi force-pushed the jk-pymongo-upgrade branch 3 times, most recently from a47fad2 to 3bbbf29 Compare January 9, 2025 21:31
Ports fixes from upstream to account for the simpler changes in the migration
guide (https://pymongo.readthedocs.io/en/stable/migrate-to-pymongo4.html):

* mongodb_support from upstream me
* pymongo_support from upstream me
* deprecate collection_names in favour of list_collection_names
* uuid representation defaults to pythonLegacy
* deprecate MongoReplicaSetClient
* use profile command instead of Database.set_profiling_level
* use count_documents instead of cursor.count
* use find_one_and_update instead of find_and_modify
* use command instead of createUser and query
* use update_one instead of collection.update
Evaluated coverage and porting tests from upstream where we lacked
coverage.
* Simple repo link fix
* Updated benchmarks
@wojcikstefan
Copy link
Member

Before working on any upgrades, we need to make sure that the current setup is up-to-date and that the test suite is passing. Only then we we will truly know what needed fixing because of the upgraded PyMongo and what needed fixing because this package was poorly maintained to begin with.

Let's ship these PRs first and then work on this PR:

@jkassemi jkassemi closed this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants