summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2012-06-04 19:14:59 -0400
committerChris McDonough <chrism@plope.com>2012-06-04 19:14:59 -0400
commite5b1331bc66e5bfab338dc064c558e00c7fdf5e6 (patch)
treeac6dd92e0f0f09c6e6f3f16e9cfd8358e98f6c17
parent60055439b06eee11468a70787698fab33673a7ae (diff)
parent8fa72fb42d34f62c6187fae416d379a216d7e869 (diff)
downloadpyramid-e5b1331bc66e5bfab338dc064c558e00c7fdf5e6.tar.gz
pyramid-e5b1331bc66e5bfab338dc064c558e00c7fdf5e6.tar.bz2
pyramid-e5b1331bc66e5bfab338dc064c558e00c7fdf5e6.zip
Merge branch 'master' of github.com:Pylons/pyramid
-rw-r--r--docs/narr/project.rst12
-rw-r--r--pyramid/config/views.py4
-rw-r--r--pyramid/tests/test_response.py2
3 files changed, 10 insertions, 8 deletions
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index d18d93605..1e2c225d2 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -144,13 +144,13 @@ directories which he creates within his ``~/projects`` directory. On
Windows, it's a good idea to put project directories within a directory that
contains no space characters, so it's wise to *avoid* a path that contains
i.e. ``My Documents``. As a result, the author, when he uses Windows, just
-puts his projects in ``C:\\projects``.
+puts his projects in ``C:\projects``.
.. warning::
You’ll need to avoid using ``pcreate`` to create a project with the same
- as a Python standard library component. In particular, this means you
- should avoid using names the names ``site`` or ``test``, both of which
+ name as a Python standard library component. In particular, this means you
+ should avoid using the names ``site`` or ``test``, both of which
conflict with Python standard library packages. You should also avoid
using the name ``pyramid``, which will conflict with Pyramid itself.
@@ -684,7 +684,7 @@ testing your application, packaging, and distributing your application.
.. note::
- ``setup.py`` is the defacto standard which Python developers use to
+ ``setup.py`` is the de facto standard which Python developers use to
distribute their reusable code. You can read more about ``setup.py`` files
and their usage in the `Setuptools documentation
<http://peak.telecommunity.com/DevCenter/setuptools>`_ and `The
@@ -966,7 +966,7 @@ named ``views`` instead of within a single ``views.py`` file, you might:
You can then continue to add view callable functions to the ``blog.py``
module, but you can also add other ``.py`` files which contain view callable
functions to the ``views`` directory. As long as you use the
-``@view_config`` directive to register views in conjuction with
+``@view_config`` directive to register views in conjunction with
``config.scan()`` they will be picked up automatically when the application
is restarted.
@@ -994,7 +994,7 @@ run a :app:`Pyramid` application is purely conventional based on the output
of its scaffolding. But we strongly recommend using while developing your
application, because many other convenience introspection commands (such as
``pviews``, ``prequest``, ``proutes`` and others) are also implemented in
-terms of configuration availaibility of this ``.ini`` file format. It also
+terms of configuration availability of this ``.ini`` file format. It also
configures Pyramid logging and provides the ``--reload`` switch for
convenient restarting of the server when code changes.
diff --git a/pyramid/config/views.py b/pyramid/config/views.py
index ad4df28d8..9e9b5321b 100644
--- a/pyramid/config/views.py
+++ b/pyramid/config/views.py
@@ -5,9 +5,9 @@ from functools import wraps
from zope.interface import (
Interface,
- classProvides,
implementedBy,
implementer,
+ provider,
)
from zope.interface.interfaces import IInterface
@@ -385,8 +385,8 @@ class ViewDeriver(object):
return decorator(view)
@implementer(IViewMapper)
+@provider(IViewMapperFactory)
class DefaultViewMapper(object):
- classProvides(IViewMapperFactory)
def __init__(self, **kw):
self.attr = kw.get('attr')
diff --git a/pyramid/tests/test_response.py b/pyramid/tests/test_response.py
index 03d96c1c4..e6d90f979 100644
--- a/pyramid/tests/test_response.py
+++ b/pyramid/tests/test_response.py
@@ -31,11 +31,13 @@ class TestFileResponse(unittest.TestCase):
path = self._getPath()
r = self._makeOne(path, content_type='image/jpeg')
self.assertEqual(r.content_type, 'image/jpeg')
+ r.app_iter.close()
def test_without_content_type(self):
path = self._getPath()
r = self._makeOne(path)
self.assertEqual(r.content_type, 'text/plain')
+ r.app_iter.close()
class TestFileIter(unittest.TestCase):
def _makeOne(self, file, block_size):