-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Remove setup_logger
from COMPAT_MODULES
#9668
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
Remove setup_logger
from COMPAT_MODULES
#9668
Conversation
In commit 5a0c458, the deprecated `log.setup_logger` method was removed; however `COMPAT_MODULES` didn't receive the requisite update. The issue doesn't really manifest itself in normal usage of Celery. It was only when using `gc.get_objects()` that it triggered a `repr` in Celery to fail. File "/python3.12/site-packages/celery/local.py", line 121, in __repr__ obj = self._get_current_object() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/python3.12/site-packages/celery/local.py", line 105, in _get_current_object return loc(*self.__args, **self.__kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/python3.12/site-packages/celery/local.py", line 390, in getappattr return current_app._rgetattr(path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/python3.12/site-packages/celery/app/base.py", line 1245, in _rgetattr return attrgetter(path)(self) ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Logging' object has no attribute 'setup_logger'
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9668 +/- ##
=======================================
Coverage 78.30% 78.30%
=======================================
Files 153 153
Lines 19123 19123
Branches 2534 2534
=======================================
Hits 14975 14975
- Misses 3858 3860 +2
+ Partials 290 288 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
What a bug hehe..
Thanks!
Bumps [celery[redis]](https://github.com/celery/celery) from 5.5.1 to 5.5.2. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/celery/celery/releases">celery[redis]'s releases</a>.</em></p> <blockquote> <h2>v5.5.2</h2> <h2>What's Changed</h2> <ul> <li>Fix calculating remaining time across DST changes by <a href="https://github.com/imrivera"><code>@imrivera</code></a> in <a href="https://redirect.github.com/celery/celery/pull/9669">celery/celery#9669</a></li> <li>Remove <code>setup_logger</code> from COMPAT_MODULES by <a href="https://github.com/rconradharris"><code>@rconradharris</code></a> in <a href="https://redirect.github.com/celery/celery/pull/9668">celery/celery#9668</a></li> <li>Fix mongodb bullet and fix github links in contributions section by <a href="https://github.com/jabberwock404"><code>@jabberwock404</code></a> in <a href="https://redirect.github.com/celery/celery/pull/9672">celery/celery#9672</a></li> <li>Prepare for release: v5.5.2 by <a href="https://github.com/Nusnus"><code>@Nusnus</code></a> in <a href="https://redirect.github.com/celery/celery/pull/9675">celery/celery#9675</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/imrivera"><code>@imrivera</code></a> made their first contribution in <a href="https://redirect.github.com/celery/celery/pull/9669">celery/celery#9669</a></li> <li><a href="https://github.com/rconradharris"><code>@rconradharris</code></a> made their first contribution in <a href="https://redirect.github.com/celery/celery/pull/9668">celery/celery#9668</a></li> <li><a href="https://github.com/jabberwock404"><code>@jabberwock404</code></a> made their first contribution in <a href="https://redirect.github.com/celery/celery/pull/9672">celery/celery#9672</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/celery/celery/compare/v5.5.1...v5.5.2">https://github.com/celery/celery/compare/v5.5.1...v5.5.2</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/celery/celery/blob/main/Changelog.rst">celery[redis]'s changelog</a>.</em></p> <blockquote> <h1>5.5.2</h1> <p>:release-date: 2025-04-25 :release-by: Tomer Nosrati</p> <p>What's Changed</p> <pre><code> - Fix calculating remaining time across DST changes ([#9669](celery/celery#9669)) - Remove `setup_logger` from COMPAT_MODULES ([#9668](celery/celery#9668)) - Fix mongodb bullet and fix github links in contributions section ([#9672](celery/celery#9672)) - Prepare for release: v5.5.2 ([#9675](celery/celery#9675)) <p>.. _version-5.5.1: </code></pre></p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/celery/celery/commit/e8adf7f0b4b46a710a96448a9a2f40ace03b4533"><code>e8adf7f</code></a> Prepare for release: v5.5.2 (<a href="https://redirect.github.com/celery/celery/issues/9675">#9675</a>)</li> <li><a href="https://github.com/celery/celery/commit/2287801006accfa0bba5959bfd2143a6825622d7"><code>2287801</code></a> fix mongodb bullet and fix contribution github links (<a href="https://redirect.github.com/celery/celery/issues/9672">#9672</a>)</li> <li><a href="https://github.com/celery/celery/commit/1aabeecea57f63802f49d43b6cbd11fb3c33a5f0"><code>1aabeec</code></a> Remove <code>setup_logger</code> from COMPAT_MODULES (<a href="https://redirect.github.com/celery/celery/issues/9668">#9668</a>)</li> <li><a href="https://github.com/celery/celery/commit/f0c726121468f4368cc6d149a6370900d1b0dbf6"><code>f0c7261</code></a> Fix calculating remaining time across DST changes (<a href="https://redirect.github.com/celery/celery/issues/9669">#9669</a>)</li> <li>See full diff in <a href="https://github.com/celery/celery/compare/v5.5.1...v5.5.2">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
In commit 5a0c458, the deprecated
log.setup_logger
method was removed; howeverCOMPAT_MODULES
didn't receive the requisite update.The issue doesn't really manifest itself in normal usage of Celery. It was only when using
gc.get_objects()
that it triggered arepr
in Celery to fail.Note: Before submitting this pull request, please review our contributing
guidelines.
Description