-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add support pymongo 4.12 #9665
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
Add support pymongo 4.12 #9665
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9665 +/- ##
=======================================
Coverage 78.68% 78.68%
=======================================
Files 153 153
Lines 19312 19313 +1
Branches 2214 2214
=======================================
+ Hits 15195 15197 +2
Misses 3817 3817
+ Partials 300 299 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
324bfb7 to
ee27d0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please pin your dependencies with exact version of celery? the latest version should drop python 3.8 support if I am not wrong. we should wait before moving with this.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the latest version should drop python 3.8 support if I am not wrong. we should wait before moving with this.
This change appears to fix a semantic issue. Why should we wait with it?
ee27d0f to
f32957b
Compare
because it is relevant only when we upgrade to pymongo 4.12 After update from pymongo 4.11.3 to 4.12.0 catch error: |
232b980 to
7bbddd1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a compatibility issue with pymongo 4.12.0 by adjusting how the uri_parser module is imported. In pymongo 4.12.0, the uri_parser is no longer accessible as a submodule of the main pymongo package due to internal refactoring.
- Updates import strategy to directly import
uri_parserfrompymongo - Changes usage from
pymongo.uri_parser.parse_uri()touri_parser.parse_uri()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Description
Fixed problem with import
uri_parseruse pymongo 4.12.0.Tested on pymongo 4.11.3 and 4.12.0
After update from pymongo 4.11.3 to 4.12.0 catch error:
Unrecoverable error: "AttributeError(\"module 'pymongo' has no attribute 'uri_parser'\")"Environment:
python = 3.13.3
celery = 5.5.1
pymongo = 4.12.0
Poetry dependencies
In pymongo 4.12.0 done refactoring in pymongo/uri_parser.py and current usage like
pymongo.uri_parser.parse_urino longer possible.Change diff:
mongodb/mongo-python-driver@eea8a37#diff-94ba1ecd40164fbb00e68b591c84061cce84aecb227ab3ed247f00d888f289b0