Skip to content

Commit

Permalink
Replace deprecated .warn method with .warning
Browse files Browse the repository at this point in the history
- `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).
  • Loading branch information
lewisemm committed Jan 15, 2024
1 parent 14b6d2c commit cd31b1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pipeline/templatetags/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def render(self, context):
package = self.package_for(package_name, "css")
except PackageNotFound:
w = "Package %r is unknown. Check PIPELINE['STYLESHEETS'] in your settings."
logger.warn(w, package_name)
logger.warning(w, package_name)
# fail silently, do not return anything if an invalid group is specified
return ""
return self.render_compressed(package, package_name, "css")
Expand Down Expand Up @@ -168,7 +168,7 @@ def render(self, context):
package = self.package_for(package_name, "js")
except PackageNotFound:
w = "Package %r is unknown. Check PIPELINE['JAVASCRIPT'] in your settings."
logger.warn(w, package_name)
logger.warning(w, package_name)

Check warning on line 171 in pipeline/templatetags/pipeline.py

View check run for this annotation

Codecov / codecov/patch

pipeline/templatetags/pipeline.py#L171

Added line #L171 was not covered by tests
# fail silently, do not return anything if an invalid group is specified
return ""
return self.render_compressed(package, package_name, "js")
Expand Down

0 comments on commit cd31b1b

Please sign in to comment.