diff options
| -rw-r--r-- | docs/narr/threadlocals.rst | 3 | ||||
| -rw-r--r-- | pyramid/threadlocal.py | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/docs/narr/threadlocals.rst b/docs/narr/threadlocals.rst index 909f643a0..5ff70565c 100644 --- a/docs/narr/threadlocals.rst +++ b/docs/narr/threadlocals.rst @@ -62,8 +62,7 @@ Because one :app:`Pyramid` application is permitted to call (perhaps as a :term:`WSGI` app with help from the :func:`pyramid.wsgi.wsgiapp2` decorator), these variables are managed in a *stack* during normal system operations. The stack -instance itself is a `threading.local -<http://docs.python.org/library/threading.html#threading.local>`_. +instance itself is a :class:`threading.local`. During normal operations, the thread locals stack is managed by a :term:`Router` object. At the beginning of a request, the Router diff --git a/pyramid/threadlocal.py b/pyramid/threadlocal.py index 3a15e6e3a..638f7b7b0 100644 --- a/pyramid/threadlocal.py +++ b/pyramid/threadlocal.py @@ -52,7 +52,7 @@ def get_current_registry(context=None): # context required by getSiteManager API global application registry if no request is currently active. This function should be used *extremely sparingly*, usually only - in unit testing code. it's almost always usually a mistake to use + in unit testing code. It's almost always usually a mistake to use ``get_current_registry`` outside a testing context because its usage makes it possible to write code that can be neither easily tested nor scripted. |
