Skip to content

Commit 2018c11

Browse files
authored
Replace deprecated .warn method with .warning (#807)
- `logging.Logger.warn()` has been deprecated since Python 3.3 and will not be available in Python 3.13 as per this pull request (python/cpython#105377). Co-authored-by: Lewis M. Kabui <[email protected]>
1 parent 14b6d2c commit 2018c11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pipeline/templatetags/pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def render(self, context):
132132
package = self.package_for(package_name, "css")
133133
except PackageNotFound:
134134
w = "Package %r is unknown. Check PIPELINE['STYLESHEETS'] in your settings."
135-
logger.warn(w, package_name)
135+
logger.warning(w, package_name)
136136
# fail silently, do not return anything if an invalid group is specified
137137
return ""
138138
return self.render_compressed(package, package_name, "css")
@@ -168,7 +168,7 @@ def render(self, context):
168168
package = self.package_for(package_name, "js")
169169
except PackageNotFound:
170170
w = "Package %r is unknown. Check PIPELINE['JAVASCRIPT'] in your settings."
171-
logger.warn(w, package_name)
171+
logger.warning(w, package_name)
172172
# fail silently, do not return anything if an invalid group is specified
173173
return ""
174174
return self.render_compressed(package, package_name, "js")

0 commit comments

Comments
 (0)