8000 Add support pymongo 4.12 by kidoz · Pull Request #9665 · celery/celery · GitHub
[go: up one dir, main page]

Skip to content

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

kidoz
Copy link
Contributor
@kidoz kidoz commented Apr 13, 2025

Description

Fixed problem with import uri_parser use 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_uri no longer possible.

Change diff:
mongodb/mongo-python-driver@eea8a37#diff-94ba1ecd40164fbb00e68b591c84061cce84aecb227ab3ed247f00d888f289b0

Copy link
codecov bot commented Apr 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.61%. Comparing base (db72f70) to head (49f496b).

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9665      +/-   ##
==========================================
- Coverage   78.62%   78.61%   -0.01%     
==========================================
  Files         153      153              
  Lines       19199    19200       +1     
  Branches     2547     2547              
==========================================
  Hits        15095    15095              
  Misses       3811     3811              
- Partials      293      294       +1     
Flag Coverage Δ
unittests 78.59% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Nusnus Nusnus self-requested a review April 13, 2025 22:40
@kidoz kidoz changed the title Add support pymongo 3.12 Add support pymongo 4.12 Apr 14, 2025
@kidoz kidoz force-pushed the bugfix/pymongo-4.12-support branch from 324bfb7 to ee27d0f Compare April 14, 2025 11:55
Copy link
Member
@auvipy auvipy left a 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.

@kidoz
Copy link
Contributor Author
kidoz commented Apr 16, 2025

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.

Add Poetry dependencies

Copy link
Member
@Nusnus Nusnus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@auvipy

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?

@Nusnus Nusnus force-pushed the bugfix/pymongo-4.12-support branch from ee27d0f to f32957b Compare April 18, 2025 01:01
@auvipy
Copy link
Member
auvipy commented Apr 24, 2025

@auvipy

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?

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:
Unrecoverable error: "AttributeError("module 'pymongo' has no attribute 'uri_parser'")"

@Nusnus Nusnus force-pushed the bugfix/pymongo-4.12-support branch from 232b980 to 7bbddd1 Compare May 31, 2025 16:42
@Nusnus Nusnus marked this pull request as draft July 9, 2025 18:42
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.

3 participants
0