Skip to content

use AssetResolver internally#3750

Open
mmerickel wants to merge 2 commits into
mainfrom
moar-asset-resolver
Open

use AssetResolver internally#3750
mmerickel wants to merge 2 commits into
mainfrom
moar-asset-resolver

Conversation

@mmerickel

@mmerickel mmerickel commented Feb 7, 2024

Copy link
Copy Markdown
Member
  • abspath_from_asset_spec no longer uses pkg_resources directly
  • ManifestCacheBuster now uses AssetResolver instead of pkg_resources directly
  • rewrite static_view to use asset resolver

Changing the static_view is bw-incompat, and I'm not there yet with it being a good idea. I think it is - but hey.

The issue with AssetResolver in general is that it tries to import the package. This is bw-incompat. On previous versions, you could add_static_view('does_not_exist:', 'static') and it would work. You could then config.override_asset(to_override='does_not_exist:', override_with='something_that_exists:'). This change requires the initial does_not_exist package to be importable no matter what.

wosc pushed a commit to ZeitOnline/pyramid that referenced this pull request Dec 5, 2025
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