Skip to content

Conversation

@cjwatson
Copy link
Contributor

Description

mongodb/mongo-python-driver#2413 caused some test regressions here. This isn't currently a problem for the upstream test suite since it pins pymongo==4.10.1 via kombu, but we're running into it in Debian where we've already upgraded pymongo for other reasons. kombu already tried to upgrade pymongo but had to revert due to these test regressions (see celery/kombu#2384 and #9938).

One of the test fixes (relating to mongodb_backend_settings) illustrates an incompatibility where I couldn't figure out a reasonable way to avoid passing it through to Celery users, so I added a note to the documentation about it. It may also be worth including a brief mention of it in the release notes. Using the canonical case for the option in question should work with both old and new versions of pymongo.

@cjwatson
Copy link
Contributor Author

Ugh, I thought this would work with both old and new versions but CI clearly disagrees. Let me see if I can improve this ...

@cjwatson cjwatson force-pushed the pymongo-4.14-compat branch from a73ee00 to e9c9cd2 Compare October 27, 2025 13:42
@codecov
Copy link

codecov bot commented Oct 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.68%. Comparing base (0a45509) to head (1639c69).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9968   +/-   ##
=======================================
  Coverage   78.68%   78.68%           
=======================================
  Files         153      153           
  Lines       19313    19313           
  Branches     2214     2214           
=======================================
+ Hits        15196    15197    +1     
  Misses       3817     3817           
+ Partials      300      299    -1     
Flag Coverage Δ
unittests 78.66% <ø> (+<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 force-pushed the pymongo-4.14-compat branch from e9c9cd2 to c3336a4 Compare October 27, 2025 14:18
mongodb/mongo-python-driver#2413 caused some
test regressions here.  This isn't currently a problem for the upstream
test suite since it pins pymongo==4.10.1 via kombu, but we're running
into it in Debian where we've already upgraded pymongo for other
reasons.  kombu already tried to upgrade pymongo but had to revert due
to these test regressions (see celery/kombu#2384
and celery#9938).

One of the test fixes (relating to `mongodb_backend_settings`)
illustrates an incompatibility where I couldn't figure out a reasonable
way to avoid passing it through to Celery users, so I added a note to
the documentation about it.  It may also be worth including a brief
mention of it in the release notes.  Using the canonical case for the
option in question should work with both old and new versions of
pymongo.
@cjwatson cjwatson force-pushed the pymongo-4.14-compat branch from c3336a4 to 34ace3c Compare October 27, 2025 14:44
@cjwatson
Copy link
Contributor Author

This isn't quite as clean as my original version, but I've checked that it works with both old and new versions of pymongo.

@auvipy auvipy self-requested a review October 27, 2025 16:30
@auvipy auvipy added this to the 5.6.x milestone Oct 27, 2025
@auvipy
Copy link
Member

auvipy commented Oct 27, 2025

we cam upgrade pymongo version in kombu as well

@cjwatson
Copy link
Contributor Author

Certainly, though I guess that would be after something like this lands in celery.

@auvipy
Copy link
Member

auvipy commented Oct 28, 2025

yes

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 also incorporate changes from this pr #9665

@cjwatson
Copy link
Contributor Author

can you also incorporate changes from this pr #9665

I mean, I suppose, but why? That PR affects exactly one pymongo version, namely 4.12.0, as the pymongo bug that it's working around was fixed in 4.12.1; so it's completely disjoint with the versions that I'm dealing with in this PR. Why not just merge the two PRs separately?

@auvipy
Copy link
Member

auvipy commented Oct 28, 2025

OK sure.

@auvipy auvipy modified the milestones: 5.6.x, 5.6.0 Oct 28, 2025
@auvipy auvipy merged commit 47b7b50 into celery:main Oct 28, 2025
107 checks passed
@cjwatson cjwatson deleted the pymongo-4.14-compat branch October 28, 2025 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants