diff options
| -rw-r--r-- | docs/api/request.rst | 4 | ||||
| -rw-r--r-- | docs/narr/environment.rst | 3 | ||||
| -rw-r--r-- | docs/narr/extending.rst | 2 | ||||
| -rw-r--r-- | docs/narr/sessions.rst | 2 | ||||
| -rw-r--r-- | docs/narr/urldispatch.rst | 9 | ||||
| -rw-r--r-- | pyramid/path.py | 42 | ||||
| -rw-r--r-- | pyramid/session.py | 12 | ||||
| -rw-r--r-- | pyramid/url.py | 5 |
8 files changed, 36 insertions, 43 deletions
diff --git a/docs/api/request.rst b/docs/api/request.rst index e4034c635..9f1f71b31 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -163,9 +163,7 @@ .. method:: invoke_subrequest(request, use_tweens=False) - .. warning:: - - This API was added in Pyramid 1.4a1. + .. versionadded:: 1.4a1 Obtain a response object from the Pyramid application based on information in the ``request`` object provided. The ``request`` object diff --git a/docs/narr/environment.rst b/docs/narr/environment.rst index 8206e0bcb..def5e12a4 100644 --- a/docs/narr/environment.rst +++ b/docs/narr/environment.rst @@ -504,12 +504,13 @@ default, this is ``false``. Mako Preprocessor ~~~~~~~~~~~~~~~~~ +.. versionadded:: 1.1 + A callable (or a :term:`dotted Python name` which names a callable) which is called to preprocess the source before the template is called. The callable will be passed the full template source before it is parsed. The return result of the callable will be used as the template source code. -.. note:: This feature is new in Pyramid 1.1. +-----------------------------+ | Config File Setting Name | diff --git a/docs/narr/extending.rst b/docs/narr/extending.rst index c464203f0..dd9281c73 100644 --- a/docs/narr/extending.rst +++ b/docs/narr/extending.rst @@ -84,7 +84,7 @@ function in your application's ``__init__.py``. For example, rather than: config.add_view('myapp.views.view1', name='view1') config.add_view('myapp.views.view2', name='view2') -You should do move the calls to ``add_view`` outside of the (non-reusable) +You should move the calls to ``add_view`` outside of the (non-reusable) ``if __name__ == '__main__'`` block, and into a reusable function: .. code-block:: python diff --git a/docs/narr/sessions.rst b/docs/narr/sessions.rst index f7da7838e..fa4affd8a 100644 --- a/docs/narr/sessions.rst +++ b/docs/narr/sessions.rst @@ -29,7 +29,7 @@ during your :app:`Pyramid` configuration. A very basic, insecure sample session factory implementation is provided in the :app:`Pyramid` core. It uses a cookie to store session information. This implementation has the following -limitation: +limitations: - The session information in the cookies used by this implementation is *not* encrypted, so it can be viewed by anyone with access to the diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index ec97bf3b2..749a2d49a 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -758,11 +758,8 @@ other non-``name`` and non-``pattern`` arguments to exception to this rule is use of the ``pregenerator`` argument, which is not ignored when ``static`` is ``True``. -.. note:: - - the ``static`` argument to - :meth:`~pyramid.config.Configurator.add_route` is new as of :app:`Pyramid` - 1.1. +.. versionadded:: 1.1 + the ``static`` argument to :meth:`~pyramid.config.Configurator.add_route` .. index:: single: redirecting to slash-appended routes @@ -906,7 +903,7 @@ routes configured in your application; for more information, see Using a Route Prefix to Compose Applications -------------------------------------------- -.. note:: This feature is new as of :app:`Pyramid` 1.2. +.. versionadded:: 1.2 The :meth:`pyramid.config.Configurator.include` method allows configuration statements to be included from separate files. See diff --git a/pyramid/path.py b/pyramid/path.py index e9c63a365..57eccdb19 100644 --- a/pyramid/path.py +++ b/pyramid/path.py @@ -114,7 +114,7 @@ class AssetResolver(Resolver): """ A class used to resolve an :term:`asset specification` to an :term:`asset descriptor`. - .. note:: This API is new as of Pyramid 1.3. + .. versionadded:: 1.3 The constructor accepts a single argument named ``package`` which may be any of: @@ -133,20 +133,19 @@ class AssetResolver(Resolver): to the :meth:`~pyramid.path.AssetResolver.resolve` method. An asset specification without a colon in it is treated as relative. - If the value ``None`` is supplied as the ``package``, the resolver will + If ``package`` is ``None``, the resolver will only be able to resolve fully qualified (not relative) asset specifications. Any attempt to resolve a relative asset specification - when the ``package`` is ``None`` will result in an :exc:`ValueError` - exception. + will result in an :exc:`ValueError` exception. - If the value :attr:`pyramid.path.CALLER_PACKAGE` is supplied as the - ``package``, the resolver will treat relative asset specifications as + If ``package`` is :attr:`pyramid.path.CALLER_PACKAGE`, + the resolver will treat relative asset specifications as relative to the caller of the :meth:`~pyramid.path.AssetResolver.resolve` method. - If a *module* or *module name* (as opposed to a package or package name) - is supplied as ``package``, its containing package is computed and this - package used to derive the package name (all names are resolved relative + If ``package`` is a *module* or *module name* (as opposed to a package or + package name), its containing package is computed and this + package is used to derive the package name (all names are resolved relative to packages, never to modules). For example, if the ``package`` argument to this type was passed the string ``xml.dom.expatbuilder``, and ``template.pt`` is supplied to the @@ -154,8 +153,8 @@ class AssetResolver(Resolver): asset spec would be ``xml.minidom:template.pt``, because ``xml.dom.expatbuilder`` is a module object, not a package object. - If a *package* or *package name* (as opposed to a module or module name) - is supplied as ``package``, this package will be used to compute relative + If ``package`` is a *package* or *package name* (as opposed to a module or + module name), this package will be used to compute relative asset specifications. For example, if the ``package`` argument to this type was passed the string ``xml.dom``, and ``template.pt`` is supplied to the :meth:`~pyramid.path.AssetResolver.resolve` method, the resulting @@ -209,7 +208,7 @@ class DottedNameResolver(Resolver): """ A class used to resolve a :term:`dotted Python name` to a package or module object. - .. note:: This API is new as of Pyramid 1.3. + .. versionadded:: 1.3 The constructor accepts a single argument named ``package`` which may be any of: @@ -229,18 +228,17 @@ class DottedNameResolver(Resolver): which has a ``.`` (dot) or ``:`` (colon) as its first character is treated as relative. - If the value ``None`` is supplied as the ``package``, the resolver will - only be able to resolve fully qualified (not relative) names. Any - attempt to resolve a relative name when the ``package`` is ``None`` will - result in an :exc:`ValueError` exception. + If ``package`` is ``None``, the resolver will only be able to resolve + fully qualified (not relative) names. Any attempt to resolve a + relative name will result in an :exc:`ValueError` exception. - If the value :attr:`pyramid.path.CALLER_PACKAGE` is supplied as the - ``package``, the resolver will treat relative dotted names as relative to + If ``package`` is :attr:`pyramid.path.CALLER_PACKAGE`, + the resolver will treat relative dotted names as relative to the caller of the :meth:`~pyramid.path.DottedNameResolver.resolve` method. - If a *module* or *module name* (as opposed to a package or package name) - is supplied as ``package``, its containing package is computed and this + If ``package`` is a *module* or *module name* (as opposed to a package or + package name), its containing package is computed and this package used to derive the package name (all names are resolved relative to packages, never to modules). For example, if the ``package`` argument to this type was passed the string ``xml.dom.expatbuilder``, and @@ -249,8 +247,8 @@ class DottedNameResolver(Resolver): import would be for ``xml.minidom``, because ``xml.dom.expatbuilder`` is a module object, not a package object. - If a *package* or *package name* (as opposed to a module or module name) - is supplied as ``package``, this package will be used to relative compute + If ``package`` is a *package* or *package name* (as opposed to a module or + module name), this package will be used to relative compute dotted names. For example, if the ``package`` argument to this type was passed the string ``xml.dom``, and ``.minidom`` is supplied to the :meth:`~pyramid.path.DottedNameResolver.resolve` method, the resulting diff --git a/pyramid/session.py b/pyramid/session.py index a5e6a8d3a..7db8c8e0e 100644 --- a/pyramid/session.py +++ b/pyramid/session.py @@ -140,30 +140,30 @@ def UnencryptedCookieSessionFactoryConfig( A number of seconds of inactivity before a session times out. ``cookie_name`` - The name of the cookie used for sessioning. Default: ``session``. + The name of the cookie used for sessioning. ``cookie_max_age`` The maximum age of the cookie used for sessioning (in seconds). Default: ``None`` (browser scope). ``cookie_path`` - The path used for the session cookie. Default: ``/``. + The path used for the session cookie. ``cookie_domain`` The domain used for the session cookie. Default: ``None`` (no domain). ``cookie_secure`` - The 'secure' flag of the session cookie. Default: ``False``. + The 'secure' flag of the session cookie. ``cookie_httponly`` - The 'httpOnly' flag of the session cookie. Default: ``False``. + The 'httpOnly' flag of the session cookie. ``cookie_on_exception`` If ``True``, set a session cookie even if an exception occurs - while rendering a view. Default: ``True``. + while rendering a view. ``signed_serialize`` - A callable which takes more or less arbitrary python data structure and + A callable which takes more or less arbitrary Python data structure and a secret and returns a signed serialization in bytes. Default: ``signed_serialize`` (using pickle). diff --git a/pyramid/url.py b/pyramid/url.py index 8fb5e49ab..84b58ac45 100644 --- a/pyramid/url.py +++ b/pyramid/url.py @@ -390,9 +390,8 @@ class URLMethodsMixin(object): pass ``app_url=''`. Passing ``app_url=''` when the resource path is ``/baz/bar`` will return ``/baz/bar``. - .. note:: - - ``app_url`` is new as of Pyramid 1.3. + .. versionadded:: 1.3 + ``app_url`` If ``app_url`` is passed and any of ``scheme``, ``port``, or ``host`` are also passed, ``app_url`` will take precedence and the values |
