From cd31b1bc69603b30c9e7d58f2ad347be34190978 Mon Sep 17 00:00:00 2001 From: "Lewis M. Kabui" Date: Mon, 15 Jan 2024 16:19:26 +0300 Subject: [PATCH] Replace deprecated .warn method with .warning - `logging.Logger.warn()` has been deprecated since Python 3.3 and will not be available in Python 3.13 as per this pull request (https://github.com/python/cpython/pull/105377). --- pipeline/templatetags/pipeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pipeline/templatetags/pipeline.py b/pipeline/templatetags/pipeline.py index 20c9bb42..5050f067 100644 --- a/pipeline/templatetags/pipeline.py +++ b/pipeline/templatetags/pipeline.py @@ -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") @@ -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) # fail silently, do not return anything if an invalid group is specified return "" return self.render_compressed(package, package_name, "js")