We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update SCons API sphinx config to pull version from SCons/__init__.py
Update SCons API sphinx config to pull version from `SCons/__init__.py`

See `doc/sphinx/conf.py`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `doc/sphinx/conf.py`
Content:
```
1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*-
3 #
4 # SCons documentation build configuration file, created by
5 # sphinx-quickstart on Mon Apr 30 09:36:53 2018.
6 #
7 # This file is execfile()d with the current directory set to its
8 # containing dir.
9 #
10 # Note that not all possible configuration values are present in this
11 # autogenerated file.
12 #
13 # All configuration values have a default; values that are commented out
14 # serve to show the default.
15 
16 # If extensions (or modules to document with autodoc) are in another directory,
17 # add these directories to sys.path here. If the directory is relative to the
18 # documentation root, use os.path.abspath to make it absolute, like shown here.
19 #
20 import os
21 import sys
22 sys.path.insert(0, os.path.abspath('../../'))
23 
24 # -- General configuration ------------------------------------------------
25 
26 # If your documentation needs a minimal Sphinx version, state it here.
27 #
28 needs_sphinx = '1.3'
29 
30 # Add any Sphinx extension module names here, as strings. They can be
31 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
32 # ones.
33 extensions = [
34     #'autoclasstoc',   # TODO: figure out how to make this useful
35     'sphinx.ext.autodoc',
36     'sphinx.ext.autosummary',
37     #'sphinx.ext.githubpages'
38     'sphinx.ext.napoleon',
39     'sphinx.ext.todo',
40     'sphinx.ext.viewcode',
41     'sphinx_rtd_theme',
42     'rst2pdf.pdfbuilder',
43 ]
44 
45 autosummary_generate = True
46 
47 autodoc_default_options = {
48     "members": True,
49     #"special-members": True,
50     "private-members": True,
51     "inherited-members": True,
52     "undoc-members": True,
53     "exclude-members": '__weakref__',
54 }
55 autodoc_exclude_members = ['*Tests']
56 napoleon_include_special_with_doc = False
57 napoleon_include_private_with_doc = True
58 
59 # Add any paths that contain templates here, relative to this directory.
60 templates_path = ['_templates']
61 
62 # The suffix(es) of source filenames.
63 # You can specify multiple suffix as a list of string:
64 #
65 source_suffix = '.rst'
66 
67 # The master toctree document.
68 master_doc = 'index'
69 
70 # General information about the project.
71 project = 'SCons'
72 copyright = '2020, SCons Project'
73 author = 'SCons Project Team'
74 
75 # The version info for the project you're documenting, acts as replacement for
76 # |version| and |release|, also used in various other places throughout the
77 # built documents.
78 #
79 # TODO: fill these in externally
80 # The short X.Y version.
81 version = '4.1'
82 # The full version, including alpha/beta/rc tags.
83 release = '4.1.0'
84 
85 # The language for content autogenerated by Sphinx. Refer to documentation
86 # for a list of supported languages.
87 #
88 # This is also used if you do content translation via gettext catalogs.
89 # Usually you set "language" from the command line for these cases.
90 language = None
91 
92 # List of patterns, relative to source directory, that match files and
93 # directories to ignore when looking for source files.
94 # This pattern also affects html_static_path and html_extra_path .
95 exclude_patterns = ["*Tests.py"]
96 
97 # The name of the Pygments (syntax highlighting) style to use.
98 pygments_style = 'sphinx'
99 
100 # If true, `todo` and `todoList` produce output, else they produce nothing.
101 todo_include_todos = False
102 
103 
104 # -- Options for HTML output ----------------------------------------------
105 
106 # The theme to use for HTML and HTML Help pages.  See the documentation for
107 # a list of builtin themes.
108 #
109 html_theme = "sphinx_rtd_theme"
110 
111 # Theme options are theme-specific and customize the look and feel of a theme
112 # further.  For a list of options available for each theme, see the
113 # documentation.
114 #
115 html_theme_options = {
116     "collapse_navigation": False,
117     "navigation_depth": 3,
118 }
119 
120 # Add any paths that contain custom static files (such as style sheets) here,
121 # relative to this directory. They are copied after the builtin static files,
122 # so a file named "default.css" will overwrite the builtin "default.css".
123 html_static_path = ['_static']
124 
125 # Custom sidebar templates, must be a dictionary that maps document names
126 # to template names.
127 #
128 # The default sidebars (for documents that don't match any pattern) are
129 # defined by theme itself.  Builtin themes are using these templates by
130 # default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
131 # 'searchbox.html']``.
132 #
133 # html_sidebars = {}
134 
135 # -- Options for HTMLHelp output ------------------------------------------
136 
137 # Output file base name for HTML help builder.
138 htmlhelp_basename = 'SConsAPIDocs'
139 
140 
141 # -- Options for LaTeX output ---------------------------------------------
142 
143 latex_elements = {
144     # The paper size ('letterpaper' or 'a4paper').
145     #
146     # 'papersize': 'letterpaper',
147 
148     # The font size ('10pt', '11pt' or '12pt').
149     #
150     # 'pointsize': '10pt',
151 
152     # Additional stuff for the LaTeX preamble.
153     #
154     # 'preamble': '',
155 
156     # Latex figure (float) alignment
157     #
158     # 'figure_align': 'htbp',
159 }
160 
161 
162 # Grouping the document tree into LaTeX files. List of tuples
163 # (source start file, target name, title,
164 #  author, documentclass [howto, manual, or own class]).
165 latex_documents = [
166     (
167         master_doc,
168         "SConsAPIDocs.tex",
169         "SCons API Documentation",
170         "SCons Project",
171         "manual",
172     )
173 ]
174 
175 
176 # -- Options for manual page output ---------------------------------------
177 
178 # One entry per manual page. List of tuples
179 # (source start file, name, description, authors, manual section).
180 man_pages = [
181     (master_doc, 'sconsapidocs', 'SCons API Documentation', [author], 1)
182 ]
183 
184 
185 # -- Options for Texinfo output -------------------------------------------
186 
187 # Grouping the document tree into Texinfo files. List of tuples
188 # (source start file, target name, title, author,
189 #  dir menu entry, description, category)
190 texinfo_documents = [
191     (
192         master_doc,
193         "SConsAPIDocs",
194         "SCons API Documentation",
195         author,
196         "SConsAPIDocs",
197         "One line description of project.",
198         "Miscellaneous",
199     )
200 ]
201 
202 
203 # -- Options for Epub output -------------------------------------------------
204 
205 
206 
207 # -- for PDF
208 # Grouping the document tree into PDF files. List of tuples
209 # (source start file, target name, title, author, options).
210 pdf_documents = [('index', u'scons-api', u'SCons API Docs', u'SCons Project'),]
211
```
--- 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/doc/sphinx/conf.py b/doc/sphinx/conf.py
--- a/doc/sphinx/conf.py
+++ b/doc/sphinx/conf.py
@@ -76,11 +76,12 @@
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
-# TODO: fill these in externally
+from SCons import __version__
+# The full version, including alpha/beta/rc tags:
+release = __version__
 # The short X.Y version.
-version = '4.1'
-# The full version, including alpha/beta/rc tags.
-release = '4.1.0'
+major, minor, _ = __version__.split('.')
+version = '.'.join([major, minor])
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.

{"golden_diff": "diff --git a/doc/sphinx/conf.py b/doc/sphinx/conf.py\n--- a/doc/sphinx/conf.py\n+++ b/doc/sphinx/conf.py\n@@ -76,11 +76,12 @@\n # |version| and |release|, also used in various other places throughout the\n # built documents.\n #\n-# TODO: fill these in externally\n+from SCons import __version__\n+# The full version, including alpha/beta/rc tags:\n+release = __version__\n # The short X.Y version.\n-version = '4.1'\n-# The full version, including alpha/beta/rc tags.\n-release = '4.1.0'\n+major, minor, _ = __version__.split('.')\n+version = '.'.join([major, minor])\n \n # The language for content autogenerated by Sphinx. Refer to documentation\n # for a list of supported languages.\n", "issue": "Update SCons API sphinx config to pull version from SCons/__init__.py\nUpdate SCons API sphinx config to pull version from `SCons/__init__.py`\r\n\r\nSee `doc/sphinx/conf.py`\n", "before_files": [{"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# SCons documentation build configuration file, created by\n# sphinx-quickstart on Mon Apr 30 09:36:53 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport os\nimport sys\nsys.path.insert(0, os.path.abspath('../../'))\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\nneeds_sphinx = '1.3'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    #'autoclasstoc',   # TODO: figure out how to make this useful\n    'sphinx.ext.autodoc',\n    'sphinx.ext.autosummary',\n    #'sphinx.ext.githubpages'\n    'sphinx.ext.napoleon',\n    'sphinx.ext.todo',\n    'sphinx.ext.viewcode',\n    'sphinx_rtd_theme',\n    'rst2pdf.pdfbuilder',\n]\n\nautosummary_generate = True\n\nautodoc_default_options = {\n    \"members\": True,\n    #\"special-members\": True,\n    \"private-members\": True,\n    \"inherited-members\": True,\n    \"undoc-members\": True,\n    \"exclude-members\": '__weakref__',\n}\nautodoc_exclude_members = ['*Tests']\nnapoleon_include_special_with_doc = False\nnapoleon_include_private_with_doc = True\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\nsource_suffix = '.rst'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = 'SCons'\ncopyright = '2020, SCons Project'\nauthor = 'SCons Project Team'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\n# TODO: fill these in externally\n# The short X.Y version.\nversion = '4.1'\n# The full version, including alpha/beta/rc tags.\nrelease = '4.1.0'\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path .\nexclude_patterns = [\"*Tests.py\"]\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = \"sphinx_rtd_theme\"\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\nhtml_theme_options = {\n    \"collapse_navigation\": False,\n    \"navigation_depth\": 3,\n}\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# Custom sidebar templates, must be a dictionary that maps document names\n# to template names.\n#\n# The default sidebars (for documents that don't match any pattern) are\n# defined by theme itself.  Builtin themes are using these templates by\n# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',\n# 'searchbox.html']``.\n#\n# html_sidebars = {}\n\n# -- Options for HTMLHelp output ------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'SConsAPIDocs'\n\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (\n        master_doc,\n        \"SConsAPIDocs.tex\",\n        \"SCons API Documentation\",\n        \"SCons Project\",\n        \"manual\",\n    )\n]\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    (master_doc, 'sconsapidocs', 'SCons API Documentation', [author], 1)\n]\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (\n        master_doc,\n        \"SConsAPIDocs\",\n        \"SCons API Documentation\",\n        author,\n        \"SConsAPIDocs\",\n        \"One line description of project.\",\n        \"Miscellaneous\",\n    )\n]\n\n\n# -- Options for Epub output -------------------------------------------------\n\n\n\n# -- for PDF\n# Grouping the document tree into PDF files. List of tuples\n# (source start file, target name, title, author, options).\npdf_documents = [('index', u'scons-api', u'SCons API Docs', u'SCons Project'),]\n", "path": "doc/sphinx/conf.py"}], "after_files": [{"content": "#!/usr/bin/env python3\n# -*- coding: utf-8 -*-\n#\n# SCons documentation build configuration file, created by\n# sphinx-quickstart on Mon Apr 30 09:36:53 2018.\n#\n# This file is execfile()d with the current directory set to its\n# containing dir.\n#\n# Note that not all possible configuration values are present in this\n# autogenerated file.\n#\n# All configuration values have a default; values that are commented out\n# serve to show the default.\n\n# If extensions (or modules to document with autodoc) are in another directory,\n# add these directories to sys.path here. If the directory is relative to the\n# documentation root, use os.path.abspath to make it absolute, like shown here.\n#\nimport os\nimport sys\nsys.path.insert(0, os.path.abspath('../../'))\n\n# -- General configuration ------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n#\nneeds_sphinx = '1.3'\n\n# Add any Sphinx extension module names here, as strings. They can be\n# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\n# ones.\nextensions = [\n    #'autoclasstoc',   # TODO: figure out how to make this useful\n    'sphinx.ext.autodoc',\n    'sphinx.ext.autosummary',\n    #'sphinx.ext.githubpages'\n    'sphinx.ext.napoleon',\n    'sphinx.ext.todo',\n    'sphinx.ext.viewcode',\n    'sphinx_rtd_theme',\n    'rst2pdf.pdfbuilder',\n]\n\nautosummary_generate = True\n\nautodoc_default_options = {\n    \"members\": True,\n    #\"special-members\": True,\n    \"private-members\": True,\n    \"inherited-members\": True,\n    \"undoc-members\": True,\n    \"exclude-members\": '__weakref__',\n}\nautodoc_exclude_members = ['*Tests']\nnapoleon_include_special_with_doc = False\nnapoleon_include_private_with_doc = True\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix(es) of source filenames.\n# You can specify multiple suffix as a list of string:\n#\nsource_suffix = '.rst'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = 'SCons'\ncopyright = '2020, SCons Project'\nauthor = 'SCons Project Team'\n\n# The version info for the project you're documenting, acts as replacement for\n# |version| and |release|, also used in various other places throughout the\n# built documents.\n#\nfrom SCons import __version__\n# The full version, including alpha/beta/rc tags:\nrelease = __version__\n# The short X.Y version.\nmajor, minor, _ = __version__.split('.')\nversion = '.'.join([major, minor])\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n#\n# This is also used if you do content translation via gettext catalogs.\n# Usually you set \"language\" from the command line for these cases.\nlanguage = None\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\n# This pattern also affects html_static_path and html_extra_path .\nexclude_patterns = [\"*Tests.py\"]\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# If true, `todo` and `todoList` produce output, else they produce nothing.\ntodo_include_todos = False\n\n\n# -- Options for HTML output ----------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\n#\nhtml_theme = \"sphinx_rtd_theme\"\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#\nhtml_theme_options = {\n    \"collapse_navigation\": False,\n    \"navigation_depth\": 3,\n}\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\nhtml_static_path = ['_static']\n\n# Custom sidebar templates, must be a dictionary that maps document names\n# to template names.\n#\n# The default sidebars (for documents that don't match any pattern) are\n# defined by theme itself.  Builtin themes are using these templates by\n# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',\n# 'searchbox.html']``.\n#\n# html_sidebars = {}\n\n# -- Options for HTMLHelp output ------------------------------------------\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = 'SConsAPIDocs'\n\n\n# -- Options for LaTeX output ---------------------------------------------\n\nlatex_elements = {\n    # The paper size ('letterpaper' or 'a4paper').\n    #\n    # 'papersize': 'letterpaper',\n\n    # The font size ('10pt', '11pt' or '12pt').\n    #\n    # 'pointsize': '10pt',\n\n    # Additional stuff for the LaTeX preamble.\n    #\n    # 'preamble': '',\n\n    # Latex figure (float) alignment\n    #\n    # 'figure_align': 'htbp',\n}\n\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title,\n#  author, documentclass [howto, manual, or own class]).\nlatex_documents = [\n    (\n        master_doc,\n        \"SConsAPIDocs.tex\",\n        \"SCons API Documentation\",\n        \"SCons Project\",\n        \"manual\",\n    )\n]\n\n\n# -- Options for manual page output ---------------------------------------\n\n# One entry per manual page. List of tuples\n# (source start file, name, description, authors, manual section).\nman_pages = [\n    (master_doc, 'sconsapidocs', 'SCons API Documentation', [author], 1)\n]\n\n\n# -- Options for Texinfo output -------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\ntexinfo_documents = [\n    (\n        master_doc,\n        \"SConsAPIDocs\",\n        \"SCons API Documentation\",\n        author,\n        \"SConsAPIDocs\",\n        \"One line description of project.\",\n        \"Miscellaneous\",\n    )\n]\n\n\n# -- Options for Epub output -------------------------------------------------\n\n\n\n# -- for PDF\n# Grouping the document tree into PDF files. List of tuples\n# (source start file, target name, title, author, options).\npdf_documents = [('index', u'scons-api', u'SCons API Docs', u'SCons Project'),]\n", "path": "doc/sphinx/conf.py"}]}