diff options
| author | Chris McDonough <chrism@plope.com> | 2013-01-01 21:39:48 -0500 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2013-01-01 21:39:48 -0500 |
| commit | cf7c15a6ceb0b96a7950daef2a33ee2464c655cb (patch) | |
| tree | c792a3bf12b2b2615fbb306e354c85b10983d63b | |
| parent | 1b5c1c3df5eadf02b0e8818e32ee45e69b2c051f (diff) | |
| parent | c5d01d4667d678782898b7d6859d60c617e30a9e (diff) | |
| download | pyramid-cf7c15a6ceb0b96a7950daef2a33ee2464c655cb.tar.gz pyramid-cf7c15a6ceb0b96a7950daef2a33ee2464c655cb.tar.bz2 pyramid-cf7c15a6ceb0b96a7950daef2a33ee2464c655cb.zip | |
Merge branch 'master' of github.com:Pylons/pyramid
32 files changed, 46 insertions, 46 deletions
diff --git a/BFG_HISTORY.txt b/BFG_HISTORY.txt index 9096d6464..10d926c70 100644 --- a/BFG_HISTORY.txt +++ b/BFG_HISTORY.txt @@ -387,7 +387,7 @@ Features Bug Fixes --------- -- The route pattern registered internally for a a local "static view" +- The route pattern registered internally for a local "static view" (either via the ``static`` ZCML directive or via the ``add_static_view`` method of the configurator) was incorrect. It was regsistered for e.g. ``static*traverse``, while it should have @@ -688,7 +688,7 @@ Features A similar combining of routing and traversal is available when a route is matched which contains a ``*traverse`` remainder marker in its path. The ``traverse`` argument allows you to associate route - patterns with an arbitrary traversal path without using a a + patterns with an arbitrary traversal path without using a ``*traverse`` remainder marker; instead you can use other match information. @@ -1381,7 +1381,7 @@ Internal lookup, because the registration will always be made with a specific request interface, but registration may not be made with a specific context interface. In general, when creating multiadapters, you - want to order the requires interfaces so that the the elements which + want to order the requires interfaces so that the elements which are more likely to be registered using specific interfaces are ordered before those which are less likely. @@ -1860,7 +1860,7 @@ Backwards Incompatibilities Bug Fixes --------- -- The the long description of this package (as shown on PyPI) was not +- The long description of this package (as shown on PyPI) was not valid reStructuredText, and so was not renderable. - Trying to use an HTTP method name string such as ``GET`` as a @@ -2920,7 +2920,7 @@ Deprecations - The import of ``repoze.bfg.security.Unauthorized`` is deprecated in favor of ``repoze.bfg.exceptions.Forbidden``. The old location still functions but emits a deprecation warning. The rename from - ``Unauthorized`` to ``Forbidden`` brings parity to the the name of + ``Unauthorized`` to ``Forbidden`` brings parity to the name of the exception and the system view it invokes when raised. Backwards Incompatibilities diff --git a/CHANGES.txt b/CHANGES.txt index cfa49fb1a..adf448945 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -332,7 +332,7 @@ Bug Fixes - When registering a view configuration that named a Chameleon ZPT renderer with a macro name in it (e.g. ``renderer='some/template#somemacro.pt``) as - well as a view configuration without a macro name it it that pointed to the + well as a view configuration without a macro name in it that pointed to the same template (e.g. ``renderer='some/template.pt'``), internal caching could confuse the two, and your code might have rendered one instead of the other. @@ -536,7 +536,7 @@ Features - An ``add_permission`` directive method was added to the Configurator. This directive registers a free-standing permission introspectable into the Pyramid introspection system. Frameworks built atop Pyramid can thus use - the the ``permissions`` introspectable category data to build a + the ``permissions`` introspectable category data to build a comprehensive list of permissions supported by a running system. Before this method was added, permissions were already registered in this introspectable category as a side effect of naming them in an ``add_view`` diff --git a/docs/api/registry.rst b/docs/api/registry.rst index 4c1af2678..a7879d3d5 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -33,7 +33,7 @@ The default implementation of the interface :class:`pyramid.interfaces.IIntrospectable` used by framework exenders. - An instance of this class is is created when + An instance of this class is created when :attr:`pyramid.config.Configurator.introspectable` is called. This class is new as of :app:`Pyramid` 1.3. diff --git a/docs/api/request.rst b/docs/api/request.rst index 3a1439874..e4034c635 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -251,7 +251,7 @@ Assigning to one is still supported but will cause a deprecation warning to be emitted, and eventually the feature will be removed. For new code, instead of assigning ``response_*`` attributes to the - request, use API of the the :attr:`pyramid.request.Request.response` + request, use API of the :attr:`pyramid.request.Request.response` object (exposed to view code as ``request.response``) to influence rendered response behavior. diff --git a/docs/designdefense.rst b/docs/designdefense.rst index b468ddac6..96e1001e6 100644 --- a/docs/designdefense.rst +++ b/docs/designdefense.rst @@ -873,7 +873,7 @@ means: #) When I use the security proxy machinery, I can have a view that conditionally displays certain HTML elements (like form fields) or - prevents certain attributes from being modified depending on the the + prevents certain attributes from being modified depending on the permissions that the accessing user possesses with respect to a context object. diff --git a/docs/glossary.rst b/docs/glossary.rst index adcf36f7c..6620552f1 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -486,8 +486,8 @@ Glossary is in use. physical root - The object returned by the application :term:`root factory`. Unlike the - the :term:`virtual root` of a request, it is not impacted by + The object returned by the application :term:`root factory`. + Unlike the :term:`virtual root` of a request, it is not impacted by :ref:`vhosting_chapter`: it will always be the actual object returned by the root factory, never a subobject. @@ -840,7 +840,7 @@ Glossary information. Mako - `Mako <http://www.makotemplates.org/>`_ is a template language language + `Mako <http://www.makotemplates.org/>`_ is a template language which refines the familiar ideas of componentized layout and inheritance using Python with Python scoping and calling semantics. diff --git a/docs/narr/assets.rst b/docs/narr/assets.rst index e8e915297..7b620548d 100644 --- a/docs/narr/assets.rst +++ b/docs/narr/assets.rst @@ -252,7 +252,7 @@ static assets that live *outside* the :app:`Pyramid` application. This will happen when the :meth:`~pyramid.config.Configurator.add_static_view` API associated with the path fed to :meth:`~pyramid.request.Request.static_url` is a *URL* instead of a view name. For example, the ``name`` argument may be -``http://example.com`` while the the ``path`` given may be +``http://example.com`` while the ``path`` given may be ``mypackage:images``: .. code-block:: python diff --git a/docs/narr/commandline.rst b/docs/narr/commandline.rst index 3bdf8c5cd..8d6b9d984 100644 --- a/docs/narr/commandline.rst +++ b/docs/narr/commandline.rst @@ -758,7 +758,7 @@ we'll pretend you have a distribution with a package in it named This script uses the Python ``optparse`` module to allow us to make sense out of extra arguments passed to the script. It uses the -:func:`pyramid.paster.bootstrap` function to get information about the the +:func:`pyramid.paster.bootstrap` function to get information about the application defined by a config file, and prints the deployment settings defined in that config file. diff --git a/docs/narr/extconfig.rst b/docs/narr/extconfig.rst index 5e7fe2753..875bc9006 100644 --- a/docs/narr/extconfig.rst +++ b/docs/narr/extconfig.rst @@ -289,7 +289,7 @@ The ``title`` is a human-consumable string that can be used by introspection system frontends to show a friendly summary of this introspectable. The ``type_name`` is a value that can be used to subtype this introspectable -within its category for for sorting and presentation purposes. It can be any +within its category for sorting and presentation purposes. It can be any value. An introspectable is also dictionary-like. It can contain any set of diff --git a/docs/narr/hooks.rst b/docs/narr/hooks.rst index ea75e5fe4..b5efc0df1 100644 --- a/docs/narr/hooks.rst +++ b/docs/narr/hooks.rst @@ -1082,7 +1082,7 @@ entirely by the relative ordering of calls to :meth:`pyramid.config.Configurator.add_tween`. However, the caller of add_tween can provide an optional hint that can influence the implicit tween chain ordering by supplying ``under`` or ``over`` (or both) arguments to -:meth:`~pyramid.config.Configurator.add_tween`. These hints are only used +:meth:`~pyramid.config.Configurator.add_tween`. These hints are only used when an explicit tween ordering is not used. See :ref:`explicit_tween_ordering` for a description of how to set an explicit tween ordering. diff --git a/docs/narr/hybrid.rst b/docs/narr/hybrid.rst index ab1bf20bb..1773a6b8c 100644 --- a/docs/narr/hybrid.rst +++ b/docs/narr/hybrid.rst @@ -477,7 +477,7 @@ Registering a Default View for a Route That Has a ``view`` Attribute ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. warning:: As of :app:`Pyramid` 1.1 this section is slated to be removed in - a later documentation release because the the ability to add views + a later documentation release because the ability to add views directly to the :term:`route configuration` by passing a ``view`` argument to ``add_route`` has been deprecated. diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index e261f9a11..511464322 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -301,7 +301,7 @@ You need to add a few boilerplate lines to your application's ``setup.py`` file in order to properly generate :term:`gettext` files from your application. -.. note:: See :ref:`project_narr` to learn about about the +.. note:: See :ref:`project_narr` to learn about the composition of an application's ``setup.py`` file. In particular, add the ``Babel`` and ``lingua`` distributions to the diff --git a/docs/narr/install.rst b/docs/narr/install.rst index 6db0d88f5..ff89553ae 100644 --- a/docs/narr/install.rst +++ b/docs/narr/install.rst @@ -171,10 +171,10 @@ installed: Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. - >>> import setutptools + >>> import setuptools Traceback (most recent call last): File "<stdin>", line 1, in <module> - ImportError: No module named setutptools + ImportError: No module named setuptools >>> If ``import setuptools`` raises an :exc:`ImportError` as it does above, you diff --git a/docs/narr/introspector.rst b/docs/narr/introspector.rst index bd81fb56a..7784e8960 100644 --- a/docs/narr/introspector.rst +++ b/docs/narr/introspector.rst @@ -496,7 +496,7 @@ introspectables in categories not described here. ``translation directories`` Each introspectable in the ``asset overrides`` category represents an - individual element in a ``specs`` argument passed to to + individual element in a ``specs`` argument passed to :meth:`pyramid.config.Configurator.add_translation_dirs`; each will have the following data. diff --git a/docs/narr/renderers.rst b/docs/narr/renderers.rst index 1158d2225..ecf625251 100644 --- a/docs/narr/renderers.rst +++ b/docs/narr/renderers.rst @@ -264,7 +264,7 @@ will be the active request object at render time. # [{"x": 1}, {"x": 2}] If you aren't the author of the objects being serialized, it won't be -possible (or at least not reasonable) to add a custom ``__json__`` method to +possible (or at least not reasonable) to add a custom ``__json__`` method to their classes in order to influence serialization. If the object passed to the renderer is not a serializable type, and has no ``__json__`` method, usually a :exc:`TypeError` will be raised during serialization. You can @@ -366,7 +366,7 @@ For example (Javascript): '&callback=?'; jqhxr = $.getJSON(api_url); -The string ``callback=?`` above in the the ``url`` param to the JQuery +The string ``callback=?`` above in the ``url`` param to the JQuery ``getAjax`` function indicates to jQuery that the query should be made as a JSONP request; the ``callback`` parameter will be automatically filled in for you and used. diff --git a/docs/narr/subrequest.rst b/docs/narr/subrequest.rst index 89551ab35..b5bc5ec48 100644 --- a/docs/narr/subrequest.rst +++ b/docs/narr/subrequest.rst @@ -142,7 +142,7 @@ generated. We can change this behavior; how to do so is described below in our discussion of the ``use_tweens`` argument. The :meth:`pyramid.request.Request.invoke_subrequest` API accepts two -arguments: a positional argument ``request`` that must be provided, and and +arguments: a positional argument ``request`` that must be provided, and ``use_tweens`` keyword argument that is optional; it defaults to ``False``. The ``request`` object passed to the API must be an object that implements diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst index ba72ebfbf..1cec26fbc 100644 --- a/docs/narr/templates.rst +++ b/docs/narr/templates.rst @@ -109,7 +109,7 @@ supply the renderer with more correct system values (see to compose proper system values is present in the request. If your template relies on the name ``request`` or ``context``, or if you've configured special :term:`renderer globals`, make sure to pass -``request`` as a keyword argument in every call to to a +``request`` as a keyword argument in every call to a ``pyramid.renderers.render_*`` function. Every view must return a :term:`response` object, except for views diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index 480b0e0cc..46f908b7c 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -87,7 +87,7 @@ setup code. However, the above :term:`scan` execution decoration`, including any objects decorated with the :class:`pyramid.view.view_config` decorator in the ``mypackage`` Python package. For example, if you have a ``views.py`` in your package, a scan will -pick up any of its configuration decorators, so we can add one there that +pick up any of its configuration decorators, so we can add one there that references ``myroute`` as a ``route_name`` parameter: .. code-block:: python @@ -860,7 +860,7 @@ exactly the same job: request into a ``GET``, losing any ``POST`` data in the original request. -See :ref:`view_module` and :ref:`changing_the_notfound_view` for for a more +See :ref:`view_module` and :ref:`changing_the_notfound_view` for a more general description of how to configure a view and/or a not found view. .. index:: diff --git a/docs/narr/views.rst b/docs/narr/views.rst index 07d018127..4f30bb7fa 100644 --- a/docs/narr/views.rst +++ b/docs/narr/views.rst @@ -180,7 +180,7 @@ All classes documented in the :mod:`pyramid.httpexceptions` module documented as inheriting from the :class:`pyramid.httpexceptions.HTTPException` are :term:`http exception` objects. Instances of an HTTP exception object may either be *returned* or *raised* from within view code. In either case -(return or raise) the instance will be used as as the view's response. +(return or raise) the instance will be used as the view's response. For example, the :class:`pyramid.httpexceptions.HTTPUnauthorized` exception can be raised. This will cause a response to be generated with a ``401 diff --git a/docs/tutorials/wiki/basiclayout.rst b/docs/tutorials/wiki/basiclayout.rst index 12cf86a91..da381ad7b 100644 --- a/docs/tutorials/wiki/basiclayout.rst +++ b/docs/tutorials/wiki/basiclayout.rst @@ -38,13 +38,13 @@ point happens to be the ``main`` function within the file named factory is named ``root_factory``. #. *Line 15*. Register a 'static view' which answers requests which start - with with URL path ``/static`` using the + with URL path ``/static`` using the :meth:`pyramid.config.Configurator.add_static_view method`. This statement registers a view that will serve up static assets, such as CSS and image files, for us, in this case, at ``http://localhost:6543/static/`` and below. The first argument is the "name" ``static``, which indicates that the URL path prefix of the view - will be ``/static``. the The second argument of this tag is the "path", + will be ``/static``. The second argument of this tag is the "path", which is a relative :term:`asset specification`, so it finds the resources it should serve within the ``static`` directory inside the ``tutorial`` package. The scaffold could have alternately used an *absolute* asset diff --git a/docs/tutorials/wiki/definingmodels.rst b/docs/tutorials/wiki/definingmodels.rst index 1a5d38b10..2cbe691fa 100644 --- a/docs/tutorials/wiki/definingmodels.rst +++ b/docs/tutorials/wiki/definingmodels.rst @@ -63,7 +63,7 @@ contain the :term:`ReStructuredText` body representing the wiki page content. Note that ``Page`` objects don't have an initial ``__name__`` or ``__parent__`` attribute. All objects in a traversal graph must have a ``__name__`` and a ``__parent__`` attribute. We don't specify these here -because both ``__name__`` and ``__parent__`` will be set by by a :term:`view` +because both ``__name__`` and ``__parent__`` will be set by a :term:`view` function when a Page is added to our Wiki mapping. As a last step, we want to change the ``appmaker`` function in our diff --git a/docs/tutorials/wiki/definingviews.rst b/docs/tutorials/wiki/definingviews.rst index 529603546..27f55da13 100644 --- a/docs/tutorials/wiki/definingviews.rst +++ b/docs/tutorials/wiki/definingviews.rst @@ -115,7 +115,7 @@ The curried function named ``check`` is used as the first argument to each WikiWord match found in the content. If the wiki (our page's ``__parent__``) already contains a page with the matched WikiWord name, the ``check`` function generates a view link to be used as the substitution value -and returns it. If the wiki does not already contain a page with with the +and returns it. If the wiki does not already contain a page with the matched WikiWord name, the function generates an "add" link as the substitution value and returns it. diff --git a/docs/tutorials/wiki2/definingviews.rst b/docs/tutorials/wiki2/definingviews.rst index 6b8689b5b..8714927c3 100644 --- a/docs/tutorials/wiki2/definingviews.rst +++ b/docs/tutorials/wiki2/definingviews.rst @@ -144,7 +144,7 @@ The ``check()`` function is used as the first argument to each WikiWord match found in the content. If the wiki already contains a page with the matched WikiWord name, ``check()`` generates a view link to be used as the substitution value and returns it. If the wiki does -not already contain a page with with the matched WikiWord name, ``check()`` +not already contain a page with the matched WikiWord name, ``check()`` generates an "add" link as the substitution value and returns it. As a result, the ``content`` variable is now a fully formed bit of HTML @@ -358,7 +358,7 @@ each of the following URLs, check that the result is as expected: of the FrontPage page object. - ``http://localhost:6543/FrontPage`` in a browser invokes - the ``view_page`` view of the front page page object. + the ``view_page`` view of the front page object. - ``http://localhost:6543/FrontPage/edit_page`` in a browser invokes the edit view for the front page object. diff --git a/pyramid/config/__init__.py b/pyramid/config/__init__.py index 40edaa324..40c487704 100644 --- a/pyramid/config/__init__.py +++ b/pyramid/config/__init__.py @@ -244,7 +244,7 @@ class Configurator( prepended to their pattern. This parameter is new in Pyramid 1.2. If ``introspection`` is passed, it must be a boolean value. If it's - ``True``, introspection values during actions will be kept for for use + ``True``, introspection values during actions will be kept for use for tools like the debug toolbar. If it's ``False``, introspection values provided by registrations will be ignored. By default, it is ``True``. This parameter is new as of Pyramid 1.3. diff --git a/pyramid/config/routes.py b/pyramid/config/routes.py index 7c61d5912..e06d0fecd 100644 --- a/pyramid/config/routes.py +++ b/pyramid/config/routes.py @@ -109,7 +109,7 @@ class RoutesConfiguratorMixin(object): remainder marker in its pattern (see :ref:`using_traverse_in_a_route_pattern`). The ``traverse`` argument to add_route allows you to associate route patterns - with an arbitrary traversal path without using a a + with an arbitrary traversal path without using a ``*traverse`` remainder marker; instead you can use other match information. diff --git a/pyramid/httpexceptions.py b/pyramid/httpexceptions.py index c82d6900c..64afc346a 100644 --- a/pyramid/httpexceptions.py +++ b/pyramid/httpexceptions.py @@ -378,7 +378,7 @@ class HTTPResetContent(HTTPOk): """ subclass of :class:`~HTTPOk` - This indicates that the the server has fulfilled the request and + This indicates that the server has fulfilled the request and the user agent SHOULD reset the document view which caused the request to be sent. @@ -754,7 +754,7 @@ class HTTPLengthRequired(HTTPClientError): """ subclass of :class:`~HTTPClientError` - This indicates that the the server refuses to accept the request + This indicates that the server refuses to accept the request without a defined Content-Length. code: 411, title: Length Required diff --git a/pyramid/interfaces.py b/pyramid/interfaces.py index 042b4487b..b176d49fb 100644 --- a/pyramid/interfaces.py +++ b/pyramid/interfaces.py @@ -974,7 +974,7 @@ class IIntrospector(Interface): indirectly by :meth:`pyramid.interfaces.IIntrospector.register`""" def relate(*pairs): - """ Given any number of of ``(category_name, discriminator)`` pairs + """ Given any number of ``(category_name, discriminator)`` pairs passed as positional arguments, relate the associated introspectables to each other. The introspectable related to each pair must have already been added via ``.add`` or ``.add_intr``; a :exc:`KeyError` @@ -986,7 +986,7 @@ class IIntrospector(Interface): """ def unrelate(*pairs): - """ Given any number of of ``(category_name, discriminator)`` pairs + """ Given any number of ``(category_name, discriminator)`` pairs passed as positional arguments, unrelate the associated introspectables from each other. The introspectable related to each pair must have already been added via ``.add`` or ``.add_intr``; a :exc:`KeyError` diff --git a/pyramid/path.py b/pyramid/path.py index d1c3b6d31..e9c63a365 100644 --- a/pyramid/path.py +++ b/pyramid/path.py @@ -175,7 +175,7 @@ class AssetResolver(Resolver): If ``spec`` is a *relative* asset specification (an asset specification without a ``:`` in it, e.g. ``templates/foo.pt``), the - ``package`` argument of the constructor is used as the the package + ``package`` argument of the constructor is used as the package portion of the asset spec. For example: .. code-block:: python diff --git a/pyramid/scripts/pserve.py b/pyramid/scripts/pserve.py index 6c7e1d654..b840fbdb9 100644 --- a/pyramid/scripts/pserve.py +++ b/pyramid/scripts/pserve.py @@ -753,7 +753,7 @@ class Monitor(object): # pragma: no cover this). Use the ``watch_file(filename)`` function to cause a reload/restart for - other other non-Python files (e.g., configuration files). If you have + other non-Python files (e.g., configuration files). If you have a dynamic set of files that grows over time you can use something like:: def watch_config_files(): diff --git a/pyramid/traversal.py b/pyramid/traversal.py index 6832ce69a..ed49d8743 100644 --- a/pyramid/traversal.py +++ b/pyramid/traversal.py @@ -414,7 +414,7 @@ def virtual_root(resource, request): 'virtual root path': the :func:`pyramid.traversal.find_resource` API will be used to find the virtual root resource using this path; if the resource is found, it will be returned. If the - ``HTTP_X_VHM_ROOT`` key is is not present in the WSGI environment, + ``HTTP_X_VHM_ROOT`` key is not present in the WSGI environment, the physical :term:`root` of the resource tree will be returned instead. Virtual roots are not useful at all in applications that use diff --git a/pyramid/url.py b/pyramid/url.py index 52e172d3f..8fb5e49ab 100644 --- a/pyramid/url.py +++ b/pyramid/url.py @@ -194,7 +194,7 @@ class URLMethodsMixin(object): names are ignored. If the route object which matches the ``route_name`` argument has - a :term:`pregenerator`, the ``*elements`` and ``**kw`` arguments + a :term:`pregenerator`, the ``*elements`` and ``**kw`` arguments passed to this function might be augmented or changed. """ try: diff --git a/pyramid/util.py b/pyramid/util.py index a8f750a46..56049af87 100644 --- a/pyramid/util.py +++ b/pyramid/util.py @@ -71,7 +71,7 @@ class InstancePropertyMixin(object): ``attrs`` is a sequence of 2-tuples *or* a data structure with an ``.items()`` method which returns a sequence of 2-tuples - (presumably a dictionary). It will be used used to add several + (presumably a dictionary). It will be used to add several properties to the instance in a manner that is more efficient than simply calling ``set_property`` repeatedly. """ |
