summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert JW Regeer <bertjw@regeer.org>2016-07-05 11:25:00 -0600
committerBert JW Regeer <bertjw@regeer.org>2016-07-05 11:25:00 -0600
commit3e2a692f4ee839d6c17850b51af9501a4d074a03 (patch)
treee3ccce316c0d34cb779c8387ccae86d4f862c6c0
parentbf91270f872594dd586d738b5aebc8b043dcad23 (diff)
downloadpyramid-3e2a692f4ee839d6c17850b51af9501a4d074a03.tar.gz
pyramid-3e2a692f4ee839d6c17850b51af9501a4d074a03.tar.bz2
pyramid-3e2a692f4ee839d6c17850b51af9501a4d074a03.zip
Remove cachebust_match
It was leftover from when this feature was removed in the 1.6 release cycle
-rw-r--r--pyramid/static.py5
-rw-r--r--pyramid/tests/test_static.py8
2 files changed, 1 insertions, 12 deletions
diff --git a/pyramid/static.py b/pyramid/static.py
index 0965be95c..3abcd465c 100644
--- a/pyramid/static.py
+++ b/pyramid/static.py
@@ -83,7 +83,7 @@ class static_view(object):
"""
def __init__(self, root_dir, cache_max_age=3600, package_name=None,
- use_subpath=False, index='index.html', cachebust_match=None):
+ use_subpath=False, index='index.html'):
# package_name is for bw compat; it is preferred to pass in a
# package-relative path as root_dir
# (e.g. ``anotherpackage:foo/static``).
@@ -96,15 +96,12 @@ class static_view(object):
self.docroot = docroot
self.norm_docroot = normcase(normpath(docroot))
self.index = index
- self.cachebust_match = cachebust_match
def __call__(self, context, request):
if self.use_subpath:
path_tuple = request.subpath
else:
path_tuple = traversal_path_info(request.environ['PATH_INFO'])
- if self.cachebust_match:
- path_tuple = self.cachebust_match(path_tuple)
path = _secure_path(path_tuple)
if path is None:
diff --git a/pyramid/tests/test_static.py b/pyramid/tests/test_static.py
index 2ca86bc44..e264652dd 100644
--- a/pyramid/tests/test_static.py
+++ b/pyramid/tests/test_static.py
@@ -113,14 +113,6 @@ class Test_static_view_use_subpath_False(unittest.TestCase):
response = inst(context, request)
self.assertTrue(b'<html>static</html>' in response.body)
- def test_cachebust_match(self):
- inst = self._makeOne('pyramid.tests:fixtures/static')
- inst.cachebust_match = lambda subpath: subpath[1:]
- request = self._makeRequest({'PATH_INFO':'/foo/index.html'})
- context = DummyContext()
- response = inst(context, request)
- self.assertTrue(b'<html>static</html>' in response.body)
-
def test_resource_is_file_with_wsgi_file_wrapper(self):
from pyramid.response import _BLOCK_SIZE
inst = self._makeOne('pyramid.tests:fixtures/static')