Fix deprecation in security.py#14537
Merged
Merged
Conversation
Member
|
Should this be marked as ready for review? |
seanbudd
approved these changes
Jan 16, 2023
seanbudd
left a comment
Member
There was a problem hiding this comment.
Thanks for catching all these, LGTM otherwise
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to issue number:
None
Summary of the issue:
When testing for deprecated code, the following message is found when importing something (even not deprecated) from
security.py, e.g.:from utils.security import post_sessionLockStateChanged
Description of user facing changes
No change for users.
For developers, when deprecated functions are not allowed, removed irrelevant log messages, e.g. indicating that
__path__is deprecated.Description of development approach
utils.security.__getattr__in order not to log a debug message for any missing variable in utils.security (e.g.__path__)log.debugwhich did not seem useful in any case.Testing strategy:
Manual tests:
In the code, manually set
_allowDeprecatedAPIto return False and run the following console commands:Known issues with pull request:
None
Change log entries:
Not needed: fixing unreleased changes.
Code Review Checklist: