We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ASCII apostrophes are replaced with typgraphic apostrophes in the PDF documentation code boxes
In version 1.3.2 of http://media.readthedocs.org/pdf/pyramid/1.3-branch/pyramid.pdf, apostrophes which should be encoded as ASCII (') are replaced with their typographic variants (’). This is correct in running text, but should not happen in code boxes because Python do not understand them:

```
Python 2.7.3 (default, Aug  1 2012, 05:14:39) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> a = ’a’
  File "<stdin>", line 1
    a = ’a’
        ^
SyntaxError: invalid syntax
```


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

{"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',\n+    'Sphinx >= 1.2.3',\n     'docutils',\n     'repoze.sphinx.autointerface',\n     ]\n", "issue": "ASCII apostrophes are replaced with typgraphic apostrophes in the PDF documentation code boxes\nIn version 1.3.2 of http://media.readthedocs.org/pdf/pyramid/1.3-branch/pyramid.pdf, apostrophes which should be encoded as ASCII (') are replaced with their typographic variants (\u2019). This is correct in running text, but should not happen in code boxes because Python do not understand them:\n\n```\nPython 2.7.3 (default, Aug  1 2012, 05:14:39) \n[GCC 4.6.3] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> a = \u2019a\u2019\n  File \"<stdin>\", line 1\n    a = \u2019a\u2019\n        ^\nSyntaxError: invalid syntax\n```\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',\n    'docutils',\n    'repoze.sphinx.autointerface',\n    ]\n\ntesting_extras = tests_require + [\n    'nose',\n    'coverage',\n    'virtualenv', # for scaffolding tests\n    ]\n\nsetup(name='pyramid',\n      version='1.5.2',\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 :: 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"}], "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.2.3',\n    'docutils',\n    'repoze.sphinx.autointerface',\n    ]\n\ntesting_extras = tests_require + [\n    'nose',\n    'coverage',\n    'virtualenv', # for scaffolding tests\n    ]\n\nsetup(name='pyramid',\n      version='1.5.2',\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 :: 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"}]}