We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN 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.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 ##############################################################################
2 #
3 # Copyright (c) 2008-2013 Agendaless Consulting and Contributors.
4 # All Rights Reserved.
5 #
6 # This software is subject to the provisions of the BSD-like license at
7 # http://www.repoze.org/LICENSE.txt.  A copy of the license should accompany
8 # this distribution.  THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL
9 # EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO,
10 # THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND
11 # FITNESS FOR A PARTICULAR PURPOSE
12 #
13 ##############################################################################
14 
15 import os
16 import sys
17 
18 from setuptools import setup, find_packages
19 
20 py_version = sys.version_info[:2]
21 
22 PY3 = py_version[0] == 3
23 
24 if PY3:
25     if py_version < (3, 2):
26         raise RuntimeError('On Python 3, Pyramid requires Python 3.2 or better')
27 else:
28     if py_version < (2, 6):
29         raise RuntimeError('On Python 2, Pyramid requires Python 2.6 or better')
30 
31 here = os.path.abspath(os.path.dirname(__file__))
32 try:
33     with open(os.path.join(here, 'README.rst')) as f:
34         README = f.read()
35     with open(os.path.join(here, 'CHANGES.txt')) as f:
36         CHANGES = f.read()
37 except IOError:
38     README = CHANGES = ''
39 
40 install_requires=[
41     'setuptools',
42     'WebOb >= 1.3.1', # request.domain and CookieProfile
43     'repoze.lru >= 0.4', # py3 compat
44     'zope.interface >= 3.8.0',  # has zope.interface.registry
45     'zope.deprecation >= 3.5.0', # py3 compat
46     'venusian >= 1.0a3', # ``ignore``
47     'translationstring >= 0.4', # py3 compat
48     'PasteDeploy >= 1.5.0', # py3 compat
49     ]
50 
51 tests_require = [
52     'WebTest >= 1.3.1', # py3 compat
53     ]
54 
55 if not PY3:
56     tests_require.append('zope.component>=3.11.0')
57 
58 docs_extras = [
59     'Sphinx >= 1.3.1',
60     'docutils',
61     'repoze.sphinx.autointerface',
62     'pylons_sphinx_latesturl',
63     'pylons-sphinx-themes',
64     'sphinxcontrib-programoutput',
65     ]
66 
67 testing_extras = tests_require + [
68     'nose',
69     'coverage',
70     'virtualenv', # for scaffolding tests
71     ]
72 
73 setup(name='pyramid',
74       version='1.7.dev0',
75       description='The Pyramid Web Framework, a Pylons project',
76       long_description=README + '\n\n' +  CHANGES,
77       classifiers=[
78         "Development Status :: 6 - Mature",
79         "Intended Audience :: Developers",
80         "Programming Language :: Python",
81         "Programming Language :: Python :: 2.6",
82         "Programming Language :: Python :: 2.7",
83         "Programming Language :: Python :: 3",
84         "Programming Language :: Python :: 3.2",
85         "Programming Language :: Python :: 3.3",
86         "Programming Language :: Python :: 3.4",
87         "Programming Language :: Python :: 3.5",
88         "Programming Language :: Python :: Implementation :: CPython",
89         "Programming Language :: Python :: Implementation :: PyPy",
90         "Framework :: Pyramid",
91         "Topic :: Internet :: WWW/HTTP",
92         "Topic :: Internet :: WWW/HTTP :: WSGI",
93         "License :: Repoze Public License",
94         ],
95       keywords='web wsgi pylons pyramid',
96       author="Chris McDonough, Agendaless Consulting",
97       author_email="pylons-discuss@googlegroups.com",
98       url="http://docs.pylonsproject.org/en/latest/docs/pyramid.html",
99       license="BSD-derived (http://www.repoze.org/LICENSE.txt)",
100       packages=find_packages(),
101       include_package_data=True,
102       zip_safe=False,
103       install_requires = install_requires,
104       extras_require = {
105           'testing':testing_extras,
106           'docs':docs_extras,
107           },
108       tests_require = tests_require,
109       test_suite="pyramid.tests",
110       entry_points = """\
111         [pyramid.scaffold]
112         starter=pyramid.scaffolds:StarterProjectTemplate
113         zodb=pyramid.scaffolds:ZODBProjectTemplate
114         alchemy=pyramid.scaffolds:AlchemyProjectTemplate
115         [pyramid.pshell_runner]
116         python=pyramid.scripts.pshell:python_shell_runner
117         [console_scripts]
118         pcreate = pyramid.scripts.pcreate:main
119         pserve = pyramid.scripts.pserve:main
120         pshell = pyramid.scripts.pshell:main
121         proutes = pyramid.scripts.proutes:main
122         pviews = pyramid.scripts.pviews:main
123         ptweens = pyramid.scripts.ptweens:main
124         prequest = pyramid.scripts.prequest:main
125         pdistreport = pyramid.scripts.pdistreport:main
126         [paste.server_runner]
127         wsgiref = pyramid.scripts.pserve:wsgiref_server_runner
128         cherrypy = pyramid.scripts.pserve:cherrypy_server_runner
129       """
130       )
131 
132
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

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',

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -56,7 +56,7 @@\n     tests_require.append('zope.component>=3.11.0')\n \n docs_extras = [\n-    'Sphinx >= 1.3.1',\n+    'Sphinx >= 1.3.4',\n     'docutils',\n     'repoze.sphinx.autointerface',\n     'pylons_sphinx_latesturl',\n", "issue": "Update to Sphinx 1.3.4 when released\nThere 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.\n\nWhen 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.\n\n", "before_files": [{"content": "##############################################################################\n#\n# Copyright (c) 2008-2013 Agendaless Consulting and Contributors.\n# All Rights Reserved.\n#\n# This software is subject to the provisions of the BSD-like license at\n# http://www.repoze.org/LICENSE.txt.  A copy of the license should accompany\n# this distribution.  THIS SOFTWARE IS PROVIDED \"AS IS\" AND ANY AND ALL\n# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO,\n# THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND\n# FITNESS FOR A PARTICULAR PURPOSE\n#\n##############################################################################\n\nimport os\nimport sys\n\nfrom setuptools import setup, find_packages\n\npy_version = sys.version_info[:2]\n\nPY3 = py_version[0] == 3\n\nif PY3:\n    if py_version < (3, 2):\n        raise RuntimeError('On Python 3, Pyramid requires Python 3.2 or better')\nelse:\n    if py_version < (2, 6):\n        raise RuntimeError('On Python 2, Pyramid requires Python 2.6 or better')\n\nhere = os.path.abspath(os.path.dirname(__file__))\ntry:\n    with open(os.path.join(here, 'README.rst')) as f:\n        README = f.read()\n    with open(os.path.join(here, 'CHANGES.txt')) as f:\n        CHANGES = f.read()\nexcept IOError:\n    README = CHANGES = ''\n\ninstall_requires=[\n    'setuptools',\n    'WebOb >= 1.3.1', # request.domain and CookieProfile\n    'repoze.lru >= 0.4', # py3 compat\n    'zope.interface >= 3.8.0',  # has zope.interface.registry\n    'zope.deprecation >= 3.5.0', # py3 compat\n    'venusian >= 1.0a3', # ``ignore``\n    'translationstring >= 0.4', # py3 compat\n    'PasteDeploy >= 1.5.0', # py3 compat\n    ]\n\ntests_require = [\n    'WebTest >= 1.3.1', # py3 compat\n    ]\n\nif not PY3:\n    tests_require.append('zope.component>=3.11.0')\n\ndocs_extras = [\n    'Sphinx >= 1.3.1',\n    'docutils',\n    'repoze.sphinx.autointerface',\n    'pylons_sphinx_latesturl',\n    'pylons-sphinx-themes',\n    'sphinxcontrib-programoutput',\n    ]\n\ntesting_extras = tests_require + [\n    'nose',\n    'coverage',\n    'virtualenv', # for scaffolding tests\n    ]\n\nsetup(name='pyramid',\n      version='1.7.dev0',\n      description='The Pyramid Web Framework, a Pylons project',\n      long_description=README + '\\n\\n' +  CHANGES,\n      classifiers=[\n        \"Development Status :: 6 - Mature\",\n        \"Intended Audience :: Developers\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 2.6\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.2\",\n        \"Programming Language :: Python :: 3.3\",\n        \"Programming Language :: Python :: 3.4\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Programming Language :: Python :: Implementation :: PyPy\",\n        \"Framework :: Pyramid\",\n        \"Topic :: Internet :: WWW/HTTP\",\n        \"Topic :: Internet :: WWW/HTTP :: WSGI\",\n        \"License :: Repoze Public License\",\n        ],\n      keywords='web wsgi pylons pyramid',\n      author=\"Chris McDonough, Agendaless Consulting\",\n      author_email=\"pylons-discuss@googlegroups.com\",\n      url=\"http://docs.pylonsproject.org/en/latest/docs/pyramid.html\",\n      license=\"BSD-derived (http://www.repoze.org/LICENSE.txt)\",\n      packages=find_packages(),\n      include_package_data=True,\n      zip_safe=False,\n      install_requires = install_requires,\n      extras_require = {\n          'testing':testing_extras,\n          'docs':docs_extras,\n          },\n      tests_require = tests_require,\n      test_suite=\"pyramid.tests\",\n      entry_points = \"\"\"\\\n        [pyramid.scaffold]\n        starter=pyramid.scaffolds:StarterProjectTemplate\n        zodb=pyramid.scaffolds:ZODBProjectTemplate\n        alchemy=pyramid.scaffolds:AlchemyProjectTemplate\n        [pyramid.pshell_runner]\n        python=pyramid.scripts.pshell:python_shell_runner\n        [console_scripts]\n        pcreate = pyramid.scripts.pcreate:main\n        pserve = pyramid.scripts.pserve:main\n        pshell = pyramid.scripts.pshell:main\n        proutes = pyramid.scripts.proutes:main\n        pviews = pyramid.scripts.pviews:main\n        ptweens = pyramid.scripts.ptweens:main\n        prequest = pyramid.scripts.prequest:main\n        pdistreport = pyramid.scripts.pdistreport:main\n        [paste.server_runner]\n        wsgiref = pyramid.scripts.pserve:wsgiref_server_runner\n        cherrypy = pyramid.scripts.pserve:cherrypy_server_runner\n      \"\"\"\n      )\n\n", "path": "setup.py"}], "after_files": [{"content": "##############################################################################\n#\n# Copyright (c) 2008-2013 Agendaless Consulting and Contributors.\n# All Rights Reserved.\n#\n# This software is subject to the provisions of the BSD-like license at\n# http://www.repoze.org/LICENSE.txt.  A copy of the license should accompany\n# this distribution.  THIS SOFTWARE IS PROVIDED \"AS IS\" AND ANY AND ALL\n# EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO,\n# THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND\n# FITNESS FOR A PARTICULAR PURPOSE\n#\n##############################################################################\n\nimport os\nimport sys\n\nfrom setuptools import setup, find_packages\n\npy_version = sys.version_info[:2]\n\nPY3 = py_version[0] == 3\n\nif PY3:\n    if py_version < (3, 2):\n        raise RuntimeError('On Python 3, Pyramid requires Python 3.2 or better')\nelse:\n    if py_version < (2, 6):\n        raise RuntimeError('On Python 2, Pyramid requires Python 2.6 or better')\n\nhere = os.path.abspath(os.path.dirname(__file__))\ntry:\n    with open(os.path.join(here, 'README.rst')) as f:\n        README = f.read()\n    with open(os.path.join(here, 'CHANGES.txt')) as f:\n        CHANGES = f.read()\nexcept IOError:\n    README = CHANGES = ''\n\ninstall_requires=[\n    'setuptools',\n    'WebOb >= 1.3.1', # request.domain and CookieProfile\n    'repoze.lru >= 0.4', # py3 compat\n    'zope.interface >= 3.8.0',  # has zope.interface.registry\n    'zope.deprecation >= 3.5.0', # py3 compat\n    'venusian >= 1.0a3', # ``ignore``\n    'translationstring >= 0.4', # py3 compat\n    'PasteDeploy >= 1.5.0', # py3 compat\n    ]\n\ntests_require = [\n    'WebTest >= 1.3.1', # py3 compat\n    ]\n\nif not PY3:\n    tests_require.append('zope.component>=3.11.0')\n\ndocs_extras = [\n    'Sphinx >= 1.3.4',\n    'docutils',\n    'repoze.sphinx.autointerface',\n    'pylons_sphinx_latesturl',\n    'pylons-sphinx-themes',\n    'sphinxcontrib-programoutput',\n    ]\n\ntesting_extras = tests_require + [\n    'nose',\n    'coverage',\n    'virtualenv', # for scaffolding tests\n    ]\n\nsetup(name='pyramid',\n      version='1.7.dev0',\n      description='The Pyramid Web Framework, a Pylons project',\n      long_description=README + '\\n\\n' +  CHANGES,\n      classifiers=[\n        \"Development Status :: 6 - Mature\",\n        \"Intended Audience :: Developers\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 2.6\",\n        \"Programming Language :: Python :: 2.7\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.2\",\n        \"Programming Language :: Python :: 3.3\",\n        \"Programming Language :: Python :: 3.4\",\n        \"Programming Language :: Python :: 3.5\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Programming Language :: Python :: Implementation :: PyPy\",\n        \"Framework :: Pyramid\",\n        \"Topic :: Internet :: WWW/HTTP\",\n        \"Topic :: Internet :: WWW/HTTP :: WSGI\",\n        \"License :: Repoze Public License\",\n        ],\n      keywords='web wsgi pylons pyramid',\n      author=\"Chris McDonough, Agendaless Consulting\",\n      author_email=\"pylons-discuss@googlegroups.com\",\n      url=\"http://docs.pylonsproject.org/en/latest/docs/pyramid.html\",\n      license=\"BSD-derived (http://www.repoze.org/LICENSE.txt)\",\n      packages=find_packages(),\n      include_package_data=True,\n      zip_safe=False,\n      install_requires = install_requires,\n      extras_require = {\n          'testing':testing_extras,\n          'docs':docs_extras,\n          },\n      tests_require = tests_require,\n      test_suite=\"pyramid.tests\",\n      entry_points = \"\"\"\\\n        [pyramid.scaffold]\n        starter=pyramid.scaffolds:StarterProjectTemplate\n        zodb=pyramid.scaffolds:ZODBProjectTemplate\n        alchemy=pyramid.scaffolds:AlchemyProjectTemplate\n        [pyramid.pshell_runner]\n        python=pyramid.scripts.pshell:python_shell_runner\n        [console_scripts]\n        pcreate = pyramid.scripts.pcreate:main\n        pserve = pyramid.scripts.pserve:main\n        pshell = pyramid.scripts.pshell:main\n        proutes = pyramid.scripts.proutes:main\n        pviews = pyramid.scripts.pviews:main\n        ptweens = pyramid.scripts.ptweens:main\n        prequest = pyramid.scripts.prequest:main\n        pdistreport = pyramid.scripts.pdistreport:main\n        [paste.server_runner]\n        wsgiref = pyramid.scripts.pserve:wsgiref_server_runner\n        cherrypy = pyramid.scripts.pserve:cherrypy_server_runner\n      \"\"\"\n      )\n\n", "path": "setup.py"}]}