summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheron Luhn <theron@luhn.com>2025-08-24 22:01:32 -0700
committerTheron Luhn <theron@luhn.com>2025-08-24 22:01:32 -0700
commit73593a0d318121662de1ec56bfa838a390d45f96 (patch)
tree177e39b4c265e5560e9d43175406c0a9dc0ff262
parenteded8c0293b19f5b5f214fca91ba4152d63fce0d (diff)
downloadpyramid-73593a0d318121662de1ec56bfa838a390d45f96.tar.gz
pyramid-73593a0d318121662de1ec56bfa838a390d45f96.tar.bz2
pyramid-73593a0d318121662de1ec56bfa838a390d45f96.zip
Update implementation.
-rw-r--r--src/pyramid/config/views.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/pyramid/config/views.py b/src/pyramid/config/views.py
index fababf542..302704c3e 100644
--- a/src/pyramid/config/views.py
+++ b/src/pyramid/config/views.py
@@ -2338,14 +2338,7 @@ class StaticURLInfo:
pathspec = f'{pkg_name}:{pkg_subpath}{subpath}'
overrides = registry.queryUtility(IPackageOverrides, name=pkg_name)
if overrides is not None:
- resource_name = posixpath.join(pkg_subpath, subpath)
- sources = overrides.filtered_sources(resource_name)
- for source, filtered_path in sources:
- rawspec = source.get_path(filtered_path)
- if hasattr(source, 'pkg_name'):
- rawspec = f'{source.pkg_name}:{rawspec}'
- break
-
+ rawspec = overrides.get_spec(f'{pkg_subpath}{subpath}')
else:
pathspec = pkg_subpath + subpath
@@ -2354,6 +2347,7 @@ class StaticURLInfo:
kw['pathspec'] = pathspec
kw['rawspec'] = rawspec
+ print(kw)
for spec_, cachebust, explicit in reversed(self.cache_busters):
if (explicit and rawspec.startswith(spec_)) or (
not explicit and pathspec.startswith(spec_)