From 0bee841b9e9537a912b14017601de63e7efeabf1 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 25 Feb 2017 17:23:50 -0600 Subject: add an IExecutionPolicy that can wrap the router --- docs/glossary.rst | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index 0f299c169..3a55a9f8a 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -1154,3 +1154,7 @@ Glossary coverage A measurement of code coverage, usually expressed as a percentage of which lines of code have been executed over which lines are executable, typically run during test execution. + execution policy + A policy which wraps the :term:`router` by creating the request object + and sending it through the request pipeline. + See :class:`pyramid.config.Configurator.set_execution_policy`. -- cgit v1.2.3 From 0a0916f81e874dbd9c59fc806d5ff0685f1264b7 Mon Sep 17 00:00:00 2001 From: Bert JW Regeer Date: Sat, 25 Feb 2017 17:23:33 -0700 Subject: Add newline to make docs happy --- docs/glossary.rst | 1 + 1 file changed, 1 insertion(+) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index 3a55a9f8a..0a46fac3b 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -1154,6 +1154,7 @@ Glossary coverage A measurement of code coverage, usually expressed as a percentage of which lines of code have been executed over which lines are executable, typically run during test execution. + execution policy A policy which wraps the :term:`router` by creating the request object and sending it through the request pipeline. -- cgit v1.2.3 From f454b80b0f6e6442fa27e48b7e1e38c5a7cbef03 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Fri, 31 Mar 2017 01:49:42 -0500 Subject: add some simple notes about plaster in the narrative docs --- docs/glossary.rst | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index 0a46fac3b..8f7ea70a1 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -366,6 +366,14 @@ Glossary :term:`WSGI` components together declaratively within an ``.ini`` file. It was developed by Ian Bicking. + plaster + `plaster `_ is + a library used by :app:`Pyramid` which acts as an abstraction between + command-line scripts and the file format used to load the :term:`WSGI` + components and application settings. By default :app:`Pyramid` ships + with the ``plaster_pastedeploy`` library installed which provides + integrated support for loading a :term:`PasteDeploy` INI file. + Chameleon `chameleon `_ is an attribute language template compiler which supports the :term:`ZPT` -- cgit v1.2.3 From 2ded2fc216b4caaf0d97813413943e0838b6eaaa Mon Sep 17 00:00:00 2001 From: Matthew Wilkes Date: Wed, 26 Apr 2017 15:41:47 +0100 Subject: Apply drafting changes to documentation. --- docs/glossary.rst | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index 0a46fac3b..0cf96f488 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -891,6 +891,11 @@ Glossary :meth:`pyramid.config.Configurator.set_session_factory` for more information. + CSRF storage policy + A utility that implements :class:`pyramid.interfaces.ICSRFStoragePolicy` + which is responsible for allocating CSRF tokens to a user and verifying + that a provided token is acceptable. + Mako `Mako `_ is a template language which refines the familiar ideas of componentized layout and inheritance -- cgit v1.2.3 From f20a018167a19d17527d40c027e6f9045749f065 Mon Sep 17 00:00:00 2001 From: cewing Date: Tue, 23 May 2017 20:21:07 -0700 Subject: fixes per code review, Thanks @stevepiercy. --- docs/glossary.rst | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index 2e5276554..9031ede04 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -751,7 +751,7 @@ Glossary :ref:`Venusian` is a library which allows framework authors to defer decorator actions. Instead of taking actions when a function (or class) decorator is executed - at import time, the action usually taken by the decorator is + at :term:`import time`, the action usually taken by the decorator is deferred until a separate "scan" phase. :app:`Pyramid` relies on Venusian to provide a basis for its :term:`scan` feature. @@ -1172,3 +1172,34 @@ Glossary A policy which wraps the :term:`router` by creating the request object and sending it through the request pipeline. See :class:`pyramid.config.Configurator.set_execution_policy`. + + singleton + A singleton is a class which will only ever have one instance. + As there is only one, it is shared by all other code. + This makes it an example of :term:`global state`. + + Using a singleton is `considered a poor design choice. `_ + As :term:`mutable` global state, it can be changed by any other code, + and so the values it represents cannot be reasoned about or tested properly. + + global state + A set of values that are available to the entirety of a program. + + mutable + In Python, a value is mutable if it can be changed *in place*. + The Python ``list`` and ``dict`` types are mutable. + When a value is added to or removed from an instance of either, the original object remains. + The opposite of mutable is :term:`immutable`. + + immutable + In Python, a value is immutable if it cannot be changed. + The Python ``str``, ``int``, and ``tuple`` data types are all ``immutable``. + + import time + In Python, the moment when a module is referred to in an ``import`` statement. + At this moment, all statements in that module at the module scope (at the left margin) are executed. + It is a bad design decision to put statements in a Python module that have :term:`side effect`\ s at import time. + + side effect + A statement or function has a side effect when it changes a value outside its own scope. + Put another way, if one can observe the change made by a function from outside that function, it has a side effect. -- cgit v1.2.3 From 19d341b5be789e97000d3dcbd33de75d8b061829 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 26 Jun 2017 03:48:21 -0700 Subject: change http://docs.pylonsproject.org to https - use correct URL for code style - use correct Pyramid version for zodb wiki src file template --- docs/glossary.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index 9031ede04..ce8e727e3 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -349,7 +349,7 @@ Glossary `A full-featured Python web framework `_. Pylons - `A lightweight Python web framework `_ + `A lightweight Python web framework `_ and a predecessor of Pyramid. ZODB @@ -367,7 +367,7 @@ Glossary file. It was developed by Ian Bicking. plaster - `plaster `_ is + `plaster `_ is a library used by :app:`Pyramid` which acts as an abstraction between command-line scripts and the file format used to load the :term:`WSGI` components and application settings. By default :app:`Pyramid` ships @@ -954,16 +954,16 @@ Glossary pyramid_handlers An add-on package which allows :app:`Pyramid` users to create classes that are analogues of Pylons 1 "controllers". See - http://docs.pylonsproject.org/projects/pyramid_handlers/en/latest/. + https://docs.pylonsproject.org/projects/pyramid_handlers/en/latest/. pyramid_jinja2 :term:`Jinja2` templating system bindings for Pyramid, documented at - http://docs.pylonsproject.org/projects/pyramid_jinja2/en/latest/. This + https://docs.pylonsproject.org/projects/pyramid_jinja2/en/latest/. This package also includes a scaffold named ``pyramid_jinja2_starter``, which creates an application package based on the Jinja2 templating system. Akhet - `Akhet `_ is a + `Akhet `_ is a Pyramid library and demo application with a Pylons-like feel. It's most known for its former application scaffold, which helped users transition from Pylons and those preferring a more Pylons-like API. @@ -1006,7 +1006,7 @@ Glossary database information. :mod:`pyramid_debugtoolbar` is configured into the ``development.ini`` of all applications which use a Pyramid :term:`cookiecutter`. For more information, see - http://docs.pylonsproject.org/projects/pyramid_debugtoolbar/en/latest/. + https://docs.pylonsproject.org/projects/pyramid_debugtoolbar/en/latest/. scaffold A project template that generates some of the major parts of a Pyramid @@ -1023,7 +1023,7 @@ Glossary used in production applications, because the logger can be configured to log to a file, to UNIX syslog, to the Windows Event Log, or even to email. See its `documentation - `_. + `_. console script A script written to the ``bin`` (on UNIX, or ``Scripts`` on Windows) @@ -1078,7 +1078,7 @@ Glossary A :term:`WSGI` server that runs on UNIX and Windows under Python 2.7+ and Python 3.3+. Projects generated via Pyramid cookiecutters use Waitress as a WGSI server. See - http://docs.pylonsproject.org/projects/waitress/en/latest/ for detailed + https://docs.pylonsproject.org/projects/waitress/en/latest/ for detailed information. Green Unicorn -- cgit v1.2.3 From a816a883492d530c50183e92d5a43fab07181114 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Tue, 27 Jun 2017 01:05:41 -0700 Subject: Update all external links per `make linkcheck` - Most are changing http to https, or readthedocs.org to readthedocs.io, and some for Python packaging reorganizing some docs into tutorials, as well as miscellaneous changes. --- docs/glossary.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index ce8e727e3..fe2d0977c 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -321,7 +321,7 @@ Glossary :term:`principal` (or principals) associated with a request. WSGI - `Web Server Gateway Interface `_. + `Web Server Gateway Interface `_. This is a Python standard for connecting web applications to web servers, similar to the concept of Java Servlets. :app:`Pyramid` requires that your application be served as a WSGI application. @@ -330,8 +330,8 @@ Glossary *Middleware* is a :term:`WSGI` concept. It is a WSGI component that acts both as a server and an application. Interesting uses for middleware exist, such as caching, content-transport - encoding, and other functions. See `WSGI.org - `_ or `PyPI + encoding, and other functions. See `WSGI documentation + `_ or `PyPI `_ to find middleware for your application. pipeline @@ -339,7 +339,7 @@ Glossary server, a WSGI application, with a set of :term:`middleware` in-between. Zope - `The Z Object Publishing Framework `_, a + `The Z Object Publishing Framework `_, a full-featured Python web framework. Grok @@ -357,7 +357,7 @@ Glossary Python object store. WebOb - `WebOb `_ is a WSGI request/response + `WebOb `_ is a WSGI request/response library created by Ian Bicking. PasteDeploy @@ -375,7 +375,7 @@ Glossary integrated support for loading a :term:`PasteDeploy` INI file. Chameleon - `chameleon `_ is an + `chameleon `_ is an attribute language template compiler which supports the :term:`ZPT` templating specification. It is written and maintained by Malthe Borch. It has several extensions, such as the ability to use bracketed (Mako-style) @@ -401,7 +401,7 @@ Glossary A `text templating language `_ by Armin Ronacher. Routes - A `system by Ben Bangert `_ + A `system by Ben Bangert `_ which parses URLs and compares them against a number of user defined mappings. The URL pattern matching syntax in :app:`Pyramid` is inspired by the Routes syntax (which was inspired by Ruby On Rails pattern syntax). @@ -500,7 +500,7 @@ Glossary information. repoze.who - `Authentication middleware `_ + `Authentication middleware `_ for :term:`WSGI` applications. It can be used by :app:`Pyramid` to provide authentication information. @@ -576,7 +576,7 @@ Glossary :ref:`adding_and_overriding_renderers` for more information. mod_wsgi - `mod_wsgi `_ is an Apache + `mod_wsgi `_ is an Apache module developed by Graham Dumpleton. It allows :term:`WSGI` applications (such as applications developed using :app:`Pyramid`) to be served using the Apache web server. @@ -1130,7 +1130,7 @@ Glossary The :term:`Python Packaging Authority` formerly recommended using the ``pyvenv`` command for `creating virtual environments on Python 3.4 and 3.5 - `_, + `_, but it was deprecated in 3.6 in favor of ``python3 -m venv`` on UNIX or ``python -m venv`` on Windows, which is backward compatible on Python 3.3 and greater. -- cgit v1.2.3 From 83a1c2a06f986fef1cdc3280b9d51310e071b298 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 3 Jul 2017 20:24:49 -0700 Subject: Add term "context manager" --- docs/glossary.rst | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index fe2d0977c..de68085d9 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -1203,3 +1203,6 @@ Glossary side effect A statement or function has a side effect when it changes a value outside its own scope. Put another way, if one can observe the change made by a function from outside that function, it has a side effect. + + context manager + A context manager is an object that defines the runtime context to be established when executing a :ref:`with ` statement in Python. The context manager handles the entry into, and the exit from, the desired runtime context for the execution of the block of code. Context managers are normally invoked using the ``with`` statement, but can also be used by directly invoking their methods. Pyramid adds context managers for :func:`pyramid.testing.testConfig`, :func:`pyramid.scripting.prepare`, and :class:`pyramid.config.Configurator`. \ No newline at end of file -- cgit v1.2.3 From 31888c9f17d926e6212a6b0227ab52f5448b0298 Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sat, 8 Jul 2017 18:21:00 -0500 Subject: update link to pastedeploy --- docs/glossary.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index fe2d0977c..54a9f8350 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -361,7 +361,7 @@ Glossary library created by Ian Bicking. PasteDeploy - `PasteDeploy `_ is a library used by + `PasteDeploy `_ is a library used by :app:`Pyramid` which makes it possible to configure :term:`WSGI` components together declaratively within an ``.ini`` file. It was developed by Ian Bicking. -- cgit v1.2.3 From 0958d268b4b5451c615e05b2b4657d2afb5a7cd4 Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Mon, 10 Jul 2017 00:24:17 -0700 Subject: Add pyramid.interfaces.IRouter.request_context and pyramid.paster.bootstrap - sort all Pyramid context managers --- docs/glossary.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index de68085d9..e80b31deb 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -1205,4 +1205,4 @@ Glossary Put another way, if one can observe the change made by a function from outside that function, it has a side effect. context manager - A context manager is an object that defines the runtime context to be established when executing a :ref:`with ` statement in Python. The context manager handles the entry into, and the exit from, the desired runtime context for the execution of the block of code. Context managers are normally invoked using the ``with`` statement, but can also be used by directly invoking their methods. Pyramid adds context managers for :func:`pyramid.testing.testConfig`, :func:`pyramid.scripting.prepare`, and :class:`pyramid.config.Configurator`. \ No newline at end of file + A context manager is an object that defines the runtime context to be established when executing a :ref:`with ` statement in Python. The context manager handles the entry into, and the exit from, the desired runtime context for the execution of the block of code. Context managers are normally invoked using the ``with`` statement, but can also be used by directly invoking their methods. Pyramid adds context managers for :class:`pyramid.config.Configurator`, :meth:`pyramid.interfaces.IRouter.request_context`, :func:`pyramid.paster.bootstrap`, :func:`pyramid.scripting.prepare`, and :func:`pyramid.testing.testConfig`. -- cgit v1.2.3 From a6aadf3386410f7d008de4fe9a6976a334fff0ac Mon Sep 17 00:00:00 2001 From: Steve Piercy Date: Sat, 15 Jul 2017 18:01:34 -0700 Subject: Add more references about context manager and `with` statement --- docs/glossary.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/glossary.rst') diff --git a/docs/glossary.rst b/docs/glossary.rst index 88be7f51d..7f1147fa1 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -1205,4 +1205,4 @@ Glossary Put another way, if one can observe the change made by a function from outside that function, it has a side effect. context manager - A context manager is an object that defines the runtime context to be established when executing a :ref:`with ` statement in Python. The context manager handles the entry into, and the exit from, the desired runtime context for the execution of the block of code. Context managers are normally invoked using the ``with`` statement, but can also be used by directly invoking their methods. Pyramid adds context managers for :class:`pyramid.config.Configurator`, :meth:`pyramid.interfaces.IRouter.request_context`, :func:`pyramid.paster.bootstrap`, :func:`pyramid.scripting.prepare`, and :func:`pyramid.testing.testConfig`. + A context manager is an object that defines the runtime context to be established when executing a :ref:`with ` statement in Python. The context manager handles the entry into, and the exit from, the desired runtime context for the execution of the block of code. Context managers are normally invoked using the ``with`` statement, but can also be used by directly invoking their methods. Pyramid adds context managers for :class:`pyramid.config.Configurator`, :meth:`pyramid.interfaces.IRouter.request_context`, :func:`pyramid.paster.bootstrap`, :func:`pyramid.scripting.prepare`, and :func:`pyramid.testing.testConfig`. See also the Python documentation for :ref:`With Statement Context Managers ` and :pep:`343`. -- cgit v1.2.3