Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use logging.Logger.warning #2058

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Use logging.Logger.warning #2058

merged 1 commit into from
Jul 12, 2024

Conversation

rominf
Copy link
Contributor

@rominf rominf commented Jul 12, 2024

Usage of logging.Logger.warn was deprecated since Python 3.3 and it will be removed in Python 3.13: https://docs.python.org/3.13/whatsnew/3.13.html#logging

There is a pull request (#2052) with similar changes, however merging that PR will likely take time. At the same time, Fedora 41 comes with Python 3.13 and packages kombu. A similar patch can be found in https://src.fedoraproject.org/rpms/python-kombu/pull-request/10. To avoid the need for distro-specific patches (see https://pkgs.org/search/?q=python3.13 for distros that come with Python 3.13), I propose to make this change in this upstream repository.

Unfortunately, I could not find an easy way to prevent issues like this with linters: the current stable version of mypy does not find this issue (mypy installed from master can find this issue though). ruff, proposed in #2055, does not find this issue: astral-sh/ruff#12295.

Usage of `logging.Logger.warn` was deprecated since Python 3.3 and it
will be removed in Python 3.13:
https://docs.python.org/3.13/whatsnew/3.13.html#logging
@Nusnus Nusnus merged commit d4d9012 into celery:main Jul 12, 2024
16 checks passed
@rominf rominf deleted the rominf-warning branch July 12, 2024 17:29
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants