'Indicate that application or test configuration has begun.
This pushes a dictionary containing the :term:`application
registry` implied by ``registry`` attribute of this
configurator and the :term:`request` implied by the
``request`` argument onto the :term:`thread local` stack
consulted by various :mod:`pyramid.threadlocal` API
functions.
If ``request`` is not specified and the registry owned by the
configurator is already pushed as the current threadlocal registry
then this method will keep the current threadlocal request unchanged.
.. versionchanged:: 1.8
The current threadlocal request is propagated if the current
threadlocal registry remains unchanged.'

def begin(self, request=_marker):

    if (request is _marker):
        current = self.manager.get()
        if (current['registry'] == self.registry):
            request = current['request']
        else:
            request = None
    self.manager.push({'registry': self.registry, 'request': request})
