internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: Pylons/pyramid

Issue:
Update to Sphinx 1.3.4 when released
There is a [bug in Sphinx 1.3.3 and 1.3.1](https://github.com/sphinx-doc/sphinx/issues/2189) (I haven't tried 1.3.2) where next and previous links in Sphinx documentation are broken when going into children and across sibling directories.

When 1.3.4 is released, we need to pin sphinx to 1.3.4, which will include the commit made 8 days after the 1.3.3 release.



Discussion:
[Sphinx 1.3.4 has been released](https://pypi.python.org/pypi/Sphinx).


Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -56,7 +56,7 @@
     tests_require.append('zope.component>=3.11.0')
 
 docs_extras = [
-    'Sphinx >= 1.3.1',
+    'Sphinx >= 1.3.4',
     'docutils',
     'repoze.sphinx.autointerface',
     'pylons_sphinx_latesturl',


Test patch:
Repository: Pylons/pyramid

Issue:
pyobject truncates code at comment
See https://github.com/sphinx-doc/sphinx/issues/2253

Example rendered docs:
http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tour.html#handling-web-requests-and-responses

rst syntax:
https://github.com/Pylons/pyramid/blame/master/docs/quick_tour.rst#L119-L120

Source code:
https://github.com/Pylons/pyramid/blob/master/docs/quick_tour/requests/app.py#L7

When the bug is fixed and released, we will need to:
- revert the source code sample to use `#` style comments
- bump up the Sphinx version



Discussion:
This is fixed in Sphinx 1.3.5, scheduled for release by Jan 23, 2016.
https://github.com/sphinx-doc/sphinx/milestones


Resolving patch:
diff --git a/docs/quick_tour/requests/app.py b/docs/quick_tour/requests/app.py
--- a/docs/quick_tour/requests/app.py
+++ b/docs/quick_tour/requests/app.py
@@ -4,7 +4,7 @@
 
 
 def hello_world(request):
-    """ Some parameters from a request such as /?name=lisa """
+    # Some parameters from a request such as /?name=lisa
     url = request.url
     name = request.params.get('name', 'No Name Provided')
 
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -57,7 +57,7 @@
     tests_require.append('zope.component>=3.11.0')
 
 docs_extras = [
-    'Sphinx >= 1.3.4',
+    'Sphinx >= 1.3.5',
     'docutils',
     'repoze.sphinx.autointerface',
     'pylons_sphinx_latesturl',


Test patch:
Repository: Pylons/pyramid

Issue:
pyobject truncates code at comment
See https://github.com/sphinx-doc/sphinx/issues/2253

Example rendered docs:
http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tour.html#handling-web-requests-and-responses

rst syntax:
https://github.com/Pylons/pyramid/blame/master/docs/quick_tour.rst#L119-L120

Source code:
https://github.com/Pylons/pyramid/blob/master/docs/quick_tour/requests/app.py#L7

When the bug is fixed and released, we will need to:
- revert the source code sample to use `#` style comments
- bump up the Sphinx version



Discussion:
This is fixed in Sphinx 1.3.5, scheduled for release by Jan 23, 2016.
https://github.com/sphinx-doc/sphinx/milestones


Resolving patch:
diff --git a/docs/quick_tour/requests/app.py b/docs/quick_tour/requests/app.py
--- a/docs/quick_tour/requests/app.py
+++ b/docs/quick_tour/requests/app.py
@@ -4,7 +4,7 @@
 
 
 def hello_world(request):
-    """ Some parameters from a request such as /?name=lisa """
+    # Some parameters from a request such as /?name=lisa
     url = request.url
     name = request.params.get('name', 'No Name Provided')
 
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -56,7 +56,7 @@
     tests_require.append('zope.component>=3.11.0')
 
 docs_extras = [
-    'Sphinx >= 1.3.4',
+    'Sphinx >= 1.3.5',
     'docutils',
     'repoze.sphinx.autointerface',
     'pylons_sphinx_latesturl',


Test patch:
Repository: Pylons/pyramid

Issue:
pcreate -s shows wrong link to tutorials
after a 

```
pcreate -s alchemy scaffold-alchemy
```

I see a link to tutorials, but this link is a 404: 

```
Tutorials: http://docs.pylonsproject.org/projects/pyramid_tutorials
```



Discussion:
@COLABORATI, this does not appear in Pyramid 1.7. Which version are you using?

Ah, you mean on the command line, not in the web page after you run. I'm working on this now. PR coming.


Resolving patch:
diff --git a/pyramid/scaffolds/__init__.py b/pyramid/scaffolds/__init__.py
--- a/pyramid/scaffolds/__init__.py
+++ b/pyramid/scaffolds/__init__.py
@@ -35,11 +35,10 @@ def post(self, command, output_dir, vars): # pragma: no cover
         msg = dedent(
             """
             %(separator)s
-            Tutorials: http://docs.pylonsproject.org/projects/pyramid_tutorials
-            Documentation: http://docs.pylonsproject.org/projects/pyramid
-
-            Twitter (tips & updates): http://twitter.com/pylons
-            Mailing List: http://groups.google.com/group/pylons-discuss
+            Tutorials:     http://docs.pylonsproject.org/projects/pyramid_tutorials/en/latest/
+            Documentation: http://docs.pylonsproject.org/projects/pyramid/en/latest/
+            Twitter:       https://twitter.com/trypyramid
+            Mailing List:  https://groups.google.com/forum/#!forum/pylons-discuss
 
             Welcome to Pyramid.  Sorry for the convenience.
             %(separator)s
@@ -53,12 +52,13 @@ def out(self, msg): # pragma: no cover (replaceable testing hook)
 
 class StarterProjectTemplate(PyramidTemplate):
     _template_dir = 'starter'
-    summary = 'Pyramid starter project'
+    summary = 'Pyramid starter project using URL dispatch and Chameleon'
 
 class ZODBProjectTemplate(PyramidTemplate):
     _template_dir = 'zodb'
-    summary = 'Pyramid ZODB project using traversal'
+    summary = 'Pyramid project using ZODB, traversal, and Chameleon'
 
 class AlchemyProjectTemplate(PyramidTemplate):
     _template_dir = 'alchemy'
-    summary = 'Pyramid SQLAlchemy project using url dispatch'
+    summary = 'Pyramid project using SQLAlchemy, SQLite, URL dispatch, and'
+    ' Chameleon'


Test patch:
Repository: Pylons/pyramid

Issue:
reify docstring doesn't render properly
The testsetup section is omitted from the rendered docs at http://pyramid.readthedocs.io/en/latest/api/decorator.html#pyramid.decorator.reify

Unfortunately this section is essential for understanding the example.



Discussion:

Resolving patch:
diff --git a/pyramid/decorator.py b/pyramid/decorator.py
--- a/pyramid/decorator.py
+++ b/pyramid/decorator.py
@@ -8,6 +8,16 @@ class reify(object):
     replacing the function it decorates with an instance variable.  It is, in
     Python parlance, a non-data descriptor.  An example:
 
+    .. code-block:: python
+
+        from pyramid.decorator import reify
+
+        class Foo(object):
+            @reify
+            def jammy(self):
+                print('jammy called')
+                return 1
+
     .. testsetup::
 
         from pyramid.decorator import reify


Test patch:
Repository: Pylons/pyramid

Issue:
Drop Python 3.3 support
This is a placeholder for Pyramid 1.8 to drop Python 3.3 support.

Creating a new issue, splitting it off from https://github.com/Pylons/pyramid/issues/2368.



Discussion:

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -18,16 +18,15 @@
 from setuptools import setup, find_packages
 
 py_version = sys.version_info[:2]
-is_pypy = '__pypy__' in sys.builtin_module_names
 
 PY3 = py_version[0] == 3
 
 if PY3:
-    if py_version < (3, 3) and not is_pypy: # PyPy3 masquerades as Python 3.2...
-        raise RuntimeError('On Python 3, Pyramid requires Python 3.3 or better')
+    if py_version < (3, 4):
+        raise RuntimeError('On Python 3, Pyramid requires Python 3.4 or better')
 else:
-    if py_version < (2, 6):
-        raise RuntimeError('On Python 2, Pyramid requires Python 2.6 or better')
+    if py_version < (2, 7):
+        raise RuntimeError('On Python 2, Pyramid requires Python 2.7 or better')
 
 here = os.path.abspath(os.path.dirname(__file__))
 try:
@@ -81,7 +80,6 @@
           "Programming Language :: Python",
           "Programming Language :: Python :: 2.7",
           "Programming Language :: Python :: 3",
-          "Programming Language :: Python :: 3.3",
           "Programming Language :: Python :: 3.4",
           "Programming Language :: Python :: 3.5",
           "Programming Language :: Python :: Implementation :: CPython",


Test patch:
Repository: Pylons/pyramid

Issue:
scaffolds can be run more than once
```
env/bin/pcreate -s starter myproj
env/bin/pcreate -s alchemy myproj
cd myproj
../env/bin/python setup.py develop
# horrible errors because the dependencies required for the alchemy scaffold
# were not installed because the second pcreate did not overwrite the setup.py file
```

We need to either make the pcreate output more interactive and obvious that you are running a scaffold on top of another scaffold or prevent running pcreate on a directory that already exists.



Discussion:
Could this be as simple as checking if the directory already exists and if so prompting the user to overwrite the contents or not? If the user does not wish to overwrite the contents then the command raises an exception stating that a directory already exists and to choose another name for the project.


Resolving patch:
diff --git a/pyramid/scripts/pcreate.py b/pyramid/scripts/pcreate.py
--- a/pyramid/scripts/pcreate.py
+++ b/pyramid/scripts/pcreate.py
@@ -56,7 +56,9 @@ class PCreateCommand(object):
     parser.add_option('--interactive',
                       dest='interactive',
                       action='store_true',
-                      help='When a file would be overwritten, interrogate')
+                      help='When a file would be overwritten, interrogate '
+                           '(this is the default, but you may specify it to '
+                           'override --overwrite)')
     parser.add_option('--ignore-conflicting-name',
                       dest='force_bad_name',
                       action='store_true',
@@ -70,6 +72,8 @@ class PCreateCommand(object):
     def __init__(self, argv, quiet=False):
         self.quiet = quiet
         self.options, self.args = self.parser.parse_args(argv[1:])
+        if not self.options.interactive and not self.options.overwrite:
+            self.options.interactive = True
         self.scaffolds = self.all_scaffolds()
 
     def run(self):


Test patch:
Repository: Pylons/pyramid

Issue:
`AllPermissionsList.__iter__` returns tuple(). Should return iter(tuple())?
My understanding is that __iter__ should [return an iterator object](https://docs.python.org/3.5/library/stdtypes.html#container.__iter__).

However, [`AllPermissionsList.__iter__`](https://github.com/Pylons/pyramid/blob/master/pyramid/security.py#L25) returns `()`.

Indeed, this raises a TypeError as expected:
```
In [1]: from pyramid.security import ALL_PERMISSIONS

In [2]: iter(ALL_PERMISSIONS)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-22-f8a3d5a1d337> in <module>()
----> 1 iter(ALL_PERMISSIONS)

TypeError: iter() returned non-iterator of type 'tuple'
```

Lastly, I don't see where this method is used in Pyramid. Should this code (the `__iter__` method on `AllPermissionsList`) even exist?


Discussion:

Resolving patch:
diff --git a/pyramid/security.py b/pyramid/security.py
--- a/pyramid/security.py
+++ b/pyramid/security.py
@@ -21,10 +21,13 @@
 
 class AllPermissionsList(object):
     """ Stand in 'permission list' to represent all permissions """
+
     def __iter__(self):
-        return ()
+        return iter(())
+
     def __contains__(self, other):
         return True
+
     def __eq__(self, other):
         return isinstance(other, self.__class__)
 


Test patch:
diff --git a/pyramid/tests/test_security.py b/pyramid/tests/test_security.py
--- a/pyramid/tests/test_security.py
+++ b/pyramid/tests/test_security.py
@@ -16,12 +16,32 @@ def _getTargetClass(self):
     def _makeOne(self):
         return self._getTargetClass()()
 
-    def test_it(self):
+    def test_equality_w_self(self):
         thing = self._makeOne()
         self.assertTrue(thing.__eq__(thing))
-        self.assertEqual(thing.__iter__(), ())
+
+    def test_equality_w_other_instances_of_class(self):
+        thing = self._makeOne()
+        other = self._makeOne()
+        self.assertTrue(thing.__eq__(other))
+
+    def test_equality_miss(self):
+        thing = self._makeOne()
+        other = object()
+        self.assertFalse(thing.__eq__(other))
+
+    def test_contains_w_string(self):
+        thing = self._makeOne()
         self.assertTrue('anything' in thing)
 
+    def test_contains_w_object(self):
+        thing = self._makeOne()
+        self.assertTrue(object() in thing)
+
+    def test_iterable(self):
+        thing = self._makeOne()
+        self.assertEqual(list(thing), [])
+
     def test_singleton(self):
         from pyramid.security import ALL_PERMISSIONS
         self.assertEqual(ALL_PERMISSIONS.__class__, self._getTargetClass())
Repository: Pylons/pyramid

Issue:
moved intersphinx references
When building the docs these messages are output. We should update them in supported branches.

```
intersphinx inventory has moved: https://pytest.org/en/latest/objects.inv -> https://docs.pytest.org/en/latest/objects.inv
intersphinx inventory has moved: http://repozewho.readthedocs.org/en/latest/objects.inv -> http://repozewho.readthedocs.io/en/latest/objects.inv
```


Discussion:

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -70,7 +70,7 @@ def nothing(*arg):
     'plaster': ('http://docs.pylonsproject.org/projects/plaster/en/latest/', None),
     'pylonswebframework': ('http://docs.pylonsproject.org/projects/pylons-webframework/en/latest/', None),
     'python': ('https://docs.python.org/3', None),
-    'pytest': ('https://pytest.org/en/latest/', None),
+    'pytest': ('https://docs.pytest.org/en/latest/', None),
     'sphinx': ('http://www.sphinx-doc.org/en/latest', None),
     'sqla': ('http://docs.sqlalchemy.org/en/latest', None),
     'tm': ('http://docs.pylonsproject.org/projects/pyramid-tm/en/latest/', None),
@@ -80,7 +80,7 @@ def nothing(*arg):
     'venusian': ('http://docs.pylonsproject.org/projects/venusian/en/latest', None),
     'webob': ('http://docs.webob.org/en/latest', None),
     'webtest': ('http://webtest.pythonpaste.org/en/latest', None),
-    'who': ('http://repozewho.readthedocs.org/en/latest', None),
+    'who': ('http://repozewho.readthedocs.io/en/latest', None),
     'zcml': ('http://docs.pylonsproject.org/projects/pyramid-zcml/en/latest', None),
     'zcomponent': ('http://zopecomponent.readthedocs.io/en/latest/', None),
     'zinterface': ('http://zopeinterface.readthedocs.io/en/latest/', None),


Test patch:
Repository: Pylons/pyramid

Issue:
moved intersphinx references
When building the docs these messages are output. We should update them in supported branches.

```
intersphinx inventory has moved: https://pytest.org/en/latest/objects.inv -> https://docs.pytest.org/en/latest/objects.inv
intersphinx inventory has moved: http://repozewho.readthedocs.org/en/latest/objects.inv -> http://repozewho.readthedocs.io/en/latest/objects.inv
```


Discussion:

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -69,7 +69,7 @@ def nothing(*arg):
     'jinja2': ('http://docs.pylonsproject.org/projects/pyramid-jinja2/en/latest/', None),
     'pylonswebframework': ('http://docs.pylonsproject.org/projects/pylons-webframework/en/latest/', None),
     'python': ('https://docs.python.org/3', None),
-    'pytest': ('https://pytest.org/en/latest/', None),
+    'pytest': ('https://docs.pytest.org/en/latest/', None),
     'sphinx': ('http://www.sphinx-doc.org/en/latest', None),
     'sqla': ('http://docs.sqlalchemy.org/en/latest', None),
     'tm': ('http://docs.pylonsproject.org/projects/pyramid-tm/en/latest/', None),
@@ -79,7 +79,7 @@ def nothing(*arg):
     'venusian': ('http://docs.pylonsproject.org/projects/venusian/en/latest', None),
     'webob': ('http://docs.webob.org/en/latest', None),
     'webtest': ('http://webtest.pythonpaste.org/en/latest', None),
-    'who': ('http://repozewho.readthedocs.org/en/latest', None),
+    'who': ('http://repozewho.readthedocs.io/en/latest', None),
     'zcml': ('http://docs.pylonsproject.org/projects/pyramid-zcml/en/latest', None),
     'zcomponent': ('http://zopecomponent.readthedocs.io/en/latest/', None),
     'zinterface': ('http://zopeinterface.readthedocs.io/en/latest/', None),


Test patch:
Repository: Pylons/pyramid

Issue:
moved intersphinx references
When building the docs these messages are output. We should update them in supported branches.

```
intersphinx inventory has moved: https://pytest.org/en/latest/objects.inv -> https://docs.pytest.org/en/latest/objects.inv
intersphinx inventory has moved: http://repozewho.readthedocs.org/en/latest/objects.inv -> http://repozewho.readthedocs.io/en/latest/objects.inv
```


Discussion:

Resolving patch:
diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -67,7 +67,7 @@ def nothing(*arg):
     'jinja2': ('http://docs.pylonsproject.org/projects/pyramid-jinja2/en/latest/', None),
     'pylonswebframework': ('http://docs.pylonsproject.org/projects/pylons-webframework/en/latest/', None),
     'python': ('https://docs.python.org/3', None),
-    'pytest': ('https://pytest.org/en/latest/', None),
+    'pytest': ('https://docs.pytest.org/en/latest/', None),
     'sqla': ('http://docs.sqlalchemy.org/en/latest', None),
     'tm': ('http://docs.pylonsproject.org/projects/pyramid-tm/en/latest/', None),
     'toolbar': ('http://docs.pylonsproject.org/projects/pyramid-debugtoolbar/en/latest', None),
@@ -76,9 +76,9 @@ def nothing(*arg):
     'venusian': ('http://docs.pylonsproject.org/projects/venusian/en/latest', None),
     'webob': ('http://docs.webob.org/en/latest', None),
     'webtest': ('http://webtest.pythonpaste.org/en/latest', None),
-    'who': ('http://repozewho.readthedocs.org/en/latest', None),
+    'who': ('http://repozewho.readthedocs.io/en/latest', None),
     'zcml': ('http://docs.pylonsproject.org/projects/pyramid-zcml/en/latest', None),
-    'zcomponent': ('http://zopecomponent.readthedocs.io/en/stable/', None),
+    'zcomponent': ('http://zopecomponent.readthedocs.io/en/latest/', None),
 }
 
 


Test patch:
Repository: Pylons/pyramid

Issue:
add_request_method only accepts property descriptor that subclasses property
https://github.com/Pylons/pyramid/blob/cc6a6ed60260b0391aa38f372b26311d58edf0d6/pyramid/util.py#L70

Looks like we check the type of a property descriptor by `isinstance(callable, property)`. This is not true for property descriptors subclasses from `object` which is pretty common. Maybe we should document this behavior [here](https://docs.pylonsproject.org/projects/pyramid/en/latest/api/config.html#pyramid.config.Configurator.add_request_method).



Discussion:

Resolving patch:
diff --git a/pyramid/config/factories.py b/pyramid/config/factories.py
--- a/pyramid/config/factories.py
+++ b/pyramid/config/factories.py
@@ -144,9 +144,10 @@ def add_request_method(self,
 
         When adding a property to the request, ``callable`` can either
         be a callable that accepts the request as its single positional
-        parameter, or it can be a property descriptor. If ``name`` is
-        ``None``, the name of the property will be computed from the
-        name of the ``callable``.
+        parameter, or it can be a property descriptor. If ``callable`` is
+        a property descriptor, it has to be an instance of a class which is
+        a subclass of ``property``. If ``name`` is ``None``, the name of
+        the property will be computed from the name of the ``callable``.
 
         If the ``callable`` is a property descriptor a ``ValueError``
         will be raised if ``name`` is ``None`` or ``reify`` is ``True``.


Test patch:
Repository: Pylons/pyramid

Issue:
Bump Sphinx to >=1.7.2
Would anyone be opposed to bumping Sphinx to >=1.7.2, != 1.7.3 in `setup.py`? I really want our PDFs to have `emphasize-lines` support, at long last, and bring in support for Unicode characters in PDFs via xelatex.

Refs:
* #667
* #2572
* https://github.com/rtfd/readthedocs.org/issues/4015



Discussion:
That's fine but I'm -1 on backporting it to older release branches.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -40,7 +40,7 @@ def readfile(name):
 
 
 docs_extras = [
-    'Sphinx >= 1.3.5, != 1.7.3',
+    'Sphinx >= 1.7.4',
     'docutils',
     'repoze.sphinx.autointerface',
     'pylons_sphinx_latesturl',


Test patch:
Repository: Pylons/pyramid

Issue:
Bump Sphinx to >=1.7.2
Would anyone be opposed to bumping Sphinx to >=1.7.2, != 1.7.3 in `setup.py`? I really want our PDFs to have `emphasize-lines` support, at long last, and bring in support for Unicode characters in PDFs via xelatex.

Refs:
* #667
* #2572
* https://github.com/rtfd/readthedocs.org/issues/4015



Discussion:
That's fine but I'm -1 on backporting it to older release branches.

Resolving patch:
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -46,7 +46,7 @@
 
 
 docs_extras = [
-    'Sphinx >= 1.3.5, != 1.7.3',
+    'Sphinx >= 1.7.4',
     'docutils',
     'repoze.sphinx.autointerface',
     'pylons_sphinx_latesturl',


Test patch:
Repository: Pylons/pyramid

Issue:
add a way for get_renderer to avoid threadlocals
It should be as simple as adding a `registry=None` arg to `get_renderer` and forwarding that value to the `RendererHelper` and adding a test to exercise it.


Discussion:

Resolving patch:
diff --git a/pyramid/renderers.py b/pyramid/renderers.py
--- a/pyramid/renderers.py
+++ b/pyramid/renderers.py
@@ -147,7 +147,7 @@ def render_to_response(renderer_name,
 
     return result
 
-def get_renderer(renderer_name, package=None):
+def get_renderer(renderer_name, package=None, registry=None):
     """ Return the renderer object for the renderer ``renderer_name``.
 
     You may supply a relative asset spec as ``renderer_name``.  If
@@ -157,10 +157,16 @@ def get_renderer(renderer_name, package=None):
     asset specification ``renderer_name``.  If ``package`` is ``None``
     (the default), the package name of the *caller* of this function
     will be used as the package.
+
+    You may directly supply an :term:`application registry` using the
+    ``registry`` argument, and it will be used to look up the renderer.
+    Otherwise, the current thread-local registry (obtained via
+    :func:`~pyramid.threadlocal.get_current_registry`) will be used.
     """
     if package is None:
         package = caller_package()
-    helper = RendererHelper(name=renderer_name, package=package)
+    helper = RendererHelper(name=renderer_name, package=package,
+                            registry=registry)
     return helper.renderer
 
 # concrete renderer factory implementations (also API)


Test patch:
diff --git a/pyramid/tests/test_renderers.py b/pyramid/tests/test_renderers.py
--- a/pyramid/tests/test_renderers.py
+++ b/pyramid/tests/test_renderers.py
@@ -624,6 +624,20 @@ def test_it_with_package(self):
         result = self._callFUT('abc/def.pt', package=pyramid.tests)
         self.assertEqual(result, renderer)
 
+    def test_it_with_registry(self):
+        renderer = self.config.testing_add_renderer(
+            'pyramid.tests:abc/def.pt')
+        result = self._callFUT('abc/def.pt', registry=self.config.registry)
+        self.assertEqual(result, renderer)
+
+    def test_it_with_isolated_registry(self):
+        from pyramid.config import Configurator
+        isolated_config = Configurator()
+        renderer = isolated_config.testing_add_renderer(
+            'pyramid.tests:abc/def.pt')
+        result = self._callFUT('abc/def.pt', registry=isolated_config.registry)
+        self.assertEqual(result, renderer)
+
 class TestJSONP(unittest.TestCase):
     def _makeOne(self, param_name='callback'):
         from pyramid.renderers import JSONP