From f35062faf63dc62addc8f05e9d8f0637bbee58e0 Mon Sep 17 00:00:00 2001 From: Bryce Boe Date: Tue, 15 May 2012 19:38:46 -0700 Subject: Fixed spelling errors and double backslash in `C:\`. --- docs/narr/project.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/narr/project.rst b/docs/narr/project.rst index d18d93605..da184ada7 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 + 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 `_ 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. -- cgit v1.2.3 From c9888fcafe4b78924fc0f8b55c4730667bba8558 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Wed, 16 May 2012 17:46:08 -0400 Subject: Remove last class advice usage (breaks under Py3k with new zope.interface. --- pyramid/config/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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') -- cgit v1.2.3 From 68eea7d468b1a53f6ee69f19db44e5c60a563c87 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Wed, 16 May 2012 17:46:30 -0400 Subject: Fix resource leak warning under Py3k. --- pyramid/tests/test_response.py | 2 ++ 1 file changed, 2 insertions(+) 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): -- cgit v1.2.3 From be8e3acc64767e5a0ba798037118da9f262bdf93 Mon Sep 17 00:00:00 2001 From: Zeb Palmer Date: Thu, 31 May 2012 21:03:38 -0600 Subject: Added missing word "name" --- docs/narr/project.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/narr/project.rst b/docs/narr/project.rst index da184ada7..1e2c225d2 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -149,7 +149,7 @@ 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 + 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. -- cgit v1.2.3