Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Sep 9, 2013
  1. @mcdonc

    - Removed ancient backwards compatibily hack in

    mcdonc authored
      ``pyramid.traversal.DefaultRootFactory`` which populated the ``__dict__`` of
      the factory with the matchdict values for compatibility with BFG 0.9.
Commits on Aug 29, 2013
  1. @mcdonc
Commits on Aug 27, 2013
  1. @mcdonc

    - Fix an obscure problem when combining a virtual root with a route w…

    mcdonc authored
    …ith a
      ``*traverse`` in its pattern.  Now the traversal path generated in
      such a configuration will be correct, instead of an element missing
      a leading slash.
Commits on Sep 9, 2012
  1. @mcdonc

    - It is no longer possible to pass an environ dictionary directly to

    mcdonc authored
      ``pyramid.traversal.ResourceTreeTraverser.__call__`` (aka
      ``ModelGraphTraverser.__call__``).  Instead, you must pass a request
      object.  Passing an environment instead of a request has generated a
      deprecation warning since Pyramid 1.1.
    - Pyramid will no longer work properly if you use the
      ``webob.request.LegacyRequest`` as a request factory.  Instances of the
      LegacyRequest class have a ``request.path_info`` which return a string.
      This Pyramid release assumes that ``request.path_info`` will
      unconditionally be Unicode.
    - Pyramid now requires WebOb 1.2b3+ (the prior Pyramid release only relied on
      1.2dev+).  This is to ensure that we obtain a version of WebOb that returns
      ``request.path_info`` as text.
Commits on Sep 8, 2012
  1. @mcdonc
Commits on Feb 18, 2012
  1. @mcdonc
  2. @mcdonc


    mcdonc authored
  3. @mcdonc


    mcdonc authored
  4. @mcdonc

    comment intent

    mcdonc authored
  5. @mcdonc

    deprecate pyramid.interfaces.IContextURL and pyramid.traversal.Traver…

    mcdonc authored
    …salContextURL, add tests for ResourceURL constructor logic
Commits on Feb 17, 2012
  1. @mcdonc


    mcdonc authored
    - Add ``pyramid.config.Configurator.add_resource_url_adapter`` API method.
      See the Hooks narrative documentation section entitled "Changing How
      pyramid.request.Request.resource_url Generates a URL" for more information.
      This is not a new feature, it just provides an API for adding a resource
      url adapter without needing to use the ZCA API.
    - A new interface was added: ``pyramid.interfaces.IResourceURL``.  An adapter
      implementing its interface can be used to override resource URL generation
      when ``request.resource_url`` is called.  This interface replaces the
      now-deprecated ``pyramid.interfaces.IContextURL`` interface.
    - The dictionary passed to a resource's ``__resource_url__`` method (see
      "Overriding Resource URL Generation" in the "Resources" chapter) now
      contains an ``app_url`` key, representing the application URL generated
      during ``request.resource_url``.  It represents a potentially customized
      URL prefix, containing potentially custom scheme, host and port information
      passed by the user to ``request.resource_url``.  It should be used instead
      of ``request.application_url`` where necessary.
    - The ``request.resource_url`` API now accepts these arguments: ``app_url``,
      ``scheme``, ``host``, and ``port``.  The app_url argument can be used to
      replace the URL prefix wholesale during url generation.  The ``scheme``,
      ``host``, and ``port`` arguments can be used to replace the respective
      default values of ``request.application_url`` partially.
    - A new API named ``request.resource_path`` now exists.  It works like
      ``request.resource_url`` but produces a relative URL rather than an
      absolute one.
    - The ``request.route_url`` API now accepts these arguments: ``_app_url``,
      ``_scheme``, ``_host``, and ``_port``.  The ``_app_url`` argument can be
      used to replace the URL prefix wholesale during url generation.  The
      ``_scheme``, ``_host``, and ``_port`` arguments can be used to replace the
      respective default values of ``request.application_url`` partially.
    Backwards Incompatibilities
    - The ``pyramid.interfaces.IContextURL`` interface has been deprecated.
      People have been instructed to use this to register a resource url adapter
      in the "Hooks" chapter to use to influence ``request.resource_url`` URL
      generation for resources found via custom traversers since Pyramid 1.0.
      The interface still exists and registering such an adapter still works, but
      this interface will be removed from the software after a few major Pyramid
      releases.  You should replace it with an equivalent
      ``pyramid.interfaces.IResourceURL`` adapter, registered using the new
      ``pyramid.config.Configurator.add_resource_url_adapter`` API.  A
      deprecation warning is now emitted when a
      ``pyramid.interfaces.IContextURL`` adapter is found when
      ``request.resource_url`` is called.
    - Change ``set_traverser`` API name to ``add_traverser``.
    Ref #438.
Commits on Jan 5, 2012
  1. @mcdonc

    - Using a dynamic segment named ``traverse`` in a route pattern like …

    mcdonc authored
        config.add_route('trav_route', 'traversal/{traverse:.*}')
      Would cause a ``UnicodeDecodeError`` when the route was matched and the
      matched portion of the URL contained any high-order characters.  See also
      #385 .
  2. @mcdonc
Commits on Jan 4, 2012
  1. @mcdonc
  2. @mcdonc

    untested work

    mcdonc authored
Commits on Nov 28, 2011
  1. @mcdonc

    use multiline imports

    mcdonc authored
Commits on Sep 25, 2011
  1. @mcdonc

    fix merge conflicts

    mcdonc authored
  2. @mcdonc

    add path_traversal_info method to match reality of latin-1 encoded en…

    mcdonc authored
    …vvars, fix traversal tests under 3.2
Commits on Sep 24, 2011
  1. @mcdonc
  2. @mcdonc

    more wtfing

    mcdonc authored
Commits on Sep 23, 2011
  1. @mcdonc

    beat me, whip me

    mcdonc authored
  2. @mcdonc

    fix on python 2

    mcdonc authored
  3. @mcdonc
  4. @mcdonc


    mcdonc authored
Commits on Sep 22, 2011
  1. @mcdonc

    anger release commit

    mcdonc authored
Commits on Sep 8, 2011
  1. @mcdonc

    - Within ``pyramid.traversal.traversal_path`` , canonicalize URL segm…

    mcdonc authored
      from UTF-8 to Unicode before checking whether a segment matches literally
      one of ``.``, the empty string, or ``..`` in case there's some sneaky way
      someone might tunnel those strings via UTF-8 that don't match the literals
      before decoded.
Commits on Sep 6, 2011
  1. @mcdonc
Commits on Aug 31, 2011
  1. @mcdonc

    - Undeprecated ``pyramid.traversal.find_model``,

    mcdonc authored
      ``pyramid.traversal.model_path``, ``pyramid.traversal.model_path_tuple``,
      and ``pyramid.url.model_url``, which were all deprecated in Pyramid 1.0.
      There's just not much cost to keeping them around forever as aliases to
      their renamed ``resource_*`` prefixed functions.
    - Undeprecated ``pyramid.view.bfg_view``, which was deprecated in Pyramid
      1.0.  This is a low-cost alias to ``pyramid.view.view_config`` which we'll
      just keep around forever.
Commits on Apr 27, 2011
  1. @mcdonc

    - Passing an ``environ`` dictionary to the ``__call__`` method of a

    mcdonc authored
      "traverser" (e.g. an object that implements
      ``pyramid.interfaces.ITraverser`` such as an instance of
      ``pyramid.traversal.ResourceTreeTraverser``) as its ``request`` argument
      now causes a deprecation warning to be emitted.  Consumer code should pass a
      ``request`` object instead.  The fact that passing an environ dict is
      permitted has been documentation-deprecated since ``repoze.bfg`` 1.1, and
      this capability will be removed entirely in a future version.
    - The following (undocumented, dictionary-like) methods of the
      ``pyramid.request.Request`` object have been deprecated: ``__contains__``,
      ``__delitem__``, ``__getitem__``, ``__iter__``, ``__setitem__``, ``get``,
      ``has_key``, ``items``, ``iteritems``, ``itervalues``, ``keys``, ``pop``,
      ``popitem``, ``setdefault``, ``update``, and ``values``.  Usage of any of
      these methods will cause a deprecation warning to be emitted.  These
      methods were added for internal compatibility in ``repoze.bfg`` 1.1 (code
      that currently expects a request object expected an environ object in BFG
      1.0 and before).  In a future version, these methods will be removed
Commits on Mar 29, 2011
  1. @mcdonc

    branch coverage

    mcdonc authored
Commits on Feb 9, 2011
  1. @mcdonc

    - Integers and longs passed as ``elements`` to ``pyramid.url.resource…

    mcdonc authored
      or ``pyramid.request.Request.resource_url`` e.g. ``resource_url(context,
      request, 1, 2)`` (``1`` and ``2`` are the ``elements``) will now be
      converted implicitly to strings in the result.  Previously passing integers
      or longs as elements would cause a TypeError.
    Closes #124
Commits on Jan 12, 2011
  1. @mcdonc

    - Deprecation warnings related to import of the following API functio…

    mcdonc authored
    …ns were
      added: ``pyramid.traversal.find_model``, ``pyramid.traversal.model_path``,
      ``pyramid.traversal.model_path_tuple``, ``pyramid.url.model_url``.  The
      instructions emitted by the deprecation warnings instruct the developer to
      change these method spellings to their ``resource`` equivalents.  This is a
      consequence of the mass concept rename of "model" to "resource" performed
      in 1.0a7.
Commits on Dec 21, 2010
  1. @mcdonc

    - Added "Finding the Root Resource" to Resources narrative chapter.

    mcdonc authored
    - Added "Finding a Resource With a Class or Interface in Lineage" to
      Resources narrative chapter.
  2. @mcdonc


    mcdonc authored
    - If a resource implements a ``__resource_url__`` method, it will be called
      as the result of invoking the ``pyramid.url.resource_url`` function to
      generate a URL, overriding the default logic.  See the new "Generating The
      URL Of A Resource" section within the Resources narrative chapter.
    - Added "Generating The URL Of A Resource" section to the Resources narrative
      chapter (includes information about overriding URL generation using
    - Added "Generating the Path To a Resource" section to the Resources
      narrative chapter.
    - Added "Finding a Resource by Path" section to the Resources narrative
Commits on Dec 18, 2010
  1. @mcdonc

    resource -> asset

    mcdonc authored
Something went wrong with that request. Please try again.