Permalink
Browse files

- Removed the class named ``pyramid.view.static`` that had been depre…

…cated

  since Pyramid 1.1.  Instead use ``pyramid.static.static_view`` with
  ``use_subpath=True`` argument.
  • Loading branch information...
1 parent f9600f6 commit 2c4f4e3cbd1b5b56bb17d2348df3c397efd0a8e4 @mcdonc mcdonc committed Sep 9, 2013
Showing with 4 additions and 45 deletions.
  1. +4 −0 CHANGES.txt
  2. +0 −4 docs/api/view.rst
  3. +0 −18 pyramid/tests/test_view.py
  4. +0 −23 pyramid/view.py
View
@@ -73,6 +73,10 @@ Backwards Incompatibilities
were executed. Rationale: it's more useful to be able to inspect the response
after response callbacks have done their jobs instead of before.
+- Removed the class named ``pyramid.view.static`` that had been deprecated
+ since Pyramid 1.1. Instead use ``pyramid.static.static_view`` with
+ ``use_subpath=True`` argument.
+
1.5a1 (2013-08-30)
==================
View
@@ -25,8 +25,4 @@
.. autoclass:: forbidden_view_config
:members:
- .. autoclass:: static
- :members:
- :inherited-members:
-
View
@@ -673,24 +673,6 @@ def test_is_not_exception_request_exception(self):
result = self._callFUT(context, request)
self.assertEqual(result, 'abc')
-class Test_static(unittest.TestCase):
- def setUp(self):
- from zope.deprecation import __show__
- __show__.off()
-
- def tearDown(self):
- from zope.deprecation import __show__
- __show__.on()
-
- def _makeOne(self, path, package_name):
- from pyramid.view import static
- return static(path, package_name)
-
- def test_it(self):
- path = 'fixtures'
- view = self._makeOne(path, None)
- self.assertEqual(view.docroot, 'fixtures')
-
class Test_view_defaults(unittest.TestCase):
def test_it(self):
from pyramid.view import view_defaults
View
@@ -20,33 +20,10 @@
default_exceptionresponse_view,
)
-from pyramid.path import caller_package
-from pyramid.static import static_view
from pyramid.threadlocal import get_current_registry
_marker = object()
-class static(static_view):
- """ Backwards compatibility alias for
- :class:`pyramid.static.static_view`; it overrides that class' constructor
- to pass ``use_subpath=True`` by default.
-
- .. deprecated:: 1.1
- use :class:`pyramid.static.static_view` instead
- (probably with a ``use_subpath=True`` argument)
- """
- def __init__(self, root_dir, cache_max_age=3600, package_name=None):
- if package_name is None:
- package_name = caller_package().__name__
- static_view.__init__(self, root_dir, cache_max_age=cache_max_age,
- package_name=package_name, use_subpath=True)
-
-deprecated(
- 'static',
- 'The "pyramid.view.static" class is deprecated as of Pyramid 1.1; '
- 'use the "pyramid.static.static_view" class instead with the '
- '"use_subpath" argument set to True.')
-
def render_view_to_response(context, request, name='', secure=True):
""" Call the :term:`view callable` configured with a :term:`view
configuration` that matches the :term:`view name` ``name``

0 comments on commit 2c4f4e3

Please sign in to comment.