Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
b96a2201
Commit
b96a2201
authored
Jun 12, 2017
by
Xavier Ordoquy
Committed by
GitHub
Jun 12, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5210 from blueyed/DeprecationWarning-stacklevel
Use stacklevel=2 with DeprecationWarnings
parents
3c420cfa
515fe928
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
rest_framework/filters.py
+2
-2
rest_framework/routers.py
+1
-1
No files found.
rest_framework/filters.py
View file @
b96a2201
...
...
@@ -48,7 +48,7 @@ if django_filters:
warnings
.
warn
(
"The built in 'rest_framework.filters.FilterSet' is deprecated. "
"You should use 'django_filters.rest_framework.FilterSet' instead."
,
DeprecationWarning
DeprecationWarning
,
stacklevel
=
2
)
return
super
(
FilterSet
,
self
)
.
__init__
(
*
args
,
**
kwargs
)
...
...
@@ -72,7 +72,7 @@ class DjangoFilterBackend(DFBase):
warnings
.
warn
(
"The built in 'rest_framework.filters.DjangoFilterBackend' is deprecated. "
"You should use 'django_filters.rest_framework.DjangoFilterBackend' instead."
,
DeprecationWarning
DeprecationWarning
,
stacklevel
=
2
)
return
super
(
DjangoFilterBackend
,
cls
)
.
__new__
(
cls
,
*
args
,
**
kwargs
)
...
...
rest_framework/routers.py
View file @
b96a2201
...
...
@@ -333,7 +333,7 @@ class DefaultRouter(SimpleRouter):
warnings
.
warn
(
"Including a schema directly via a router is now deprecated. "
"Use `get_schema_view()` instead."
,
DeprecationWarning
DeprecationWarning
,
stacklevel
=
2
)
if
'schema_renderers'
in
kwargs
:
assert
'schema_title'
in
kwargs
,
'Missing "schema_title" argument.'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment