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


--- 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.4',
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.5.8',
75       description='The Pyramid Web Framework, a Pylons project',
76       long_description=README + '\n\n' +  CHANGES,
77       classifiers=[
78         "Intended Audience :: Developers",
79         "Programming Language :: Python",
80         "Programming Language :: Python :: 2.6",
81         "Programming Language :: Python :: 2.7",
82         "Programming Language :: Python :: 3",
83         "Programming Language :: Python :: 3.2",
84         "Programming Language :: Python :: 3.3",
85         "Programming Language :: Python :: 3.4",
86         "Programming Language :: Python :: 3.5",
87         "Programming Language :: Python :: Implementation :: CPython",
88         "Programming Language :: Python :: Implementation :: PyPy",
89         "Framework :: Pyramid",
90         "Topic :: Internet :: WWW/HTTP",
91         "Topic :: Internet :: WWW/HTTP :: WSGI",
92         "License :: Repoze Public License",
93         ],
94       keywords='web wsgi pylons pyramid',
95       author="Chris McDonough, Agendaless Consulting",
96       author_email="pylons-discuss@googlegroups.com",
97       url="http://docs.pylonsproject.org/en/latest/docs/pyramid.html",
98       license="BSD-derived (http://www.repoze.org/LICENSE.txt)",
99       packages=find_packages(),
100       include_package_data=True,
101       zip_safe=False,
102       install_requires = install_requires,
103       extras_require = {
104           'testing':testing_extras,
105           'docs':docs_extras,
106           },
107       tests_require = tests_require,
108       test_suite="pyramid.tests",
109       entry_points = """\
110         [pyramid.scaffold]
111         starter=pyramid.scaffolds:StarterProjectTemplate
112         zodb=pyramid.scaffolds:ZODBProjectTemplate
113         alchemy=pyramid.scaffolds:AlchemyProjectTemplate
114         [console_scripts]
115         pcreate = pyramid.scripts.pcreate:main
116         pserve = pyramid.scripts.pserve:main
117         pshell = pyramid.scripts.pshell:main
118         proutes = pyramid.scripts.proutes:main
119         pviews = pyramid.scripts.pviews:main
120         ptweens = pyramid.scripts.ptweens:main
121         prequest = pyramid.scripts.prequest:main
122         pdistreport = pyramid.scripts.pdistreport:main
123         [paste.server_runner]
124         wsgiref = pyramid.scripts.pserve:wsgiref_server_runner
125         cherrypy = pyramid.scripts.pserve:cherrypy_server_runner
126       """
127       )
128 
129
```

Path: `docs/quick_tour/requests/app.py`
Content:
```
1 from wsgiref.simple_server import make_server
2 from pyramid.config import Configurator
3 from pyramid.response import Response
4 
5 
6 def hello_world(request):
7     """ Some parameters from a request such as /?name=lisa """
8     url = request.url
9     name = request.params.get('name', 'No Name Provided')
10 
11     body = 'URL %s with name: %s' % (url, name)
12     return Response(
13         content_type="text/plain",
14         body=body
15     )
16 
17 
18 if __name__ == '__main__':
19     config = Configurator()
20     config.add_route('hello', '/')
21     config.add_view(hello_world, route_name='hello')
22     app = config.make_wsgi_app()
23     server = make_server('0.0.0.0', 6543, app)
24     server.serve_forever()
25
```
--- 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/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',

{"golden_diff": "diff --git a/docs/quick_tour/requests/app.py b/docs/quick_tour/requests/app.py\n--- a/docs/quick_tour/requests/app.py\n+++ b/docs/quick_tour/requests/app.py\n@@ -4,7 +4,7 @@\n \n \n def hello_world(request):\n-    \"\"\" Some parameters from a request such as /?name=lisa \"\"\"\n+    # Some parameters from a request such as /?name=lisa\n     url = request.url\n     name = request.params.get('name', 'No Name Provided')\n \ndiff --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.4',\n+    'Sphinx >= 1.3.5',\n     'docutils',\n     'repoze.sphinx.autointerface',\n     'pylons_sphinx_latesturl',\n", "issue": "pyobject truncates code at comment\nSee https://github.com/sphinx-doc/sphinx/issues/2253\n\nExample rendered docs:\nhttp://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tour.html#handling-web-requests-and-responses\n\nrst syntax:\nhttps://github.com/Pylons/pyramid/blame/master/docs/quick_tour.rst#L119-L120\n\nSource code:\nhttps://github.com/Pylons/pyramid/blob/master/docs/quick_tour/requests/app.py#L7\n\nWhen the bug is fixed and released, we will need to:\n- revert the source code sample to use `#` style comments\n- bump up the Sphinx version\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.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.5.8',\n      description='The Pyramid Web Framework, a Pylons project',\n      long_description=README + '\\n\\n' +  CHANGES,\n      classifiers=[\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        [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"}, {"content": "from wsgiref.simple_server import make_server\nfrom pyramid.config import Configurator\nfrom pyramid.response import Response\n\n\ndef hello_world(request):\n    \"\"\" Some parameters from a request such as /?name=lisa \"\"\"\n    url = request.url\n    name = request.params.get('name', 'No Name Provided')\n\n    body = 'URL %s with name: %s' % (url, name)\n    return Response(\n        content_type=\"text/plain\",\n        body=body\n    )\n\n\nif __name__ == '__main__':\n    config = Configurator()\n    config.add_route('hello', '/')\n    config.add_view(hello_world, route_name='hello')\n    app = config.make_wsgi_app()\n    server = make_server('0.0.0.0', 6543, app)\n    server.serve_forever()\n", "path": "docs/quick_tour/requests/app.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.5',\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.5.8',\n      description='The Pyramid Web Framework, a Pylons project',\n      long_description=README + '\\n\\n' +  CHANGES,\n      classifiers=[\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        [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"}, {"content": "from wsgiref.simple_server import make_server\nfrom pyramid.config import Configurator\nfrom pyramid.response import Response\n\n\ndef hello_world(request):\n    # Some parameters from a request such as /?name=lisa\n    url = request.url\n    name = request.params.get('name', 'No Name Provided')\n\n    body = 'URL %s with name: %s' % (url, name)\n    return Response(\n        content_type=\"text/plain\",\n        body=body\n    )\n\n\nif __name__ == '__main__':\n    config = Configurator()\n    config.add_route('hello', '/')\n    config.add_view(hello_world, route_name='hello')\n    app = config.make_wsgi_app()\n    server = make_server('0.0.0.0', 6543, app)\n    server.serve_forever()\n", "path": "docs/quick_tour/requests/app.py"}]}