Skip to content

Use warnings.warn instead of logger.warning for deprecation notices#1593

Open
ArnavBalyan wants to merge 1 commit into
apache:mainfrom
ArnavBalyan:arnavb/deprecation-warnings
Open

Use warnings.warn instead of logger.warning for deprecation notices#1593
ArnavBalyan wants to merge 1 commit into
apache:mainfrom
ArnavBalyan:arnavb/deprecation-warnings

Conversation

@ArnavBalyan
Copy link
Copy Markdown
Member

Changes

  • logger.warning does not fire in most CI/applications unless the app configures it.
  • warnings.warn is visible by default to pytest and python -W
  • Switch to warnings to so deprecation notices can reach users/CI tests.

How I tested this

  • N/A

Notes

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

@ArnavBalyan
Copy link
Copy Markdown
Member Author

cc @skrawcz

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.

1 participant