From 1a48c8b7952d35b217c3adf3f6be11026fefd03b Mon Sep 17 00:00:00 2001 From: Laurence Rowe Date: Wed, 24 Apr 2013 14:38:32 -0700 Subject: Laurence Rowe contributor agreement. --- CONTRIBUTORS.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 97eb54f7b..7cd7123c5 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -198,3 +198,5 @@ Contributors - Georges Dubus, 2013/03/21 - Jason McKellar, 2013/03/28 + +- Laurence Rowe, 2013/04/24 -- cgit v1.2.3 From f3bffdfc35a5ecbb45b5f63bdb08bdc41553b63d Mon Sep 17 00:00:00 2001 From: Laurence Rowe Date: Wed, 24 Apr 2013 14:38:41 -0700 Subject: Consider superclass views after predicate mismatch The merged fix for #786 only worked for views registered to an interface. --- pyramid/router.py | 2 +- pyramid/tests/test_router.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pyramid/router.py b/pyramid/router.py index 63c12a1af..f780f6711 100644 --- a/pyramid/router.py +++ b/pyramid/router.py @@ -165,7 +165,7 @@ class Router(object): except PredicateMismatch: # look for other views that meet the predicate # criteria - for iface in context_iface.flattened(): + for iface in context_iface.__sro__[1:]: view_callable = adapters.lookup( (IViewClassifier, request.request_iface, iface), IView, name=view_name, default=None) diff --git a/pyramid/tests/test_router.py b/pyramid/tests/test_router.py index 432959147..b836d7d72 100644 --- a/pyramid/tests/test_router.py +++ b/pyramid/tests/test_router.py @@ -1180,11 +1180,9 @@ class TestRouter(unittest.TestCase): from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRequest, IResponse from pyramid.response import Response - from zope.interface import Interface, implementer - class IContext(Interface): + class BaseContext: pass - @implementer(IContext) - class DummyContext: + class DummyContext(BaseContext): pass context = DummyContext() self._registerTraverserFactory(context) @@ -1193,7 +1191,7 @@ class TestRouter(unittest.TestCase): DummyContext) good_view = DummyView('abc') self._registerView(self.config.derive_view(good_view), - '', IViewClassifier, IRequest, IContext) + '', IViewClassifier, IRequest, BaseContext) router = self._makeOne() def make_response(s): return Response(s) -- cgit v1.2.3 From ec16183223f20d6207348528290c7b33450c2385 Mon Sep 17 00:00:00 2001 From: Junaid Ali Date: Fri, 31 May 2013 17:36:52 -0500 Subject: Added test to cover failing statements in scaffold view --- pyramid/scaffolds/alchemy/+package+/tests.py_tmpl | 26 +++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/pyramid/scaffolds/alchemy/+package+/tests.py_tmpl b/pyramid/scaffolds/alchemy/+package+/tests.py_tmpl index a26cd9eeb..e6425eb91 100644 --- a/pyramid/scaffolds/alchemy/+package+/tests.py_tmpl +++ b/pyramid/scaffolds/alchemy/+package+/tests.py_tmpl @@ -6,7 +6,7 @@ from pyramid import testing from .models import DBSession -class TestMyView(unittest.TestCase): +class TestMyViewSuccessCondition(unittest.TestCase): def setUp(self): self.config = testing.setUp() from sqlalchemy import create_engine @@ -25,9 +25,31 @@ class TestMyView(unittest.TestCase): DBSession.remove() testing.tearDown() - def test_it(self): + def test_passing_view(self): from .views import my_view request = testing.DummyRequest() info = my_view(request) self.assertEqual(info['one'].name, 'one') self.assertEqual(info['project'], '{{project}}') + + +class TestMyViewFailureCondition(unittest.TestCase): + def setUp(self): + self.config = testing.setUp() + from sqlalchemy import create_engine + engine = create_engine('sqlite://') + from .models import ( + Base, + MyModel, + ) + DBSession.configure(bind=engine) + + def tearDown(self): + DBSession.remove() + testing.tearDown() + + def test_failing_view(self): + from .views import my_view + request = testing.DummyRequest() + info = my_view(request) + self.assertEqual(info.status_int, 500) \ No newline at end of file -- cgit v1.2.3 From 188aa7ee1d4cbc55d965a452d45201852b46df58 Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Mon, 3 Jun 2013 23:10:08 +0200 Subject: Add a parent_domain option for auth_tkt policy This change adds a new ``parent_domain`` option to ``AuthTktAuthenticationPolicy`` which sets the authentication cookie as a wildcard cookie on the parent domain. This is useful if you have multiple sites sharing the same domain. --- CHANGES.txt | 4 ++++ pyramid/authentication.py | 40 +++++++++++++++++++++++++++--------- pyramid/tests/test_authentication.py | 24 ++++++++++++++++++++++ 3 files changed, 58 insertions(+), 10 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a471addce..5153e056e 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,10 @@ Features ``pyramid.config.Configurator.add_static_view``. This allows externally-hosted static URLs to be generated based on the current protocol. +- The ``AuthTktAuthenticationPolicy`` has a new ``parent_domain`` option to + set the authentication cookie as a wildcard cookie on the parent domain. This + is useful if you have multiple sites sharing the same domain. + - The ``AuthTktAuthenticationPolicy`` now supports IPv6 addresses when using the ``include_ip=True`` option. This is possibly incompatible with alternative ``auth_tkt`` implementations, as the specification does not diff --git a/pyramid/authentication.py b/pyramid/authentication.py index bc0286ed3..c1aa970bd 100644 --- a/pyramid/authentication.py +++ b/pyramid/authentication.py @@ -511,9 +511,23 @@ class AuthTktAuthenticationPolicy(CallbackAuthenticationPolicy): ``wild_domain`` Default: ``True``. An auth_tkt cookie will be generated for the - wildcard domain. + wildcard domain. If your site is hosted as ``example.com`` this + will make the cookie available for sites underneath ``example.com`` + such as ``www.example.com``. Optional. + ``parent_domain`` + + Default: ``False``. An auth_tkt cookie will be generated for the + parent domain of the current site. For example if your site is + hosted under ``www.example.com`` a cookie will be generated for + ``.example.com``. This can be useful if you have multiple sites + sharing the same domain. This option supercedes the ``wild_domain`` + option. + Optional. + + This option is available as of :app:`Pyramid` 1.5. + ``hashalg`` Default: ``md5`` (the literal string). @@ -565,7 +579,8 @@ class AuthTktAuthenticationPolicy(CallbackAuthenticationPolicy): http_only=False, wild_domain=True, debug=False, - hashalg=_marker + hashalg=_marker, + parent_domain=False, ): if hashalg is _marker: hashalg = 'md5' @@ -603,6 +618,7 @@ class AuthTktAuthenticationPolicy(CallbackAuthenticationPolicy): path=path, wild_domain=wild_domain, hashalg=hashalg, + parent_domain=parent_domain, ) self.callback = callback self.debug = debug @@ -800,7 +816,7 @@ class AuthTktCookieHelper(object): def __init__(self, secret, cookie_name='auth_tkt', secure=False, include_ip=False, timeout=None, reissue_time=None, max_age=None, http_only=False, path="/", wild_domain=True, - hashalg='md5'): + hashalg='md5', parent_domain=False): self.secret = secret self.cookie_name = cookie_name self.include_ip = include_ip @@ -811,6 +827,7 @@ class AuthTktCookieHelper(object): self.http_only = http_only self.path = path self.wild_domain = wild_domain + self.parent_domain = parent_domain self.hashalg = hashalg static_flags = [] @@ -850,16 +867,19 @@ class AuthTktCookieHelper(object): cookies = [ ('Set-Cookie', '%s="%s"; Path=%s%s%s' % ( - self.cookie_name, value, self.path, max_age, self.static_flags)), - ('Set-Cookie', '%s="%s"; Path=%s; Domain=%s%s%s' % ( - self.cookie_name, value, self.path, cur_domain, max_age, - self.static_flags)), + self.cookie_name, value, self.path, max_age, self.static_flags)) ] - if self.wild_domain: - wild_domain = '.' + cur_domain + domains = [] + if self.parent_domain and cur_domain.count('.') > 1: + domains.append('.' + cur_domain.split('.', 1)[1]) + else: + domains.append(cur_domain) + if self.wild_domain: + domains.append('.' + cur_domain) + for domain in domains: cookies.append(('Set-Cookie', '%s="%s"; Path=%s; Domain=%s%s%s' % ( - self.cookie_name, value, self.path, wild_domain, max_age, + self.cookie_name, value, self.path, domain, max_age, self.static_flags))) return cookies diff --git a/pyramid/tests/test_authentication.py b/pyramid/tests/test_authentication.py index cfabf9a9d..960a87a6a 100644 --- a/pyramid/tests/test_authentication.py +++ b/pyramid/tests/test_authentication.py @@ -947,6 +947,30 @@ class TestAuthTktCookieHelper(unittest.TestCase): self.assertTrue(result[1][1].endswith('; Path=/; Domain=localhost')) self.assertTrue(result[1][1].startswith('auth_tkt=')) + def test_remember_parent_domain(self): + helper = self._makeOne('secret', parent_domain=True) + request = self._makeRequest() + request.environ['HTTP_HOST'] = 'www.example.com' + result = helper.remember(request, 'other') + self.assertEqual(len(result), 2) + + self.assertEqual(result[0][0], 'Set-Cookie') + self.assertTrue(result[0][1].endswith('; Path=/')) + self.assertTrue(result[0][1].startswith('auth_tkt=')) + + self.assertEqual(result[1][0], 'Set-Cookie') + self.assertTrue(result[1][1].endswith('; Path=/; Domain=.example.com')) + self.assertTrue(result[1][1].startswith('auth_tkt=')) + + def test_remember_parent_domain_supercedes_wild_domain(self): + helper = self._makeOne('secret', parent_domain=True, wild_domain=True) + request = self._makeRequest() + request.environ['HTTP_HOST'] = 'www.example.com' + result = helper.remember(request, 'other') + self.assertEqual(len(result), 2) + self.assertTrue(result[0][1].endswith('; Path=/')) + self.assertTrue(result[1][1].endswith('; Path=/; Domain=.example.com')) + def test_remember_domain_has_port(self): helper = self._makeOne('secret', wild_domain=False) request = self._makeRequest() -- cgit v1.2.3 From da5a402fdc5d02728d261f5652b6a22881eeb9a5 Mon Sep 17 00:00:00 2001 From: Junaid Ali Date: Tue, 4 Jun 2013 14:41:22 -0500 Subject: Added some test dependencies --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 4a3cecd98..f5768e23b 100644 --- a/setup.py +++ b/setup.py @@ -52,6 +52,8 @@ install_requires=[ tests_require = [ 'WebTest >= 1.3.1', # py3 compat + 'webtest', + 'zope.component', ] if not PY3: -- cgit v1.2.3 From 27be34831a376e7041983531e0a17af76c06b482 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 2 Jul 2013 00:28:31 -0400 Subject: Allow 'prequest' to send basic auth headers. Also, allow passing PROPFIND / OPTIONS as methods. --- pyramid/scripts/prequest.py | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/pyramid/scripts/prequest.py b/pyramid/scripts/prequest.py index 3d8921b15..874fd1bca 100644 --- a/pyramid/scripts/prequest.py +++ b/pyramid/scripts/prequest.py @@ -1,3 +1,4 @@ +import base64 import optparse import sys import textwrap @@ -29,6 +30,12 @@ class PRequestCommand(object): Use "prequest --method=PATCH config.ini /path < data" to do a PATCH with the given request body. + Use "prequest --method=OPTIONS config.ini /path" to do an + OPTIONS request. + + Use "prequest --method=PROPFIND config.ini /path" to do an + PROPFIND request. + If the path is relative (doesn't begin with "/") it is interpreted as relative to "/". The path passed to this script should be URL-quoted. The path can be succeeded with a query string (e.g. `/path?a=1&=b2'). @@ -66,9 +73,17 @@ class PRequestCommand(object): parser.add_option( '-m', '--method', dest='method', - choices=['GET', 'HEAD', 'POST', 'PUT', 'PATCH', 'DELETE'], + choices=['GET', 'HEAD', 'POST', 'PUT', 'PATCH','DELETE', + 'PROPFIND', 'OPTIONS'], type='choice', - help='Request method type', + help='Request method type (GET, POST, PUT, PATCH, DELETE, ' + 'PROPFIND, OPTIONS)', + ) + parser.add_option( + '-l', '--login', + dest='login', + type='string', + help='HTTP basic auth username:password pair', ) get_app = staticmethod(get_app) @@ -99,6 +114,10 @@ class PRequestCommand(object): path = url_unquote(path) headers = {} + if self.options.login: + enc = base64.b64encode(self.options.login.encode('ascii')) + headers['Authorization'] = 'Basic ' + enc.decode('ascii') + if self.options.headers: for item in self.options.headers: if ':' not in item: -- cgit v1.2.3 From 3cdae905ea6805384d830ca1107731f4a747372a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 11 Jul 2013 15:09:05 -0400 Subject: reST fix --- pyramid/url.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyramid/url.py b/pyramid/url.py index 84b58ac45..83f0d1eab 100644 --- a/pyramid/url.py +++ b/pyramid/url.py @@ -387,7 +387,7 @@ class URLMethodsMixin(object): resulting url of a resource that has a path of ``/baz/bar`` will be ``http://foo/baz/bar``. If you want to generate completely relative URLs with no leading scheme, host, port, or initial path, you can - pass ``app_url=''`. Passing ``app_url=''` when the resource path is + pass ``app_url=''``. Passing ``app_url=''`` when the resource path is ``/baz/bar`` will return ``/baz/bar``. .. versionadded:: 1.3 -- cgit v1.2.3 From f1f49bfacc5fd1fef1b4be23cdd26ccb4be6e0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Araujo?= Date: Thu, 11 Jul 2013 16:44:24 -0400 Subject: Minor markup update to clarify object type --- pyramid/config/routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyramid/config/routes.py b/pyramid/config/routes.py index f495794b4..c86e4a2dd 100644 --- a/pyramid/config/routes.py +++ b/pyramid/config/routes.py @@ -90,10 +90,10 @@ class RoutesConfiguratorMixin(object): ``traverse`` argument provided to ``add_route`` is ``/{article}``, when a request comes in that causes the route to match in such a way that the ``article`` match value is - '1' (when the request URI is ``/articles/1/edit``), the + ``'1'`` (when the request URI is ``/articles/1/edit``), the traversal path will be generated as ``/1``. This means that the root object's ``__getitem__`` will be called with the - name ``1`` during the traversal phase. If the ``1`` object + name ``'1'`` during the traversal phase. If the ``'1'`` object exists, it will become the :term:`context` of the request. :ref:`traversal_chapter` has more information about traversal. -- cgit v1.2.3 From 4ff3cc2e7b7ce256749e292ca7a86ae146db8513 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Thu, 11 Jul 2013 20:54:28 -0400 Subject: Typo firx from merwok. --- MANIFEST.in | 725 ++++++++++++++++++++++++++++++++++++++++++++ pyramid/scripts/prequest.py | 2 +- 2 files changed, 726 insertions(+), 1 deletion(-) create mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 000000000..bc89253ce --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,725 @@ +.gitignore +.gitmodules +.travis.yml +BFG_HISTORY.txt +CHANGES.txt +CONTRIBUTORS.txt +COPYRIGHT.txt +HACKING.txt +HISTORY.txt +LICENSE.txt +README.rst +RELEASING.txt +TODO.txt +docs/.gitignore +docs/Makefile +docs/_static/latex-note.png +docs/_static/latex-warning.png +docs/_themes +docs/api/authentication.rst +docs/api/authorization.rst +docs/api/compat.rst +docs/api/config.rst +docs/api/decorator.rst +docs/api/events.rst +docs/api/exceptions.rst +docs/api/httpexceptions.rst +docs/api/i18n.rst +docs/api/interfaces.rst +docs/api/location.rst +docs/api/paster.rst +docs/api/path.rst +docs/api/registry.rst +docs/api/renderers.rst +docs/api/request.rst +docs/api/response.rst +docs/api/scaffolds.rst +docs/api/scripting.rst +docs/api/security.rst +docs/api/session.rst +docs/api/settings.rst +docs/api/static.rst +docs/api/testing.rst +docs/api/threadlocal.rst +docs/api/traversal.rst +docs/api/tweens.rst +docs/api/url.rst +docs/api/view.rst +docs/api/wsgi.rst +docs/authorintro.rst +docs/changes.rst +docs/conf.py +docs/conventions.rst +docs/convert_images.sh +docs/copyright.rst +docs/coversizing.py +docs/designdefense.rst +docs/foreword.rst +docs/glossary.rst +docs/index.rst +docs/latexindex.rst +docs/make_book +docs/make_epub +docs/make_pdf +docs/narr/MyProject/CHANGES.txt +docs/narr/MyProject/MANIFEST.in +docs/narr/MyProject/README.txt +docs/narr/MyProject/development.ini +docs/narr/MyProject/myproject/__init__.py +docs/narr/MyProject/myproject/static/favicon.ico +docs/narr/MyProject/myproject/static/footerbg.png +docs/narr/MyProject/myproject/static/headerbg.png +docs/narr/MyProject/myproject/static/ie6.css +docs/narr/MyProject/myproject/static/middlebg.png +docs/narr/MyProject/myproject/static/pylons.css +docs/narr/MyProject/myproject/static/pyramid-small.png +docs/narr/MyProject/myproject/static/pyramid.png +docs/narr/MyProject/myproject/static/transparent.gif +docs/narr/MyProject/myproject/templates/mytemplate.pt +docs/narr/MyProject/myproject/tests.py +docs/narr/MyProject/myproject/views.py +docs/narr/MyProject/production.ini +docs/narr/MyProject/setup.cfg +docs/narr/MyProject/setup.py +docs/narr/advconfig.rst +docs/narr/assets.rst +docs/narr/commandline.rst +docs/narr/configuration.rst +docs/narr/environment.rst +docs/narr/events.rst +docs/narr/extconfig.rst +docs/narr/extending.rst +docs/narr/firstapp.rst +docs/narr/hellotraversal.py +docs/narr/hellotraversal.rst +docs/narr/helloworld.py +docs/narr/hooks.rst +docs/narr/hybrid.rst +docs/narr/i18n.rst +docs/narr/install.rst +docs/narr/introduction.rst +docs/narr/introspector.rst +docs/narr/logging.rst +docs/narr/muchadoabouttraversal.rst +docs/narr/paste.rst +docs/narr/project-debug.png +docs/narr/project.png +docs/narr/project.rst +docs/narr/renderers.rst +docs/narr/resources.rst +docs/narr/resourcetreetraverser.png +docs/narr/router.png +docs/narr/router.rst +docs/narr/scaffolding.rst +docs/narr/security.rst +docs/narr/sessions.rst +docs/narr/startup.rst +docs/narr/subrequest.rst +docs/narr/tb_introspector.png +docs/narr/templates.rst +docs/narr/testing.rst +docs/narr/threadlocals.rst +docs/narr/traversal.rst +docs/narr/upgrading.rst +docs/narr/urldispatch.rst +docs/narr/vhosting.rst +docs/narr/viewconfig.rst +docs/narr/views.rst +docs/narr/webob.rst +docs/narr/zca.rst +docs/python-3.png +docs/remake +docs/tutorials/.gitignore +docs/tutorials/bfg/index.rst +docs/tutorials/modwsgi/index.rst +docs/tutorials/wiki/NOTE-relocatable.txt +docs/tutorials/wiki/authorization.rst +docs/tutorials/wiki/background.rst +docs/tutorials/wiki/basiclayout.rst +docs/tutorials/wiki/definingmodels.rst +docs/tutorials/wiki/definingviews.rst +docs/tutorials/wiki/design.rst +docs/tutorials/wiki/distributing.rst +docs/tutorials/wiki/index.rst +docs/tutorials/wiki/installation.rst +docs/tutorials/wiki/src/authorization/CHANGES.txt +docs/tutorials/wiki/src/authorization/MANIFEST.in +docs/tutorials/wiki/src/authorization/README.txt +docs/tutorials/wiki/src/authorization/development.ini +docs/tutorials/wiki/src/authorization/production.ini +docs/tutorials/wiki/src/authorization/setup.cfg +docs/tutorials/wiki/src/authorization/setup.py +docs/tutorials/wiki/src/authorization/tutorial/__init__.py +docs/tutorials/wiki/src/authorization/tutorial/models.py +docs/tutorials/wiki/src/authorization/tutorial/security.py +docs/tutorials/wiki/src/authorization/tutorial/static/favicon.ico +docs/tutorials/wiki/src/authorization/tutorial/static/footerbg.png +docs/tutorials/wiki/src/authorization/tutorial/static/headerbg.png +docs/tutorials/wiki/src/authorization/tutorial/static/ie6.css +docs/tutorials/wiki/src/authorization/tutorial/static/middlebg.png +docs/tutorials/wiki/src/authorization/tutorial/static/pylons.css +docs/tutorials/wiki/src/authorization/tutorial/static/pyramid-small.png +docs/tutorials/wiki/src/authorization/tutorial/static/pyramid.png +docs/tutorials/wiki/src/authorization/tutorial/static/transparent.gif +docs/tutorials/wiki/src/authorization/tutorial/templates/edit.pt +docs/tutorials/wiki/src/authorization/tutorial/templates/login.pt +docs/tutorials/wiki/src/authorization/tutorial/templates/mytemplate.pt +docs/tutorials/wiki/src/authorization/tutorial/templates/view.pt +docs/tutorials/wiki/src/authorization/tutorial/tests.py +docs/tutorials/wiki/src/authorization/tutorial/views.py +docs/tutorials/wiki/src/basiclayout/CHANGES.txt +docs/tutorials/wiki/src/basiclayout/MANIFEST.in +docs/tutorials/wiki/src/basiclayout/README.txt +docs/tutorials/wiki/src/basiclayout/development.ini +docs/tutorials/wiki/src/basiclayout/production.ini +docs/tutorials/wiki/src/basiclayout/setup.cfg +docs/tutorials/wiki/src/basiclayout/setup.py +docs/tutorials/wiki/src/basiclayout/tutorial/__init__.py +docs/tutorials/wiki/src/basiclayout/tutorial/models.py +docs/tutorials/wiki/src/basiclayout/tutorial/static/favicon.ico +docs/tutorials/wiki/src/basiclayout/tutorial/static/footerbg.png +docs/tutorials/wiki/src/basiclayout/tutorial/static/headerbg.png +docs/tutorials/wiki/src/basiclayout/tutorial/static/ie6.css +docs/tutorials/wiki/src/basiclayout/tutorial/static/middlebg.png +docs/tutorials/wiki/src/basiclayout/tutorial/static/pylons.css +docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid-small.png +docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid.png +docs/tutorials/wiki/src/basiclayout/tutorial/static/transparent.gif +docs/tutorials/wiki/src/basiclayout/tutorial/templates/mytemplate.pt +docs/tutorials/wiki/src/basiclayout/tutorial/tests.py +docs/tutorials/wiki/src/basiclayout/tutorial/views.py +docs/tutorials/wiki/src/models/CHANGES.txt +docs/tutorials/wiki/src/models/MANIFEST.in +docs/tutorials/wiki/src/models/README.txt +docs/tutorials/wiki/src/models/development.ini +docs/tutorials/wiki/src/models/production.ini +docs/tutorials/wiki/src/models/setup.cfg +docs/tutorials/wiki/src/models/setup.py +docs/tutorials/wiki/src/models/tutorial/__init__.py +docs/tutorials/wiki/src/models/tutorial/models.py +docs/tutorials/wiki/src/models/tutorial/static/favicon.ico +docs/tutorials/wiki/src/models/tutorial/static/footerbg.png +docs/tutorials/wiki/src/models/tutorial/static/headerbg.png +docs/tutorials/wiki/src/models/tutorial/static/ie6.css +docs/tutorials/wiki/src/models/tutorial/static/middlebg.png +docs/tutorials/wiki/src/models/tutorial/static/pylons.css +docs/tutorials/wiki/src/models/tutorial/static/pyramid-small.png +docs/tutorials/wiki/src/models/tutorial/static/pyramid.png +docs/tutorials/wiki/src/models/tutorial/static/transparent.gif +docs/tutorials/wiki/src/models/tutorial/templates/mytemplate.pt +docs/tutorials/wiki/src/models/tutorial/tests.py +docs/tutorials/wiki/src/models/tutorial/views.py +docs/tutorials/wiki/src/tests/CHANGES.txt +docs/tutorials/wiki/src/tests/MANIFEST.in +docs/tutorials/wiki/src/tests/README.txt +docs/tutorials/wiki/src/tests/development.ini +docs/tutorials/wiki/src/tests/production.ini +docs/tutorials/wiki/src/tests/setup.cfg +docs/tutorials/wiki/src/tests/setup.py +docs/tutorials/wiki/src/tests/tutorial/__init__.py +docs/tutorials/wiki/src/tests/tutorial/models.py +docs/tutorials/wiki/src/tests/tutorial/security.py +docs/tutorials/wiki/src/tests/tutorial/static/favicon.ico +docs/tutorials/wiki/src/tests/tutorial/static/footerbg.png +docs/tutorials/wiki/src/tests/tutorial/static/headerbg.png +docs/tutorials/wiki/src/tests/tutorial/static/ie6.css +docs/tutorials/wiki/src/tests/tutorial/static/middlebg.png +docs/tutorials/wiki/src/tests/tutorial/static/pylons.css +docs/tutorials/wiki/src/tests/tutorial/static/pyramid-small.png +docs/tutorials/wiki/src/tests/tutorial/static/pyramid.png +docs/tutorials/wiki/src/tests/tutorial/static/transparent.gif +docs/tutorials/wiki/src/tests/tutorial/templates/edit.pt +docs/tutorials/wiki/src/tests/tutorial/templates/login.pt +docs/tutorials/wiki/src/tests/tutorial/templates/mytemplate.pt +docs/tutorials/wiki/src/tests/tutorial/templates/view.pt +docs/tutorials/wiki/src/tests/tutorial/tests.py +docs/tutorials/wiki/src/tests/tutorial/views.py +docs/tutorials/wiki/src/views/CHANGES.txt +docs/tutorials/wiki/src/views/MANIFEST.in +docs/tutorials/wiki/src/views/README.txt +docs/tutorials/wiki/src/views/development.ini +docs/tutorials/wiki/src/views/production.ini +docs/tutorials/wiki/src/views/setup.cfg +docs/tutorials/wiki/src/views/setup.py +docs/tutorials/wiki/src/views/tutorial/__init__.py +docs/tutorials/wiki/src/views/tutorial/models.py +docs/tutorials/wiki/src/views/tutorial/static/favicon.ico +docs/tutorials/wiki/src/views/tutorial/static/footerbg.png +docs/tutorials/wiki/src/views/tutorial/static/headerbg.png +docs/tutorials/wiki/src/views/tutorial/static/ie6.css +docs/tutorials/wiki/src/views/tutorial/static/middlebg.png +docs/tutorials/wiki/src/views/tutorial/static/pylons.css +docs/tutorials/wiki/src/views/tutorial/static/pyramid-small.png +docs/tutorials/wiki/src/views/tutorial/static/pyramid.png +docs/tutorials/wiki/src/views/tutorial/static/transparent.gif +docs/tutorials/wiki/src/views/tutorial/templates/edit.pt +docs/tutorials/wiki/src/views/tutorial/templates/mytemplate.pt +docs/tutorials/wiki/src/views/tutorial/templates/view.pt +docs/tutorials/wiki/src/views/tutorial/tests.py +docs/tutorials/wiki/src/views/tutorial/views.py +docs/tutorials/wiki/tests.rst +docs/tutorials/wiki2/authorization.rst +docs/tutorials/wiki2/background.rst +docs/tutorials/wiki2/basiclayout.rst +docs/tutorials/wiki2/definingmodels.rst +docs/tutorials/wiki2/definingviews.rst +docs/tutorials/wiki2/design.rst +docs/tutorials/wiki2/distributing.rst +docs/tutorials/wiki2/index.rst +docs/tutorials/wiki2/installation.rst +docs/tutorials/wiki2/src/authorization/CHANGES.txt +docs/tutorials/wiki2/src/authorization/MANIFEST.in +docs/tutorials/wiki2/src/authorization/README.txt +docs/tutorials/wiki2/src/authorization/development.ini +docs/tutorials/wiki2/src/authorization/production.ini +docs/tutorials/wiki2/src/authorization/setup.cfg +docs/tutorials/wiki2/src/authorization/setup.py +docs/tutorials/wiki2/src/authorization/tutorial/__init__.py +docs/tutorials/wiki2/src/authorization/tutorial/models.py +docs/tutorials/wiki2/src/authorization/tutorial/scripts/__init__.py +docs/tutorials/wiki2/src/authorization/tutorial/scripts/initializedb.py +docs/tutorials/wiki2/src/authorization/tutorial/security.py +docs/tutorials/wiki2/src/authorization/tutorial/static/favicon.ico +docs/tutorials/wiki2/src/authorization/tutorial/static/footerbg.png +docs/tutorials/wiki2/src/authorization/tutorial/static/headerbg.png +docs/tutorials/wiki2/src/authorization/tutorial/static/ie6.css +docs/tutorials/wiki2/src/authorization/tutorial/static/middlebg.png +docs/tutorials/wiki2/src/authorization/tutorial/static/pylons.css +docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid-small.png +docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid.png +docs/tutorials/wiki2/src/authorization/tutorial/static/transparent.gif +docs/tutorials/wiki2/src/authorization/tutorial/templates/edit.pt +docs/tutorials/wiki2/src/authorization/tutorial/templates/login.pt +docs/tutorials/wiki2/src/authorization/tutorial/templates/mytemplate.pt +docs/tutorials/wiki2/src/authorization/tutorial/templates/view.pt +docs/tutorials/wiki2/src/authorization/tutorial/tests.py +docs/tutorials/wiki2/src/authorization/tutorial/views.py +docs/tutorials/wiki2/src/basiclayout/CHANGES.txt +docs/tutorials/wiki2/src/basiclayout/MANIFEST.in +docs/tutorials/wiki2/src/basiclayout/README.txt +docs/tutorials/wiki2/src/basiclayout/development.ini +docs/tutorials/wiki2/src/basiclayout/production.ini +docs/tutorials/wiki2/src/basiclayout/setup.cfg +docs/tutorials/wiki2/src/basiclayout/setup.py +docs/tutorials/wiki2/src/basiclayout/tutorial/__init__.py +docs/tutorials/wiki2/src/basiclayout/tutorial/models.py +docs/tutorials/wiki2/src/basiclayout/tutorial/scripts/__init__.py +docs/tutorials/wiki2/src/basiclayout/tutorial/scripts/initializedb.py +docs/tutorials/wiki2/src/basiclayout/tutorial/static/favicon.ico +docs/tutorials/wiki2/src/basiclayout/tutorial/static/footerbg.png +docs/tutorials/wiki2/src/basiclayout/tutorial/static/headerbg.png +docs/tutorials/wiki2/src/basiclayout/tutorial/static/ie6.css +docs/tutorials/wiki2/src/basiclayout/tutorial/static/middlebg.png +docs/tutorials/wiki2/src/basiclayout/tutorial/static/pylons.css +docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid-small.png +docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid.png +docs/tutorials/wiki2/src/basiclayout/tutorial/static/transparent.gif +docs/tutorials/wiki2/src/basiclayout/tutorial/templates/mytemplate.pt +docs/tutorials/wiki2/src/basiclayout/tutorial/tests.py +docs/tutorials/wiki2/src/basiclayout/tutorial/views.py +docs/tutorials/wiki2/src/models/CHANGES.txt +docs/tutorials/wiki2/src/models/MANIFEST.in +docs/tutorials/wiki2/src/models/README.txt +docs/tutorials/wiki2/src/models/development.ini +docs/tutorials/wiki2/src/models/production.ini +docs/tutorials/wiki2/src/models/setup.cfg +docs/tutorials/wiki2/src/models/setup.py +docs/tutorials/wiki2/src/models/tutorial/__init__.py +docs/tutorials/wiki2/src/models/tutorial/models.py +docs/tutorials/wiki2/src/models/tutorial/scripts/__init__.py +docs/tutorials/wiki2/src/models/tutorial/scripts/initializedb.py +docs/tutorials/wiki2/src/models/tutorial/static/favicon.ico +docs/tutorials/wiki2/src/models/tutorial/static/footerbg.png +docs/tutorials/wiki2/src/models/tutorial/static/headerbg.png +docs/tutorials/wiki2/src/models/tutorial/static/ie6.css +docs/tutorials/wiki2/src/models/tutorial/static/middlebg.png +docs/tutorials/wiki2/src/models/tutorial/static/pylons.css +docs/tutorials/wiki2/src/models/tutorial/static/pyramid-small.png +docs/tutorials/wiki2/src/models/tutorial/static/pyramid.png +docs/tutorials/wiki2/src/models/tutorial/static/transparent.gif +docs/tutorials/wiki2/src/models/tutorial/templates/mytemplate.pt +docs/tutorials/wiki2/src/models/tutorial/tests.py +docs/tutorials/wiki2/src/models/tutorial/views.py +docs/tutorials/wiki2/src/tests/CHANGES.txt +docs/tutorials/wiki2/src/tests/MANIFEST.in +docs/tutorials/wiki2/src/tests/README.txt +docs/tutorials/wiki2/src/tests/development.ini +docs/tutorials/wiki2/src/tests/production.ini +docs/tutorials/wiki2/src/tests/setup.cfg +docs/tutorials/wiki2/src/tests/setup.py +docs/tutorials/wiki2/src/tests/tutorial/__init__.py +docs/tutorials/wiki2/src/tests/tutorial/models.py +docs/tutorials/wiki2/src/tests/tutorial/scripts/__init__.py +docs/tutorials/wiki2/src/tests/tutorial/scripts/initializedb.py +docs/tutorials/wiki2/src/tests/tutorial/security.py +docs/tutorials/wiki2/src/tests/tutorial/static/favicon.ico +docs/tutorials/wiki2/src/tests/tutorial/static/footerbg.png +docs/tutorials/wiki2/src/tests/tutorial/static/headerbg.png +docs/tutorials/wiki2/src/tests/tutorial/static/ie6.css +docs/tutorials/wiki2/src/tests/tutorial/static/middlebg.png +docs/tutorials/wiki2/src/tests/tutorial/static/pylons.css +docs/tutorials/wiki2/src/tests/tutorial/static/pyramid-small.png +docs/tutorials/wiki2/src/tests/tutorial/static/pyramid.png +docs/tutorials/wiki2/src/tests/tutorial/static/transparent.gif +docs/tutorials/wiki2/src/tests/tutorial/templates/edit.pt +docs/tutorials/wiki2/src/tests/tutorial/templates/login.pt +docs/tutorials/wiki2/src/tests/tutorial/templates/mytemplate.pt +docs/tutorials/wiki2/src/tests/tutorial/templates/view.pt +docs/tutorials/wiki2/src/tests/tutorial/tests.py +docs/tutorials/wiki2/src/tests/tutorial/views.py +docs/tutorials/wiki2/src/views/CHANGES.txt +docs/tutorials/wiki2/src/views/MANIFEST.in +docs/tutorials/wiki2/src/views/README.txt +docs/tutorials/wiki2/src/views/development.ini +docs/tutorials/wiki2/src/views/production.ini +docs/tutorials/wiki2/src/views/setup.cfg +docs/tutorials/wiki2/src/views/setup.py +docs/tutorials/wiki2/src/views/tutorial/__init__.py +docs/tutorials/wiki2/src/views/tutorial/models.py +docs/tutorials/wiki2/src/views/tutorial/scripts/__init__.py +docs/tutorials/wiki2/src/views/tutorial/scripts/initializedb.py +docs/tutorials/wiki2/src/views/tutorial/static/favicon.ico +docs/tutorials/wiki2/src/views/tutorial/static/footerbg.png +docs/tutorials/wiki2/src/views/tutorial/static/headerbg.png +docs/tutorials/wiki2/src/views/tutorial/static/ie6.css +docs/tutorials/wiki2/src/views/tutorial/static/middlebg.png +docs/tutorials/wiki2/src/views/tutorial/static/pylons.css +docs/tutorials/wiki2/src/views/tutorial/static/pyramid-small.png +docs/tutorials/wiki2/src/views/tutorial/static/pyramid.png +docs/tutorials/wiki2/src/views/tutorial/static/transparent.gif +docs/tutorials/wiki2/src/views/tutorial/templates/edit.pt +docs/tutorials/wiki2/src/views/tutorial/templates/mytemplate.pt +docs/tutorials/wiki2/src/views/tutorial/templates/view.pt +docs/tutorials/wiki2/src/views/tutorial/tests.py +docs/tutorials/wiki2/src/views/tutorial/views.py +docs/tutorials/wiki2/tests.rst +docs/whatsnew-1.0.rst +docs/whatsnew-1.1.rst +docs/whatsnew-1.2.rst +docs/whatsnew-1.3.rst +docs/whatsnew-1.4.rst +pyramid/__init__.py +pyramid/asset.py +pyramid/authentication.py +pyramid/authorization.py +pyramid/chameleon_text.py +pyramid/chameleon_zpt.py +pyramid/compat.py +pyramid/config/__init__.py +pyramid/config/adapters.py +pyramid/config/assets.py +pyramid/config/factories.py +pyramid/config/i18n.py +pyramid/config/predicates.py +pyramid/config/rendering.py +pyramid/config/routes.py +pyramid/config/security.py +pyramid/config/settings.py +pyramid/config/testing.py +pyramid/config/tweens.py +pyramid/config/util.py +pyramid/config/views.py +pyramid/config/zca.py +pyramid/decorator.py +pyramid/encode.py +pyramid/events.py +pyramid/exceptions.py +pyramid/fixers/__init__.py +pyramid/fixers/fix_bfg_imports.py +pyramid/httpexceptions.py +pyramid/i18n.py +pyramid/interfaces.py +pyramid/location.py +pyramid/mako_templating.py +pyramid/paster.py +pyramid/path.py +pyramid/registry.py +pyramid/renderers.py +pyramid/request.py +pyramid/resource.py +pyramid/response.py +pyramid/router.py +pyramid/scaffolds/__init__.py +pyramid/scaffolds/alchemy/+package+/__init__.py +pyramid/scaffolds/alchemy/+package+/models.py +pyramid/scaffolds/alchemy/+package+/scripts/__init__.py +pyramid/scaffolds/alchemy/+package+/scripts/initializedb.py +pyramid/scaffolds/alchemy/+package+/static/favicon.ico +pyramid/scaffolds/alchemy/+package+/static/footerbg.png +pyramid/scaffolds/alchemy/+package+/static/headerbg.png +pyramid/scaffolds/alchemy/+package+/static/ie6.css +pyramid/scaffolds/alchemy/+package+/static/middlebg.png +pyramid/scaffolds/alchemy/+package+/static/pylons.css +pyramid/scaffolds/alchemy/+package+/static/pyramid-small.png +pyramid/scaffolds/alchemy/+package+/static/pyramid.png +pyramid/scaffolds/alchemy/+package+/static/transparent.gif +pyramid/scaffolds/alchemy/+package+/templates/mytemplate.pt_tmpl +pyramid/scaffolds/alchemy/+package+/tests.py_tmpl +pyramid/scaffolds/alchemy/+package+/views.py_tmpl +pyramid/scaffolds/alchemy/CHANGES.txt_tmpl +pyramid/scaffolds/alchemy/MANIFEST.in_tmpl +pyramid/scaffolds/alchemy/README.txt_tmpl +pyramid/scaffolds/alchemy/development.ini_tmpl +pyramid/scaffolds/alchemy/production.ini_tmpl +pyramid/scaffolds/alchemy/setup.cfg_tmpl +pyramid/scaffolds/alchemy/setup.py_tmpl +pyramid/scaffolds/copydir.py +pyramid/scaffolds/starter/+package+/__init__.py +pyramid/scaffolds/starter/+package+/static/favicon.ico +pyramid/scaffolds/starter/+package+/static/footerbg.png +pyramid/scaffolds/starter/+package+/static/headerbg.png +pyramid/scaffolds/starter/+package+/static/ie6.css +pyramid/scaffolds/starter/+package+/static/middlebg.png +pyramid/scaffolds/starter/+package+/static/pylons.css +pyramid/scaffolds/starter/+package+/static/pyramid-small.png +pyramid/scaffolds/starter/+package+/static/pyramid.png +pyramid/scaffolds/starter/+package+/static/transparent.gif +pyramid/scaffolds/starter/+package+/templates/mytemplate.pt_tmpl +pyramid/scaffolds/starter/+package+/tests.py_tmpl +pyramid/scaffolds/starter/+package+/views.py_tmpl +pyramid/scaffolds/starter/CHANGES.txt_tmpl +pyramid/scaffolds/starter/MANIFEST.in_tmpl +pyramid/scaffolds/starter/README.txt_tmpl +pyramid/scaffolds/starter/development.ini_tmpl +pyramid/scaffolds/starter/production.ini_tmpl +pyramid/scaffolds/starter/setup.cfg_tmpl +pyramid/scaffolds/starter/setup.py_tmpl +pyramid/scaffolds/template.py +pyramid/scaffolds/tests.py +pyramid/scaffolds/zodb/+package+/__init__.py +pyramid/scaffolds/zodb/+package+/models.py +pyramid/scaffolds/zodb/+package+/static/favicon.ico +pyramid/scaffolds/zodb/+package+/static/footerbg.png +pyramid/scaffolds/zodb/+package+/static/headerbg.png +pyramid/scaffolds/zodb/+package+/static/ie6.css +pyramid/scaffolds/zodb/+package+/static/middlebg.png +pyramid/scaffolds/zodb/+package+/static/pylons.css +pyramid/scaffolds/zodb/+package+/static/pyramid-small.png +pyramid/scaffolds/zodb/+package+/static/pyramid.png +pyramid/scaffolds/zodb/+package+/static/transparent.gif +pyramid/scaffolds/zodb/+package+/templates/mytemplate.pt +pyramid/scaffolds/zodb/+package+/tests.py_tmpl +pyramid/scaffolds/zodb/+package+/views.py_tmpl +pyramid/scaffolds/zodb/CHANGES.txt_tmpl +pyramid/scaffolds/zodb/MANIFEST.in_tmpl +pyramid/scaffolds/zodb/README.txt_tmpl +pyramid/scaffolds/zodb/development.ini_tmpl +pyramid/scaffolds/zodb/production.ini_tmpl +pyramid/scaffolds/zodb/setup.cfg_tmpl +pyramid/scaffolds/zodb/setup.py_tmpl +pyramid/scripting.py +pyramid/scripts/__init__.py +pyramid/scripts/common.py +pyramid/scripts/pcreate.py +pyramid/scripts/prequest.py +pyramid/scripts/proutes.py +pyramid/scripts/pserve.py +pyramid/scripts/pshell.py +pyramid/scripts/ptweens.py +pyramid/scripts/pviews.py +pyramid/security.py +pyramid/session.py +pyramid/settings.py +pyramid/static.py +pyramid/testing.py +pyramid/tests/__init__.py +pyramid/tests/fixtures/components.mak +pyramid/tests/fixtures/dummy.ini +pyramid/tests/fixtures/hello .world.mako +pyramid/tests/fixtures/hello_inherit_pkg.mak +pyramid/tests/fixtures/hellocompo.mak +pyramid/tests/fixtures/helloinherit.mak +pyramid/tests/fixtures/helloworld.mak +pyramid/tests/fixtures/helloworld.mako +pyramid/tests/fixtures/layout.mak +pyramid/tests/fixtures/minimal.pt +pyramid/tests/fixtures/minimal.txt +pyramid/tests/fixtures/nonminimal.mak +pyramid/tests/fixtures/nonminimal.txt +pyramid/tests/fixtures/pp.pt +pyramid/tests/fixtures/static/.hiddenfile +pyramid/tests/fixtures/static/arcs.svg.tgz +pyramid/tests/fixtures/static/index.html +pyramid/tests/fixtures/static/subdir/index.html +pyramid/tests/fixtures/withmacro.pt +pyramid/tests/pkgs/__init__.py +pyramid/tests/pkgs/ccbugapp/__init__.py +pyramid/tests/pkgs/conflictapp/__init__.py +pyramid/tests/pkgs/conflictapp/included.py +pyramid/tests/pkgs/defpermbugapp/__init__.py +pyramid/tests/pkgs/eventonly/__init__.py +pyramid/tests/pkgs/exceptionviewapp/__init__.py +pyramid/tests/pkgs/exceptionviewapp/models.py +pyramid/tests/pkgs/exceptionviewapp/views.py +pyramid/tests/pkgs/fixtureapp/__init__.py +pyramid/tests/pkgs/fixtureapp/models.py +pyramid/tests/pkgs/fixtureapp/subpackage/__init__.py +pyramid/tests/pkgs/fixtureapp/subpackage/templates/bar.pt +pyramid/tests/pkgs/fixtureapp/templates/fixture.pt +pyramid/tests/pkgs/fixtureapp/views.py +pyramid/tests/pkgs/forbiddenapp/__init__.py +pyramid/tests/pkgs/forbiddenview/__init__.py +pyramid/tests/pkgs/hybridapp/__init__.py +pyramid/tests/pkgs/hybridapp/views.py +pyramid/tests/pkgs/includeapp1/__init__.py +pyramid/tests/pkgs/includeapp1/root.py +pyramid/tests/pkgs/includeapp1/three.py +pyramid/tests/pkgs/includeapp1/two.py +pyramid/tests/pkgs/localeapp/__init__.py +pyramid/tests/pkgs/localeapp/locale/GARBAGE +pyramid/tests/pkgs/localeapp/locale/be/LC_MESSAGES +pyramid/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.mo +pyramid/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.po +pyramid/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.mo +pyramid/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.po +pyramid/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.mo +pyramid/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.po +pyramid/tests/pkgs/localeapp/locale2/GARBAGE +pyramid/tests/pkgs/localeapp/locale2/be/LC_MESSAGES +pyramid/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.mo +pyramid/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.po +pyramid/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.mo +pyramid/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.po +pyramid/tests/pkgs/localeapp/locale3/GARBAGE +pyramid/tests/pkgs/localeapp/locale3/be/LC_MESSAGES +pyramid/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.mo +pyramid/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.po +pyramid/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.mo +pyramid/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.po +pyramid/tests/pkgs/notfoundview/__init__.py +pyramid/tests/pkgs/permbugapp/__init__.py +pyramid/tests/pkgs/rendererscanapp/__init__.py +pyramid/tests/pkgs/rendererscanapp/one.pt +pyramid/tests/pkgs/rendererscanapp/two/__init__.py +pyramid/tests/pkgs/rendererscanapp/two/two.pt +pyramid/tests/pkgs/restbugapp/__init__.py +pyramid/tests/pkgs/restbugapp/views.py +pyramid/tests/pkgs/static_abspath/__init__.py +pyramid/tests/pkgs/static_assetspec/__init__.py +pyramid/tests/pkgs/static_routeprefix/__init__.py +pyramid/tests/pkgs/staticpermapp/__init__.py +pyramid/tests/pkgs/subrequestapp/__init__.py +pyramid/tests/pkgs/viewdecoratorapp/__init__.py +pyramid/tests/pkgs/viewdecoratorapp/views/__init__.py +pyramid/tests/pkgs/viewdecoratorapp/views/templates/foo.pt +pyramid/tests/pkgs/viewdecoratorapp/views/views.py +pyramid/tests/pkgs/wsgiapp2app/__init__.py +pyramid/tests/test_asset.py +pyramid/tests/test_authentication.py +pyramid/tests/test_authorization.py +pyramid/tests/test_chameleon_text.py +pyramid/tests/test_chameleon_zpt.py +pyramid/tests/test_config/__init__.py +pyramid/tests/test_config/files/assets/dummy.txt +pyramid/tests/test_config/files/minimal.pt +pyramid/tests/test_config/path/scanerror/__init__.py +pyramid/tests/test_config/path/scanerror/will_raise_error.py +pyramid/tests/test_config/pkgs/__init__.py +pyramid/tests/test_config/pkgs/asset/__init__.py +pyramid/tests/test_config/pkgs/asset/models.py +pyramid/tests/test_config/pkgs/asset/subpackage/__init__.py +pyramid/tests/test_config/pkgs/asset/subpackage/templates/bar.pt +pyramid/tests/test_config/pkgs/asset/templates/fixture.pt +pyramid/tests/test_config/pkgs/asset/views.py +pyramid/tests/test_config/pkgs/scanextrakw/__init__.py +pyramid/tests/test_config/pkgs/scannable/__init__.py +pyramid/tests/test_config/pkgs/scannable/another.py +pyramid/tests/test_config/pkgs/scannable/pod/notinit.py +pyramid/tests/test_config/pkgs/scannable/subpackage/__init__.py +pyramid/tests/test_config/pkgs/scannable/subpackage/notinit.py +pyramid/tests/test_config/pkgs/scannable/subpackage/subsubpackage/__init__.py +pyramid/tests/test_config/pkgs/selfscan/__init__.py +pyramid/tests/test_config/pkgs/selfscan/another.py +pyramid/tests/test_config/test_adapters.py +pyramid/tests/test_config/test_assets.py +pyramid/tests/test_config/test_factories.py +pyramid/tests/test_config/test_i18n.py +pyramid/tests/test_config/test_init.py +pyramid/tests/test_config/test_predicates.py +pyramid/tests/test_config/test_rendering.py +pyramid/tests/test_config/test_routes.py +pyramid/tests/test_config/test_security.py +pyramid/tests/test_config/test_settings.py +pyramid/tests/test_config/test_testing.py +pyramid/tests/test_config/test_tweens.py +pyramid/tests/test_config/test_util.py +pyramid/tests/test_config/test_views.py +pyramid/tests/test_decorator.py +pyramid/tests/test_docs.py +pyramid/tests/test_encode.py +pyramid/tests/test_events.py +pyramid/tests/test_exceptions.py +pyramid/tests/test_httpexceptions.py +pyramid/tests/test_i18n.py +pyramid/tests/test_integration.py +pyramid/tests/test_location.py +pyramid/tests/test_mako_templating.py +pyramid/tests/test_paster.py +pyramid/tests/test_path.py +pyramid/tests/test_registry.py +pyramid/tests/test_renderers.py +pyramid/tests/test_request.py +pyramid/tests/test_response.py +pyramid/tests/test_router.py +pyramid/tests/test_scaffolds/__init__.py +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/.badfile +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/__init__.py_tmpl +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/resources.py +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/favicon.ico +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/footerbg.png +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/headerbg.png +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/ie6.css +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/middlebg.png +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pylons.css +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid-small.png +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid.png +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/transparent.gif +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/templates/mytemplate.pt_tmpl +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/test_no_content.py_tmpl +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/tests.py_tmpl +pyramid/tests/test_scaffolds/fixture_scaffold/+package+/views.py_tmpl +pyramid/tests/test_scaffolds/fixture_scaffold/CHANGES.txt_tmpl +pyramid/tests/test_scaffolds/fixture_scaffold/MANIFEST.in_tmpl +pyramid/tests/test_scaffolds/fixture_scaffold/README.txt_tmpl +pyramid/tests/test_scaffolds/fixture_scaffold/development.ini_tmpl +pyramid/tests/test_scaffolds/fixture_scaffold/production.ini_tmpl +pyramid/tests/test_scaffolds/fixture_scaffold/setup.cfg_tmpl +pyramid/tests/test_scaffolds/fixture_scaffold/setup.py_tmpl +pyramid/tests/test_scaffolds/test_copydir.py +pyramid/tests/test_scaffolds/test_init.py +pyramid/tests/test_scaffolds/test_template.py +pyramid/tests/test_scripting.py +pyramid/tests/test_scripts/__init__.py +pyramid/tests/test_scripts/dummy.py +pyramid/tests/test_scripts/test_common.py +pyramid/tests/test_scripts/test_pcreate.py +pyramid/tests/test_scripts/test_prequest.py +pyramid/tests/test_scripts/test_proutes.py +pyramid/tests/test_scripts/test_pserve.py +pyramid/tests/test_scripts/test_pshell.py +pyramid/tests/test_scripts/test_ptweens.py +pyramid/tests/test_scripts/test_pviews.py +pyramid/tests/test_security.py +pyramid/tests/test_session.py +pyramid/tests/test_settings.py +pyramid/tests/test_static.py +pyramid/tests/test_testing.py +pyramid/tests/test_threadlocal.py +pyramid/tests/test_traversal.py +pyramid/tests/test_url.py +pyramid/tests/test_urldispatch.py +pyramid/tests/test_util.py +pyramid/tests/test_view.py +pyramid/tests/test_wsgi.py +pyramid/threadlocal.py +pyramid/traversal.py +pyramid/tweens.py +pyramid/url.py +pyramid/urldispatch.py +pyramid/util.py +pyramid/view.py +pyramid/wsgi.py +rtd.txt +setup.cfg +setup.py +tox.ini diff --git a/pyramid/scripts/prequest.py b/pyramid/scripts/prequest.py index 874fd1bca..8628d5a5a 100644 --- a/pyramid/scripts/prequest.py +++ b/pyramid/scripts/prequest.py @@ -33,7 +33,7 @@ class PRequestCommand(object): Use "prequest --method=OPTIONS config.ini /path" to do an OPTIONS request. - Use "prequest --method=PROPFIND config.ini /path" to do an + Use "prequest --method=PROPFIND config.ini /path" to do a PROPFIND request. If the path is relative (doesn't begin with "/") it is interpreted as -- cgit v1.2.3 From eed8f8df0130a49113f9c9afdf57c6cd25830b5f Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Thu, 11 Jul 2013 20:58:27 -0400 Subject: Get this out of the way after removing the pre-commit hook. --- MANIFEST.in | 725 ------------------------------------------------------------ 1 file changed, 725 deletions(-) delete mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index bc89253ce..000000000 --- a/MANIFEST.in +++ /dev/null @@ -1,725 +0,0 @@ -.gitignore -.gitmodules -.travis.yml -BFG_HISTORY.txt -CHANGES.txt -CONTRIBUTORS.txt -COPYRIGHT.txt -HACKING.txt -HISTORY.txt -LICENSE.txt -README.rst -RELEASING.txt -TODO.txt -docs/.gitignore -docs/Makefile -docs/_static/latex-note.png -docs/_static/latex-warning.png -docs/_themes -docs/api/authentication.rst -docs/api/authorization.rst -docs/api/compat.rst -docs/api/config.rst -docs/api/decorator.rst -docs/api/events.rst -docs/api/exceptions.rst -docs/api/httpexceptions.rst -docs/api/i18n.rst -docs/api/interfaces.rst -docs/api/location.rst -docs/api/paster.rst -docs/api/path.rst -docs/api/registry.rst -docs/api/renderers.rst -docs/api/request.rst -docs/api/response.rst -docs/api/scaffolds.rst -docs/api/scripting.rst -docs/api/security.rst -docs/api/session.rst -docs/api/settings.rst -docs/api/static.rst -docs/api/testing.rst -docs/api/threadlocal.rst -docs/api/traversal.rst -docs/api/tweens.rst -docs/api/url.rst -docs/api/view.rst -docs/api/wsgi.rst -docs/authorintro.rst -docs/changes.rst -docs/conf.py -docs/conventions.rst -docs/convert_images.sh -docs/copyright.rst -docs/coversizing.py -docs/designdefense.rst -docs/foreword.rst -docs/glossary.rst -docs/index.rst -docs/latexindex.rst -docs/make_book -docs/make_epub -docs/make_pdf -docs/narr/MyProject/CHANGES.txt -docs/narr/MyProject/MANIFEST.in -docs/narr/MyProject/README.txt -docs/narr/MyProject/development.ini -docs/narr/MyProject/myproject/__init__.py -docs/narr/MyProject/myproject/static/favicon.ico -docs/narr/MyProject/myproject/static/footerbg.png -docs/narr/MyProject/myproject/static/headerbg.png -docs/narr/MyProject/myproject/static/ie6.css -docs/narr/MyProject/myproject/static/middlebg.png -docs/narr/MyProject/myproject/static/pylons.css -docs/narr/MyProject/myproject/static/pyramid-small.png -docs/narr/MyProject/myproject/static/pyramid.png -docs/narr/MyProject/myproject/static/transparent.gif -docs/narr/MyProject/myproject/templates/mytemplate.pt -docs/narr/MyProject/myproject/tests.py -docs/narr/MyProject/myproject/views.py -docs/narr/MyProject/production.ini -docs/narr/MyProject/setup.cfg -docs/narr/MyProject/setup.py -docs/narr/advconfig.rst -docs/narr/assets.rst -docs/narr/commandline.rst -docs/narr/configuration.rst -docs/narr/environment.rst -docs/narr/events.rst -docs/narr/extconfig.rst -docs/narr/extending.rst -docs/narr/firstapp.rst -docs/narr/hellotraversal.py -docs/narr/hellotraversal.rst -docs/narr/helloworld.py -docs/narr/hooks.rst -docs/narr/hybrid.rst -docs/narr/i18n.rst -docs/narr/install.rst -docs/narr/introduction.rst -docs/narr/introspector.rst -docs/narr/logging.rst -docs/narr/muchadoabouttraversal.rst -docs/narr/paste.rst -docs/narr/project-debug.png -docs/narr/project.png -docs/narr/project.rst -docs/narr/renderers.rst -docs/narr/resources.rst -docs/narr/resourcetreetraverser.png -docs/narr/router.png -docs/narr/router.rst -docs/narr/scaffolding.rst -docs/narr/security.rst -docs/narr/sessions.rst -docs/narr/startup.rst -docs/narr/subrequest.rst -docs/narr/tb_introspector.png -docs/narr/templates.rst -docs/narr/testing.rst -docs/narr/threadlocals.rst -docs/narr/traversal.rst -docs/narr/upgrading.rst -docs/narr/urldispatch.rst -docs/narr/vhosting.rst -docs/narr/viewconfig.rst -docs/narr/views.rst -docs/narr/webob.rst -docs/narr/zca.rst -docs/python-3.png -docs/remake -docs/tutorials/.gitignore -docs/tutorials/bfg/index.rst -docs/tutorials/modwsgi/index.rst -docs/tutorials/wiki/NOTE-relocatable.txt -docs/tutorials/wiki/authorization.rst -docs/tutorials/wiki/background.rst -docs/tutorials/wiki/basiclayout.rst -docs/tutorials/wiki/definingmodels.rst -docs/tutorials/wiki/definingviews.rst -docs/tutorials/wiki/design.rst -docs/tutorials/wiki/distributing.rst -docs/tutorials/wiki/index.rst -docs/tutorials/wiki/installation.rst -docs/tutorials/wiki/src/authorization/CHANGES.txt -docs/tutorials/wiki/src/authorization/MANIFEST.in -docs/tutorials/wiki/src/authorization/README.txt -docs/tutorials/wiki/src/authorization/development.ini -docs/tutorials/wiki/src/authorization/production.ini -docs/tutorials/wiki/src/authorization/setup.cfg -docs/tutorials/wiki/src/authorization/setup.py -docs/tutorials/wiki/src/authorization/tutorial/__init__.py -docs/tutorials/wiki/src/authorization/tutorial/models.py -docs/tutorials/wiki/src/authorization/tutorial/security.py -docs/tutorials/wiki/src/authorization/tutorial/static/favicon.ico -docs/tutorials/wiki/src/authorization/tutorial/static/footerbg.png -docs/tutorials/wiki/src/authorization/tutorial/static/headerbg.png -docs/tutorials/wiki/src/authorization/tutorial/static/ie6.css -docs/tutorials/wiki/src/authorization/tutorial/static/middlebg.png -docs/tutorials/wiki/src/authorization/tutorial/static/pylons.css -docs/tutorials/wiki/src/authorization/tutorial/static/pyramid-small.png -docs/tutorials/wiki/src/authorization/tutorial/static/pyramid.png -docs/tutorials/wiki/src/authorization/tutorial/static/transparent.gif -docs/tutorials/wiki/src/authorization/tutorial/templates/edit.pt -docs/tutorials/wiki/src/authorization/tutorial/templates/login.pt -docs/tutorials/wiki/src/authorization/tutorial/templates/mytemplate.pt -docs/tutorials/wiki/src/authorization/tutorial/templates/view.pt -docs/tutorials/wiki/src/authorization/tutorial/tests.py -docs/tutorials/wiki/src/authorization/tutorial/views.py -docs/tutorials/wiki/src/basiclayout/CHANGES.txt -docs/tutorials/wiki/src/basiclayout/MANIFEST.in -docs/tutorials/wiki/src/basiclayout/README.txt -docs/tutorials/wiki/src/basiclayout/development.ini -docs/tutorials/wiki/src/basiclayout/production.ini -docs/tutorials/wiki/src/basiclayout/setup.cfg -docs/tutorials/wiki/src/basiclayout/setup.py -docs/tutorials/wiki/src/basiclayout/tutorial/__init__.py -docs/tutorials/wiki/src/basiclayout/tutorial/models.py -docs/tutorials/wiki/src/basiclayout/tutorial/static/favicon.ico -docs/tutorials/wiki/src/basiclayout/tutorial/static/footerbg.png -docs/tutorials/wiki/src/basiclayout/tutorial/static/headerbg.png -docs/tutorials/wiki/src/basiclayout/tutorial/static/ie6.css -docs/tutorials/wiki/src/basiclayout/tutorial/static/middlebg.png -docs/tutorials/wiki/src/basiclayout/tutorial/static/pylons.css -docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid-small.png -docs/tutorials/wiki/src/basiclayout/tutorial/static/pyramid.png -docs/tutorials/wiki/src/basiclayout/tutorial/static/transparent.gif -docs/tutorials/wiki/src/basiclayout/tutorial/templates/mytemplate.pt -docs/tutorials/wiki/src/basiclayout/tutorial/tests.py -docs/tutorials/wiki/src/basiclayout/tutorial/views.py -docs/tutorials/wiki/src/models/CHANGES.txt -docs/tutorials/wiki/src/models/MANIFEST.in -docs/tutorials/wiki/src/models/README.txt -docs/tutorials/wiki/src/models/development.ini -docs/tutorials/wiki/src/models/production.ini -docs/tutorials/wiki/src/models/setup.cfg -docs/tutorials/wiki/src/models/setup.py -docs/tutorials/wiki/src/models/tutorial/__init__.py -docs/tutorials/wiki/src/models/tutorial/models.py -docs/tutorials/wiki/src/models/tutorial/static/favicon.ico -docs/tutorials/wiki/src/models/tutorial/static/footerbg.png -docs/tutorials/wiki/src/models/tutorial/static/headerbg.png -docs/tutorials/wiki/src/models/tutorial/static/ie6.css -docs/tutorials/wiki/src/models/tutorial/static/middlebg.png -docs/tutorials/wiki/src/models/tutorial/static/pylons.css -docs/tutorials/wiki/src/models/tutorial/static/pyramid-small.png -docs/tutorials/wiki/src/models/tutorial/static/pyramid.png -docs/tutorials/wiki/src/models/tutorial/static/transparent.gif -docs/tutorials/wiki/src/models/tutorial/templates/mytemplate.pt -docs/tutorials/wiki/src/models/tutorial/tests.py -docs/tutorials/wiki/src/models/tutorial/views.py -docs/tutorials/wiki/src/tests/CHANGES.txt -docs/tutorials/wiki/src/tests/MANIFEST.in -docs/tutorials/wiki/src/tests/README.txt -docs/tutorials/wiki/src/tests/development.ini -docs/tutorials/wiki/src/tests/production.ini -docs/tutorials/wiki/src/tests/setup.cfg -docs/tutorials/wiki/src/tests/setup.py -docs/tutorials/wiki/src/tests/tutorial/__init__.py -docs/tutorials/wiki/src/tests/tutorial/models.py -docs/tutorials/wiki/src/tests/tutorial/security.py -docs/tutorials/wiki/src/tests/tutorial/static/favicon.ico -docs/tutorials/wiki/src/tests/tutorial/static/footerbg.png -docs/tutorials/wiki/src/tests/tutorial/static/headerbg.png -docs/tutorials/wiki/src/tests/tutorial/static/ie6.css -docs/tutorials/wiki/src/tests/tutorial/static/middlebg.png -docs/tutorials/wiki/src/tests/tutorial/static/pylons.css -docs/tutorials/wiki/src/tests/tutorial/static/pyramid-small.png -docs/tutorials/wiki/src/tests/tutorial/static/pyramid.png -docs/tutorials/wiki/src/tests/tutorial/static/transparent.gif -docs/tutorials/wiki/src/tests/tutorial/templates/edit.pt -docs/tutorials/wiki/src/tests/tutorial/templates/login.pt -docs/tutorials/wiki/src/tests/tutorial/templates/mytemplate.pt -docs/tutorials/wiki/src/tests/tutorial/templates/view.pt -docs/tutorials/wiki/src/tests/tutorial/tests.py -docs/tutorials/wiki/src/tests/tutorial/views.py -docs/tutorials/wiki/src/views/CHANGES.txt -docs/tutorials/wiki/src/views/MANIFEST.in -docs/tutorials/wiki/src/views/README.txt -docs/tutorials/wiki/src/views/development.ini -docs/tutorials/wiki/src/views/production.ini -docs/tutorials/wiki/src/views/setup.cfg -docs/tutorials/wiki/src/views/setup.py -docs/tutorials/wiki/src/views/tutorial/__init__.py -docs/tutorials/wiki/src/views/tutorial/models.py -docs/tutorials/wiki/src/views/tutorial/static/favicon.ico -docs/tutorials/wiki/src/views/tutorial/static/footerbg.png -docs/tutorials/wiki/src/views/tutorial/static/headerbg.png -docs/tutorials/wiki/src/views/tutorial/static/ie6.css -docs/tutorials/wiki/src/views/tutorial/static/middlebg.png -docs/tutorials/wiki/src/views/tutorial/static/pylons.css -docs/tutorials/wiki/src/views/tutorial/static/pyramid-small.png -docs/tutorials/wiki/src/views/tutorial/static/pyramid.png -docs/tutorials/wiki/src/views/tutorial/static/transparent.gif -docs/tutorials/wiki/src/views/tutorial/templates/edit.pt -docs/tutorials/wiki/src/views/tutorial/templates/mytemplate.pt -docs/tutorials/wiki/src/views/tutorial/templates/view.pt -docs/tutorials/wiki/src/views/tutorial/tests.py -docs/tutorials/wiki/src/views/tutorial/views.py -docs/tutorials/wiki/tests.rst -docs/tutorials/wiki2/authorization.rst -docs/tutorials/wiki2/background.rst -docs/tutorials/wiki2/basiclayout.rst -docs/tutorials/wiki2/definingmodels.rst -docs/tutorials/wiki2/definingviews.rst -docs/tutorials/wiki2/design.rst -docs/tutorials/wiki2/distributing.rst -docs/tutorials/wiki2/index.rst -docs/tutorials/wiki2/installation.rst -docs/tutorials/wiki2/src/authorization/CHANGES.txt -docs/tutorials/wiki2/src/authorization/MANIFEST.in -docs/tutorials/wiki2/src/authorization/README.txt -docs/tutorials/wiki2/src/authorization/development.ini -docs/tutorials/wiki2/src/authorization/production.ini -docs/tutorials/wiki2/src/authorization/setup.cfg -docs/tutorials/wiki2/src/authorization/setup.py -docs/tutorials/wiki2/src/authorization/tutorial/__init__.py -docs/tutorials/wiki2/src/authorization/tutorial/models.py -docs/tutorials/wiki2/src/authorization/tutorial/scripts/__init__.py -docs/tutorials/wiki2/src/authorization/tutorial/scripts/initializedb.py -docs/tutorials/wiki2/src/authorization/tutorial/security.py -docs/tutorials/wiki2/src/authorization/tutorial/static/favicon.ico -docs/tutorials/wiki2/src/authorization/tutorial/static/footerbg.png -docs/tutorials/wiki2/src/authorization/tutorial/static/headerbg.png -docs/tutorials/wiki2/src/authorization/tutorial/static/ie6.css -docs/tutorials/wiki2/src/authorization/tutorial/static/middlebg.png -docs/tutorials/wiki2/src/authorization/tutorial/static/pylons.css -docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid-small.png -docs/tutorials/wiki2/src/authorization/tutorial/static/pyramid.png -docs/tutorials/wiki2/src/authorization/tutorial/static/transparent.gif -docs/tutorials/wiki2/src/authorization/tutorial/templates/edit.pt -docs/tutorials/wiki2/src/authorization/tutorial/templates/login.pt -docs/tutorials/wiki2/src/authorization/tutorial/templates/mytemplate.pt -docs/tutorials/wiki2/src/authorization/tutorial/templates/view.pt -docs/tutorials/wiki2/src/authorization/tutorial/tests.py -docs/tutorials/wiki2/src/authorization/tutorial/views.py -docs/tutorials/wiki2/src/basiclayout/CHANGES.txt -docs/tutorials/wiki2/src/basiclayout/MANIFEST.in -docs/tutorials/wiki2/src/basiclayout/README.txt -docs/tutorials/wiki2/src/basiclayout/development.ini -docs/tutorials/wiki2/src/basiclayout/production.ini -docs/tutorials/wiki2/src/basiclayout/setup.cfg -docs/tutorials/wiki2/src/basiclayout/setup.py -docs/tutorials/wiki2/src/basiclayout/tutorial/__init__.py -docs/tutorials/wiki2/src/basiclayout/tutorial/models.py -docs/tutorials/wiki2/src/basiclayout/tutorial/scripts/__init__.py -docs/tutorials/wiki2/src/basiclayout/tutorial/scripts/initializedb.py -docs/tutorials/wiki2/src/basiclayout/tutorial/static/favicon.ico -docs/tutorials/wiki2/src/basiclayout/tutorial/static/footerbg.png -docs/tutorials/wiki2/src/basiclayout/tutorial/static/headerbg.png -docs/tutorials/wiki2/src/basiclayout/tutorial/static/ie6.css -docs/tutorials/wiki2/src/basiclayout/tutorial/static/middlebg.png -docs/tutorials/wiki2/src/basiclayout/tutorial/static/pylons.css -docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid-small.png -docs/tutorials/wiki2/src/basiclayout/tutorial/static/pyramid.png -docs/tutorials/wiki2/src/basiclayout/tutorial/static/transparent.gif -docs/tutorials/wiki2/src/basiclayout/tutorial/templates/mytemplate.pt -docs/tutorials/wiki2/src/basiclayout/tutorial/tests.py -docs/tutorials/wiki2/src/basiclayout/tutorial/views.py -docs/tutorials/wiki2/src/models/CHANGES.txt -docs/tutorials/wiki2/src/models/MANIFEST.in -docs/tutorials/wiki2/src/models/README.txt -docs/tutorials/wiki2/src/models/development.ini -docs/tutorials/wiki2/src/models/production.ini -docs/tutorials/wiki2/src/models/setup.cfg -docs/tutorials/wiki2/src/models/setup.py -docs/tutorials/wiki2/src/models/tutorial/__init__.py -docs/tutorials/wiki2/src/models/tutorial/models.py -docs/tutorials/wiki2/src/models/tutorial/scripts/__init__.py -docs/tutorials/wiki2/src/models/tutorial/scripts/initializedb.py -docs/tutorials/wiki2/src/models/tutorial/static/favicon.ico -docs/tutorials/wiki2/src/models/tutorial/static/footerbg.png -docs/tutorials/wiki2/src/models/tutorial/static/headerbg.png -docs/tutorials/wiki2/src/models/tutorial/static/ie6.css -docs/tutorials/wiki2/src/models/tutorial/static/middlebg.png -docs/tutorials/wiki2/src/models/tutorial/static/pylons.css -docs/tutorials/wiki2/src/models/tutorial/static/pyramid-small.png -docs/tutorials/wiki2/src/models/tutorial/static/pyramid.png -docs/tutorials/wiki2/src/models/tutorial/static/transparent.gif -docs/tutorials/wiki2/src/models/tutorial/templates/mytemplate.pt -docs/tutorials/wiki2/src/models/tutorial/tests.py -docs/tutorials/wiki2/src/models/tutorial/views.py -docs/tutorials/wiki2/src/tests/CHANGES.txt -docs/tutorials/wiki2/src/tests/MANIFEST.in -docs/tutorials/wiki2/src/tests/README.txt -docs/tutorials/wiki2/src/tests/development.ini -docs/tutorials/wiki2/src/tests/production.ini -docs/tutorials/wiki2/src/tests/setup.cfg -docs/tutorials/wiki2/src/tests/setup.py -docs/tutorials/wiki2/src/tests/tutorial/__init__.py -docs/tutorials/wiki2/src/tests/tutorial/models.py -docs/tutorials/wiki2/src/tests/tutorial/scripts/__init__.py -docs/tutorials/wiki2/src/tests/tutorial/scripts/initializedb.py -docs/tutorials/wiki2/src/tests/tutorial/security.py -docs/tutorials/wiki2/src/tests/tutorial/static/favicon.ico -docs/tutorials/wiki2/src/tests/tutorial/static/footerbg.png -docs/tutorials/wiki2/src/tests/tutorial/static/headerbg.png -docs/tutorials/wiki2/src/tests/tutorial/static/ie6.css -docs/tutorials/wiki2/src/tests/tutorial/static/middlebg.png -docs/tutorials/wiki2/src/tests/tutorial/static/pylons.css -docs/tutorials/wiki2/src/tests/tutorial/static/pyramid-small.png -docs/tutorials/wiki2/src/tests/tutorial/static/pyramid.png -docs/tutorials/wiki2/src/tests/tutorial/static/transparent.gif -docs/tutorials/wiki2/src/tests/tutorial/templates/edit.pt -docs/tutorials/wiki2/src/tests/tutorial/templates/login.pt -docs/tutorials/wiki2/src/tests/tutorial/templates/mytemplate.pt -docs/tutorials/wiki2/src/tests/tutorial/templates/view.pt -docs/tutorials/wiki2/src/tests/tutorial/tests.py -docs/tutorials/wiki2/src/tests/tutorial/views.py -docs/tutorials/wiki2/src/views/CHANGES.txt -docs/tutorials/wiki2/src/views/MANIFEST.in -docs/tutorials/wiki2/src/views/README.txt -docs/tutorials/wiki2/src/views/development.ini -docs/tutorials/wiki2/src/views/production.ini -docs/tutorials/wiki2/src/views/setup.cfg -docs/tutorials/wiki2/src/views/setup.py -docs/tutorials/wiki2/src/views/tutorial/__init__.py -docs/tutorials/wiki2/src/views/tutorial/models.py -docs/tutorials/wiki2/src/views/tutorial/scripts/__init__.py -docs/tutorials/wiki2/src/views/tutorial/scripts/initializedb.py -docs/tutorials/wiki2/src/views/tutorial/static/favicon.ico -docs/tutorials/wiki2/src/views/tutorial/static/footerbg.png -docs/tutorials/wiki2/src/views/tutorial/static/headerbg.png -docs/tutorials/wiki2/src/views/tutorial/static/ie6.css -docs/tutorials/wiki2/src/views/tutorial/static/middlebg.png -docs/tutorials/wiki2/src/views/tutorial/static/pylons.css -docs/tutorials/wiki2/src/views/tutorial/static/pyramid-small.png -docs/tutorials/wiki2/src/views/tutorial/static/pyramid.png -docs/tutorials/wiki2/src/views/tutorial/static/transparent.gif -docs/tutorials/wiki2/src/views/tutorial/templates/edit.pt -docs/tutorials/wiki2/src/views/tutorial/templates/mytemplate.pt -docs/tutorials/wiki2/src/views/tutorial/templates/view.pt -docs/tutorials/wiki2/src/views/tutorial/tests.py -docs/tutorials/wiki2/src/views/tutorial/views.py -docs/tutorials/wiki2/tests.rst -docs/whatsnew-1.0.rst -docs/whatsnew-1.1.rst -docs/whatsnew-1.2.rst -docs/whatsnew-1.3.rst -docs/whatsnew-1.4.rst -pyramid/__init__.py -pyramid/asset.py -pyramid/authentication.py -pyramid/authorization.py -pyramid/chameleon_text.py -pyramid/chameleon_zpt.py -pyramid/compat.py -pyramid/config/__init__.py -pyramid/config/adapters.py -pyramid/config/assets.py -pyramid/config/factories.py -pyramid/config/i18n.py -pyramid/config/predicates.py -pyramid/config/rendering.py -pyramid/config/routes.py -pyramid/config/security.py -pyramid/config/settings.py -pyramid/config/testing.py -pyramid/config/tweens.py -pyramid/config/util.py -pyramid/config/views.py -pyramid/config/zca.py -pyramid/decorator.py -pyramid/encode.py -pyramid/events.py -pyramid/exceptions.py -pyramid/fixers/__init__.py -pyramid/fixers/fix_bfg_imports.py -pyramid/httpexceptions.py -pyramid/i18n.py -pyramid/interfaces.py -pyramid/location.py -pyramid/mako_templating.py -pyramid/paster.py -pyramid/path.py -pyramid/registry.py -pyramid/renderers.py -pyramid/request.py -pyramid/resource.py -pyramid/response.py -pyramid/router.py -pyramid/scaffolds/__init__.py -pyramid/scaffolds/alchemy/+package+/__init__.py -pyramid/scaffolds/alchemy/+package+/models.py -pyramid/scaffolds/alchemy/+package+/scripts/__init__.py -pyramid/scaffolds/alchemy/+package+/scripts/initializedb.py -pyramid/scaffolds/alchemy/+package+/static/favicon.ico -pyramid/scaffolds/alchemy/+package+/static/footerbg.png -pyramid/scaffolds/alchemy/+package+/static/headerbg.png -pyramid/scaffolds/alchemy/+package+/static/ie6.css -pyramid/scaffolds/alchemy/+package+/static/middlebg.png -pyramid/scaffolds/alchemy/+package+/static/pylons.css -pyramid/scaffolds/alchemy/+package+/static/pyramid-small.png -pyramid/scaffolds/alchemy/+package+/static/pyramid.png -pyramid/scaffolds/alchemy/+package+/static/transparent.gif -pyramid/scaffolds/alchemy/+package+/templates/mytemplate.pt_tmpl -pyramid/scaffolds/alchemy/+package+/tests.py_tmpl -pyramid/scaffolds/alchemy/+package+/views.py_tmpl -pyramid/scaffolds/alchemy/CHANGES.txt_tmpl -pyramid/scaffolds/alchemy/MANIFEST.in_tmpl -pyramid/scaffolds/alchemy/README.txt_tmpl -pyramid/scaffolds/alchemy/development.ini_tmpl -pyramid/scaffolds/alchemy/production.ini_tmpl -pyramid/scaffolds/alchemy/setup.cfg_tmpl -pyramid/scaffolds/alchemy/setup.py_tmpl -pyramid/scaffolds/copydir.py -pyramid/scaffolds/starter/+package+/__init__.py -pyramid/scaffolds/starter/+package+/static/favicon.ico -pyramid/scaffolds/starter/+package+/static/footerbg.png -pyramid/scaffolds/starter/+package+/static/headerbg.png -pyramid/scaffolds/starter/+package+/static/ie6.css -pyramid/scaffolds/starter/+package+/static/middlebg.png -pyramid/scaffolds/starter/+package+/static/pylons.css -pyramid/scaffolds/starter/+package+/static/pyramid-small.png -pyramid/scaffolds/starter/+package+/static/pyramid.png -pyramid/scaffolds/starter/+package+/static/transparent.gif -pyramid/scaffolds/starter/+package+/templates/mytemplate.pt_tmpl -pyramid/scaffolds/starter/+package+/tests.py_tmpl -pyramid/scaffolds/starter/+package+/views.py_tmpl -pyramid/scaffolds/starter/CHANGES.txt_tmpl -pyramid/scaffolds/starter/MANIFEST.in_tmpl -pyramid/scaffolds/starter/README.txt_tmpl -pyramid/scaffolds/starter/development.ini_tmpl -pyramid/scaffolds/starter/production.ini_tmpl -pyramid/scaffolds/starter/setup.cfg_tmpl -pyramid/scaffolds/starter/setup.py_tmpl -pyramid/scaffolds/template.py -pyramid/scaffolds/tests.py -pyramid/scaffolds/zodb/+package+/__init__.py -pyramid/scaffolds/zodb/+package+/models.py -pyramid/scaffolds/zodb/+package+/static/favicon.ico -pyramid/scaffolds/zodb/+package+/static/footerbg.png -pyramid/scaffolds/zodb/+package+/static/headerbg.png -pyramid/scaffolds/zodb/+package+/static/ie6.css -pyramid/scaffolds/zodb/+package+/static/middlebg.png -pyramid/scaffolds/zodb/+package+/static/pylons.css -pyramid/scaffolds/zodb/+package+/static/pyramid-small.png -pyramid/scaffolds/zodb/+package+/static/pyramid.png -pyramid/scaffolds/zodb/+package+/static/transparent.gif -pyramid/scaffolds/zodb/+package+/templates/mytemplate.pt -pyramid/scaffolds/zodb/+package+/tests.py_tmpl -pyramid/scaffolds/zodb/+package+/views.py_tmpl -pyramid/scaffolds/zodb/CHANGES.txt_tmpl -pyramid/scaffolds/zodb/MANIFEST.in_tmpl -pyramid/scaffolds/zodb/README.txt_tmpl -pyramid/scaffolds/zodb/development.ini_tmpl -pyramid/scaffolds/zodb/production.ini_tmpl -pyramid/scaffolds/zodb/setup.cfg_tmpl -pyramid/scaffolds/zodb/setup.py_tmpl -pyramid/scripting.py -pyramid/scripts/__init__.py -pyramid/scripts/common.py -pyramid/scripts/pcreate.py -pyramid/scripts/prequest.py -pyramid/scripts/proutes.py -pyramid/scripts/pserve.py -pyramid/scripts/pshell.py -pyramid/scripts/ptweens.py -pyramid/scripts/pviews.py -pyramid/security.py -pyramid/session.py -pyramid/settings.py -pyramid/static.py -pyramid/testing.py -pyramid/tests/__init__.py -pyramid/tests/fixtures/components.mak -pyramid/tests/fixtures/dummy.ini -pyramid/tests/fixtures/hello .world.mako -pyramid/tests/fixtures/hello_inherit_pkg.mak -pyramid/tests/fixtures/hellocompo.mak -pyramid/tests/fixtures/helloinherit.mak -pyramid/tests/fixtures/helloworld.mak -pyramid/tests/fixtures/helloworld.mako -pyramid/tests/fixtures/layout.mak -pyramid/tests/fixtures/minimal.pt -pyramid/tests/fixtures/minimal.txt -pyramid/tests/fixtures/nonminimal.mak -pyramid/tests/fixtures/nonminimal.txt -pyramid/tests/fixtures/pp.pt -pyramid/tests/fixtures/static/.hiddenfile -pyramid/tests/fixtures/static/arcs.svg.tgz -pyramid/tests/fixtures/static/index.html -pyramid/tests/fixtures/static/subdir/index.html -pyramid/tests/fixtures/withmacro.pt -pyramid/tests/pkgs/__init__.py -pyramid/tests/pkgs/ccbugapp/__init__.py -pyramid/tests/pkgs/conflictapp/__init__.py -pyramid/tests/pkgs/conflictapp/included.py -pyramid/tests/pkgs/defpermbugapp/__init__.py -pyramid/tests/pkgs/eventonly/__init__.py -pyramid/tests/pkgs/exceptionviewapp/__init__.py -pyramid/tests/pkgs/exceptionviewapp/models.py -pyramid/tests/pkgs/exceptionviewapp/views.py -pyramid/tests/pkgs/fixtureapp/__init__.py -pyramid/tests/pkgs/fixtureapp/models.py -pyramid/tests/pkgs/fixtureapp/subpackage/__init__.py -pyramid/tests/pkgs/fixtureapp/subpackage/templates/bar.pt -pyramid/tests/pkgs/fixtureapp/templates/fixture.pt -pyramid/tests/pkgs/fixtureapp/views.py -pyramid/tests/pkgs/forbiddenapp/__init__.py -pyramid/tests/pkgs/forbiddenview/__init__.py -pyramid/tests/pkgs/hybridapp/__init__.py -pyramid/tests/pkgs/hybridapp/views.py -pyramid/tests/pkgs/includeapp1/__init__.py -pyramid/tests/pkgs/includeapp1/root.py -pyramid/tests/pkgs/includeapp1/three.py -pyramid/tests/pkgs/includeapp1/two.py -pyramid/tests/pkgs/localeapp/__init__.py -pyramid/tests/pkgs/localeapp/locale/GARBAGE -pyramid/tests/pkgs/localeapp/locale/be/LC_MESSAGES -pyramid/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.mo -pyramid/tests/pkgs/localeapp/locale/de/LC_MESSAGES/deformsite.po -pyramid/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.mo -pyramid/tests/pkgs/localeapp/locale/de_DE/LC_MESSAGES/deformsite.po -pyramid/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.mo -pyramid/tests/pkgs/localeapp/locale/en/LC_MESSAGES/deformsite.po -pyramid/tests/pkgs/localeapp/locale2/GARBAGE -pyramid/tests/pkgs/localeapp/locale2/be/LC_MESSAGES -pyramid/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.mo -pyramid/tests/pkgs/localeapp/locale2/de/LC_MESSAGES/deformsite.po -pyramid/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.mo -pyramid/tests/pkgs/localeapp/locale2/en/LC_MESSAGES/deformsite.po -pyramid/tests/pkgs/localeapp/locale3/GARBAGE -pyramid/tests/pkgs/localeapp/locale3/be/LC_MESSAGES -pyramid/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.mo -pyramid/tests/pkgs/localeapp/locale3/de/LC_MESSAGES/deformsite.po -pyramid/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.mo -pyramid/tests/pkgs/localeapp/locale3/en/LC_MESSAGES/deformsite.po -pyramid/tests/pkgs/notfoundview/__init__.py -pyramid/tests/pkgs/permbugapp/__init__.py -pyramid/tests/pkgs/rendererscanapp/__init__.py -pyramid/tests/pkgs/rendererscanapp/one.pt -pyramid/tests/pkgs/rendererscanapp/two/__init__.py -pyramid/tests/pkgs/rendererscanapp/two/two.pt -pyramid/tests/pkgs/restbugapp/__init__.py -pyramid/tests/pkgs/restbugapp/views.py -pyramid/tests/pkgs/static_abspath/__init__.py -pyramid/tests/pkgs/static_assetspec/__init__.py -pyramid/tests/pkgs/static_routeprefix/__init__.py -pyramid/tests/pkgs/staticpermapp/__init__.py -pyramid/tests/pkgs/subrequestapp/__init__.py -pyramid/tests/pkgs/viewdecoratorapp/__init__.py -pyramid/tests/pkgs/viewdecoratorapp/views/__init__.py -pyramid/tests/pkgs/viewdecoratorapp/views/templates/foo.pt -pyramid/tests/pkgs/viewdecoratorapp/views/views.py -pyramid/tests/pkgs/wsgiapp2app/__init__.py -pyramid/tests/test_asset.py -pyramid/tests/test_authentication.py -pyramid/tests/test_authorization.py -pyramid/tests/test_chameleon_text.py -pyramid/tests/test_chameleon_zpt.py -pyramid/tests/test_config/__init__.py -pyramid/tests/test_config/files/assets/dummy.txt -pyramid/tests/test_config/files/minimal.pt -pyramid/tests/test_config/path/scanerror/__init__.py -pyramid/tests/test_config/path/scanerror/will_raise_error.py -pyramid/tests/test_config/pkgs/__init__.py -pyramid/tests/test_config/pkgs/asset/__init__.py -pyramid/tests/test_config/pkgs/asset/models.py -pyramid/tests/test_config/pkgs/asset/subpackage/__init__.py -pyramid/tests/test_config/pkgs/asset/subpackage/templates/bar.pt -pyramid/tests/test_config/pkgs/asset/templates/fixture.pt -pyramid/tests/test_config/pkgs/asset/views.py -pyramid/tests/test_config/pkgs/scanextrakw/__init__.py -pyramid/tests/test_config/pkgs/scannable/__init__.py -pyramid/tests/test_config/pkgs/scannable/another.py -pyramid/tests/test_config/pkgs/scannable/pod/notinit.py -pyramid/tests/test_config/pkgs/scannable/subpackage/__init__.py -pyramid/tests/test_config/pkgs/scannable/subpackage/notinit.py -pyramid/tests/test_config/pkgs/scannable/subpackage/subsubpackage/__init__.py -pyramid/tests/test_config/pkgs/selfscan/__init__.py -pyramid/tests/test_config/pkgs/selfscan/another.py -pyramid/tests/test_config/test_adapters.py -pyramid/tests/test_config/test_assets.py -pyramid/tests/test_config/test_factories.py -pyramid/tests/test_config/test_i18n.py -pyramid/tests/test_config/test_init.py -pyramid/tests/test_config/test_predicates.py -pyramid/tests/test_config/test_rendering.py -pyramid/tests/test_config/test_routes.py -pyramid/tests/test_config/test_security.py -pyramid/tests/test_config/test_settings.py -pyramid/tests/test_config/test_testing.py -pyramid/tests/test_config/test_tweens.py -pyramid/tests/test_config/test_util.py -pyramid/tests/test_config/test_views.py -pyramid/tests/test_decorator.py -pyramid/tests/test_docs.py -pyramid/tests/test_encode.py -pyramid/tests/test_events.py -pyramid/tests/test_exceptions.py -pyramid/tests/test_httpexceptions.py -pyramid/tests/test_i18n.py -pyramid/tests/test_integration.py -pyramid/tests/test_location.py -pyramid/tests/test_mako_templating.py -pyramid/tests/test_paster.py -pyramid/tests/test_path.py -pyramid/tests/test_registry.py -pyramid/tests/test_renderers.py -pyramid/tests/test_request.py -pyramid/tests/test_response.py -pyramid/tests/test_router.py -pyramid/tests/test_scaffolds/__init__.py -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/.badfile -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/__init__.py_tmpl -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/resources.py -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/favicon.ico -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/footerbg.png -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/headerbg.png -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/ie6.css -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/middlebg.png -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pylons.css -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid-small.png -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/pyramid.png -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/static/transparent.gif -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/templates/mytemplate.pt_tmpl -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/test_no_content.py_tmpl -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/tests.py_tmpl -pyramid/tests/test_scaffolds/fixture_scaffold/+package+/views.py_tmpl -pyramid/tests/test_scaffolds/fixture_scaffold/CHANGES.txt_tmpl -pyramid/tests/test_scaffolds/fixture_scaffold/MANIFEST.in_tmpl -pyramid/tests/test_scaffolds/fixture_scaffold/README.txt_tmpl -pyramid/tests/test_scaffolds/fixture_scaffold/development.ini_tmpl -pyramid/tests/test_scaffolds/fixture_scaffold/production.ini_tmpl -pyramid/tests/test_scaffolds/fixture_scaffold/setup.cfg_tmpl -pyramid/tests/test_scaffolds/fixture_scaffold/setup.py_tmpl -pyramid/tests/test_scaffolds/test_copydir.py -pyramid/tests/test_scaffolds/test_init.py -pyramid/tests/test_scaffolds/test_template.py -pyramid/tests/test_scripting.py -pyramid/tests/test_scripts/__init__.py -pyramid/tests/test_scripts/dummy.py -pyramid/tests/test_scripts/test_common.py -pyramid/tests/test_scripts/test_pcreate.py -pyramid/tests/test_scripts/test_prequest.py -pyramid/tests/test_scripts/test_proutes.py -pyramid/tests/test_scripts/test_pserve.py -pyramid/tests/test_scripts/test_pshell.py -pyramid/tests/test_scripts/test_ptweens.py -pyramid/tests/test_scripts/test_pviews.py -pyramid/tests/test_security.py -pyramid/tests/test_session.py -pyramid/tests/test_settings.py -pyramid/tests/test_static.py -pyramid/tests/test_testing.py -pyramid/tests/test_threadlocal.py -pyramid/tests/test_traversal.py -pyramid/tests/test_url.py -pyramid/tests/test_urldispatch.py -pyramid/tests/test_util.py -pyramid/tests/test_view.py -pyramid/tests/test_wsgi.py -pyramid/threadlocal.py -pyramid/traversal.py -pyramid/tweens.py -pyramid/url.py -pyramid/urldispatch.py -pyramid/util.py -pyramid/view.py -pyramid/wsgi.py -rtd.txt -setup.cfg -setup.py -tox.ini -- cgit v1.2.3 From d3ee791327d09411f6fb98a769904961070fba1a Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Thu, 11 Jul 2013 21:04:43 -0400 Subject: Coverage for new '--login' option. --- pyramid/tests/test_scripts/test_prequest.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pyramid/tests/test_scripts/test_prequest.py b/pyramid/tests/test_scripts/test_prequest.py index 64a7c3045..7630d8f3c 100644 --- a/pyramid/tests/test_scripts/test_prequest.py +++ b/pyramid/tests/test_scripts/test_prequest.py @@ -68,6 +68,19 @@ class TestPRequestCommand(unittest.TestCase): self.assertEqual(self._app_name, None) self.assertEqual(self._out, ['abc']) + def test_command_w_basic_auth(self): + command = self._makeOne( + ['', '--login=user:password', + '--header=name:value','development.ini', '/']) + command.run() + self.assertEqual(self._environ['HTTP_NAME'], 'value') + self.assertEqual(self._environ['HTTP_AUTHORIZATION'], + 'Basic dXNlcjpwYXNzd29yZA==') + self.assertEqual(self._path_info, '/') + self.assertEqual(self._spec, 'development.ini') + self.assertEqual(self._app_name, None) + self.assertEqual(self._out, ['abc']) + def test_command_has_content_type_header_var(self): command = self._makeOne( ['', '--header=content-type:app/foo','development.ini', '/']) -- cgit v1.2.3 From acc5ecb5423ef0b33ab45e6e378428f2188c2148 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Thu, 11 Jul 2013 21:08:19 -0400 Subject: Coverage for new OPTIONS and PROPFIND methods. --- pyramid/tests/test_scripts/test_prequest.py | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/pyramid/tests/test_scripts/test_prequest.py b/pyramid/tests/test_scripts/test_prequest.py index 7630d8f3c..37f1d3c0f 100644 --- a/pyramid/tests/test_scripts/test_prequest.py +++ b/pyramid/tests/test_scripts/test_prequest.py @@ -109,6 +109,7 @@ class TestPRequestCommand(unittest.TestCase): def test_command_method_get(self): command = self._makeOne(['', '--method=GET', 'development.ini', '/']) command.run() + self.assertEqual(self._environ['REQUEST_METHOD'], 'GET') self.assertEqual(self._path_info, '/') self.assertEqual(self._spec, 'development.ini') self.assertEqual(self._app_name, None) @@ -120,6 +121,7 @@ class TestPRequestCommand(unittest.TestCase): stdin = NativeIO() command.stdin = stdin command.run() + self.assertEqual(self._environ['REQUEST_METHOD'], 'POST') self.assertEqual(self._environ['CONTENT_LENGTH'], '-1') self.assertEqual(self._environ['wsgi.input'], stdin) self.assertEqual(self._path_info, '/') @@ -133,6 +135,7 @@ class TestPRequestCommand(unittest.TestCase): stdin = NativeIO() command.stdin = stdin command.run() + self.assertEqual(self._environ['REQUEST_METHOD'], 'PUT') self.assertEqual(self._environ['CONTENT_LENGTH'], '-1') self.assertEqual(self._environ['wsgi.input'], stdin) self.assertEqual(self._path_info, '/') @@ -146,6 +149,7 @@ class TestPRequestCommand(unittest.TestCase): stdin = NativeIO() command.stdin = stdin command.run() + self.assertEqual(self._environ['REQUEST_METHOD'], 'PATCH') self.assertEqual(self._environ['CONTENT_LENGTH'], '-1') self.assertEqual(self._environ['wsgi.input'], stdin) self.assertEqual(self._path_info, '/') @@ -153,6 +157,32 @@ class TestPRequestCommand(unittest.TestCase): self.assertEqual(self._app_name, None) self.assertEqual(self._out, ['abc']) + def test_command_method_propfind(self): + from pyramid.compat import NativeIO + command = self._makeOne(['', '--method=PROPFIND', 'development.ini', + '/']) + stdin = NativeIO() + command.stdin = stdin + command.run() + self.assertEqual(self._environ['REQUEST_METHOD'], 'PROPFIND') + self.assertEqual(self._path_info, '/') + self.assertEqual(self._spec, 'development.ini') + self.assertEqual(self._app_name, None) + self.assertEqual(self._out, ['abc']) + + def test_command_method_options(self): + from pyramid.compat import NativeIO + command = self._makeOne(['', '--method=OPTIONS', 'development.ini', + '/']) + stdin = NativeIO() + command.stdin = stdin + command.run() + self.assertEqual(self._environ['REQUEST_METHOD'], 'OPTIONS') + self.assertEqual(self._path_info, '/') + self.assertEqual(self._spec, 'development.ini') + self.assertEqual(self._app_name, None) + self.assertEqual(self._out, ['abc']) + def test_command_with_query_string(self): command = self._makeOne(['', 'development.ini', '/abc?a=1&b=2&c']) command.run() -- cgit v1.2.3 From a1786313496754fcc3db48ef66bc764b846452cb Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 12 Jul 2013 10:33:26 -0600 Subject: add an entry to changes about code merged from feature.prequest_login branch --- CHANGES.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index ba8aae559..0156b24fd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,8 +4,11 @@ next release Features -------- -- ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH`` - requests. See https://github.com/Pylons/pyramid/pull/1033. +- ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH`` + requests. See https://github.com/Pylons/pyramid/pull/1033. add support for + submitting ``OPTIONS`` and ``PROPFIND`` requests, and allow users to specify + basic authentication credentials in the request via a ``--login`` argument to + the script. See https://github.com/Pylons/pyramid/pull/1039. - ``ACLAuthorizationPolicy`` supports ``__acl__`` as a callable. This removes the ambiguity between the potential ``AttributeError`` that would -- cgit v1.2.3 From 2d045be54b8671a062b886c613b3f4e3e88ff7c9 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 12 Jul 2013 21:05:46 -0600 Subject: Make abstraction consistent. --- HACKING.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HACKING.txt b/HACKING.txt index 26e85ee80..5b5dcc458 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -126,7 +126,7 @@ documentation in this package which references that API or behavior must change to reflect the bug fix, ideally in the same commit that fixes the bug or adds the feature. -To build and review docs (where ``$yourvenv`` refers to the virtualenv you're +To build and review docs (where ``$VENV`` refers to the virtualenv you're using to develop Pyramid): 1. Run ``$VENV/bin/python setup.py dev docs``. This will cause Sphinx -- cgit v1.2.3 From 0baa6c4270d5bcfc710434834de83a388d1c0466 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 13 Jul 2013 16:11:24 -0600 Subject: New tutorial: Using PyCharm with Pyramid --- docs/index.rst | 1 + docs/tutorials/pycharm/images/create_new_project.png | Bin 0 -> 118472 bytes docs/tutorials/pycharm/images/create_setup.png | Bin 0 -> 123209 bytes .../pycharm/images/create_virtual_environment.png | Bin 0 -> 42991 bytes .../pycharm/images/edit_run_debug_configurations.png | Bin 0 -> 106932 bytes docs/tutorials/pycharm/images/install_package.png | Bin 0 -> 69633 bytes .../pycharm/images/install_package_pyramid.png | Bin 0 -> 125125 bytes .../pycharm/images/install_package_setuptools.png | Bin 0 -> 107886 bytes .../tutorials/pycharm/images/python_interpreters_1.png | Bin 0 -> 130060 bytes .../tutorials/pycharm/images/python_interpreters_2.png | Bin 0 -> 130852 bytes docs/tutorials/pycharm/images/run_configuration.png | Bin 0 -> 57129 bytes docs/tutorials/pycharm/images/start_up_screen.png | Bin 0 -> 70500 bytes 12 files changed, 1 insertion(+) create mode 100644 docs/tutorials/pycharm/images/create_new_project.png create mode 100644 docs/tutorials/pycharm/images/create_setup.png create mode 100644 docs/tutorials/pycharm/images/create_virtual_environment.png create mode 100644 docs/tutorials/pycharm/images/edit_run_debug_configurations.png create mode 100644 docs/tutorials/pycharm/images/install_package.png create mode 100644 docs/tutorials/pycharm/images/install_package_pyramid.png create mode 100644 docs/tutorials/pycharm/images/install_package_setuptools.png create mode 100644 docs/tutorials/pycharm/images/python_interpreters_1.png create mode 100644 docs/tutorials/pycharm/images/python_interpreters_2.png create mode 100644 docs/tutorials/pycharm/images/run_configuration.png create mode 100644 docs/tutorials/pycharm/images/start_up_screen.png diff --git a/docs/index.rst b/docs/index.rst index bc711f8ff..93b550d60 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -108,6 +108,7 @@ platforms. tutorials/wiki/index.rst tutorials/bfg/index.rst tutorials/modwsgi/index.rst + tutorials/pycharm/index.rst API Documentation ================== diff --git a/docs/tutorials/pycharm/images/create_new_project.png b/docs/tutorials/pycharm/images/create_new_project.png new file mode 100644 index 000000000..f15068b65 Binary files /dev/null and b/docs/tutorials/pycharm/images/create_new_project.png differ diff --git a/docs/tutorials/pycharm/images/create_setup.png b/docs/tutorials/pycharm/images/create_setup.png new file mode 100644 index 000000000..de4cb364b Binary files /dev/null and b/docs/tutorials/pycharm/images/create_setup.png differ diff --git a/docs/tutorials/pycharm/images/create_virtual_environment.png b/docs/tutorials/pycharm/images/create_virtual_environment.png new file mode 100644 index 000000000..0bd3c9263 Binary files /dev/null and b/docs/tutorials/pycharm/images/create_virtual_environment.png differ diff --git a/docs/tutorials/pycharm/images/edit_run_debug_configurations.png b/docs/tutorials/pycharm/images/edit_run_debug_configurations.png new file mode 100644 index 000000000..7708fa9dc Binary files /dev/null and b/docs/tutorials/pycharm/images/edit_run_debug_configurations.png differ diff --git a/docs/tutorials/pycharm/images/install_package.png b/docs/tutorials/pycharm/images/install_package.png new file mode 100644 index 000000000..944a05f6a Binary files /dev/null and b/docs/tutorials/pycharm/images/install_package.png differ diff --git a/docs/tutorials/pycharm/images/install_package_pyramid.png b/docs/tutorials/pycharm/images/install_package_pyramid.png new file mode 100644 index 000000000..05a209b6c Binary files /dev/null and b/docs/tutorials/pycharm/images/install_package_pyramid.png differ diff --git a/docs/tutorials/pycharm/images/install_package_setuptools.png b/docs/tutorials/pycharm/images/install_package_setuptools.png new file mode 100644 index 000000000..8932a3f40 Binary files /dev/null and b/docs/tutorials/pycharm/images/install_package_setuptools.png differ diff --git a/docs/tutorials/pycharm/images/python_interpreters_1.png b/docs/tutorials/pycharm/images/python_interpreters_1.png new file mode 100644 index 000000000..6b1455001 Binary files /dev/null and b/docs/tutorials/pycharm/images/python_interpreters_1.png differ diff --git a/docs/tutorials/pycharm/images/python_interpreters_2.png b/docs/tutorials/pycharm/images/python_interpreters_2.png new file mode 100644 index 000000000..61c3de2b1 Binary files /dev/null and b/docs/tutorials/pycharm/images/python_interpreters_2.png differ diff --git a/docs/tutorials/pycharm/images/run_configuration.png b/docs/tutorials/pycharm/images/run_configuration.png new file mode 100644 index 000000000..4612b2b3c Binary files /dev/null and b/docs/tutorials/pycharm/images/run_configuration.png differ diff --git a/docs/tutorials/pycharm/images/start_up_screen.png b/docs/tutorials/pycharm/images/start_up_screen.png new file mode 100644 index 000000000..c65e01eeb Binary files /dev/null and b/docs/tutorials/pycharm/images/start_up_screen.png differ -- cgit v1.2.3 From 904981635bcaa54b9cd94538ac5c3db07cfe3ee7 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 13 Jul 2013 16:11:24 -0600 Subject: New tutorial: Using PyCharm with Pyramid --- docs/index.rst | 1 + .../pycharm/images/create_new_project.png | Bin 0 -> 118472 bytes docs/tutorials/pycharm/images/create_setup.png | Bin 0 -> 123209 bytes .../pycharm/images/create_virtual_environment.png | Bin 0 -> 42991 bytes .../images/edit_run_debug_configurations.png | Bin 0 -> 106932 bytes docs/tutorials/pycharm/images/install_package.png | Bin 0 -> 69633 bytes .../pycharm/images/install_package_pyramid.png | Bin 0 -> 125125 bytes .../pycharm/images/install_package_setuptools.png | Bin 0 -> 107886 bytes .../pycharm/images/python_interpreters_1.png | Bin 0 -> 130060 bytes .../pycharm/images/python_interpreters_2.png | Bin 0 -> 130852 bytes .../tutorials/pycharm/images/run_configuration.png | Bin 0 -> 57129 bytes docs/tutorials/pycharm/images/start_up_screen.png | Bin 0 -> 70500 bytes docs/tutorials/pycharm/index.rst | 356 +++++++++++++++++++++ 13 files changed, 357 insertions(+) create mode 100644 docs/tutorials/pycharm/images/create_new_project.png create mode 100644 docs/tutorials/pycharm/images/create_setup.png create mode 100644 docs/tutorials/pycharm/images/create_virtual_environment.png create mode 100644 docs/tutorials/pycharm/images/edit_run_debug_configurations.png create mode 100644 docs/tutorials/pycharm/images/install_package.png create mode 100644 docs/tutorials/pycharm/images/install_package_pyramid.png create mode 100644 docs/tutorials/pycharm/images/install_package_setuptools.png create mode 100644 docs/tutorials/pycharm/images/python_interpreters_1.png create mode 100644 docs/tutorials/pycharm/images/python_interpreters_2.png create mode 100644 docs/tutorials/pycharm/images/run_configuration.png create mode 100644 docs/tutorials/pycharm/images/start_up_screen.png create mode 100644 docs/tutorials/pycharm/index.rst diff --git a/docs/index.rst b/docs/index.rst index bc711f8ff..93b550d60 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -108,6 +108,7 @@ platforms. tutorials/wiki/index.rst tutorials/bfg/index.rst tutorials/modwsgi/index.rst + tutorials/pycharm/index.rst API Documentation ================== diff --git a/docs/tutorials/pycharm/images/create_new_project.png b/docs/tutorials/pycharm/images/create_new_project.png new file mode 100644 index 000000000..f15068b65 Binary files /dev/null and b/docs/tutorials/pycharm/images/create_new_project.png differ diff --git a/docs/tutorials/pycharm/images/create_setup.png b/docs/tutorials/pycharm/images/create_setup.png new file mode 100644 index 000000000..de4cb364b Binary files /dev/null and b/docs/tutorials/pycharm/images/create_setup.png differ diff --git a/docs/tutorials/pycharm/images/create_virtual_environment.png b/docs/tutorials/pycharm/images/create_virtual_environment.png new file mode 100644 index 000000000..0bd3c9263 Binary files /dev/null and b/docs/tutorials/pycharm/images/create_virtual_environment.png differ diff --git a/docs/tutorials/pycharm/images/edit_run_debug_configurations.png b/docs/tutorials/pycharm/images/edit_run_debug_configurations.png new file mode 100644 index 000000000..7708fa9dc Binary files /dev/null and b/docs/tutorials/pycharm/images/edit_run_debug_configurations.png differ diff --git a/docs/tutorials/pycharm/images/install_package.png b/docs/tutorials/pycharm/images/install_package.png new file mode 100644 index 000000000..944a05f6a Binary files /dev/null and b/docs/tutorials/pycharm/images/install_package.png differ diff --git a/docs/tutorials/pycharm/images/install_package_pyramid.png b/docs/tutorials/pycharm/images/install_package_pyramid.png new file mode 100644 index 000000000..05a209b6c Binary files /dev/null and b/docs/tutorials/pycharm/images/install_package_pyramid.png differ diff --git a/docs/tutorials/pycharm/images/install_package_setuptools.png b/docs/tutorials/pycharm/images/install_package_setuptools.png new file mode 100644 index 000000000..8932a3f40 Binary files /dev/null and b/docs/tutorials/pycharm/images/install_package_setuptools.png differ diff --git a/docs/tutorials/pycharm/images/python_interpreters_1.png b/docs/tutorials/pycharm/images/python_interpreters_1.png new file mode 100644 index 000000000..6b1455001 Binary files /dev/null and b/docs/tutorials/pycharm/images/python_interpreters_1.png differ diff --git a/docs/tutorials/pycharm/images/python_interpreters_2.png b/docs/tutorials/pycharm/images/python_interpreters_2.png new file mode 100644 index 000000000..61c3de2b1 Binary files /dev/null and b/docs/tutorials/pycharm/images/python_interpreters_2.png differ diff --git a/docs/tutorials/pycharm/images/run_configuration.png b/docs/tutorials/pycharm/images/run_configuration.png new file mode 100644 index 000000000..4612b2b3c Binary files /dev/null and b/docs/tutorials/pycharm/images/run_configuration.png differ diff --git a/docs/tutorials/pycharm/images/start_up_screen.png b/docs/tutorials/pycharm/images/start_up_screen.png new file mode 100644 index 000000000..c65e01eeb Binary files /dev/null and b/docs/tutorials/pycharm/images/start_up_screen.png differ diff --git a/docs/tutorials/pycharm/index.rst b/docs/tutorials/pycharm/index.rst new file mode 100644 index 000000000..1b7c07f98 --- /dev/null +++ b/docs/tutorials/pycharm/index.rst @@ -0,0 +1,356 @@ +************************** +Using PyCharm with Pyramid +************************** + +This tutorial is a very brief overview of how to use PyCharm with Pyramid. +`PyCharm `_ is an Integrated Development +Environment (IDE) for Python programmers. It has numerous features including +code completion, project management, version control system (git, Subversion, +etc.), debugger, and more. + +This tutorial is a continual evolving document. Both PyCharm and Pyramid are +under active development, and changes to either may necessitate changes to +this document. In addition, there may be errors or omissions in this +document, and corrections and improvements through a pull request are most +welcome. + +To get started with Pyramid in PyCharm, we need to install prerequisite +software. + +* Python +* PyCharm and certain Python packages +* Pyramid and its requirements + +Install Python +============== + +You can download installers for Mac OS X and Windows, or source tarballs for +Linux, Unix, or Mac OS X from `python.org Download +`_. Follow the instructions in the README files. + +Install PyCharm +=============== + +PyCharm is a commercial application that requires a license. Several license +types are available depending on your usage. + +Pyramid is an open source project, and on an annual basis fulfills the terms of +the Open Source License with JetBrains for the use of PyCharm to develop for +Pyramid under the Pylons Project. If you contribute to Pyramid or the Pylons +Project, and would like to use our 1-year license, please contact the license +maintainer `stevepiercy` in the `#pyramid` channel on `irc.freenode.net`. + +Alternatively you can download a 30-day trial of PyCharm or `purchase a license +`_ for development or training +purposes under any other license. + +`Download PyCharm `_ and +follow the installation instructions on that web page. + +Configure PyCharm +================= + +Create a New Project +-------------------- + +Launch the PyCharm application. + +From the Start Up screen, click Create New Project. + +.. image:: images/start_up_screen.png + +If the Start Up screen does not appear, you probably have an existing project +open. Close the existing project and the Start Up screen will appear. + +.. image:: images/create_new_project.png + +In the Create New Project dialog window do the following. + +* Enter a Project name. The Location should automatically populate as you + type. You can change the path as you wish. It is common practice to use the + path `~/projects/` to contain projects. This location shall be referred to + as your "project directory" throughout the rest of this document. +* Project type should be Empty project. +* For Interpreter, click the ellipsis button to create a new virtual + environment. + +A new window appears, "Python Interpreters". + +Create or Select a Python Interpreter +------------------------------------- + +.. image:: images/python_interpreters_1.png + +* Either click the `+` button to add a new Python interpreter for Python + 2.7 (the Python 2.7 installer uses the path + `/Library/Frameworks/Python.framework/Versions/2.7/bin`), or use an existing + Python interpreter for Python 2.7. PyCharm will take a few seconds to add a + new interpreter. + +.. image:: images/python_interpreters_2.png + +Create a Virtual Environment +---------------------------- + +* Click the button with the Python logo and a green "V". A new window appears, + "Create Virtual Environment". + +.. image:: images/create_virtual_environment.png + +* Enter a Virtual Environment name. +* The Location should automatically populate as you type. You can change the + path as you wish. +* The Base interpreter should be already selected, but if not, select + `/Library/Frameworks/Python.framework/Versions/2.7/bin` or other Python 2.7 + interpreter. +* Leave the box unchecked for "Inherit global site packages". +* Click "OK". PyCharm will set up libraries and packages, and return you to + the Python Interpreters window. + +Install setuptools and pyramid Packages +--------------------------------------- + +If you already have setuptools installed, you can skip this step. + +In the Python Interpreters window with the just-created virtual environment +selected in the top pane, in the lower pane select the Packages tab, and click +the Install button. The Available Packages window appears. + +.. image:: images/install_package.png + +In the Available Packages window, in the search bar, enter "setuptools". +Select the plain old "setuptools" package, and click the Install Package button +and wait for the status message to disappear. PyCharm will install the package +and any dependencies. + +.. image:: images/install_package_setuptools.png + +Repeat the previous step, except use "pyramid" for searching and selecting. + +.. image:: images/install_package_pyramid.png + +When PyCharm finishes installing the packages, close the Available Packages +window. + +In the Python Interpreters window, click the OK button. + +In the Create New Project window, click the OK button. + +If PyCharm displays a warning, click the Yes button. PyCharm opens the new +project. + +Clone the Pyramid repository +============================ + +By cloning the Pyramid repository, you can contribute changes to the code or +documentation. We recommend that you fork the Pyramid repository to your own +GitHub account, then clone your forked repository, so that you can commit your +changes to your GitHub repository and submit pull requests to the Pyramid +project. + +In PyCharm, select *VCS > Enable Version Control Integration...*, then select +Git as your VCS and click the OK button. + +See `Cloning a Repository from GitHub +`_ in the PyCharm documentation for more information on using GitHub and git +in PyCharm. + +We will refer to the cloned repository of Pyramid on your computer as your +"local Pyramid repository". + +Install development and documentation requirements +================================================== + +In order to contribute bug fixes, features, and documentation changes to +Pyramid, you must install development and documentation requirements into your +virtual environment. Pyramid uses Sphinx and reStructuredText for +documentation. + +* In PyCharm, select *Run > Edit Configurations...*. The Run/Debug + Configurations window appears. + + .. image:: images/edit_run_debug_configurations.png + +* Click the "+" button, then select Python to add a new Python run + configuration. +* Name the configuration "setup dev". +* Either manually enter the path to the `setup.py` script or click the ellipsis + button to navigate to the `pyramid/setup.py` path and select it. +* For Script parameters enter `dev`. +* Click the "Apply" button to save the run configuration. + +While we're here, let's duplicate this run configuration for installing the +documentation requirements. + +* Click the "Copy Configuration" button. Its icon looks like two dog-eared + pages, with a blue page on top of a grey page. +* Name the configuration "setup docs". +* Leave the path as is. +* For Script parameters enter `docs`. +* Click the "Apply" button to save the run configuration. +* Click the "OK" button to return to the project window. + +In the PyCharm toolbar, you will see a Python icon and your run configurations. + +.. image:: images/run_configuration.png + +First select "setup dev", and click the "run" button (the green triangle). It +may take some time to install the requirements. Second select "setup docs", +and click the "run" button again. + +As of this writing, PyCharm does not yet have a command line interface to a +shell. So there are some things that require you to go into a shell to enter +commands. This next step requires doing just so. + +* In your shell, navigate to your project directory, e.g., `cd + ~/projects/pycharm_pyramid/`. +* Enter the command `source bin/activate` to activate your virtual environment. +* Navigate into your local Pyramid repository, e.g., `cd pyramid`. +* Issue the command `git submodule update --init --recursive`. +* Navigate to the `docs` directory in your local Pyramid repository with the + command `cd docs`. +* Issue the command `make clean html` to generate the HTML documentation from + reStructuredText files. +* The HTML files are in `_build/html`. Open up `index.html` in a web browser + to see the result. +* Whenever you want to edit existing docs and see the effect of your changes, + simply run `make html` from within the `docs` directory. + +Unfortunately, the author was unable to figure out how to generate docs in +PyCharm using either a "Python docs" or "Python" run configuration. If anyone +knows, please submit a pull request. + +You will now be ready to hack in and contribute to Pyramid. + +Template Languages +================== + +To configure the template languages Mako and Jinja, see the PyCharm +documentation `Templates +`_. + +To configure the template language Chameleon, see `Creating and Registering +File Types +`_. Specifically for Chameleon, we want to associate XML to the `*.pt` +extension. + +* Open *PyCharm > Preferences...*, then the File Types dialog box. +* From the Recognized File Types list, select "XML files". +* In the Registered Patterns area, click the "+" button, and the Add Wildcard + window opens. Enter `*.pt` in the Add Wildcard window, and click the OK + button. Click OK again to save the settings. + +Creating a Pyramid Project +========================== + +The information for this section is derived from `Creating a Pyramid Project +`_ +and adapted for use in PyCharm. + +Creating a Pyramid Project Using Scaffolds +------------------------------------------ + +Within PyCharm, you can start a project using a scaffold by doing the +following. + +* Select *Run > Edit Configurations...*. +* Click the "+" button, then select Python to add a new Python run + configuration. +* Name the configuration "pcreate". +* Either manually enter the path to the `pcreate` script or click the ellipsis + button to navigate to the `$VENV/bin/pcreate` path and select it. +* For Script parameters enter `-s starter MyProject`. "starter" is the name of + one of the scaffolds included with Pyramid, but you can use any scaffold. + "MyProject" is the name of your project. +* Select the directory into which you want to place `MyProject`. A common + practice is `~/projects/`. +* Click the OK button to save the run configuration. +* Select *Run > Run 'pcreate'* to run the run configuration. Your project will + be created. +* Select *File > Open directory*, select the directory where you created your + project `MyProject`, and click the Choose button. You will be prompted to + open the project, and you may find it convenient to select "Open in current + window", and check "Add to currently open projects". +* Finally set the Project Interpreter to your virtual environment or verify it + as such. Select *PyCharm > Preferences... > Project Interpreter*, and verify + that the project is using the same virtual environment as the parent project. +* If a yellow bar warns you to install requirements, then click link to do so. + +Installing your Newly Created Project for Development +----------------------------------------------------- + +We will create another run configuration, just like before. + +* In PyCharm, select the `setup.py` script in the `MyProject` folder. This + should populate some fields with the proper values. +* Select *Run > Edit Configurations...*. +* Click the "+" button, then select Python to add a new Python run + configuration. +* Name the configuration "MyProject setup develop". +* Either manually enter the path to the `setup.py` script in the `MyProject` + folder or click the ellipsis button to navigate to the path and select it. +* For Script parameters enter `develop`. +* For Project, select "MyProject". +* For Working directory, enter or select the path to `MyProject`. +* Click the "Apply" button to save the run configuration. +* Finally run the run configuration "MyProject setup develop". Your project + will be installed. + +Running The Tests For Your Application +-------------------------------------- + +We will create yet another run configuration. [If you know of an easier method +while in PyCharm, please submit a pull request.] + +* Select *Run > Edit Configurations...*. +* Select the previous run configuration "MyProject setup develop", and click + the Copy Configuration button. +* Name the configuration "MyProject setup test". +* The path to the `setup.py` script in the `MyProject` folder should already be + entered. +* For Script parameters enter `test -q`. +* For Project "MyProject" should be selected. +* For Working directory, the path to `MyProject` should be selected. +* Click the "Apply" button to save the run configuration. +* Finally run the run configuration "MyProject setup test". Your project will + run its unit tests. + +Running The Project Application +------------------------------- + +When will creation of run configurations end? Not today! + +* Select *Run > Edit Configurations...*. +* Select the previous run configuration "MyProject setup develop", and click + the Copy Configuration button. +* Name the configuration "MyProject pserve". +* Either manually enter the path to the `pserve` script or click the ellipsis + button to navigate to the `$VENV/bin/pserve` path and select it. +* For Script parameters enter `development.ini`. +* For Project "MyProject" should be selected. +* For Working directory, the path to `MyProject` should be selected. +* Click the "Apply" button to save the run configuration. +* Finally run the run configuration "MyProject pserve". Your project will run. + Click the link in the Python console or visit the URL http://0.0.0.0:6543/ in + a web browser. + +You can also reload any changes to your project's `.py` or `.ini` files +automatically by using the Script parameters `development.ini --reload`. + +Debugging +========= + +See the PyCharm documentation `Running and Debugging +`_ for +details on how to debug your Pyramid app in PyCharm. + +First, you cannot simultaneously run and debug your app. Terminate your app if +it is running before you debug it. + +To debug your app, open a file in your app that you want to debug and click on +the gutter (the space between line numbers and the code) to set a breakpoint. +Then select "MyProject pserve" in the PyCharm toolbar, then click the debug +icon (which looks like a green ladybug). Your app will run up to the first +breakpoint. -- cgit v1.2.3 From ffdb7b6892be1952f9ac45091c80aa0500cb6507 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 13 Jul 2013 18:32:07 -0600 Subject: New tutorial: Using PyCharm with Pyramid --- docs/tutorials/pycharm/index.rst | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/tutorials/pycharm/index.rst b/docs/tutorials/pycharm/index.rst index 1b7c07f98..f2e3b7bcb 100644 --- a/docs/tutorials/pycharm/index.rst +++ b/docs/tutorials/pycharm/index.rst @@ -151,10 +151,9 @@ project. In PyCharm, select *VCS > Enable Version Control Integration...*, then select Git as your VCS and click the OK button. -See `Cloning a Repository from GitHub -`_ in the PyCharm documentation for more information on using GitHub and git -in PyCharm. +See `Cloning a Repository from GitHub `_ +in the PyCharm documentation for more information on using GitHub and git in +PyCharm. We will refer to the cloned repository of Pyramid on your computer as your "local Pyramid repository". -- cgit v1.2.3 From 6b97003b5cfc8e318eb0cb789569d3604b3821f3 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 14 Jul 2013 22:22:15 -0500 Subject: update changlog --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0156b24fd..2221f9945 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -101,7 +101,8 @@ Bug Fixes predicate mismatch error when trying to use GET or DELETE methods. Now the views are found and no predicate mismatch is raised. - See https://github.com/Pylons/pyramid/pull/786 + See https://github.com/Pylons/pyramid/pull/786 and + https://github.com/Pylons/pyramid/pull/1004 - Spaces and dots may now be in mako renderer template paths. This was broken when support for the new makodef syntax was added in 1.4a1. -- cgit v1.2.3 From 84b9027389615084eaf402f8f2aae2ec7199bd67 Mon Sep 17 00:00:00 2001 From: Laurence Rowe Date: Sun, 14 Jul 2013 21:33:24 -0700 Subject: Avoid re-executing the same view when looking up context base views. This is a tweak of #1004. Really we should be using subscribers here instead of adapters, but zope.interface doesn't yet suppport named subscribers. --- pyramid/router.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyramid/router.py b/pyramid/router.py index 3d2a2ff3e..1a991648b 100644 --- a/pyramid/router.py +++ b/pyramid/router.py @@ -165,9 +165,13 @@ class Router(object): # look for other views that meet the predicate # criteria for iface in context_iface.__sro__[1:]: + previous_view_callable = view_callable view_callable = adapters.lookup( (IViewClassifier, request.request_iface, iface), IView, name=view_name, default=None) + # intermediate bases may lookup same view_callable + if view_callable is previous_view_callable: + continue if view_callable is not None: try: response = view_callable(context, request) -- cgit v1.2.3 From 75fc4ac60ed4217cfaed4145656b7cefdc05cb04 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 15 Jul 2013 21:44:01 -0500 Subject: update changelog --- CHANGES.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2221f9945..0dff0f047 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -102,7 +102,8 @@ Bug Fixes methods. Now the views are found and no predicate mismatch is raised. See https://github.com/Pylons/pyramid/pull/786 and - https://github.com/Pylons/pyramid/pull/1004 + https://github.com/Pylons/pyramid/pull/1004 and + https://github.com/Pylons/pyramid/pull/1046 - Spaces and dots may now be in mako renderer template paths. This was broken when support for the new makodef syntax was added in 1.4a1. -- cgit v1.2.3 From 09d131cd5a3dd387ebf46d6a31f3969fb8239600 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Tue, 16 Jul 2013 05:44:10 -0600 Subject: - Correct title - Synch order of chapters --- docs/latexindex.rst | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/latexindex.rst b/docs/latexindex.rst index 6bb875f73..21cea8256 100644 --- a/docs/latexindex.rst +++ b/docs/latexindex.rst @@ -1,8 +1,8 @@ .. _latexindex: -@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -The :app:`Pyramid` Web Application Framework -@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +The :app:`Pyramid` Web Application Development Framework +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ .. frontmatter:: @@ -28,8 +28,8 @@ Narrative Documentation narr/introduction narr/install - narr/configuration narr/firstapp + narr/configuration narr/project narr/startup narr/router @@ -50,6 +50,7 @@ Narrative Documentation narr/vhosting narr/testing narr/resources + narr/hellotraversal narr/muchadoabouttraversal narr/traversal narr/security @@ -60,6 +61,8 @@ Narrative Documentation narr/extending narr/advconfig narr/extconfig + narr/scaffolding + narr/upgrading narr/threadlocals narr/zca @@ -71,10 +74,11 @@ Tutorials .. toctree:: :maxdepth: 1 - tutorials/wiki/index.rst tutorials/wiki2/index.rst + tutorials/wiki/index.rst tutorials/bfg/index.rst tutorials/modwsgi/index.rst + tutorials/pycharm/index.rst .. _api_reference: -- cgit v1.2.3 From a70d54c9ce1e635feb931eea63e41ea56bae4fb5 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 17 Jul 2013 04:53:03 -0600 Subject: Improve consistency between latexindex.rst and index.rst. --- docs/authorintro.rst | 2 +- docs/index.rst | 4 ++-- docs/latexindex.rst | 18 +++++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/authorintro.rst b/docs/authorintro.rst index f1a9d1484..b3cd68494 100644 --- a/docs/authorintro.rst +++ b/docs/authorintro.rst @@ -73,7 +73,7 @@ This book is divided into three major parts: concepts in terms of the sample. You should read the tutorials if you want a guided tour of :app:`Pyramid`. -:ref:`api_reference` +:ref:`api_documentation` Comprehensive reference material for every public API exposed by :app:`Pyramid`. The API documentation is organized diff --git a/docs/index.rst b/docs/index.rst index 93b550d60..d1a1e8ee7 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -45,7 +45,7 @@ What's New .. _html_narrative_documentation: -Narrative documentation +Narrative Documentation ======================= Narrative documentation in chapter form explaining how to use @@ -111,7 +111,7 @@ platforms. tutorials/pycharm/index.rst API Documentation -================== +================= Comprehensive reference material for every public API exposed by :app:`Pyramid`: diff --git a/docs/latexindex.rst b/docs/latexindex.rst index 21cea8256..416fc9bf1 100644 --- a/docs/latexindex.rst +++ b/docs/latexindex.rst @@ -1,13 +1,13 @@ .. _latexindex: -@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ -The :app:`Pyramid` Web Application Development Framework -@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +================================================= +The Pyramid Web Application Development Framework +================================================= .. frontmatter:: Front Matter -@@@@@@@@@@@@ +============ .. toctree:: :maxdepth: 1 @@ -21,7 +21,7 @@ Front Matter .. _narrative_documentation: Narrative Documentation -@@@@@@@@@@@@@@@@@@@@@@@ +======================= .. toctree:: :maxdepth: 1 @@ -69,7 +69,7 @@ Narrative Documentation .. _tutorials: Tutorials -@@@@@@@@@ +========= .. toctree:: :maxdepth: 1 @@ -80,10 +80,10 @@ Tutorials tutorials/modwsgi/index.rst tutorials/pycharm/index.rst -.. _api_reference: +.. _api_documentation: -API Reference -@@@@@@@@@@@@@ +API Documentation +================= .. toctree:: :maxdepth: 1 -- cgit v1.2.3 From 4d6281d1c06d85ce64a6cd6d6a8da423053e7d7a Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Wed, 17 Jul 2013 05:06:00 -0600 Subject: Remove PyCharm tutorial, since it now resides under pyramid_tutorials --- .../pycharm/images/create_new_project.png | Bin 118472 -> 0 bytes docs/tutorials/pycharm/images/create_setup.png | Bin 123209 -> 0 bytes .../pycharm/images/create_virtual_environment.png | Bin 42991 -> 0 bytes .../images/edit_run_debug_configurations.png | Bin 106932 -> 0 bytes docs/tutorials/pycharm/images/install_package.png | Bin 69633 -> 0 bytes .../pycharm/images/install_package_pyramid.png | Bin 125125 -> 0 bytes .../pycharm/images/install_package_setuptools.png | Bin 107886 -> 0 bytes .../pycharm/images/python_interpreters_1.png | Bin 130060 -> 0 bytes .../pycharm/images/python_interpreters_2.png | Bin 130852 -> 0 bytes .../tutorials/pycharm/images/run_configuration.png | Bin 57129 -> 0 bytes docs/tutorials/pycharm/images/start_up_screen.png | Bin 70500 -> 0 bytes docs/tutorials/pycharm/index.rst | 355 --------------------- 12 files changed, 355 deletions(-) delete mode 100644 docs/tutorials/pycharm/images/create_new_project.png delete mode 100644 docs/tutorials/pycharm/images/create_setup.png delete mode 100644 docs/tutorials/pycharm/images/create_virtual_environment.png delete mode 100644 docs/tutorials/pycharm/images/edit_run_debug_configurations.png delete mode 100644 docs/tutorials/pycharm/images/install_package.png delete mode 100644 docs/tutorials/pycharm/images/install_package_pyramid.png delete mode 100644 docs/tutorials/pycharm/images/install_package_setuptools.png delete mode 100644 docs/tutorials/pycharm/images/python_interpreters_1.png delete mode 100644 docs/tutorials/pycharm/images/python_interpreters_2.png delete mode 100644 docs/tutorials/pycharm/images/run_configuration.png delete mode 100644 docs/tutorials/pycharm/images/start_up_screen.png delete mode 100644 docs/tutorials/pycharm/index.rst diff --git a/docs/tutorials/pycharm/images/create_new_project.png b/docs/tutorials/pycharm/images/create_new_project.png deleted file mode 100644 index f15068b65..000000000 Binary files a/docs/tutorials/pycharm/images/create_new_project.png and /dev/null differ diff --git a/docs/tutorials/pycharm/images/create_setup.png b/docs/tutorials/pycharm/images/create_setup.png deleted file mode 100644 index de4cb364b..000000000 Binary files a/docs/tutorials/pycharm/images/create_setup.png and /dev/null differ diff --git a/docs/tutorials/pycharm/images/create_virtual_environment.png b/docs/tutorials/pycharm/images/create_virtual_environment.png deleted file mode 100644 index 0bd3c9263..000000000 Binary files a/docs/tutorials/pycharm/images/create_virtual_environment.png and /dev/null differ diff --git a/docs/tutorials/pycharm/images/edit_run_debug_configurations.png b/docs/tutorials/pycharm/images/edit_run_debug_configurations.png deleted file mode 100644 index 7708fa9dc..000000000 Binary files a/docs/tutorials/pycharm/images/edit_run_debug_configurations.png and /dev/null differ diff --git a/docs/tutorials/pycharm/images/install_package.png b/docs/tutorials/pycharm/images/install_package.png deleted file mode 100644 index 944a05f6a..000000000 Binary files a/docs/tutorials/pycharm/images/install_package.png and /dev/null differ diff --git a/docs/tutorials/pycharm/images/install_package_pyramid.png b/docs/tutorials/pycharm/images/install_package_pyramid.png deleted file mode 100644 index 05a209b6c..000000000 Binary files a/docs/tutorials/pycharm/images/install_package_pyramid.png and /dev/null differ diff --git a/docs/tutorials/pycharm/images/install_package_setuptools.png b/docs/tutorials/pycharm/images/install_package_setuptools.png deleted file mode 100644 index 8932a3f40..000000000 Binary files a/docs/tutorials/pycharm/images/install_package_setuptools.png and /dev/null differ diff --git a/docs/tutorials/pycharm/images/python_interpreters_1.png b/docs/tutorials/pycharm/images/python_interpreters_1.png deleted file mode 100644 index 6b1455001..000000000 Binary files a/docs/tutorials/pycharm/images/python_interpreters_1.png and /dev/null differ diff --git a/docs/tutorials/pycharm/images/python_interpreters_2.png b/docs/tutorials/pycharm/images/python_interpreters_2.png deleted file mode 100644 index 61c3de2b1..000000000 Binary files a/docs/tutorials/pycharm/images/python_interpreters_2.png and /dev/null differ diff --git a/docs/tutorials/pycharm/images/run_configuration.png b/docs/tutorials/pycharm/images/run_configuration.png deleted file mode 100644 index 4612b2b3c..000000000 Binary files a/docs/tutorials/pycharm/images/run_configuration.png and /dev/null differ diff --git a/docs/tutorials/pycharm/images/start_up_screen.png b/docs/tutorials/pycharm/images/start_up_screen.png deleted file mode 100644 index c65e01eeb..000000000 Binary files a/docs/tutorials/pycharm/images/start_up_screen.png and /dev/null differ diff --git a/docs/tutorials/pycharm/index.rst b/docs/tutorials/pycharm/index.rst deleted file mode 100644 index f2e3b7bcb..000000000 --- a/docs/tutorials/pycharm/index.rst +++ /dev/null @@ -1,355 +0,0 @@ -************************** -Using PyCharm with Pyramid -************************** - -This tutorial is a very brief overview of how to use PyCharm with Pyramid. -`PyCharm `_ is an Integrated Development -Environment (IDE) for Python programmers. It has numerous features including -code completion, project management, version control system (git, Subversion, -etc.), debugger, and more. - -This tutorial is a continual evolving document. Both PyCharm and Pyramid are -under active development, and changes to either may necessitate changes to -this document. In addition, there may be errors or omissions in this -document, and corrections and improvements through a pull request are most -welcome. - -To get started with Pyramid in PyCharm, we need to install prerequisite -software. - -* Python -* PyCharm and certain Python packages -* Pyramid and its requirements - -Install Python -============== - -You can download installers for Mac OS X and Windows, or source tarballs for -Linux, Unix, or Mac OS X from `python.org Download -`_. Follow the instructions in the README files. - -Install PyCharm -=============== - -PyCharm is a commercial application that requires a license. Several license -types are available depending on your usage. - -Pyramid is an open source project, and on an annual basis fulfills the terms of -the Open Source License with JetBrains for the use of PyCharm to develop for -Pyramid under the Pylons Project. If you contribute to Pyramid or the Pylons -Project, and would like to use our 1-year license, please contact the license -maintainer `stevepiercy` in the `#pyramid` channel on `irc.freenode.net`. - -Alternatively you can download a 30-day trial of PyCharm or `purchase a license -`_ for development or training -purposes under any other license. - -`Download PyCharm `_ and -follow the installation instructions on that web page. - -Configure PyCharm -================= - -Create a New Project --------------------- - -Launch the PyCharm application. - -From the Start Up screen, click Create New Project. - -.. image:: images/start_up_screen.png - -If the Start Up screen does not appear, you probably have an existing project -open. Close the existing project and the Start Up screen will appear. - -.. image:: images/create_new_project.png - -In the Create New Project dialog window do the following. - -* Enter a Project name. The Location should automatically populate as you - type. You can change the path as you wish. It is common practice to use the - path `~/projects/` to contain projects. This location shall be referred to - as your "project directory" throughout the rest of this document. -* Project type should be Empty project. -* For Interpreter, click the ellipsis button to create a new virtual - environment. - -A new window appears, "Python Interpreters". - -Create or Select a Python Interpreter -------------------------------------- - -.. image:: images/python_interpreters_1.png - -* Either click the `+` button to add a new Python interpreter for Python - 2.7 (the Python 2.7 installer uses the path - `/Library/Frameworks/Python.framework/Versions/2.7/bin`), or use an existing - Python interpreter for Python 2.7. PyCharm will take a few seconds to add a - new interpreter. - -.. image:: images/python_interpreters_2.png - -Create a Virtual Environment ----------------------------- - -* Click the button with the Python logo and a green "V". A new window appears, - "Create Virtual Environment". - -.. image:: images/create_virtual_environment.png - -* Enter a Virtual Environment name. -* The Location should automatically populate as you type. You can change the - path as you wish. -* The Base interpreter should be already selected, but if not, select - `/Library/Frameworks/Python.framework/Versions/2.7/bin` or other Python 2.7 - interpreter. -* Leave the box unchecked for "Inherit global site packages". -* Click "OK". PyCharm will set up libraries and packages, and return you to - the Python Interpreters window. - -Install setuptools and pyramid Packages ---------------------------------------- - -If you already have setuptools installed, you can skip this step. - -In the Python Interpreters window with the just-created virtual environment -selected in the top pane, in the lower pane select the Packages tab, and click -the Install button. The Available Packages window appears. - -.. image:: images/install_package.png - -In the Available Packages window, in the search bar, enter "setuptools". -Select the plain old "setuptools" package, and click the Install Package button -and wait for the status message to disappear. PyCharm will install the package -and any dependencies. - -.. image:: images/install_package_setuptools.png - -Repeat the previous step, except use "pyramid" for searching and selecting. - -.. image:: images/install_package_pyramid.png - -When PyCharm finishes installing the packages, close the Available Packages -window. - -In the Python Interpreters window, click the OK button. - -In the Create New Project window, click the OK button. - -If PyCharm displays a warning, click the Yes button. PyCharm opens the new -project. - -Clone the Pyramid repository -============================ - -By cloning the Pyramid repository, you can contribute changes to the code or -documentation. We recommend that you fork the Pyramid repository to your own -GitHub account, then clone your forked repository, so that you can commit your -changes to your GitHub repository and submit pull requests to the Pyramid -project. - -In PyCharm, select *VCS > Enable Version Control Integration...*, then select -Git as your VCS and click the OK button. - -See `Cloning a Repository from GitHub `_ -in the PyCharm documentation for more information on using GitHub and git in -PyCharm. - -We will refer to the cloned repository of Pyramid on your computer as your -"local Pyramid repository". - -Install development and documentation requirements -================================================== - -In order to contribute bug fixes, features, and documentation changes to -Pyramid, you must install development and documentation requirements into your -virtual environment. Pyramid uses Sphinx and reStructuredText for -documentation. - -* In PyCharm, select *Run > Edit Configurations...*. The Run/Debug - Configurations window appears. - - .. image:: images/edit_run_debug_configurations.png - -* Click the "+" button, then select Python to add a new Python run - configuration. -* Name the configuration "setup dev". -* Either manually enter the path to the `setup.py` script or click the ellipsis - button to navigate to the `pyramid/setup.py` path and select it. -* For Script parameters enter `dev`. -* Click the "Apply" button to save the run configuration. - -While we're here, let's duplicate this run configuration for installing the -documentation requirements. - -* Click the "Copy Configuration" button. Its icon looks like two dog-eared - pages, with a blue page on top of a grey page. -* Name the configuration "setup docs". -* Leave the path as is. -* For Script parameters enter `docs`. -* Click the "Apply" button to save the run configuration. -* Click the "OK" button to return to the project window. - -In the PyCharm toolbar, you will see a Python icon and your run configurations. - -.. image:: images/run_configuration.png - -First select "setup dev", and click the "run" button (the green triangle). It -may take some time to install the requirements. Second select "setup docs", -and click the "run" button again. - -As of this writing, PyCharm does not yet have a command line interface to a -shell. So there are some things that require you to go into a shell to enter -commands. This next step requires doing just so. - -* In your shell, navigate to your project directory, e.g., `cd - ~/projects/pycharm_pyramid/`. -* Enter the command `source bin/activate` to activate your virtual environment. -* Navigate into your local Pyramid repository, e.g., `cd pyramid`. -* Issue the command `git submodule update --init --recursive`. -* Navigate to the `docs` directory in your local Pyramid repository with the - command `cd docs`. -* Issue the command `make clean html` to generate the HTML documentation from - reStructuredText files. -* The HTML files are in `_build/html`. Open up `index.html` in a web browser - to see the result. -* Whenever you want to edit existing docs and see the effect of your changes, - simply run `make html` from within the `docs` directory. - -Unfortunately, the author was unable to figure out how to generate docs in -PyCharm using either a "Python docs" or "Python" run configuration. If anyone -knows, please submit a pull request. - -You will now be ready to hack in and contribute to Pyramid. - -Template Languages -================== - -To configure the template languages Mako and Jinja, see the PyCharm -documentation `Templates -`_. - -To configure the template language Chameleon, see `Creating and Registering -File Types -`_. Specifically for Chameleon, we want to associate XML to the `*.pt` -extension. - -* Open *PyCharm > Preferences...*, then the File Types dialog box. -* From the Recognized File Types list, select "XML files". -* In the Registered Patterns area, click the "+" button, and the Add Wildcard - window opens. Enter `*.pt` in the Add Wildcard window, and click the OK - button. Click OK again to save the settings. - -Creating a Pyramid Project -========================== - -The information for this section is derived from `Creating a Pyramid Project -`_ -and adapted for use in PyCharm. - -Creating a Pyramid Project Using Scaffolds ------------------------------------------- - -Within PyCharm, you can start a project using a scaffold by doing the -following. - -* Select *Run > Edit Configurations...*. -* Click the "+" button, then select Python to add a new Python run - configuration. -* Name the configuration "pcreate". -* Either manually enter the path to the `pcreate` script or click the ellipsis - button to navigate to the `$VENV/bin/pcreate` path and select it. -* For Script parameters enter `-s starter MyProject`. "starter" is the name of - one of the scaffolds included with Pyramid, but you can use any scaffold. - "MyProject" is the name of your project. -* Select the directory into which you want to place `MyProject`. A common - practice is `~/projects/`. -* Click the OK button to save the run configuration. -* Select *Run > Run 'pcreate'* to run the run configuration. Your project will - be created. -* Select *File > Open directory*, select the directory where you created your - project `MyProject`, and click the Choose button. You will be prompted to - open the project, and you may find it convenient to select "Open in current - window", and check "Add to currently open projects". -* Finally set the Project Interpreter to your virtual environment or verify it - as such. Select *PyCharm > Preferences... > Project Interpreter*, and verify - that the project is using the same virtual environment as the parent project. -* If a yellow bar warns you to install requirements, then click link to do so. - -Installing your Newly Created Project for Development ------------------------------------------------------ - -We will create another run configuration, just like before. - -* In PyCharm, select the `setup.py` script in the `MyProject` folder. This - should populate some fields with the proper values. -* Select *Run > Edit Configurations...*. -* Click the "+" button, then select Python to add a new Python run - configuration. -* Name the configuration "MyProject setup develop". -* Either manually enter the path to the `setup.py` script in the `MyProject` - folder or click the ellipsis button to navigate to the path and select it. -* For Script parameters enter `develop`. -* For Project, select "MyProject". -* For Working directory, enter or select the path to `MyProject`. -* Click the "Apply" button to save the run configuration. -* Finally run the run configuration "MyProject setup develop". Your project - will be installed. - -Running The Tests For Your Application --------------------------------------- - -We will create yet another run configuration. [If you know of an easier method -while in PyCharm, please submit a pull request.] - -* Select *Run > Edit Configurations...*. -* Select the previous run configuration "MyProject setup develop", and click - the Copy Configuration button. -* Name the configuration "MyProject setup test". -* The path to the `setup.py` script in the `MyProject` folder should already be - entered. -* For Script parameters enter `test -q`. -* For Project "MyProject" should be selected. -* For Working directory, the path to `MyProject` should be selected. -* Click the "Apply" button to save the run configuration. -* Finally run the run configuration "MyProject setup test". Your project will - run its unit tests. - -Running The Project Application -------------------------------- - -When will creation of run configurations end? Not today! - -* Select *Run > Edit Configurations...*. -* Select the previous run configuration "MyProject setup develop", and click - the Copy Configuration button. -* Name the configuration "MyProject pserve". -* Either manually enter the path to the `pserve` script or click the ellipsis - button to navigate to the `$VENV/bin/pserve` path and select it. -* For Script parameters enter `development.ini`. -* For Project "MyProject" should be selected. -* For Working directory, the path to `MyProject` should be selected. -* Click the "Apply" button to save the run configuration. -* Finally run the run configuration "MyProject pserve". Your project will run. - Click the link in the Python console or visit the URL http://0.0.0.0:6543/ in - a web browser. - -You can also reload any changes to your project's `.py` or `.ini` files -automatically by using the Script parameters `development.ini --reload`. - -Debugging -========= - -See the PyCharm documentation `Running and Debugging -`_ for -details on how to debug your Pyramid app in PyCharm. - -First, you cannot simultaneously run and debug your app. Terminate your app if -it is running before you debug it. - -To debug your app, open a file in your app that you want to debug and click on -the gutter (the space between line numbers and the code) to set a breakpoint. -Then select "MyProject pserve" in the PyCharm toolbar, then click the debug -icon (which looks like a green ladybug). Your app will run up to the first -breakpoint. -- cgit v1.2.3 From 832067458dd92dd6543e7f3850bb447a09d895fa Mon Sep 17 00:00:00 2001 From: Chris Davies Date: Thu, 18 Jul 2013 20:38:45 +0000 Subject: When running the alchemy scaffold on MySQL an error is generated on table creation: sqlalchemy.exc.OperationalError: (OperationalError) (1170, "BLOB/TEXT column 'name' used in key specification without a key length") '\nCREATE TABLE models (\n\tid INTEGER NOT NULL AUTO_INCREMENT, \n\tname TEXT, \n\tvalue INTEGER, \n\tPRIMARY KEY (id), \n\tUNIQUE (name)\n)\n\n' () MySQL (and MariaDB) doesn't allow an index of more than 255 characters. After modifying the scaffold and creating a project, the following results: > show create table models; +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | models | CREATE TABLE `models` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` text, `value` int(11) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `my_index` (`name`(255)) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 | +--------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ A unique index is created on the name field, constrained to 255 characters. When run on SQLite3: sqlite> .schema models CREATE TABLE models ( id INTEGER NOT NULL, name TEXT, value INTEGER, PRIMARY KEY (id) ); CREATE UNIQUE INDEX my_index ON models (name); the mysql specific constraint is ignored and the table is created with a unique index as desired. --- pyramid/scaffolds/alchemy/+package+/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyramid/scaffolds/alchemy/+package+/models.py b/pyramid/scaffolds/alchemy/+package+/models.py index aeeb9df64..db1fee832 100644 --- a/pyramid/scaffolds/alchemy/+package+/models.py +++ b/pyramid/scaffolds/alchemy/+package+/models.py @@ -1,5 +1,6 @@ from sqlalchemy import ( Column, + Index, Integer, Text, ) @@ -20,9 +21,11 @@ Base = declarative_base() class MyModel(Base): __tablename__ = 'models' id = Column(Integer, primary_key=True) - name = Column(Text, unique=True) + name = Column(Text) value = Column(Integer) def __init__(self, name, value): self.name = name self.value = value + +Index('my_index', MyModel.name, unique=True, mysql_length=255) -- cgit v1.2.3 From 5028d84aeb6ac79ee7db4dc4012ff4caaba10e77 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 18 Jul 2013 18:09:20 -0400 Subject: normalize notations used for string and json renderer return values, closes #1005 --- docs/narr/renderers.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/narr/renderers.rst b/docs/narr/renderers.rst index 20a9eda31..a2811dbae 100644 --- a/docs/narr/renderers.rst +++ b/docs/narr/renderers.rst @@ -198,7 +198,7 @@ representing the JSON serialization of the return value: .. code-block:: python - '{"content": "Hello!"}' + {"content": "Hello!"} The return value needn't be a dictionary, but the return value must contain values serializable by the configured serializer (by default ``json.dumps``). -- cgit v1.2.3 From 0d96b77150f1283a44acd0d9c2d2f74453d298a1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 18 Jul 2013 18:17:20 -0400 Subject: version bump in setup.py conf.py CHANGES.txt, rejigger changes bugs vs. features --- CHANGES.txt | 44 ++++++++++++++++++++++---------------------- docs/conf.py | 2 +- docs/index.rst | 1 + setup.py | 2 +- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2d8cf9ef4..0031fc635 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,4 @@ -next release +Next Release ============ Features @@ -6,7 +6,7 @@ Features - ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH`` requests. See https://github.com/Pylons/pyramid/pull/1033. add support for - submitting ``OPTIONS`` and ``PROPFIND`` requests, and allow users to specify + submitting ``OPTIONS`` and ``PROPFIND`` requests, and allow users to specify basic authentication credentials in the request via a ``--login`` argument to the script. See https://github.com/Pylons/pyramid/pull/1039. @@ -44,22 +44,6 @@ Features ``X-CSRF-Token`` (as well as the ``csrf_token`` form parameter, which they always did). The header is tried when the form parameter does not exist. -Bug Fixes ---------- - -- Make the ``pyramid.config.assets.PackageOverrides`` object implement the API - for ``__loader__`` objects specified in PEP 302. Proxies to the - ``__loader__`` set by the importer, if present; otherwise, raises - ``NotImplementedError``. This makes Pyramid static view overrides work - properly under Python 3.3 (previously they would not). See - https://github.com/Pylons/pyramid/pull/1015 for more information. - -- ``mako_templating``: added defensive workaround for non-importability of - ``mako`` due to upstream ``markupsafe`` dropping Python 3.2 support. Mako - templating will no longer work under the combination of MarkupSafe 0.17 and - Python 3.2 (although the combination of MarkupSafe 0.17 and Python 3.3 or any - supported Python 2 version will work OK). - - View lookup will now search for valid views based on the inheritance hierarchy of the context. It tries to find views based on the most specific context first, and upon predicate failure, will move up the @@ -67,7 +51,7 @@ Bug Fixes In the past, only the most specific type containing views would be checked and if no matching view could be found then a PredicateMismatch would be raised. Now predicate mismatches don't hide valid views registered on - super-types. Here's an example that now works:: + super-types. Here's an example that now works: .. code-block:: python @@ -109,6 +93,22 @@ Bug Fixes https://github.com/Pylons/pyramid/pull/1004 and https://github.com/Pylons/pyramid/pull/1046 +Bug Fixes +--------- + +- Make the ``pyramid.config.assets.PackageOverrides`` object implement the API + for ``__loader__`` objects specified in PEP 302. Proxies to the + ``__loader__`` set by the importer, if present; otherwise, raises + ``NotImplementedError``. This makes Pyramid static view overrides work + properly under Python 3.3 (previously they would not). See + https://github.com/Pylons/pyramid/pull/1015 for more information. + +- ``mako_templating``: added defensive workaround for non-importability of + ``mako`` due to upstream ``markupsafe`` dropping Python 3.2 support. Mako + templating will no longer work under the combination of MarkupSafe 0.17 and + Python 3.2 (although the combination of MarkupSafe 0.17 and Python 3.3 or any + supported Python 2 version will work OK). + - Spaces and dots may now be in mako renderer template paths. This was broken when support for the new makodef syntax was added in 1.4a1. See https://github.com/Pylons/pyramid/issues/950 @@ -124,9 +124,9 @@ Bug Fixes https://github.com/Pylons/pyramid/issues/981 - ``pyramid.testing.DummyResource`` didn't define ``__bool__``, so code under - Python 3 would use ``__len__`` to find truthiness; this usually caused an - instance of DummyResource to be "falsy" instead of "truthy". See - https://github.com/Pylons/pyramid/pull/1032 + Python 3 would use ``__len__`` to find truthiness; this usually caused an + instance of DummyResource to be "falsy" instead of "truthy". See + https://github.com/Pylons/pyramid/pull/1032 1.4 (2012-12-18) ================ diff --git a/docs/conf.py b/docs/conf.py index 84b01a791..ff5f325d8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -93,7 +93,7 @@ copyright = '2008-%s, Agendaless Consulting' % thisyear # other places throughout the built documents. # # The short X.Y version. -version = '1.4' +version = '1.5dev' # The full version, including alpha/beta/rc tags. release = version diff --git a/docs/index.rst b/docs/index.rst index 93b550d60..35646f3d2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -37,6 +37,7 @@ What's New .. toctree:: :maxdepth: 1 + whatsnew-1.5 whatsnew-1.4 whatsnew-1.3 whatsnew-1.2 diff --git a/setup.py b/setup.py index 4a3cecd98..df7622656 100644 --- a/setup.py +++ b/setup.py @@ -70,7 +70,7 @@ testing_extras = tests_require + [ ] setup(name='pyramid', - version='1.4', + version='1.5dev', description=('The Pyramid web application development framework, a ' 'Pylons project'), long_description=README + '\n\n' + CHANGES, -- cgit v1.2.3 From e7638bfd959811bb85f681ff2ad8d43d716018ad Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Thu, 18 Jul 2013 18:17:38 -0400 Subject: add whatsnew-1.5 --- docs/whatsnew-1.5.rst | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 docs/whatsnew-1.5.rst diff --git a/docs/whatsnew-1.5.rst b/docs/whatsnew-1.5.rst new file mode 100644 index 000000000..47b768eb9 --- /dev/null +++ b/docs/whatsnew-1.5.rst @@ -0,0 +1,125 @@ +What's New In Pyramid 1.5 +========================= + +This article explains the new features in :app:`Pyramid` version 1.5 as +compared to its predecessor, :app:`Pyramid` 1.4. It also documents backwards +incompatibilities between the two versions and deprecations added to +:app:`Pyramid` 1.5, as well as software dependency changes and notable +documentation additions. + +Feature Additions +----------------- + +The feature additions in Pyramid 1.5 follow. + +- View lookup will now search for valid views based on the inheritance + hierarchy of the context. It tries to find views based on the most specific + context first, and upon predicate failure, will move up the inheritance chain + to test views found by the super-type of the context. In the past, only the + most specific type containing views would be checked and if no matching view + could be found then a PredicateMismatch would be raised. Now predicate + mismatches don't hide valid views registered on super-types. Here's an + example that now works: + + .. code-block:: python + + class IResource(Interface): + + ... + + @view_config(context=IResource) + def get(context, request): + + ... + + @view_config(context=IResource, request_method='POST') + def post(context, request): + + ... + + @view_config(context=IResource, request_method='DELETE') + def delete(context, request): + + ... + + @implementor(IResource) + class MyResource: + + ... + + @view_config(context=MyResource, request_method='POST') + def override_post(context, request): + + ... + + Previously the override_post view registration would hide the get + and delete views in the context of MyResource -- leading to a + predicate mismatch error when trying to use GET or DELETE + methods. Now the views are found and no predicate mismatch is + raised. + See https://github.com/Pylons/pyramid/pull/786 and + https://github.com/Pylons/pyramid/pull/1004 and + https://github.com/Pylons/pyramid/pull/1046 + +- ``scripts/prequest.py`` (aka the ``prequest`` console script): added support + for submitting ``PUT`` and ``PATCH`` requests. See + https://github.com/Pylons/pyramid/pull/1033. add support for submitting + ``OPTIONS`` and ``PROPFIND`` requests, and allow users to specify basic + authentication credentials in the request via a ``--login`` argument to the + script. See https://github.com/Pylons/pyramid/pull/1039. + +- :class:`pyramid.authorization.ACLAuthorizationPolicy` supports ``__acl__`` as + a callable. This removes the ambiguity between the potential + ``AttributeError`` that would be raised on the ``context`` when the property + was not defined and the ``AttributeError`` that could be raised from any + user-defined code within a dynamic property. It is recommended to define a + dynamic ACL as a callable to avoid this ambiguity. See + https://github.com/Pylons/pyramid/issues/735. + +- Allow a protocol-relative URL (e.g. ``//example.com/images``) to be passed to + :meth:`pyramid.config.Configurator.add_static_view`. This allows + externally-hosted static URLs to be generated based on the current protocol. + +- The :class:`pyramid.authentication.AuthTktAuthenticationPolicy` has a new + ``parent_domain`` option to set the authentication cookie as a wildcard + cookie on the parent domain. This is useful if you have multiple sites + sharing the same domain. It also now supports IPv6 addresses when using + the ``include_ip=True`` option. This is possibly incompatible with + alternative ``auth_tkt`` implementations, as the specification does not + define how to properly handle IPv6. See + https://github.com/Pylons/pyramid/issues/831. + +- Make it possible to use variable arguments via + :func:`pyramid.paster.get_appsettings`. This also allowed the generated + ``initialize_db`` script from the ``alchemy`` scaffold to grow support for + options in the form ``a=1 b=2`` so you can fill in values in a parameterized + ``.ini`` file, e.g. ``initialize_myapp_db etc/development.ini a=1 b=2``. See + https://github.com/Pylons/pyramid/pull/911 + +- The ``request.session.check_csrf_token()`` method and the ``check_csrf`` view + predicate now take into account the value of the HTTP header named + ``X-CSRF-Token`` (as well as the ``csrf_token`` form parameter, which they + always did). The header is tried when the form parameter does not exist. + +Backwards Incompatibilities +--------------------------- + +This release has no known backwards incompatibilities with Pyramid 1.4.X. + +Deprecations +------------ + +This release has no new deprecations as compared to Pyramid 1.4.X. + + +Documentation Enhancements +-------------------------- + +Many documentation enhancements have been added, but we did not track them as +they were added. + +Dependency Changes +------------------ + +No dependency changes from Pyramid 1.4.X were made in Pyramid 1.5. + -- cgit v1.2.3 From 8a7d6c22807e43cc3dd3e1b8317a9feb952f969f Mon Sep 17 00:00:00 2001 From: Ronan Amicel Date: Sun, 21 Jul 2013 20:56:07 +0200 Subject: Fix documentation of testing.setUp --- pyramid/testing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyramid/testing.py b/pyramid/testing.py index 9bd245e4e..14c6f4acf 100644 --- a/pyramid/testing.py +++ b/pyramid/testing.py @@ -411,7 +411,7 @@ def setUp(registry=None, request=None, hook_zca=True, autocommit=True, suitable testing analogue. After ``setUp`` is finished, the registry returned by the - :func:`pyramid.threadlocal.get_current_request` function will + :func:`pyramid.threadlocal.get_current_registry` function will be the passed (or constructed) registry until :func:`pyramid.testing.tearDown` is called (or :func:`pyramid.testing.setUp` is called again) . -- cgit v1.2.3 From 456c171e31f166d48d1faf65273096f3a5b33d43 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Tue, 23 Jul 2013 05:18:06 -0600 Subject: Remove references to relocated PyCharm tutorial --- docs/index.rst | 1 - docs/latexindex.rst | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 4be0ecd26..22b27039c 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -109,7 +109,6 @@ platforms. tutorials/wiki/index.rst tutorials/bfg/index.rst tutorials/modwsgi/index.rst - tutorials/pycharm/index.rst API Documentation ================= diff --git a/docs/latexindex.rst b/docs/latexindex.rst index 416fc9bf1..83641d8b3 100644 --- a/docs/latexindex.rst +++ b/docs/latexindex.rst @@ -78,7 +78,6 @@ Tutorials tutorials/wiki/index.rst tutorials/bfg/index.rst tutorials/modwsgi/index.rst - tutorials/pycharm/index.rst .. _api_documentation: @@ -115,7 +114,7 @@ API Documentation .. backmatter:: Glossary and Index -@@@@@@@@@@@@@@@@@@ +================== .. toctree:: :maxdepth: 1 -- cgit v1.2.3 From 32333e4d84fe0e71ce097a5dca57025353956dbe Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 24 Jul 2013 17:22:48 -0400 Subject: add not_ predicate feature --- CHANGES.txt | 24 +++++++++++++++++ docs/api/config.rst | 1 + docs/narr/viewconfig.rst | 27 +++++++++++++++++++ docs/whatsnew-1.5.rst | 26 +++++++++++++++++++ pyramid/config/__init__.py | 5 +++- pyramid/config/predicates.py | 1 + pyramid/config/util.py | 38 ++++++++++++++++++++++++++- pyramid/tests/test_config/test_util.py | 47 ++++++++++++++++++++++++++++++++++ 8 files changed, 167 insertions(+), 2 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 0031fc635..c100f7fa6 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,30 @@ Next Release Features -------- +- Add the ability to invert the result of any view, route, or subscriber + predicate using the ``not_`` class. For example:: + + from pyramid.config import not_ + + @view_config(route_name='myroute', request_method=not_('POST')) + def myview(request): ... + + The above example will ensure that the view is called if the request method + is not POST (at least if no other view is more specific). + + The :class:`pyramid.config.not_` class can be used against any value that is + a predicate value passed in any of these contexts: + + - ``pyramid.config.Configurator.add_view`` + + - ``pyramid.config.Configurator.add_route`` + + - ``pyramid.config.Configurator.add_subscriber`` + + - ``pyramid.view.view_config`` + + - ``pyramid.events.subscriber`` + - ``scripts/prequest.py``: add support for submitting ``PUT`` and ``PATCH`` requests. See https://github.com/Pylons/pyramid/pull/1033. add support for submitting ``OPTIONS`` and ``PROPFIND`` requests, and allow users to specify diff --git a/docs/api/config.rst b/docs/api/config.rst index 39d504348..1f65be9f1 100644 --- a/docs/api/config.rst +++ b/docs/api/config.rst @@ -135,3 +135,4 @@ will only exist for the lifetime of the actual applications for which they are being used. +.. autoclass:: not_ diff --git a/docs/narr/viewconfig.rst b/docs/narr/viewconfig.rst index 241ce62b5..388371a0d 100644 --- a/docs/narr/viewconfig.rst +++ b/docs/narr/viewconfig.rst @@ -557,6 +557,33 @@ form of :term:`declarative configuration`, while :meth:`pyramid.config.Configurator.add_view` is a form of :term:`imperative configuration`. However, they both do the same thing. +Inverting Predicate Values +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can invert the meaning of any predicate value by wrapping it in a call to +:class:`pyramid.config.not_`. + +.. code-block:: python + :linenos: + + from pyramid.config import not_ + + config.add_view( + 'mypackage.views.my_view', + route_name='ok', + request_method=not_('POST') + ) + +The above example will ensure that the view is called if the request method +is *not* ``POST``, at least if no other view is more specific. + +This technique of wrapping a predicate value in ``not_`` can be used anywhere +predicate values are accepted: + +- :meth:`pyramid.config.Configurator.add_view` + +- :meth:`pyramid.view.view_config` + .. index:: single: view_config placement diff --git a/docs/whatsnew-1.5.rst b/docs/whatsnew-1.5.rst index 47b768eb9..ee2250017 100644 --- a/docs/whatsnew-1.5.rst +++ b/docs/whatsnew-1.5.rst @@ -12,6 +12,32 @@ Feature Additions The feature additions in Pyramid 1.5 follow. +- Add the ability to invert the result of any view, route, or subscriber + predicate value using the ``not_`` class. For example: + + .. code-block:: python + + from pyramid.config import not_ + + @view_config(route_name='myroute', request_method=not_('POST')) + def myview(request): ... + + The above example will ensure that the view is called if the request method + is not POST, at least if no other view is more specific. + + The :class:`pyramid.config.not_` class can be used against any value that is + a predicate value passed in any of these contexts: + + - :meth:`pyramid.config.Configurator.add_view` + + - :meth:`pyramid.config.Configurator.add_route` + + - :meth:`pyramid.config.Configurator.add_subscriber` + + - :meth:`pyramid.view.view_config` + + - :meth:`pyramid.events.subscriber` + - View lookup will now search for valid views based on the inheritance hierarchy of the context. It tries to find views based on the most specific context first, and upon predicate failure, will move up the inheritance chain diff --git a/pyramid/config/__init__.py b/pyramid/config/__init__.py index 5bb9987af..d52ee0e7a 100644 --- a/pyramid/config/__init__.py +++ b/pyramid/config/__init__.py @@ -70,7 +70,7 @@ from pyramid.config.security import SecurityConfiguratorMixin from pyramid.config.settings import SettingsConfiguratorMixin from pyramid.config.testing import TestingConfiguratorMixin from pyramid.config.tweens import TweensConfiguratorMixin -from pyramid.config.util import PredicateList +from pyramid.config.util import PredicateList, not_ from pyramid.config.views import ViewsConfiguratorMixin from pyramid.config.zca import ZCAConfiguratorMixin @@ -86,6 +86,9 @@ _marker = object() ConfigurationError = ConfigurationError # pyflakes +not_ = not_ # pyflakes, this is an API + + class Configurator( TestingConfiguratorMixin, TweensConfiguratorMixin, diff --git a/pyramid/config/predicates.py b/pyramid/config/predicates.py index ded8fbfbf..c8f66e83d 100644 --- a/pyramid/config/predicates.py +++ b/pyramid/config/predicates.py @@ -294,3 +294,4 @@ class EffectivePrincipalsPredicate(object): if self.val.issubset(rpset): return True return False + diff --git a/pyramid/config/util.py b/pyramid/config/util.py index af0dd1641..a98e71cf5 100644 --- a/pyramid/config/util.py +++ b/pyramid/config/util.py @@ -28,6 +28,35 @@ def as_sorted_tuple(val): val = tuple(sorted(val)) return val +class not_(object): + def __init__(self, value): + self.value = value + +class Notted(object): + def __init__(self, predicate): + self.predicate = predicate + + def _notted_text(self, val): + # if the underlying predicate doesnt return a value, it's not really + # a predicate, it's just something pretending to be a predicate, + # so dont update the hash + if val: + val = '!' + val + return val + + def text(self): + return self._notted_text(self.predicate.text()) + + def phash(self): + return self._notted_text(self.predicate.phash()) + + def __call__(self, context, request): + result = self.predicate(context, request) + phash = self.phash() + if phash: + result = not result + return result + # under = after # over = before @@ -74,7 +103,14 @@ class PredicateList(object): if not isinstance(vals, predvalseq): vals = (vals,) for val in vals: - pred = predicate_factory(val, config) + realval = val + notted = False + if isinstance(val, not_): + realval = val.value + notted = True + pred = predicate_factory(realval, config) + if notted: + pred = Notted(pred) hashes = pred.phash() if not is_nonstr_iter(hashes): hashes = [hashes] diff --git a/pyramid/tests/test_config/test_util.py b/pyramid/tests/test_config/test_util.py index a984acfd0..f6cd414fb 100644 --- a/pyramid/tests/test_config/test_util.py +++ b/pyramid/tests/test_config/test_util.py @@ -364,6 +364,23 @@ class TestPredicateList(unittest.TestCase): def test_unknown_predicate(self): from pyramid.exceptions import ConfigurationError self.assertRaises(ConfigurationError, self._callFUT, unknown=1) + + def test_notted(self): + from pyramid.config import not_ + from pyramid.testing import DummyRequest + request = DummyRequest() + _, predicates, _ = self._callFUT( + xhr='xhr', + request_method=not_('POST'), + header=not_('header'), + ) + self.assertEqual(predicates[0].text(), 'xhr = True') + self.assertEqual(predicates[1].text(), + "!request_method = POST") + self.assertEqual(predicates[2].text(), '!header header') + self.assertEqual(predicates[1](None, request), True) + self.assertEqual(predicates[2](None, request), True) + class Test_takes_one_arg(unittest.TestCase): def _callFUT(self, view, attr=None, argname=None): @@ -551,7 +568,37 @@ class Test_takes_one_arg(unittest.TestCase): foo = Foo() self.assertTrue(self._callFUT(foo.method)) +class TestNotted(unittest.TestCase): + def _makeOne(self, predicate): + from pyramid.config.util import Notted + return Notted(predicate) + + def test_it_with_phash_val(self): + pred = DummyPredicate('val') + inst = self._makeOne(pred) + self.assertEqual(inst.text(), '!val') + self.assertEqual(inst.phash(), '!val') + self.assertEqual(inst(None, None), False) + + def test_it_without_phash_val(self): + pred = DummyPredicate('') + inst = self._makeOne(pred) + self.assertEqual(inst.text(), '') + self.assertEqual(inst.phash(), '') + self.assertEqual(inst(None, None), True) + +class DummyPredicate(object): + def __init__(self, result): + self.result = result + + def text(self): + return self.result + + phash = text + def __call__(self, context, request): + return True + class DummyCustomPredicate(object): def __init__(self): self.__text__ = 'custom predicate' -- cgit v1.2.3 From bb9948168a9540d7b1b574ca8ee02bd07cbdede9 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 24 Jul 2013 18:00:03 -0400 Subject: indicate version in which not_ was added --- docs/narr/viewconfig.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/narr/viewconfig.rst b/docs/narr/viewconfig.rst index 388371a0d..b78b9b497 100644 --- a/docs/narr/viewconfig.rst +++ b/docs/narr/viewconfig.rst @@ -584,6 +584,8 @@ predicate values are accepted: - :meth:`pyramid.view.view_config` +.. versionadded:: 1.5 + .. index:: single: view_config placement -- cgit v1.2.3 From a6291243051b1977832b0b9a45c27eb68d7ba867 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 27 Jul 2013 03:03:08 -0600 Subject: Move .. versionadded:: 1.2 to end of ``match_param`` definition so that when building PDF it does not pause and wait for user to hit RETURN. This is now consistent with other placements of this directive as well. --- docs/narr/viewconfig.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/narr/viewconfig.rst b/docs/narr/viewconfig.rst index b78b9b497..fd3229339 100644 --- a/docs/narr/viewconfig.rst +++ b/docs/narr/viewconfig.rst @@ -290,9 +290,9 @@ configured view. of the ``REQUEST_METHOD`` of the :term:`WSGI` environment. ``request_param`` - This value can be any string or a sequence of strings. A view declaration - with this argument ensures that the view will only be called when the - :term:`request` has a key in the ``request.params`` dictionary (an HTTP + This value can be any string or a sequence of strings. A view declaration + with this argument ensures that the view will only be called when the + :term:`request` has a key in the ``request.params`` dictionary (an HTTP ``GET`` or ``POST`` variable) that has a name which matches the supplied value. @@ -306,8 +306,6 @@ configured view. consideration of keys and values in the ``request.params`` dictionary. ``match_param`` - .. versionadded:: 1.2 - This param may be either a single string of the format "key=value" or a dict of key/value pairs. @@ -324,6 +322,8 @@ configured view. If ``match_param`` is not supplied, the view will be invoked without consideration of the keys and values in ``request.matchdict``. + .. versionadded:: 1.2 + ``containment`` This value should be a reference to a Python class or :term:`interface` that a parent object in the context resource's :term:`lineage` must provide @@ -505,7 +505,7 @@ configuration stanza: .. code-block:: python :linenos: - config.add_view('mypackage.views.my_view', route_name='ok', + config.add_view('mypackage.views.my_view', route_name='ok', request_method='POST', permission='read') All arguments to ``view_config`` may be omitted. For example: @@ -570,7 +570,7 @@ You can invert the meaning of any predicate value by wrapping it in a call to config.add_view( 'mypackage.views.my_view', - route_name='ok', + route_name='ok', request_method=not_('POST') ) -- cgit v1.2.3 From 7a4c7c49441395a45e85f5649856ac3982081316 Mon Sep 17 00:00:00 2001 From: Darren Slatten Date: Sat, 27 Jul 2013 20:09:42 -0500 Subject: Added the `:orphan:` file-wide metadata field The :orphan: field suppresses the Sphinx error that occurs when a file in the source directory doesn't appear in a `toctree` directive. --- docs/foreword.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/foreword.rst b/docs/foreword.rst index aa8d7c77b..cc8271bdf 100644 --- a/docs/foreword.rst +++ b/docs/foreword.rst @@ -1,3 +1,5 @@ +:orphan: + Foreword ======== -- cgit v1.2.3 From 133323b00defc9a8a6fbd8247cbb7125c2377f91 Mon Sep 17 00:00:00 2001 From: Darren Slatten Date: Sat, 27 Jul 2013 20:14:04 -0500 Subject: Removed `foreword.rst` from hidden `toctree` The `foreword.rst` file was used in printed versions, but currently it is not being used, so it shouldn't appear in any `toctree` directives. --- docs/index.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 22b27039c..52b30df45 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -223,6 +223,5 @@ Index and Glossary :hidden: glossary - foreword.rst latexindex.rst -- cgit v1.2.3 From 2057f2d7a71604fa40a02ee88a3cacf7b73e94c8 Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sun, 28 Jul 2013 11:02:16 +0200 Subject: Improve consistency between latexindex.rst and index.rst some more this adds to a70d54c --- docs/latexindex.rst | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/docs/latexindex.rst b/docs/latexindex.rst index 83641d8b3..08c3157b3 100644 --- a/docs/latexindex.rst +++ b/docs/latexindex.rst @@ -86,30 +86,9 @@ API Documentation .. toctree:: :maxdepth: 1 + :glob: - api/authorization - api/authentication - api/config - api/events - api/exceptions - api/httpexceptions - api/i18n - api/interfaces - api/location - api/paster - api/registry - api/renderers - api/request - api/response - api/scripting - api/security - api/settings - api/testing - api/threadlocal - api/traversal - api/url - api/view - api/wsgi + api/* .. backmatter:: -- cgit v1.2.3 From 239485e0722a580115173833b432d85c44c3a34c Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Sun, 28 Jul 2013 17:45:03 +0200 Subject: [docs] add latexpdf target I looked at latest Sphinx sources (in sphinx/quickstart.py) on how this is done --- docs/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index c98fdc65e..12dc88bf8 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -63,8 +63,13 @@ latex: cp _static/latex-note.png _build/latex @echo @echo "Build finished; the LaTeX files are in _build/latex." - @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ - "run these through (pdf)latex." + @echo "Run \`make latexpdf' to build a PDF file from them." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C _build/latex all-pdf + @echo "pdflatex finished; the PDF file is in _build/latex." changes: mkdir -p _build/changes _build/doctrees -- cgit v1.2.3 From 0ed2c8f00d31caa224875a51b6a7723098b570ef Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 28 Jul 2013 14:06:49 -0400 Subject: use :orphan: for latexindex too --- docs/index.rst | 4 ---- docs/latexindex.rst | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 52b30df45..5dfbbce1e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -216,12 +216,8 @@ Index and Glossary * :ref:`genindex` * :ref:`search` - -.. add glossary, foreword, and latexindex in a hidden toc to avoid warnings - .. toctree:: :hidden: glossary - latexindex.rst diff --git a/docs/latexindex.rst b/docs/latexindex.rst index 83641d8b3..c0cfb7696 100644 --- a/docs/latexindex.rst +++ b/docs/latexindex.rst @@ -1,3 +1,5 @@ +:orphan: + .. _latexindex: ================================================= -- cgit v1.2.3 From a4c67fca938d03fb46f9a95f7e54287c41df2520 Mon Sep 17 00:00:00 2001 From: Julian Paul Glass Date: Wed, 31 Jul 2013 22:31:02 +1000 Subject: Added verbosity option -v --verbose to pserve.py --- pyramid/scripts/pserve.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pyramid/scripts/pserve.py b/pyramid/scripts/pserve.py index b840fbdb9..a2e26b231 100644 --- a/pyramid/scripts/pserve.py +++ b/pyramid/scripts/pserve.py @@ -65,7 +65,7 @@ class PServeCommand(object): You can also include variable assignments like 'http_port=8080' and then use %(http_port)s in your config files. """ - verbose = 1 + default_verbosity = 1 parser = optparse.OptionParser( usage, @@ -125,6 +125,12 @@ class PServeCommand(object): action='store_true', dest='show_status', help="Show the status of the (presumably daemonized) server") + parser.add_option( + '-v', '--verbose', + default=default_verbosity, + dest='verbose', + type=int, + help="Set verbose level (default ["+str(default_verbosity)+"])") if hasattr(os, 'setuid'): # I don't think these are available on Windows @@ -148,8 +154,6 @@ class PServeCommand(object): _scheme_re = re.compile(r'^[a-z][a-z]+:', re.I) - default_verbosity = 1 - _reloader_environ_key = 'PYTHON_RELOADER_SHOULD_RUN' _monitor_environ_key = 'PASTE_MONITOR_SHOULD_RUN' @@ -158,6 +162,7 @@ class PServeCommand(object): def __init__(self, argv, quiet=False): self.quiet = quiet self.options, self.args = self.parser.parse_args(argv[1:]) + self.verbose = self.options.verbose def out(self, msg): # pragma: no cover if not self.quiet: -- cgit v1.2.3 From 6012965b3441f93ee83408bb5cd0c21c091ca6db Mon Sep 17 00:00:00 2001 From: Julian Paul Glass Date: Wed, 31 Jul 2013 22:34:32 +1000 Subject: Added verbosity option -v --verbose to pserve.py --- pyramid/scripts/pserve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyramid/scripts/pserve.py b/pyramid/scripts/pserve.py index a2e26b231..0feb9cd69 100644 --- a/pyramid/scripts/pserve.py +++ b/pyramid/scripts/pserve.py @@ -130,7 +130,7 @@ class PServeCommand(object): default=default_verbosity, dest='verbose', type=int, - help="Set verbose level (default ["+str(default_verbosity)+"])") + help="Set verbose level (default "+str(default_verbosity)+")") if hasattr(os, 'setuid'): # I don't think these are available on Windows -- cgit v1.2.3 From 8fc233823ea121a13cfeb61efc371144bec96ba3 Mon Sep 17 00:00:00 2001 From: Julian Paul Glass Date: Thu, 1 Aug 2013 00:06:47 +1000 Subject: Replaced references tow self.verbose with self.option.verbose --- pyramid/scripts/pserve.py | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/pyramid/scripts/pserve.py b/pyramid/scripts/pserve.py index 0feb9cd69..c012abb01 100644 --- a/pyramid/scripts/pserve.py +++ b/pyramid/scripts/pserve.py @@ -162,7 +162,6 @@ class PServeCommand(object): def __init__(self, argv, quiet=False): self.quiet = quiet self.options, self.args = self.parser.parse_args(argv[1:]) - self.verbose = self.options.verbose def out(self, msg): # pragma: no cover if not self.quiet: @@ -202,7 +201,7 @@ class PServeCommand(object): if self.options.reload: if os.environ.get(self._reloader_environ_key): - if self.verbose > 1: + if self.options.verbose > 1: self.out('Running reloading file monitor') install_reloader(int(self.options.reload_interval), [app_spec]) # if self.requires_config_file: @@ -276,7 +275,7 @@ class PServeCommand(object): try: self.daemonize() except DaemonizeException as ex: - if self.verbose > 0: + if self.options.verbose > 0: self.out(str(ex)) return 2 @@ -308,7 +307,7 @@ class PServeCommand(object): app = self.loadapp(app_spec, name=app_name, relative_to=base, global_conf=vars) - if self.verbose > 0: + if self.options.verbose > 0: if hasattr(os, 'getpid'): msg = 'Starting server in PID %i.' % os.getpid() else: @@ -319,7 +318,7 @@ class PServeCommand(object): try: server(app) except (SystemExit, KeyboardInterrupt) as e: - if self.verbose > 1: + if self.options.verbose > 1: raise if str(e): msg = ' ' + str(e) @@ -363,7 +362,7 @@ class PServeCommand(object): "Daemon is already running (PID: %s from PID file %s)" % (pid, self.options.pid_file)) - if self.verbose > 0: + if self.options.verbose > 0: self.out('Entering daemon mode') pid = os.fork() if pid: @@ -438,11 +437,11 @@ class PServeCommand(object): def record_pid(self, pid_file): pid = os.getpid() - if self.verbose > 1: + if self.options.verbose > 1: self.out('Writing PID %s to %s' % (pid, pid_file)) with open(pid_file, 'w') as f: f.write(str(pid)) - atexit.register(self._remove_pid_file, pid, pid_file, self.verbose) + atexit.register(self._remove_pid_file, pid, pid_file, self.options.verbose) def stop_daemon(self): # pragma: no cover pid_file = self.options.pid_file or 'pyramid.pid' @@ -495,7 +494,7 @@ class PServeCommand(object): self.restart_with_monitor(reloader=True) def restart_with_monitor(self, reloader=False): # pragma: no cover - if self.verbose > 0: + if self.options.verbose > 0: if reloader: self.out('Starting subprocess with file monitor') else: @@ -516,7 +515,7 @@ class PServeCommand(object): proc = None except KeyboardInterrupt: self.out('^C caught in monitor process') - if self.verbose > 1: + if self.options.verbose > 1: raise return 1 finally: @@ -532,7 +531,7 @@ class PServeCommand(object): # a monitor, any exit code will restart if exit_code != 3: return exit_code - if self.verbose > 0: + if self.options.verbose > 0: self.out('%s %s %s' % ('-' * 20, 'Restarting', '-' * 20)) def change_user_group(self, user, group): # pragma: no cover @@ -564,7 +563,7 @@ class PServeCommand(object): if not gid: gid = entry.pw_gid uid = entry.pw_uid - if self.verbose > 0: + if self.options.verbose > 0: self.out('Changing user to %s:%s (%s:%s)' % ( user, group or '(unknown)', uid, gid)) if gid: -- cgit v1.2.3 From b18bdeeda1c837456c7c677c0fd49567bb72fdd8 Mon Sep 17 00:00:00 2001 From: Julian Paul Glass Date: Thu, 1 Aug 2013 00:52:07 +1000 Subject: table layouts and templates, query attributes (edit,new,del) --- pyramid/tests/test_scripts/test_pserve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyramid/tests/test_scripts/test_pserve.py b/pyramid/tests/test_scripts/test_pserve.py index 6e4b0f17d..107ff4c0a 100644 --- a/pyramid/tests/test_scripts/test_pserve.py +++ b/pyramid/tests/test_scripts/test_pserve.py @@ -156,7 +156,7 @@ class TestPServeCommand(unittest.TestCase): self.pid_file = tempfile.mktemp() pid = os.getpid() inst = self._makeOne() - inst.verbose = verbosity + inst.options.verbose = verbosity try: atexit.register = fake_atexit -- cgit v1.2.3 From 26b33b3e42aa216e55404259ef296acfc7975244 Mon Sep 17 00:00:00 2001 From: Julian Paul Glass Date: Thu, 1 Aug 2013 00:52:07 +1000 Subject: Updated test_pserve.py - ins.options.verbose --- pyramid/tests/test_scripts/test_pserve.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyramid/tests/test_scripts/test_pserve.py b/pyramid/tests/test_scripts/test_pserve.py index 6e4b0f17d..107ff4c0a 100644 --- a/pyramid/tests/test_scripts/test_pserve.py +++ b/pyramid/tests/test_scripts/test_pserve.py @@ -156,7 +156,7 @@ class TestPServeCommand(unittest.TestCase): self.pid_file = tempfile.mktemp() pid = os.getpid() inst = self._makeOne() - inst.verbose = verbosity + inst.options.verbose = verbosity try: atexit.register = fake_atexit -- cgit v1.2.3 From abed945e78fab649d6e2885feba1eaa3ede9f9be Mon Sep 17 00:00:00 2001 From: Julian Paul Glass Date: Thu, 1 Aug 2013 01:39:04 +1000 Subject: Changed to an incrementing verbose level, (-q, --quiet) option added, all references to quiet=BOOL removed (can't have both) Updated test_pserve.py --- pyramid/scripts/pserve.py | 18 +++++++++++------- pyramid/tests/test_scripts/test_pserve.py | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/pyramid/scripts/pserve.py b/pyramid/scripts/pserve.py index c012abb01..89bfc765f 100644 --- a/pyramid/scripts/pserve.py +++ b/pyramid/scripts/pserve.py @@ -45,8 +45,8 @@ if WIN and not hasattr(os, 'kill'): # pragma: no cover else: kill = os.kill -def main(argv=sys.argv, quiet=False): - command = PServeCommand(argv, quiet=quiet) +def main(argv=sys.argv): + command = PServeCommand(argv) return command.run() class DaemonizeException(Exception): @@ -129,8 +129,14 @@ class PServeCommand(object): '-v', '--verbose', default=default_verbosity, dest='verbose', - type=int, + action='count', help="Set verbose level (default "+str(default_verbosity)+")") + parser.add_option( + '-q', '--quiet', + action='store_const', + const=0, + dest='verbose', + help="Suppress verbose output") if hasattr(os, 'setuid'): # I don't think these are available on Windows @@ -159,13 +165,11 @@ class PServeCommand(object): possible_subcommands = ('start', 'stop', 'restart', 'status') - def __init__(self, argv, quiet=False): - self.quiet = quiet + def __init__(self, argv): self.options, self.args = self.parser.parse_args(argv[1:]) def out(self, msg): # pragma: no cover - if not self.quiet: - print(msg) + print(msg) def get_options(self): if (len(self.args) > 1 diff --git a/pyramid/tests/test_scripts/test_pserve.py b/pyramid/tests/test_scripts/test_pserve.py index 107ff4c0a..350487e2a 100644 --- a/pyramid/tests/test_scripts/test_pserve.py +++ b/pyramid/tests/test_scripts/test_pserve.py @@ -259,7 +259,7 @@ class Test_read_pidfile(unittest.TestCase): class Test_main(unittest.TestCase): def _callFUT(self, argv): from pyramid.scripts.pserve import main - return main(argv, quiet=True) + return main(argv) def test_it(self): result = self._callFUT(['pserve']) -- cgit v1.2.3 From eac06005ac849b279b94149bbbf87d2aff802495 Mon Sep 17 00:00:00 2001 From: Julian Paul Glass Date: Fri, 2 Aug 2013 19:57:42 +1000 Subject: quiet keyword sets verbose level to 0, test_pserve.py restored to previous state --- pyramid/scripts/pserve.py | 11 +++++++---- pyramid/tests/test_scripts/test_pserve.py | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pyramid/scripts/pserve.py b/pyramid/scripts/pserve.py index 89bfc765f..cc368d721 100644 --- a/pyramid/scripts/pserve.py +++ b/pyramid/scripts/pserve.py @@ -45,8 +45,8 @@ if WIN and not hasattr(os, 'kill'): # pragma: no cover else: kill = os.kill -def main(argv=sys.argv): - command = PServeCommand(argv) +def main(argv=sys.argv, quiet=False): + command = PServeCommand(argv, quiet=quiet) return command.run() class DaemonizeException(Exception): @@ -165,11 +165,14 @@ class PServeCommand(object): possible_subcommands = ('start', 'stop', 'restart', 'status') - def __init__(self, argv): + def __init__(self, argv, quiet=False): self.options, self.args = self.parser.parse_args(argv[1:]) + if quiet: + self.options.verbose = 0 def out(self, msg): # pragma: no cover - print(msg) + if self.options.verbose > 0: + print(msg) def get_options(self): if (len(self.args) > 1 diff --git a/pyramid/tests/test_scripts/test_pserve.py b/pyramid/tests/test_scripts/test_pserve.py index 350487e2a..107ff4c0a 100644 --- a/pyramid/tests/test_scripts/test_pserve.py +++ b/pyramid/tests/test_scripts/test_pserve.py @@ -259,7 +259,7 @@ class Test_read_pidfile(unittest.TestCase): class Test_main(unittest.TestCase): def _callFUT(self, argv): from pyramid.scripts.pserve import main - return main(argv) + return main(argv, quiet=True) def test_it(self): result = self._callFUT(['pserve']) -- cgit v1.2.3 From ff00405c65a901d5a952e27ec96ff4239c58b012 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Aug 2013 13:00:52 -0400 Subject: point at add-on documentation --- docs/narr/introduction.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/narr/introduction.rst b/docs/narr/introduction.rst index 48164d323..fa2646134 100644 --- a/docs/narr/introduction.rst +++ b/docs/narr/introduction.rst @@ -217,6 +217,8 @@ that the Pyramid core doesn't. Add-on packages already exist which let you easily send email, let you use the Jinja2 templating system, let you use XML-RPC or JSON-RPC, let you integrate with jQuery Mobile, etc. +Examples: http://docs.pylonsproject.org/en/latest/docs/pyramid.html#pyramid-add-on-documentation + Class-based and function-based views ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- cgit v1.2.3 From 49f7c34024d5d3f483b9627790d9dc8a5b15e6a0 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Aug 2013 14:46:03 -0400 Subject: add a docstring for not_ --- pyramid/config/util.py | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/pyramid/config/util.py b/pyramid/config/util.py index a98e71cf5..892592196 100644 --- a/pyramid/config/util.py +++ b/pyramid/config/util.py @@ -29,6 +29,40 @@ def as_sorted_tuple(val): return val class not_(object): + """ + + You can invert the meaning of any predicate value by wrapping it in a call + to :class:`pyramid.config.not_`. + + .. code-block:: python + :linenos: + + from pyramid.config import not_ + + config.add_view( + 'mypackage.views.my_view', + route_name='ok', + request_method=not_('POST') + ) + + The above example will ensure that the view is called if the request method + is *not* ``POST``, at least if no other view is more specific. + + This technique of wrapping a predicate value in ``not_`` can be used + anywhere predicate values are accepted: + + - :meth:`pyramid.config.Configurator.add_view` + + - :meth:`pyramid.config.Configurator.add_route` + + - :meth:`pyramid.config.Configurator.add_subscriber` + + - :meth:`pyramid.view.view_config` + + - :meth:`pyramid.events.subscriber` + + .. versionadded:: 1.5 + """ def __init__(self, value): self.value = value -- cgit v1.2.3 From b210ce350a3856166376f63a32725cc1516ba294 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 2 Aug 2013 19:14:29 -0400 Subject: add pdistreport command --- CHANGES.txt | 4 ++ docs/narr/commandline.rst | 24 +++++++++ docs/whatsnew-1.5.rst | 4 ++ pyramid/scripts/pdistreport.py | 37 +++++++++++++ pyramid/tests/test_scripts/test_pdistreport.py | 74 ++++++++++++++++++++++++++ setup.py | 1 + 6 files changed, 144 insertions(+) create mode 100644 pyramid/scripts/pdistreport.py create mode 100644 pyramid/tests/test_scripts/test_pdistreport.py diff --git a/CHANGES.txt b/CHANGES.txt index c100f7fa6..8292a2382 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,10 @@ Next Release Features -------- +- Add ``pdistreport`` script, which prints the Python version in use, the + Pyramid version in use, and the version number and location of all Python + distributions currently installed. + - Add the ability to invert the result of any view, route, or subscriber predicate using the ``not_`` class. For example:: diff --git a/docs/narr/commandline.rst b/docs/narr/commandline.rst index e1347f3ca..17e5227fa 100644 --- a/docs/narr/commandline.rst +++ b/docs/narr/commandline.rst @@ -474,6 +474,30 @@ input of the ``prequest`` process is used as the ``POST`` body:: $ $VENV/bin/prequest -mPOST development.ini / < somefile +Showing All Installed Distributions and their Versions +------------------------------------------------------ + +.. versionadded:: 1.5 + +You can use the ``pdistreport`` command to show the Pyramid version in use, the +Python version in use, and all installed versions of Python distributions in +your Python environment:: + + $ $VENV/bin/pdistreport + Pyramid version: 1.5dev + Platform Linux-3.2.0-51-generic-x86_64-with-debian-wheezy-sid + Packages: + authapp 0.0 + /home/chrism/projects/foo/src/authapp + beautifulsoup4 4.1.3 + /home/chrism/projects/foo/lib/python2.7/site-packages/beautifulsoup4-4.1.3-py2.7.egg + ... more output ... + +``pdistreport`` takes no options. Its output is useful to paste into a +pastebin when you are having problems and need someone with more familiarity +with Python packaging and distribution than you have to look at your +environment. + .. _writing_a_script: Writing a Script diff --git a/docs/whatsnew-1.5.rst b/docs/whatsnew-1.5.rst index ee2250017..b987fa77f 100644 --- a/docs/whatsnew-1.5.rst +++ b/docs/whatsnew-1.5.rst @@ -12,6 +12,10 @@ Feature Additions The feature additions in Pyramid 1.5 follow. +- Add ``pdistreport`` script, which prints the Python version in use, the + Pyramid version in use, and the version number and location of all Python + distributions currently installed. + - Add the ability to invert the result of any view, route, or subscriber predicate value using the ``not_`` class. For example: diff --git a/pyramid/scripts/pdistreport.py b/pyramid/scripts/pdistreport.py new file mode 100644 index 000000000..10edb5715 --- /dev/null +++ b/pyramid/scripts/pdistreport.py @@ -0,0 +1,37 @@ +import sys +import platform +import pkg_resources +import optparse +from operator import itemgetter + +def out(*args): # pragma: no cover + for arg in args: + sys.stdout.write(arg) + sys.stdout.write(' ') + sys.stdout.write('\n') + +def main(argv=sys.argv, pkg_resources=pkg_resources, platform=platform.platform, + out=out): + # all args except argv are for unit testing purposes only + description = "Show Python distribution versions and locations in use" + usage = "usage: %prog" + parser = optparse.OptionParser(usage, description=description) + parser.parse_args(argv[1:]) + packages = [] + for distribution in pkg_resources.working_set: + name = distribution.project_name + packages.append( + {'version': distribution.version, + 'lowername': name.lower(), + 'name': name, + 'location':distribution.location} + ) + packages = sorted(packages, key=itemgetter('lowername')) + pyramid_version = pkg_resources.get_distribution('pyramid').version + plat = platform() + out('Pyramid version:', pyramid_version) + out('Platform:', plat) + out('Packages:') + for package in packages: + out(' ', package['name'], package['version']) + out(' ', package['location']) diff --git a/pyramid/tests/test_scripts/test_pdistreport.py b/pyramid/tests/test_scripts/test_pdistreport.py new file mode 100644 index 000000000..a8316c0e5 --- /dev/null +++ b/pyramid/tests/test_scripts/test_pdistreport.py @@ -0,0 +1,74 @@ +import unittest +from pyramid.tests.test_scripts import dummy + +class TestPDistReportCommand(unittest.TestCase): + def _callFUT(self, **kw): + argv = [] + from pyramid.scripts.pdistreport import main + return main(argv, **kw) + + def test_no_dists(self): + def platform(): + return 'myplatform' + pkg_resources = DummyPkgResources() + L = [] + def out(*args): + L.extend(args) + result = self._callFUT(pkg_resources=pkg_resources, platform=platform, + out=out) + self.assertEqual(result, None) + self.assertEqual( + L, + ['Pyramid version:', '1', + 'Platform:', 'myplatform', + 'Packages:'] + ) + + def test_with_dists(self): + def platform(): + return 'myplatform' + working_set = (DummyDistribution('abc'), DummyDistribution('def')) + pkg_resources = DummyPkgResources(working_set) + L = [] + def out(*args): + L.extend(args) + result = self._callFUT(pkg_resources=pkg_resources, platform=platform, + out=out) + self.assertEqual(result, None) + self.assertEqual( + L, + ['Pyramid version:', + '1', + 'Platform:', + 'myplatform', + 'Packages:', + ' ', + 'abc', + '1', + ' ', + '/projects/abc', + ' ', + 'def', + '1', + ' ', + '/projects/def'] + ) + +class DummyPkgResources(object): + def __init__(self, working_set=()): + self.working_set = working_set + + def get_distribution(self, name): + return Version('1') + +class Version(object): + def __init__(self, version): + self.version = version + +class DummyDistribution(object): + def __init__(self, name): + self.project_name = name + self.version = '1' + self.location = '/projects/%s' % name + + diff --git a/setup.py b/setup.py index df7622656..0cff30439 100644 --- a/setup.py +++ b/setup.py @@ -118,6 +118,7 @@ setup(name='pyramid', pviews = pyramid.scripts.pviews:main ptweens = pyramid.scripts.ptweens:main prequest = pyramid.scripts.prequest:main + pdistreport = pyramid.scripts.pdistreport:main [paste.server_runner] wsgiref = pyramid.scripts.pserve:wsgiref_server_runner cherrypy = pyramid.scripts.pserve:cherrypy_server_runner -- cgit v1.2.3 From a5da4dbbb2f5876740004c5fc9ffb15ae600d35e Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Tue, 6 Aug 2013 03:34:52 -0400 Subject: add redis session mention --- docs/narr/sessions.rst | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/narr/sessions.rst b/docs/narr/sessions.rst index 7ec280c8a..82440060c 100644 --- a/docs/narr/sessions.rst +++ b/docs/narr/sessions.rst @@ -148,6 +148,7 @@ Some gotchas: .. index:: single: pyramid_beaker single: Beaker + single: pyramid_redis_sessions single: session factory (alternates) .. _using_alternate_session_factories: @@ -155,11 +156,17 @@ Some gotchas: Using Alternate Session Factories --------------------------------- -At the time of this writing, exactly one alternate session factory -implementation exists, named ``pyramid_beaker``. This is a session factory -that uses the `Beaker `_ library as a backend. -Beaker has support for file-based sessions, database based sessions, and -encrypted cookie-based sessions. See `the pyramid_beaker documentation +At the time of this writing, exactly two alternate session factories +exist. + +The first is named ``pyramid_redis_sessions``. It can be downloaded from PyPI. +It uses Redis as a backend. It is the recommended persistent session solution +at the time of this writing. + +The second is named ``pyramid_beaker``. This is a session factory that uses the +`Beaker `_ library as a backend. Beaker has +support for file-based sessions, database based sessions, and encrypted +cookie-based sessions. See `the pyramid_beaker documentation `_ for more information about ``pyramid_beaker``. -- cgit v1.2.3 From 1670e45561674bed100583665eccce5e5284439f Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Tue, 6 Aug 2013 02:24:48 -0700 Subject: add missing word ``pserve`` --- docs/narr/project.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/narr/project.rst b/docs/narr/project.rst index 9d69a65a5..e25f3012a 100644 --- a/docs/narr/project.rst +++ b/docs/narr/project.rst @@ -1005,12 +1005,12 @@ Pyramid application based on the data in the file. application. As we saw in :ref:`firstapp_chapter`, ``pserve`` needn't be invoked at all to run a :app:`Pyramid` application. The use of ``pserve`` to 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 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. +of its scaffolding. But we strongly recommend using ``pserve`` while +developing your application, because many other convenience introspection +commands (such as ``pviews``, ``prequest``, ``proutes`` and others) are also +implemented in 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. .. _alternate_wsgi_server: -- cgit v1.2.3 From 268e1d1d8168376700031678379fe356db96afea Mon Sep 17 00:00:00 2001 From: tisdall Date: Thu, 8 Aug 2013 14:30:44 -0400 Subject: changed "obect" to "object" --- docs/api/request.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/request.rst b/docs/api/request.rst index b1f5918d7..8958d2abc 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -156,7 +156,7 @@ .. attribute:: matched_route If a :term:`route` has matched during this request, this attribute will - be an obect representing the route matched by the URL pattern + be an object representing the route matched by the URL pattern associated with the route. If a route has not matched during this request, the value of this attribute will be ``None``. See :ref:`matched_route`. -- cgit v1.2.3 From 0240e91af1616be75305ac5b7a57099ef42210bf Mon Sep 17 00:00:00 2001 From: tisdall Date: Thu, 8 Aug 2013 14:36:10 -0400 Subject: "behavor" to "behavior" --- docs/api/request.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/request.rst b/docs/api/request.rst index 8958d2abc..a90cb1ac0 100644 --- a/docs/api/request.rst +++ b/docs/api/request.rst @@ -238,7 +238,7 @@ .. attribute:: response_* In Pyramid 1.0, you could set attributes on a - :class:`pyramid.request.Request` which influenced the behavor of + :class:`pyramid.request.Request` which influenced the behavior of *rendered* responses (views which use a :term:`renderer` and which don't directly return a response). These attributes began with ``response_``, such as ``response_headerlist``. If you needed to -- cgit v1.2.3 From 00f9fe4dc2425d58d4c30253c53695bdf2a21e99 Mon Sep 17 00:00:00 2001 From: tisdall Date: Thu, 8 Aug 2013 14:44:23 -0400 Subject: "langauges" to "languages" --- docs/narr/i18n.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index 74765f8e2..bb336784f 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -808,7 +808,7 @@ If this setting is supplied within the :app:`Pyramid` application default_locale_name = settings['pyramid.default_locale_name'] .. index:: - single: detecting langauges + single: detecting languages "Detecting" Available Languages ------------------------------- -- cgit v1.2.3 From 86254fc545bc67f0a0050252dfcd297cc4b49f20 Mon Sep 17 00:00:00 2001 From: tisdall Date: Thu, 8 Aug 2013 14:49:59 -0400 Subject: "unecessary" to "unnecessary" --- docs/whatsnew-1.1.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/whatsnew-1.1.rst b/docs/whatsnew-1.1.rst index 5cba8dd3e..f1b8ec6f9 100644 --- a/docs/whatsnew-1.1.rst +++ b/docs/whatsnew-1.1.rst @@ -397,7 +397,7 @@ Deprecations and Behavior Differences shell you use to invoke ``paster serve`` to see these warnings, e.g. on UNIX, ``PYTHONWARNINGS=all $VENV/bin/paster serve development.ini``. Python 2.5 and 2.6 show deprecation warnings by default, - so this is unecessary there. + so this is unnecessary there. All deprecation warnings are emitted to the console. - The :class:`pyramid.view.static` class has been deprecated in favor of the -- cgit v1.2.3 From 6714a5e945d46b456f6e54c4b982566b25640949 Mon Sep 17 00:00:00 2001 From: tisdall Date: Thu, 8 Aug 2013 14:53:24 -0400 Subject: "refered" to "referred" --- docs/whatsnew-1.1.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/whatsnew-1.1.rst b/docs/whatsnew-1.1.rst index f1b8ec6f9..cc63017df 100644 --- a/docs/whatsnew-1.1.rst +++ b/docs/whatsnew-1.1.rst @@ -13,7 +13,7 @@ Terminology Changes The term "template" used by the Pyramid documentation used to refer to both "paster templates" and "rendered templates" (templates created by a rendering engine. i.e. Mako, Chameleon, Jinja, etc.). "Paster templates" will now be -refered to as "scaffolds", whereas the name for "rendered templates" will +referred to as "scaffolds", whereas the name for "rendered templates" will remain as "templates." Major Feature Additions -- cgit v1.2.3 From bfb395aa02dc9c451d1c8e0e77242cf2547cff8b Mon Sep 17 00:00:00 2001 From: tisdall Date: Thu, 8 Aug 2013 14:58:30 -0400 Subject: "readded" to "re-added" --- pyramid/interfaces.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyramid/interfaces.py b/pyramid/interfaces.py index a57f61ddb..275209737 100644 --- a/pyramid/interfaces.py +++ b/pyramid/interfaces.py @@ -915,7 +915,7 @@ class ISession(IDict): by ``queue``. An alternate flash message queue can used by passing an optional ``queue``, which must be a string. If ``allow_duplicate`` is false, if the ``msg`` already exists in the - queue, it will not be readded.""" + queue, it will not be re-added.""" def pop_flash(queue=''): """ Pop a queue from the flash storage. The queue is removed from -- cgit v1.2.3 From dcc7d67cb55304483b3c9931fbec17e98447279a Mon Sep 17 00:00:00 2001 From: tisdall Date: Thu, 8 Aug 2013 15:11:43 -0400 Subject: "resouce" to "resource" --- docs/narr/traversal.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/narr/traversal.rst b/docs/narr/traversal.rst index 2eb6ece13..a60c5ba56 100644 --- a/docs/narr/traversal.rst +++ b/docs/narr/traversal.rst @@ -289,7 +289,7 @@ system uses this algorithm to find a :term:`context` resource and a return resource "C". #. Traversal ends when a) the entire path is exhausted or b) when any - resouce raises a :exc:`KeyError` from its ``__getitem__`` or c) when any + resource raises a :exc:`KeyError` from its ``__getitem__`` or c) when any non-final path element traversal does not have a ``__getitem__`` method (resulting in a :exc:`AttributeError`) or d) when any path element is prefixed with the set of characters ``@@`` (indicating that the characters -- cgit v1.2.3 From 0efeb41f6db69a2df29fc2fb32e58d769f6311db Mon Sep 17 00:00:00 2001 From: tisdall Date: Fri, 9 Aug 2013 14:34:48 -0400 Subject: "argments" to "arguments"; "agument" to "argument" --- pyramid/renderers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyramid/renderers.py b/pyramid/renderers.py index 64951a6ba..602655be8 100644 --- a/pyramid/renderers.py +++ b/pyramid/renderers.py @@ -114,7 +114,7 @@ def render_to_response(renderer_name, value, request=None, package=None): top-level system names, such as ``request``, ``context``, ``renderer_name``, and ``view``. See :ref:`renderer_system_values` for the full list. If :term:`renderer globals` have been specified, these - will also be used to agument the value. + will also be used to argument the value. Supply a ``request`` parameter in order to provide the renderer with the most correct 'system' values (``request`` and ``context`` @@ -200,7 +200,7 @@ class JSON(object): The default serializer uses ``json.JSONEncoder``. A different serializer can be specified via the ``serializer`` argument. Custom serializers should accept the object, a callback - ``default``, and any extra ``kw`` keyword argments passed during + ``default``, and any extra ``kw`` keyword arguments passed during renderer construction. .. versionadded:: 1.4 -- cgit v1.2.3 From bfd928b5424c49343c6680715013d61bf4991cfa Mon Sep 17 00:00:00 2001 From: tisdall Date: Fri, 9 Aug 2013 14:42:49 -0400 Subject: "dermine" to "determine" --- docs/narr/i18n.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index bb336784f..2964686d3 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -984,7 +984,7 @@ requires no additional coding or configuration. The default locale negotiator implementation named :class:`~pyramid.i18n.default_locale_negotiator` uses the following -set of steps to dermine the locale name. +set of steps to determine the locale name. - First, the negotiator looks for the ``_LOCALE_`` attribute of the request object (possibly set directly by view code or by a listener -- cgit v1.2.3 From b4cd53a9f3f133603c5139b42134deba1f78276a Mon Sep 17 00:00:00 2001 From: tisdall Date: Fri, 9 Aug 2013 14:47:15 -0400 Subject: "wilcard" to "wildcard" --- HISTORY.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HISTORY.txt b/HISTORY.txt index 67de56998..bf054f9ed 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -2150,7 +2150,7 @@ Features - Add ``wild_domain`` argument to AuthTktAuthenticationPolicy, which defaults to ``True``. If it is set to ``False``, the feature of the policy which - sets a cookie with a wilcard domain will be turned off. + sets a cookie with a wildcard domain will be turned off. - Add a ``MANIFEST.in`` file to each paster template. See https://github.com/Pylons/pyramid/issues#issue/95 -- cgit v1.2.3 From 4a7ab035275b20b9a2926d65a3936b6fc8c35c3a Mon Sep 17 00:00:00 2001 From: tisdall Date: Fri, 9 Aug 2013 14:51:35 -0400 Subject: "offical" to "official" --- docs/narr/introduction.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/narr/introduction.rst b/docs/narr/introduction.rst index fa2646134..032f4be6b 100644 --- a/docs/narr/introduction.rst +++ b/docs/narr/introduction.rst @@ -859,7 +859,7 @@ It's our goal that no Pyramid question go unanswered. Whether you ask a question on IRC, on the Pylons-discuss maillist, or on StackOverflow, you're likely to get a reasonably prompt response. We don't tolerate "support trolls" or other people who seem to get their rocks off by berating fellow -users in our various offical support channels. We try to keep it well-lit +users in our various official support channels. We try to keep it well-lit and new-user-friendly. Example: Visit irc\://freenode.net#pyramid (the ``#pyramid`` channel on -- cgit v1.2.3 From c40d20b20c3a8d0b3ac6f2e7ee1632889a69bfe5 Mon Sep 17 00:00:00 2001 From: tisdall Date: Fri, 9 Aug 2013 14:54:36 -0400 Subject: "repetion" to "repetition" --- docs/narr/viewconfig.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/narr/viewconfig.rst b/docs/narr/viewconfig.rst index fd3229339..6a064c209 100644 --- a/docs/narr/viewconfig.rst +++ b/docs/narr/viewconfig.rst @@ -831,7 +831,7 @@ of this: config.add_view( RESTView, route_name='rest', attr='delete', request_method='DELETE') -To reduce the amount of repetion in the ``config.add_view`` statements, we +To reduce the amount of repetition in the ``config.add_view`` statements, we can move the ``route_name='rest'`` argument to a ``@view_default`` class decorator on the RESTView class: -- cgit v1.2.3 From 866944efa58accab20abca15409803d9e13368b4 Mon Sep 17 00:00:00 2001 From: tisdall Date: Fri, 9 Aug 2013 14:56:29 -0400 Subject: "arent" to "aren't" --- docs/narr/urldispatch.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/narr/urldispatch.rst b/docs/narr/urldispatch.rst index 18cb3e4db..310c160c0 100644 --- a/docs/narr/urldispatch.rst +++ b/docs/narr/urldispatch.rst @@ -865,7 +865,7 @@ Debugging Route Matching ------------------------ It's useful to be able to take a peek under the hood when requests that enter -your application arent matching your routes as you expect them to. To debug +your application aren't matching your routes as you expect them to. To debug route matching, use the ``PYRAMID_DEBUG_ROUTEMATCH`` environment variable or the ``pyramid.debug_routematch`` configuration file setting (set either to ``true``). Details of the route matching decision for a particular request to the -- cgit v1.2.3 From b32e463fcd27d54759afbc61db7d1c0a13aa8525 Mon Sep 17 00:00:00 2001 From: tisdall Date: Fri, 9 Aug 2013 15:03:08 -0400 Subject: "intead" to "instead" --- pyramid/config/adapters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyramid/config/adapters.py b/pyramid/config/adapters.py index fe8e973b1..92c787c6c 100644 --- a/pyramid/config/adapters.py +++ b/pyramid/config/adapters.py @@ -216,7 +216,7 @@ class AdaptersConfiguratorMixin(object): config.add_traverser(MyCustomTraverser) This would cause the Pyramid superdefault traverser to never be used; - intead all traversal would be done using your ``MyCustomTraverser`` + instead all traversal would be done using your ``MyCustomTraverser`` class, no matter which object was returned by the :term:`root factory` of this application. Note that we passed no arguments to the ``iface`` keyword parameter. The default value of ``iface``, -- cgit v1.2.3 From 71d2beb98cfecffe7ee739970d8f4489122200ba Mon Sep 17 00:00:00 2001 From: tisdall Date: Fri, 9 Aug 2013 15:04:17 -0400 Subject: "agsinst" to "against" --- pyramid/config/adapters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyramid/config/adapters.py b/pyramid/config/adapters.py index 92c787c6c..5573b6748 100644 --- a/pyramid/config/adapters.py +++ b/pyramid/config/adapters.py @@ -228,7 +228,7 @@ class AdaptersConfiguratorMixin(object): time. The traverser used can depend on the result of the :term:`root factory`. For instance, if your root factory returns more than one type of object conditionally, you could claim that an alternate - traverser adapter should be used agsinst one particular class or + traverser adapter should be used against one particular class or interface returned by that root factory. When the root factory returned an object that implemented that class or interface, a custom traverser would be used. Otherwise, the default traverser would be -- cgit v1.2.3 From 95d5b72927484fa3882c5c47bf79d591a5af50a5 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 4 Aug 2013 05:20:26 -0500 Subject: update sphinx to use the version from the package automatically --- docs/conf.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index ff5f325d8..e50c0c60a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,6 +19,8 @@ import warnings warnings.simplefilter('ignore', DeprecationWarning) +import pkg_resources + # skip raw nodes from sphinx.writers.text import TextTranslator from sphinx.writers.latex import LaTeXTranslator @@ -93,7 +95,7 @@ copyright = '2008-%s, Agendaless Consulting' % thisyear # other places throughout the built documents. # # The short X.Y version. -version = '1.5dev' +version = pkg_resources.get_distribution('pyramid').version # The full version, including alpha/beta/rc tags. release = version -- cgit v1.2.3 From 1377480e027112afd8fdc4f75862b31b6111df0b Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 10 Aug 2013 02:38:36 -0400 Subject: add change note --- CHANGES.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 8292a2382..457bfc7b7 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -121,6 +121,12 @@ Features https://github.com/Pylons/pyramid/pull/1004 and https://github.com/Pylons/pyramid/pull/1046 +- The ``pserve`` command now takes a ``-v`` (or ``--verbose``) flag and a + ``-q`` (or ``--quiet``) flag. Output from running ``pserve`` can be + controlled using these flags. ``-v`` can be specified multiple times to + increase verbosity. ``-q`` sets verbosity to ``0`` unconditionally. The + default verbosity level is ``1``. + Bug Fixes --------- -- cgit v1.2.3 From 0a8d50f1e227acbfd5a9d63a61a4b383ee63c1c1 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 10 Aug 2013 02:55:13 -0400 Subject: add change note --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 457bfc7b7..68799da4a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -162,6 +162,9 @@ Bug Fixes instance of DummyResource to be "falsy" instead of "truthy". See https://github.com/Pylons/pyramid/pull/1032 +- The ``alchemy`` scaffold would break when the database was MySQL during + tables creation. See https://github.com/Pylons/pyramid/pull/1049 + 1.4 (2012-12-18) ================ -- cgit v1.2.3 From ab222cd0a7e4e320ccc2a09062c7b29ee9ead9d5 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 10 Aug 2013 03:03:27 -0400 Subject: remove unused testing dependencies --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index bab271159..0cff30439 100644 --- a/setup.py +++ b/setup.py @@ -52,8 +52,6 @@ install_requires=[ tests_require = [ 'WebTest >= 1.3.1', # py3 compat - 'webtest', - 'zope.component', ] if not PY3: -- cgit v1.2.3 From 986dc5f96c3bf0a62eb8984bfa5c2da4a3e2f254 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sat, 10 Aug 2013 03:05:00 -0400 Subject: add change note --- CHANGES.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.txt b/CHANGES.txt index 68799da4a..e9533ab48 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -127,6 +127,9 @@ Features increase verbosity. ``-q`` sets verbosity to ``0`` unconditionally. The default verbosity level is ``1``. +- The ``alchemy`` scaffold tests now provide better coverage. See + https://github.com/Pylons/pyramid/pull/1029 + Bug Fixes --------- -- cgit v1.2.3 From 89e3bb679b39e067f20f742e7a10fce0a05777ed Mon Sep 17 00:00:00 2001 From: Julian Paul Glass Date: Sat, 10 Aug 2013 20:35:08 +1000 Subject: Appended name to CONTRIBUTORS.txt --- CONTRIBUTORS.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index d2b116f46..a9396b25e 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -202,3 +202,5 @@ Contributors - Luke Cyca, 2013/05/30 - Laurence Rowe, 2013/04/24 + +- Julian P. Glass, 2013/08/10 -- cgit v1.2.3 From c801c78232458cbb5297bebac6ca4795ac2878c1 Mon Sep 17 00:00:00 2001 From: Junaid Ali Date: Sat, 10 Aug 2013 20:05:12 -0500 Subject: accepted contributors license --- CONTRIBUTORS.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 97eb54f7b..9d0e5981b 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -198,3 +198,5 @@ Contributors - Georges Dubus, 2013/03/21 - Jason McKellar, 2013/03/28 + +- Junaid Ali, 2013/08/10 \ No newline at end of file -- cgit v1.2.3 From 0b175c6e675391cbc7a4ad56b265dcbc2c5aa976 Mon Sep 17 00:00:00 2001 From: Blaise Laflamme Date: Sun, 11 Aug 2013 12:01:59 -0400 Subject: updated doc _theme --- docs/_themes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_themes b/docs/_themes index f59f7bfce..8673c4a14 160000 --- a/docs/_themes +++ b/docs/_themes @@ -1 +1 @@ -Subproject commit f59f7bfce5259f50fbb67b9040c03ecb080130b4 +Subproject commit 8673c4a14f192c15f1949dc9862821e60f31604a -- cgit v1.2.3 From 43600c9258e560c81f2c92912d01d47bf10f888a Mon Sep 17 00:00:00 2001 From: Chris Davies Date: Mon, 12 Aug 2013 00:04:14 +0000 Subject: added myself to CONTRIBUTORS.txt --- CONTRIBUTORS.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index 4a4adbfc4..0cecc93df 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -206,3 +206,5 @@ Contributors - Julian P. Glass, 2013/08/10 - Junaid Ali, 2013/08/10 + +- Chris Davies, 2013/08/11 -- cgit v1.2.3 From 7683e22a93a3df2a541dddb9afac540ef9094f49 Mon Sep 17 00:00:00 2001 From: Jeff Szusz Date: Mon, 12 Aug 2013 11:10:09 -0400 Subject: #967 fixed 'Sommetime' -> 'Sometime' in templates.rst --- docs/narr/templates.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst index d4cf20b93..ddebb3fa2 100644 --- a/docs/narr/templates.rst +++ b/docs/narr/templates.rst @@ -723,7 +723,7 @@ This template doesn't use any advanced features of Mako, only the Using A Mako def name Within a Renderer Name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Sommetime you'd like to render a ``def`` inside of a Mako template instead of +Sometime you'd like to render a ``def`` inside of a Mako template instead of the full Mako template. To render a def inside a Mako template, given a :term:`Mako` template file named ``foo.mak`` and a def named ``bar``, you can configure the template as a :term:`renderer` like so: -- cgit v1.2.3 From fc9d4cbc8b3ccbd2c2b5c942595bf420eeae4596 Mon Sep 17 00:00:00 2001 From: Jeff Szusz Date: Mon, 12 Aug 2013 11:28:53 -0400 Subject: Update templates.rst --- docs/narr/templates.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/narr/templates.rst b/docs/narr/templates.rst index ddebb3fa2..af5ad6c5c 100644 --- a/docs/narr/templates.rst +++ b/docs/narr/templates.rst @@ -723,7 +723,7 @@ This template doesn't use any advanced features of Mako, only the Using A Mako def name Within a Renderer Name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Sometime you'd like to render a ``def`` inside of a Mako template instead of +Sometimes you'd like to render a ``def`` inside of a Mako template instead of the full Mako template. To render a def inside a Mako template, given a :term:`Mako` template file named ``foo.mak`` and a def named ``bar``, you can configure the template as a :term:`renderer` like so: -- cgit v1.2.3 From 9d0643063615ef7ce54fe062461c5dbf92cde3b4 Mon Sep 17 00:00:00 2001 From: Amos Latteier Date: Mon, 12 Aug 2013 16:04:00 -0400 Subject: Add documentation for creating and firing custom events. See issue #982. --- docs/api/registry.rst | 8 ++++++ docs/narr/events.rst | 79 +++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 85 insertions(+), 2 deletions(-) diff --git a/docs/api/registry.rst b/docs/api/registry.rst index db348495c..f96b23b68 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -29,6 +29,14 @@ This attribute is often accessed as ``request.registry.introspector`` in a typical Pyramid application. + .. method:: notify(*events) + + Fire one or more event. All event subscribers to the event(s) + will be notified. This method is often accessed as + ``request.registry.notify`` in Pyramid applications to fire + custom events. See :ref:`custom_events` for more information. + + .. class:: Introspectable .. versionadded:: 1.3 diff --git a/docs/narr/events.rst b/docs/narr/events.rst index 929208083..6065b67fd 100644 --- a/docs/narr/events.rst +++ b/docs/narr/events.rst @@ -53,7 +53,7 @@ method (see also :term:`Configurator`): from subscribers import mysubscriber - # "config" below is assumed to be an instance of a + # "config" below is assumed to be an instance of a # pyramid.config.Configurator object config.add_subscriber(mysubscriber, NewRequest) @@ -113,7 +113,7 @@ your application like so: :linenos: def handle_new_request(event): - print 'request', event.request + print 'request', event.request def handle_new_response(event): print 'response', event.response @@ -150,3 +150,78 @@ application, because the interface defined at :class:`pyramid.interfaces.INewResponse` says it must (:class:`pyramid.events.NewResponse` objects also have a ``request``). +.. _custom_events: + +Creating Your Own Events +------------------------ + +In addition to using the events that the Pyramid framework creates, +you can create your own events for use in your application. This can +be useful to decouple parts of your application. + +For example, suppose your application has to do many things when a new +document is created. Rather than putting all this logic in the view +that creates the document, you can create the document in your view +and then fire a custom event. Subscribers to the custom event can take +other actions, such as indexing the document, sending email, or +sending a message to a remote system. + +An event is simply an object. There are no required attributes or +method for your custom events. In general, your events should keep +track of the information that subscribers will need. Here are some +example custom event classes: + +.. code-block:: python + :linenos: + + class DocCreated(object): + def __init__(self, doc, request): + self.doc = doc + self.request = request + + class UserEvent(object): + def __init__(self, user): + self.user = user + + class UserLoggedIn(UserEvent): + pass + +Some Pyramid applications choose to define custom events classes in an +``events`` module. + +You can subscribe to custom events in the same way what you subscribe +to Pyramid events -- either imperatively or with a decorator. Here's +an example of subscribing to a custom event with a decorator: + +.. code-block:: python + :linenos: + + from pyramid.events import subscriber + from .events import DocCreated + from .index import index_doc + + @subscriber(DocCreated) + def index_doc(event): + # index the document using our application's index_doc function + index_doc(event.doc, event.request) + +The above example assumes that the application defines a +``DocCreated`` event class and an ``index_doc`` function. + +To fire your custom events use the +:meth:`pyramid.registry.Registry.notify` method, which is most often +accessed as ``request.registry.notify``. For example: + +.. code-block:: python + :linenos: + + from .events import DocCreated + + def new_doc_view(request): + doc = MyDoc() + event = DocCreated(doc, request) + request.registry.notify(event) + return {'document': doc} + +This example view will notify all subscribers to the custom +``DocCreated`` event. -- cgit v1.2.3 From 387051c91d5a3844db5fa0938a19c19f5881e056 Mon Sep 17 00:00:00 2001 From: Amos Latteier Date: Mon, 12 Aug 2013 16:27:41 -0400 Subject: Fix tab/space snafu. --- docs/narr/events.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/narr/events.rst b/docs/narr/events.rst index 6065b67fd..702618843 100644 --- a/docs/narr/events.rst +++ b/docs/narr/events.rst @@ -177,7 +177,7 @@ example custom event classes: class DocCreated(object): def __init__(self, doc, request): self.doc = doc - self.request = request + self.request = request class UserEvent(object): def __init__(self, user): @@ -219,9 +219,9 @@ accessed as ``request.registry.notify``. For example: def new_doc_view(request): doc = MyDoc() - event = DocCreated(doc, request) - request.registry.notify(event) - return {'document': doc} + event = DocCreated(doc, request) + request.registry.notify(event) + return {'document': doc} This example view will notify all subscribers to the custom ``DocCreated`` event. -- cgit v1.2.3 From 29ab2b964164844daa012c3e80d276f49ccbe217 Mon Sep 17 00:00:00 2001 From: Amos Latteier Date: Mon, 12 Aug 2013 16:45:11 -0400 Subject: Minor fixes suggested by @tshepang and @mmerickel thanks! --- docs/api/registry.rst | 5 +++-- docs/narr/events.rst | 8 ++++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/docs/api/registry.rst b/docs/api/registry.rst index f96b23b68..42a405a32 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -31,8 +31,9 @@ .. method:: notify(*events) - Fire one or more event. All event subscribers to the event(s) - will be notified. This method is often accessed as + Fire one or more events. All event subscribers to the event(s) + will be notified. The subscribers will be called synchronously on + the current thread. This method is often accessed as ``request.registry.notify`` in Pyramid applications to fire custom events. See :ref:`custom_events` for more information. diff --git a/docs/narr/events.rst b/docs/narr/events.rst index 702618843..485247afc 100644 --- a/docs/narr/events.rst +++ b/docs/narr/events.rst @@ -77,7 +77,7 @@ type via the :func:`pyramid.events.subscriber` function. @subscriber(NewRequest) def mysubscriber(event): - event.request.foo = 1 + event.request.foo = 1 When the :func:`~pyramid.events.subscriber` decorator is used a :term:`scan` must be performed against the package containing the @@ -189,7 +189,7 @@ example custom event classes: Some Pyramid applications choose to define custom events classes in an ``events`` module. -You can subscribe to custom events in the same way what you subscribe +You can subscribe to custom events in the same way that you subscribe to Pyramid events -- either imperatively or with a decorator. Here's an example of subscribing to a custom event with a decorator: @@ -225,3 +225,7 @@ accessed as ``request.registry.notify``. For example: This example view will notify all subscribers to the custom ``DocCreated`` event. + +Note that when you fire an event, all subscribers are run +synchronously on the current thread. So it's generally not a good idea +to create event handlers that may take a long time to run. -- cgit v1.2.3 From 970dfae46bb398e862f57d89c3f6efe10c45e715 Mon Sep 17 00:00:00 2001 From: Amos Latteier Date: Mon, 12 Aug 2013 17:00:29 -0400 Subject: Mention subscriber predicates. --- docs/narr/events.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/narr/events.rst b/docs/narr/events.rst index 485247afc..5004a1787 100644 --- a/docs/narr/events.rst +++ b/docs/narr/events.rst @@ -190,8 +190,10 @@ Some Pyramid applications choose to define custom events classes in an ``events`` module. You can subscribe to custom events in the same way that you subscribe -to Pyramid events -- either imperatively or with a decorator. Here's -an example of subscribing to a custom event with a decorator: +to Pyramid events -- either imperatively or with a decorator. You can +also use custom events with :ref:`subscriber predicates +`. Here's an example of subscribing to a custom +event with a decorator: .. code-block:: python :linenos: -- cgit v1.2.3 From 8339cd1095be5e49fe41662e3618b8da6055a4f0 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Mon, 12 Aug 2013 16:28:57 -0500 Subject: remove the "thread" reference --- docs/api/registry.rst | 8 ++++---- docs/narr/events.rst | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/api/registry.rst b/docs/api/registry.rst index 42a405a32..7736cf075 100644 --- a/docs/api/registry.rst +++ b/docs/api/registry.rst @@ -32,10 +32,10 @@ .. method:: notify(*events) Fire one or more events. All event subscribers to the event(s) - will be notified. The subscribers will be called synchronously on - the current thread. This method is often accessed as - ``request.registry.notify`` in Pyramid applications to fire - custom events. See :ref:`custom_events` for more information. + will be notified. The subscribers will be called synchronously. + This method is often accessed as ``request.registry.notify`` + in Pyramid applications to fire custom events. See + :ref:`custom_events` for more information. .. class:: Introspectable diff --git a/docs/narr/events.rst b/docs/narr/events.rst index 5004a1787..11af89ca6 100644 --- a/docs/narr/events.rst +++ b/docs/narr/events.rst @@ -229,5 +229,7 @@ This example view will notify all subscribers to the custom ``DocCreated`` event. Note that when you fire an event, all subscribers are run -synchronously on the current thread. So it's generally not a good idea -to create event handlers that may take a long time to run. +synchronously so it's generally not a good idea +to create event handlers that may take a long time to run. Although +event handlers could be used as a central place to spawn tasks on your +own message queues. -- cgit v1.2.3