Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
mcdonc committed Feb 18, 2015
2 parents b63f0c5 + 4dacb8c commit d433397
Show file tree
Hide file tree
Showing 32 changed files with 687 additions and 210 deletions.
26 changes: 25 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,26 @@ Features
or group them for improved conflict detection.
See https://github.com/Pylons/pyramid/pull/1513

- Add ``pyramid.request.apply_request_extensions`` function which can be
used in testing to apply any request extensions configured via
``config.add_request_method``. Previously it was only possible to test
the extensions by going through Pyramid's router.
See https://github.com/Pylons/pyramid/pull/1581

- pcreate when run without a scaffold argument will now print information on
the missing flag, as well as a list of available scaffolds.
See https://github.com/Pylons/pyramid/pull/1566 and
https://github.com/Pylons/pyramid/issues/1297

- Added support / testing for 'pypy3' under Tox and Travis.
See https://github.com/Pylons/pyramid/pull/1469

- Cache busting for static resources has been added and is available via a new
argument to ``pyramid.config.Configurator.add_static_view``: ``cachebust``.
See https://github.com/Pylons/pyramid/pull/1380
Core APIs are shipped for both cache busting via query strings and
path segments and may be extended to fit into custom asset pipelines.
See https://github.com/Pylons/pyramid/pull/1380 and
https://github.com/Pylons/pyramid/pull/1583

- Add ``pyramid.config.Configurator.root_package`` attribute and init
parameter to assist with includeable packages that wish to resolve
Expand Down Expand Up @@ -89,6 +103,10 @@ Features
Bug Fixes
---------

- Work around an issue where ``pserve --reload`` would leave terminal echo
disabled if it reloaded during a pdb session.
See https://github.com/Pylons/pyramid/pull/1577

- ``pyramid.wsgi.wsgiapp`` and ``pyramid.wsgi.wsgiapp2`` now raise
``ValueError`` when accidentally passed ``None``.
See https://github.com/Pylons/pyramid/pull/1320
Expand Down Expand Up @@ -131,6 +149,12 @@ Bug Fixes
callback and thus behave just like the ``pyramid.renderers.JSON` renderer.
See https://github.com/Pylons/pyramid/pull/1561

- Prevent "parameters to load are deprecated" ``DeprecationWarning``
from setuptools>=11.3. See https://github.com/Pylons/pyramid/pull/1541

- Avoiding timing attacks against CSRF tokens.
See https://github.com/Pylons/pyramid/pull/1574

Deprecations
------------

Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,3 +240,7 @@ Contributors
- Adrian Teng, 2014/12/17

- Ilja Everila, 2015/02/05

- Geoffrey T. Dairiki, 2015/02/06

- David Glick, 2015/02/12
2 changes: 1 addition & 1 deletion HACKING.txt
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ Test Coverage
-------------

- The codebase *must* have 100% test statement coverage after each commit.
You can test coverage via ``tox -e coverage``, or alternately by installing
You can test coverage via ``tox -e cover``, or alternately by installing
``nose`` and ``coverage`` into your virtualenv (easiest via ``setup.py
dev``) , and running ``setup.py nosetests --with-coverage``.

Expand Down
3 changes: 3 additions & 0 deletions docs/api/interfaces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ Other Interfaces
.. autointerface:: IRenderer
:members:

.. autointerface:: IResponseFactory
:members:

.. autointerface:: IViewMapperFactory
:members:

Expand Down
1 change: 1 addition & 0 deletions docs/api/request.rst
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,4 @@
that used as ``request.GET``, ``request.POST``, and ``request.params``),
see :class:`pyramid.interfaces.IMultiDict`.

.. autofunction:: apply_request_extensions(request)
6 changes: 6 additions & 0 deletions docs/api/static.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
:members:
:inherited-members:

.. autoclass:: PathSegmentCacheBuster
:members:

.. autoclass:: QueryStringCacheBuster
:members:

.. autoclass:: PathSegmentMd5CacheBuster
:members:

Expand Down
3 changes: 2 additions & 1 deletion docs/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Glossary

response factory
An object which, provided a :term:`request` as a single positional
argument, returns a Pyramid-compatible response.
argument, returns a Pyramid-compatible response. See
:class:`pyramid.interfaces.IResponseFactory`.

response
An object returned by a :term:`view callable` that represents response
Expand Down
15 changes: 8 additions & 7 deletions docs/narr/assets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -446,19 +446,20 @@ In order to implement your own cache buster, you can write your own class from
scratch which implements the :class:`~pyramid.interfaces.ICacheBuster`
interface. Alternatively you may choose to subclass one of the existing
implementations. One of the most likely scenarios is you'd want to change the
way the asset token is generated. To do this just subclass an existing
implementation and replace the :meth:`~pyramid.interfaces.ICacheBuster.token`
method. Here is an example which just uses Git to get the hash of the
currently checked out code:
way the asset token is generated. To do this just subclass either
:class:`~pyramid.static.PathSegmentCacheBuster` or
:class:`~pyramid.static.QueryStringCacheBuster` and define a
``tokenize(pathspec)`` method. Here is an example which just uses Git to get
the hash of the currently checked out code:

.. code-block:: python
:linenos:
import os
import subprocess
from pyramid.static import PathSegmentMd5CacheBuster
from pyramid.static import PathSegmentCacheBuster
class GitCacheBuster(PathSegmentMd5CacheBuster):
class GitCacheBuster(PathSegmentCacheBuster):
"""
Assuming your code is installed as a Git checkout, as opposed to as an
egg from an egg repository like PYPI, you can use this cachebuster to
Expand All @@ -470,7 +471,7 @@ currently checked out code:
['git', 'rev-parse', 'HEAD'],
cwd=here).strip()
def token(self, pathspec):
def tokenize(self, pathspec):
return self.sha1
Choosing a Cache Buster
Expand Down
9 changes: 6 additions & 3 deletions docs/narr/hooks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,12 @@ Whenever :app:`Pyramid` returns a response from a view it creates a
object.

The factory that :app:`Pyramid` uses to create a response object instance can be
changed by passing a ``response_factory`` argument to the constructor of the
:term:`configurator`. This argument can be either a callable or a
:term:`dotted Python name` representing a callable.
changed by passing a :class:`pyramid.interfaces.IResponseFactory` argument to
the constructor of the :term:`configurator`. This argument can be either a
callable or a :term:`dotted Python name` representing a callable.

The factory takes a single positional argument, which is a :term:`Request`
object. The argument may be ``None``.

.. code-block:: python
:linenos:
Expand Down
Loading

0 comments on commit d433397

Please sign in to comment.