From 656e3b3985c1a694b76c76f59eef01380d90ff46 Mon Sep 17 00:00:00 2001 From: Benjamin Locher Date: Thu, 17 Feb 2022 21:34:27 -0500 Subject: [PATCH 1/2] switching to smart_str --- .gitignore | 3 +++ django_inlinecss/templatetags/inlinecss.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index fddc013..37688fa 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,6 @@ venv.bak/ # mypy .mypy_cache/ + +# JetBrains +.idea/ diff --git a/django_inlinecss/templatetags/inlinecss.py b/django_inlinecss/templatetags/inlinecss.py index c778ddf..82b9728 100644 --- a/django_inlinecss/templatetags/inlinecss.py +++ b/django_inlinecss/templatetags/inlinecss.py @@ -4,7 +4,7 @@ from __future__ import unicode_literals from django import template -from django.utils.encoding import smart_text +from django.utils.encoding import smart_str from django_inlinecss import conf @@ -23,7 +23,7 @@ def render(self, context): for expression in self.filter_expressions: path = expression.resolve(context, True) if path is not None: - path = smart_text(path) + path = smart_str(path) css_loader = conf.get_css_loader()() css = ''.join((css, css_loader.load(path))) From 73f6757a436c8b28487c9bef840cebf11ea33c45 Mon Sep 17 00:00:00 2001 From: Benjamin Locher Date: Thu, 17 Feb 2022 21:36:16 -0500 Subject: [PATCH 2/2] bumping python version to 3.10 --- setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index c1ff0c5..87dfc00 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ URL = 'https://github.com/roverdotcom/django-inlinecss' EMAIL = 'philip@rover.com' AUTHOR = 'Philip Kimmey' -REQUIRES_PYTHON = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.7' +REQUIRES_PYTHON = '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <3.11' VERSION = None # What packages are required for this module to be executed? @@ -140,6 +140,10 @@ def run(self): 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Topic :: Communications :: Email', 'Topic :: Text Processing :: Markup :: HTML', ],