-
Notifications
You must be signed in to change notification settings - Fork 2
Test 'exclude_from_schema' deprecation warning message #1
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
Test 'exclude_from_schema' deprecation warning message #1
Conversation
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.
Yep. Great.
rest_framework/schemas/generators.py
Outdated
fmt = ("{}. The `APIView.exclude_from_schema` is pending deprecation. " | ||
"Set `schema = None` instead") | ||
fmt = ("The `APIView.exclude_from_schema` is pending deprecation. " | ||
"Set `schema = None` instead in `{}`.") |
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.
Just before I merge this...
I put the class name first so it would be more obvious in the console.
Last it could be all the way ..................................................................................................................................................................................................................over here.
What do you think?
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.
@rpkilby PING 🙂
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.
That's fair. Maybe APIView.exclude_from_schema
=> ClassName.exclude_from_schema
?
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.
I mostly made the change b/c the class name on its own read a little oddly.
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.
OK. Do that and we'll go. 👍
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.
Updated.
6bb3f25
to
492bb3d
Compare
* Add tests for schema exclusions * Move exclusion check to should_include_endpoint * Update docs * Switch to using `schema = None` * Test PendingDeprecationWarnings * Add note to release notes. * s/deprecated/pending deprecation/ * Add PR link to release notes * Correct typo in test class name * Test 'exclude_from_schema' deprecation warning message (#1) * Correct deprecation warning message
Hi @carltongibson - was just trying to recreate the noise from the deprecation warnings on my machine. In the process, also added assertions for the msg.