From 01eac92dcdbe0d51b75783350997e69a7613da9e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 24 Feb 2012 15:15:18 -0500 Subject: docs-deprecate tmpl_context --- CHANGES.txt | 11 +++++++++++ docs/api/request.rst | 4 ---- docs/narr/webob.rst | 4 ++-- docs/whatsnew-1.3.rst | 8 ++++++++ 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d07d49f8b..249e7fcfc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,17 @@ Bug Fixes Configurator was an old-style ``pyramid.configuration.Configurator`` instance. +Deprecations +------------ + +- All references to the ``tmpl_context`` request variable were removed from + the docs. Its existence in Pyramid is confusing for people who were never + Pylons users. It was added as a porting convenience for Pylons users in + Pyramid 1.0, but it never caught on because the Pyramid rendering system is + a lot different than Pylons' was, and alternate ways exist to do what it + was designed to offer in Pylons. It will continue to exist "forever" but + it will not be recommended or mentioned in the docs. + 1.3a9 (2012-02-22) ================== diff --git a/docs/api/request.rst b/docs/api/request.rst index e1b233fbc..1112ea069 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -145,10 +145,6 @@ ``request.session`` attribute will cause a :class:`pyramid.exceptions.ConfigurationError` to be raised. - .. attribute:: tmpl_context - - The template context for Pylons-style applications. - .. attribute:: matchdict If a :term:`route` has matched during this request, this attribute will diff --git a/docs/narr/webob.rst b/docs/narr/webob.rst index 21c368350..a8c11acec 100644 --- a/docs/narr/webob.rst +++ b/docs/narr/webob.rst @@ -117,8 +117,8 @@ Special Attributes Added to the Request by :app:`Pyramid` In addition to the standard :term:`WebOb` attributes, :app:`Pyramid` adds special attributes to every request: ``context``, ``registry``, ``root``, ``subpath``, ``traversed``, ``view_name``, ``virtual_root``, -``virtual_root_path``, ``session``, and ``tmpl_context``, ``matchdict``, and -``matched_route``. These attributes are documented further within the +``virtual_root_path``, ``session``, ``matchdict``, and ``matched_route``. +These attributes are documented further within the :class:`pyramid.request.Request` API documentation. .. index:: diff --git a/docs/whatsnew-1.3.rst b/docs/whatsnew-1.3.rst index daa1ffdec..ac01bb140 100644 --- a/docs/whatsnew-1.3.rst +++ b/docs/whatsnew-1.3.rst @@ -476,6 +476,14 @@ Deprecations Configurator were removed from the documentation. They have been deprecated since Pyramid 1.1. +- All references to the ``tmpl_context`` request variable were removed from + the docs. Its existence in Pyramid is confusing for people who were never + Pylons users. It was added as a porting convenience for Pylons users in + Pyramid 1.0, but it never caught on because the Pyramid rendering system is + a lot different than Pylons' was, and alternate ways exist to do what it + was designed to offer in Pylons. It will continue to exist "forever" but + it will not be recommended or mentioned in the docs. + Documentation Enhancements -------------------------- -- cgit v1.2.3 From f077a0de559a4df2a1efb5867a22eb33fc69407a Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 24 Feb 2012 15:17:40 -0500 Subject: add warning --- pyramid/request.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyramid/request.py b/pyramid/request.py index c15ed7d8e..af1dfee2b 100644 --- a/pyramid/request.py +++ b/pyramid/request.py @@ -330,7 +330,8 @@ class Request(BaseRequest, DeprecatedRequestMethodsMixin, URLMethodsMixin, @reify def tmpl_context(self): - """ Template context (for Pylons apps) """ + # docs-deprecated template context for Pylons-like apps; do not + # remove. return TemplateContext() @reify -- cgit v1.2.3 From 1b7342f994abeb94a63b571a2a397cb2328eed98 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 26 Feb 2012 05:22:02 -0500 Subject: - Pyramid authorization policies did not show up in the introspector. --- CHANGES.txt | 2 ++ pyramid/config/security.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 249e7fcfc..fb2f4486a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -8,6 +8,8 @@ Bug Fixes Configurator was an old-style ``pyramid.configuration.Configurator`` instance. +- Pyramid authorization policies did not show up in the introspector. + Deprecations ------------ diff --git a/pyramid/config/security.py b/pyramid/config/security.py index a0ea173ba..e8ef1518d 100644 --- a/pyramid/config/security.py +++ b/pyramid/config/security.py @@ -73,7 +73,8 @@ class SecurityConfiguratorMixin(object): intr['policy'] = policy # authorization policy used by view config (phase 3) and # authentication policy (phase 2) - self.action(IAuthorizationPolicy, register, order=PHASE1_CONFIG) + self.action(IAuthorizationPolicy, register, order=PHASE1_CONFIG, + introspectables=(intr,)) self.action(None, ensure) def _set_authorization_policy(self, policy): -- cgit v1.2.3 From 81c63fee1dae8dcf12b5063f93faf0eeed54659c Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 26 Feb 2012 13:36:14 -0500 Subject: make latex render again --- docs/narr/urldispatch.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index 7c0b437c1..f036ce94e 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -785,12 +785,6 @@ already end in a slash, and if the value of ``PATH_INFO`` *plus* a slash matches any route's pattern. In this case it does an HTTP redirect to the slash-appended ``PATH_INFO``. -To configure the slash-appending not found view in your application, change -the application's startup configuration, adding the following stanza: - -.. code-block:: python - :linenos: - Let's use an example. If the following routes are configured in your application: -- cgit v1.2.3