From bcf79f0d2555236b8b70932d30fd76bd15591ba0 Mon Sep 17 00:00:00 2001 From: Chris Shenton Date: Sat, 21 Oct 2017 15:35:25 +0200 Subject: Quick Tutorial: Replace wsgiref with waitress In setup.py add waitress import. In development.ini use waitress. Adjust line number highlighting. Mention that we're using it early in the tutorial. Addresses #2926 --- docs/quick_tutorial/ini.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'docs/quick_tutorial/ini.rst') diff --git a/docs/quick_tutorial/ini.rst b/docs/quick_tutorial/ini.rst index 96dfc5b5f..c478d6784 100644 --- a/docs/quick_tutorial/ini.rst +++ b/docs/quick_tutorial/ini.rst @@ -89,7 +89,7 @@ application. Processing then proceeds as described in the Pyramid chapter on - ``pserve`` looks for ``[app:main]`` and finds ``use = egg:tutorial``. -- The projects's ``setup.py`` has defined an "entry point" (lines 9-12) for the +- The projects's ``setup.py`` has defined an "entry point" (lines 10-13) for the project's "main" entry point of ``tutorial:main``. - The ``tutorial`` package's ``__init__`` has a ``main`` function. @@ -99,10 +99,11 @@ application. Processing then proceeds as described in the Pyramid chapter on The ``.ini`` file is also used for two other functions: -- *Configuring the WSGI server*. ``[server:main]`` wires up the choice of which - WSGI *server* for your WSGI *application*. In this case, we are using - ``wsgiref`` bundled in the Python library. It also wires up the *port - number*: ``port = 6543`` tells ``wsgiref`` to listen on port 6543. +- *Configuring the WSGI server*. ``[server:main]`` wires up the choice + of which WSGI *server* for your WSGI *application*. In this case, we + are using ``waitress`` which was specified in + ``tutorial/setup.py``. It also wires up the *port number*: ``listen + = localhost:6543`` tells ``waitress`` to listen on port 6543. - *Configuring Python logging*. Pyramid uses Python standard logging, which needs a number of configuration values. The ``.ini`` serves this function. -- cgit v1.2.3 From 30bf7300404c1259d6558d58713933a5a067eeee Mon Sep 17 00:00:00 2001 From: Chris Shenton Date: Sat, 21 Oct 2017 19:26:06 +0200 Subject: Changes per stevepiercy review, thanks! --- docs/quick_tutorial/ini.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs/quick_tutorial/ini.rst') diff --git a/docs/quick_tutorial/ini.rst b/docs/quick_tutorial/ini.rst index c478d6784..f6d64eeda 100644 --- a/docs/quick_tutorial/ini.rst +++ b/docs/quick_tutorial/ini.rst @@ -102,8 +102,9 @@ The ``.ini`` file is also used for two other functions: - *Configuring the WSGI server*. ``[server:main]`` wires up the choice of which WSGI *server* for your WSGI *application*. In this case, we are using ``waitress`` which was specified in - ``tutorial/setup.py``. It also wires up the *port number*: ``listen - = localhost:6543`` tells ``waitress`` to listen on port 6543. + ``tutorial/setup.py``. It also wires up the *port number*: + ``listen = localhost:6543`` tells ``waitress`` to listen on host + ``localhost`` at port ``6543``. - *Configuring Python logging*. Pyramid uses Python standard logging, which needs a number of configuration values. The ``.ini`` serves this function. -- cgit v1.2.3 From 2a84a443831be7bf398b10b75b891c25a3f889e7 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Fri, 1 Dec 2017 10:40:59 -0800 Subject: Clarify when and how waitress is installed. - see #3204 --- docs/quick_tutorial/ini.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs/quick_tutorial/ini.rst') diff --git a/docs/quick_tutorial/ini.rst b/docs/quick_tutorial/ini.rst index f6d64eeda..e4f30405f 100644 --- a/docs/quick_tutorial/ini.rst +++ b/docs/quick_tutorial/ini.rst @@ -101,11 +101,13 @@ The ``.ini`` file is also used for two other functions: - *Configuring the WSGI server*. ``[server:main]`` wires up the choice of which WSGI *server* for your WSGI *application*. In this case, we - are using ``waitress`` which was specified in - ``tutorial/setup.py``. It also wires up the *port number*: + are using ``waitress`` which we specified in + ``tutorial/setup.py`` and was installed in the :doc:`requirements` step at the start of this tutorial. It also wires up the *port number*: ``listen = localhost:6543`` tells ``waitress`` to listen on host ``localhost`` at port ``6543``. + .. note:: Running the command ``$VENV/bin/pip install -e .`` will check for previously installed packages in our virtual environment that are specified in our package's ``setup.py`` file, then install our package in editable mode, installing any requirements that were not previously installed. If a requirement was manually installed previously on the command line or otherwise, in this case Waitress, then ``$VENV/bin/pip install -e .`` will merely check that it is installed and move on. + - *Configuring Python logging*. Pyramid uses Python standard logging, which needs a number of configuration values. The ``.ini`` serves this function. This provides the console log output that you see on startup and each -- cgit v1.2.3