Skip to content
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

fix: Replace deprecated .warn method with .warning #34057

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

lewisemm
Copy link
Contributor

Description

This PR replaces the use of logging.Logger.warn with logging.Logger.warning, which is the preferred and recommended way to log warnings. This will eliminate the deprecation warnings that are generated after test runs.

In addition to that, the deprecated logging.Logger.warn is due to be removed all together in Python 3.13. See python/cpython#105377

Supporting information

Fixes openedx/public-engineering#149

Testing instructions

Please provide detailed step-by-step instructions for testing this change.

Deadline

"None" if there's no rush, or provide a specific date or event (and reason) if there is one.

Other information

Include anything else that will help reviewers and consumers understand the change.

  • Does this change depend on other changes elsewhere?
  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
  • If your database migration can't be rolled back easily.

The `logging.Logger.warn` method has been deprecated since Python 3.3
and is due to be removed all together in Python 3.13. See
python/cpython#105377

`logging.Logger.warning` is the preferred and recommended way to log
warnings.

Fixes openedx/public-engineering#149
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jan 15, 2024
@openedx-webhooks
Copy link

Thanks for the pull request, @lewisemm! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@UsamaSadiq UsamaSadiq merged commit 780e908 into openedx:master Jan 16, 2024
64 checks passed
@openedx-webhooks
Copy link

@lewisemm 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Deprecation Warning]: The 'warn' method is deprecated, use 'warning' instead
4 participants