From a32fe88f241c660a84a73a9835855cc46b426cd1 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 9 Nov 2026 13:37:17 -0500 Subject: [PATCH 1/2] ci: replace pkg_resources and retired macos-13 runner - sassutils/wsgi.py: use importlib.resources.files instead of pkg_resources.resource_filename (removed from newer setuptools) - main.yml: macos-13 runners are retired; use macos-15-intel --- .github/workflows/main.yml | 2 +- sassutils/wsgi.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index de00b365..fd64b14e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: uses: asottile/workflows/.github/workflows/tox.yml@v1.8.1 with: env: '["py310"]' - os: macos-13 + os: macos-15-intel wheel-tags: true submodules: true main-linux: diff --git a/sassutils/wsgi.py b/sassutils/wsgi.py index d29fa824..9f8243cb 100644 --- a/sassutils/wsgi.py +++ b/sassutils/wsgi.py @@ -3,11 +3,10 @@ """ import collections.abc +import importlib.resources import logging import os.path -from pkg_resources import resource_filename - from .builder import Manifest from sass import CompileError @@ -107,7 +106,7 @@ def __init__( for package_name in self.manifests: if package_name in self.package_dir: continue - path = resource_filename(package_name, '') + path = str(importlib.resources.files(package_name)) self.package_dir[package_name] = path self.paths = [] for package_name, manifest in self.manifests.items(): From 20acc9e8a599ef66ceea7590a579b90870cc5979 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 9 Nov 2026 13:44:44 -0500 Subject: [PATCH 2/2] fix: resolve module dirs too, like pkg_resources did importlib.resources.files() rejects plain modules on py310. --- sassutils/wsgi.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sassutils/wsgi.py b/sassutils/wsgi.py index 9f8243cb..72d3eb13 100644 --- a/sassutils/wsgi.py +++ b/sassutils/wsgi.py @@ -3,7 +3,7 @@ """ import collections.abc -import importlib.resources +import importlib import logging import os.path @@ -106,7 +106,9 @@ def __init__( for package_name in self.manifests: if package_name in self.package_dir: continue - path = str(importlib.resources.files(package_name)) + path = os.path.dirname( + importlib.import_module(package_name).__file__, + ) self.package_dir[package_name] = path self.paths = [] for package_name, manifest in self.manifests.items():