summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/_static/pyramid_router.pngbin0 -> 120643 bytes
m---------docs/_themes0
-rw-r--r--docs/narr/router.rst4
-rw-r--r--pyramid/scripts/prequest.py8
-rw-r--r--pyramid/tests/test_scripts/test_prequest.py13
-rw-r--r--rtd.txt2
-rw-r--r--setup.py2
7 files changed, 24 insertions, 5 deletions
diff --git a/docs/_static/pyramid_router.png b/docs/_static/pyramid_router.png
new file mode 100644
index 000000000..3c9f81158
--- /dev/null
+++ b/docs/_static/pyramid_router.png
Binary files differ
diff --git a/docs/_themes b/docs/_themes
-Subproject 3bec9280a6cedb15e97e5899021aa8d723c2538
+Subproject b14bf8c2a0d95ae8e3d38d07ad3721370ae6f3f
diff --git a/docs/narr/router.rst b/docs/narr/router.rst
index 693217a6b..6f90c70cc 100644
--- a/docs/narr/router.rst
+++ b/docs/narr/router.rst
@@ -9,7 +9,7 @@
Request Processing
==================
-.. image:: ../_static/pyramid_request_processing.svg
+.. image:: ../_static/pyramid_request_processing.*
:alt: Request Processing
Once a :app:`Pyramid` application is up and running, it is ready to accept
@@ -119,7 +119,7 @@ request enters a :app:`Pyramid` application through to the point that
#. The :term:`thread local` stack is popped.
-.. image:: ../_static/pyramid_router.svg
+.. image:: ../_static/pyramid_router.*
:alt: Pyramid Router
This is a very high-level overview that leaves out various details. For more
diff --git a/pyramid/scripts/prequest.py b/pyramid/scripts/prequest.py
index 2ab3b8bb9..34eeadf32 100644
--- a/pyramid/scripts/prequest.py
+++ b/pyramid/scripts/prequest.py
@@ -5,7 +5,7 @@ import textwrap
from pyramid.compat import url_unquote
from pyramid.request import Request
-from pyramid.paster import get_app
+from pyramid.paster import get_app, setup_logging
from pyramid.scripts.common import parse_vars
def main(argv=sys.argv, quiet=False):
@@ -97,12 +97,18 @@ class PRequestCommand(object):
if not self.quiet:
print(msg)
+ def configure_logging(self, app_spec):
+ setup_logging(app_spec)
+
def run(self):
if not len(self.args) >= 2:
self.out('You must provide at least two arguments')
return 2
app_spec = self.args[0]
path = self.args[1]
+
+ self.configure_logging(app_spec)
+
if not path.startswith('/'):
path = '/' + path
diff --git a/pyramid/tests/test_scripts/test_prequest.py b/pyramid/tests/test_scripts/test_prequest.py
index 37f1d3c0f..95cec0518 100644
--- a/pyramid/tests/test_scripts/test_prequest.py
+++ b/pyramid/tests/test_scripts/test_prequest.py
@@ -210,8 +210,21 @@ class TestPRequestCommand(unittest.TestCase):
self.assertEqual(self._path_info, '/')
self.assertEqual(self._spec, 'development.ini')
self.assertEqual(self._app_name, None)
+
self.assertEqual(self._out, [b'abc'])
+ def test_command_method_configures_logging(self):
+ command = self._makeOne(['', 'development.ini', '/'])
+ called_args = []
+
+ def configure_logging(app_spec):
+ called_args.append(app_spec)
+
+ command.configure_logging = configure_logging
+ command.run()
+ self.assertEqual(called_args, ['development.ini'])
+
+
class Test_main(unittest.TestCase):
def _callFUT(self, argv):
from pyramid.scripts.prequest import main
diff --git a/rtd.txt b/rtd.txt
index b449ac73c..4aecd9933 100644
--- a/rtd.txt
+++ b/rtd.txt
@@ -1,4 +1,4 @@
+Sphinx >= 1.2.3
repoze.sphinx.autointerface
repoze.lru
pylons_sphinx_latesturl
-
diff --git a/setup.py b/setup.py
index d736dc38d..629b77f3d 100644
--- a/setup.py
+++ b/setup.py
@@ -56,7 +56,7 @@ if not PY3:
tests_require.append('zope.component>=3.11.0')
docs_extras = [
- 'Sphinx',
+ 'Sphinx >= 1.2.3',
'docutils',
'repoze.sphinx.autointerface',
]