Skip to content

ci: replace pkg_resources and retired macos-13 runner - #3

Merged
schloerke merged 2 commits into
mainfrom
schloerke/pr-2-gha-review
Nov 9, 2026
Merged

schloerke merged 2 commits into
mainfrom
schloerke/pr-2-gha-review

Conversation

@schloerke

@schloerke schloerke commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the CI failures seen in gadenbuie/libsass-python#2.

  • sassutils/wsgi.py imported pkg_resources, which newer setuptools no longer ships. Every test job failed at import with ModuleNotFoundError: No module named 'pkg_resources'. It now finds the folder with os.path.dirname(importlib.import_module(name).__file__), which works for both packages and single modules, the same as resource_filename(name, '') did. (importlib.resources.files() was not used because it rejects single modules on Python 3.10.)
  • The main-macos-intel job used macos-13, which GitHub has retired, so the job never started. Switched to macos-15-intel.

- 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
importlib.resources.files() rejects plain modules on py310.
@schloerke
schloerke merged commit b9f6b07 into main Nov 9, 2026
11 checks passed
schloerke added a commit that referenced this pull request Nov 9, 2026
* add macos-intel now that macos-latest is arm64

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/hhatto/autopep8: v2.1.0 → v2.1.1](hhatto/autopep8@v2.1.0...v2.1.1)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/reorder-python-imports: v3.12.0 → v3.13.0](asottile/reorder-python-imports@v3.12.0...v3.13.0)
- [github.com/hhatto/autopep8: v2.1.1 → v2.2.0](hhatto/autopep8@v2.1.1...v2.2.0)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.15.2 → v3.16.0](asottile/pyupgrade@v3.15.2...v3.16.0)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/hhatto/autopep8: v2.2.0 → v2.3.0](hhatto/autopep8@v2.2.0...v2.3.0)
- [github.com/PyCQA/flake8: 7.0.0 → 7.1.0](PyCQA/flake8@7.0.0...7.1.0)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/hhatto/autopep8: v2.3.0 → v2.3.1](hhatto/autopep8@v2.3.0...v2.3.1)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.16.0 → v3.17.0](asottile/pyupgrade@v3.16.0...v3.17.0)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/PyCQA/flake8: 7.1.0 → 7.1.1](PyCQA/flake8@7.1.0...7.1.1)

* remove msvc hack

does not apply on latest setuptools

* disable pypy for now

* py39+

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.6.0...v5.0.0)
- [github.com/asottile/setup-cfg-fmt: v2.5.0 → v2.7.0](asottile/setup-cfg-fmt@v2.5.0...v2.7.0)
- [github.com/asottile/reorder-python-imports: v3.13.0 → v3.14.0](asottile/reorder-python-imports@v3.13.0...v3.14.0)
- [github.com/asottile/pyupgrade: v3.17.0 → v3.18.0](asottile/pyupgrade@v3.17.0...v3.18.0)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.18.0 → v3.19.0](asottile/pyupgrade@v3.18.0...v3.19.0)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.19.0 → v3.19.1](asottile/pyupgrade@v3.19.0...v3.19.1)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/hhatto/autopep8: v2.3.1 → v2.3.2](hhatto/autopep8@v2.3.1...v2.3.2)

* upgrade asottile/workflows

Committed via https://github.com/asottile/all-repos

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/PyCQA/flake8: 7.1.1 → 7.1.2](PyCQA/flake8@7.1.1...7.1.2)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/setup-cfg-fmt: v2.7.0 → v2.8.0](asottile/setup-cfg-fmt@v2.7.0...v2.8.0)
- [github.com/PyCQA/flake8: 7.1.2 → 7.2.0](PyCQA/flake8@7.1.2...7.2.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/reorder-python-imports: v3.14.0 → v3.15.0](asottile/reorder-python-imports@v3.14.0...v3.15.0)
- [github.com/asottile/add-trailing-comma: v3.1.0 → v3.2.0](asottile/add-trailing-comma@v3.1.0...v3.2.0)
- [github.com/asottile/pyupgrade: v3.19.1 → v3.20.0](asottile/pyupgrade@v3.19.1...v3.20.0)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/PyCQA/flake8: 7.2.0 → 7.3.0](PyCQA/flake8@7.2.0...7.3.0)

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](pre-commit/pre-commit-hooks@v5.0.0...v6.0.0)

* py310+

Committed via https://github.com/asottile/all-repos

* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/setup-cfg-fmt: v2.8.0 → v3.1.0](asottile/setup-cfg-fmt@v2.8.0...v3.1.0)
- [github.com/asottile/reorder-python-imports: v3.15.0 → v3.16.0](asottile/reorder-python-imports@v3.15.0...v3.16.0)
- [github.com/asottile/add-trailing-comma: v3.2.0 → v4.0.0](asottile/add-trailing-comma@v3.2.0...v4.0.0)
- [github.com/asottile/pyupgrade: v3.20.0 → v3.21.0](asottile/pyupgrade@v3.20.0...v3.21.0)

* Update README.rst

See sass/sass-site#1483

* ci: replace pkg_resources and retired macos-13 runner (#3)

* 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

* fix: resolve module dirs too, like pkg_resources did

importlib.resources.files() rejects plain modules on py310.

---------

Co-authored-by: Anthony Sottile <asottile@umich.edu>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant