We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
DEP: (yt 4.3) set upper limit on runtime requirement on numpy (<2.0)
This issue is a reminder that, if yt 4.3.0 is released, as scheduled (sometime about end of September), *before* numpy 2.0 (currently aimed at December 2023), we should update the runtime requirement on the backport branch (basically replaying https://github.com/yt-project/yt/pull/4573).

--- 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/source/conf.py`
Content:
```
1 #
2 # yt documentation build configuration file, created by
3 # sphinx-quickstart on Tue Jan 11 09:46:53 2011.
4 #
5 # This file is execfile()d with the current directory set to its containing dir.
6 #
7 # Note that not all possible configuration values are present in this
8 # autogenerated file.
9 #
10 # All configuration values have a default; values that are commented out
11 # serve to show the default.
12 
13 import glob
14 import os
15 import sys
16 
17 import sphinx_bootstrap_theme
18 
19 on_rtd = os.environ.get("READTHEDOCS", None) == "True"
20 
21 # If extensions (or modules to document with autodoc) are in another directory,
22 # add these directories to sys.path here. If the directory is relative to the
23 # documentation root, use os.path.abspath to make it absolute, like shown here.
24 sys.path.insert(0, os.path.abspath("../extensions/"))
25 
26 # -- General configuration -----------------------------------------------------
27 
28 # If your documentation needs a minimal Sphinx version, state it here.
29 # needs_sphinx = '1.0'
30 
31 # Add any Sphinx extension module names here, as strings. They can be extensions
32 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
33 extensions = [
34     "sphinx.ext.autodoc",
35     "sphinx.ext.intersphinx",
36     "sphinx.ext.mathjax",
37     "sphinx.ext.viewcode",
38     "sphinx.ext.napoleon",
39     "yt_cookbook",
40     "yt_colormaps",
41     "config_help",
42     "yt_showfields",
43     "nbsphinx",
44 ]
45 
46 if not on_rtd:
47     extensions.append("sphinx.ext.autosummary")
48     extensions.append("pythonscript_sphinxext")
49 
50 # Add any paths that contain templates here, relative to this directory.
51 templates_path = ["_templates"]
52 
53 # The suffix of source filenames.
54 source_suffix = ".rst"
55 
56 # The encoding of source files.
57 # source_encoding = 'utf-8-sig'
58 
59 # The master toctree document.
60 master_doc = "index"
61 
62 # General information about the project.
63 project = "The yt Project"
64 copyright = "2013-2021, the yt Project"
65 
66 # The version info for the project you're documenting, acts as replacement for
67 # |version| and |release|, also used in various other places throughout the
68 # built documents.
69 #
70 # The short X.Y version.
71 version = "4.3"
72 # The full version, including alpha/beta/rc tags.
73 release = "4.3-dev"
74 
75 # The language for content autogenerated by Sphinx. Refer to documentation
76 # for a list of supported languages.
77 # language = None
78 
79 # There are two options for replacing |today|: either, you set today to some
80 # non-false value, then it is used:
81 # today = ''
82 # Else, today_fmt is used as the format for a strftime call.
83 # today_fmt = '%B %d, %Y'
84 
85 # List of patterns, relative to source directory, that match files and
86 # directories to ignore when looking for source files.
87 exclude_patterns = []
88 
89 # The reST default role (used for this markup: `text`) to use for all documents.
90 # default_role = None
91 
92 # If true, '()' will be appended to :func: etc. cross-reference text.
93 # add_function_parentheses = True
94 
95 # If true, the current module name will be prepended to all description
96 # unit titles (such as .. function::).
97 # add_module_names = True
98 
99 # If true, sectionauthor and moduleauthor directives will be shown in the
100 # output. They are ignored by default.
101 show_authors = False
102 
103 # The name of the Pygments (syntax highlighting) style to use.
104 pygments_style = "sphinx"
105 
106 # A list of ignored prefixes for module index sorting.
107 # modindex_common_prefix = []
108 
109 
110 # -- Options for HTML output ---------------------------------------------------
111 
112 # The theme to use for HTML and HTML Help pages.  See the documentation for
113 # a list of builtin themes.
114 html_theme = "bootstrap"
115 html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
116 
117 # Theme options are theme-specific and customize the look and feel of a theme
118 # further.  For a list of options available for each theme, see the
119 # documentation.
120 html_theme_options = dict(
121     bootstrap_version="3",
122     bootswatch_theme="readable",
123     navbar_links=[
124         ("", ""),  # see https://github.com/yt-project/yt/pull/3423
125         ("How to get help", "help/index"),
126         ("Quickstart notebooks", "quickstart/index"),
127         ("Cookbook", "cookbook/index"),
128     ],
129     navbar_sidebarrel=False,
130     globaltoc_depth=2,
131 )
132 
133 # Add any paths that contain custom themes here, relative to this directory.
134 # html_theme_path = []
135 
136 # The name for this set of Sphinx documents.  If None, it defaults to
137 # "<project> v<release> documentation".
138 # html_title = None
139 
140 # A shorter title for the navigation bar.  Default is the same as html_title.
141 # html_short_title = None
142 
143 # The name of an image file (relative to this directory) to place at the top
144 # of the sidebar.
145 html_logo = "_static/yt_icon.png"
146 
147 # The name of an image file (within the static path) to use as favicon of the
148 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
149 # pixels large.
150 # html_favicon = None
151 
152 # Add any paths that contain custom static files (such as style sheets) here,
153 # relative to this directory. They are copied after the builtin static files,
154 # so a file named "default.css" will overwrite the builtin "default.css".
155 html_static_path = ["_static", "analyzing/_static"]
156 
157 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
158 # using the given strftime format.
159 # html_last_updated_fmt = '%b %d, %Y'
160 
161 # If true, SmartyPants will be used to convert quotes and dashes to
162 # typographically correct entities.
163 # html_use_smartypants = True
164 
165 # Custom sidebar templates, maps document names to template names.
166 # html_sidebars = {}
167 
168 # Additional templates that should be rendered to pages, maps page names to
169 # template names.
170 # html_additional_pages = {}
171 
172 # If false, no module index is generated.
173 html_domain_indices = False
174 
175 # If false, no index is generated.
176 html_use_index = True
177 
178 # If true, the index is split into individual pages for each letter.
179 # html_split_index = False
180 
181 # If true, links to the reST sources are added to the pages.
182 html_show_sourcelink = False
183 
184 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
185 # html_show_sphinx = True
186 
187 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
188 # html_show_copyright = True
189 
190 # If true, an OpenSearch description file will be output, and all pages will
191 # contain a <link> tag referring to it.  The value of this option must be the
192 # base URL from which the finished HTML is served.
193 # html_use_opensearch = ''
194 
195 # This is the file name suffix for HTML files (e.g. ".xhtml").
196 # html_file_suffix = None
197 
198 # Output file base name for HTML help builder.
199 htmlhelp_basename = "ytdoc"
200 
201 
202 # -- Options for LaTeX output --------------------------------------------------
203 
204 # The paper size ('letter' or 'a4').
205 # latex_paper_size = 'letter'
206 
207 # The font size ('10pt', '11pt' or '12pt').
208 # latex_font_size = '10pt'
209 
210 # Grouping the document tree into LaTeX files. List of tuples
211 # (source start file, target name, title, author, documentclass [howto/manual]).
212 latex_documents = [
213     ("index", "yt.tex", "yt Documentation", "The yt Project", "manual"),
214 ]
215 
216 # The name of an image file (relative to this directory) to place at the top of
217 # the title page.
218 # latex_logo = None
219 
220 # For "manual" documents, if this is true, then toplevel headings are parts,
221 # not chapters.
222 # latex_use_parts = False
223 
224 # If true, show page references after internal links.
225 # latex_show_pagerefs = False
226 
227 # If true, show URL addresses after external links.
228 # latex_show_urls = False
229 
230 # Documents to append as an appendix to all manuals.
231 # latex_appendices = []
232 
233 # If false, no module index is generated.
234 # latex_domain_indices = True
235 
236 
237 # -- Options for manual page output --------------------------------------------
238 
239 # One entry per manual page. List of tuples
240 # (source start file, name, description, authors, manual section).
241 man_pages = [("index", "yt", "yt Documentation", ["The yt Project"], 1)]
242 
243 nbsphinx_allow_errors = True
244 
245 # Example configuration for intersphinx: refer to the Python standard library.
246 intersphinx_mapping = {
247     "python": ("https://docs.python.org/3/", None),
248     "ipython": ("https://ipython.readthedocs.io/en/stable/", None),
249     "numpy": ("https://numpy.org/doc/stable/", None),
250     "matplotlib": ("https://matplotlib.org/stable/", None),
251     "astropy": ("https://docs.astropy.org/en/stable", None),
252     "pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
253     "trident": ("https://trident.readthedocs.io/en/latest/", None),
254     "yt_astro_analysis": ("https://yt-astro-analysis.readthedocs.io/en/latest/", None),
255     "yt_attic": ("https://yt-attic.readthedocs.io/en/latest/", None),
256     "pytest": ("https://docs.pytest.org/en/stable", None),
257 }
258 
259 if not on_rtd:
260     autosummary_generate = glob.glob("reference/api/api.rst")
261 
262 
263 # as of Sphinx 3.1.2 this is the supported way to link custom style sheets
264 def setup(app):
265     app.add_css_file("custom.css")
266
```

Path: `yt/_version.py`
Content:
```
1 from typing import NamedTuple
2 
3 from packaging.version import Version
4 
5 __all__ = [
6     "__version__",
7     "version_info",
8 ]
9 
10 __version__ = "4.3.dev0"  # keep in sync with pyproject.toml
11 
12 
13 class VersionTuple(NamedTuple):
14     """
15     A minimal representation of the current version number
16     that can be used downstream to check the runtime version
17     simply by comparing with builtin tuples, as can be done with
18     the runtime Python version using sys.version_info
19 
20     https://docs.python.org/3/library/sys.html#sys.version_info
21     """
22 
23     major: int
24     minor: int
25     micro: int
26     releaselevel: str
27     serial: int
28 
29 
30 def _parse_to_version_info(version_str: str) -> VersionTuple:
31     # adapted from matplotlib 3.5
32     """
33     Parse a version string to a namedtuple analogous to sys.version_info.
34     See:
35     https://packaging.pypa.io/en/latest/version.html#packaging.version.parse
36     https://docs.python.org/3/library/sys.html#sys.version_info
37     """
38     v = Version(version_str)
39     if v.pre is None and v.post is None and v.dev is None:
40         return VersionTuple(v.major, v.minor, v.micro, "final", 0)
41     elif v.dev is not None:
42         return VersionTuple(v.major, v.minor, v.micro, "alpha", v.dev)
43     elif v.pre is not None:
44         releaselevel = {"a": "alpha", "b": "beta", "rc": "candidate"}.get(
45             v.pre[0], "alpha"
46         )
47         return VersionTuple(v.major, v.minor, v.micro, releaselevel, v.pre[1])
48     elif v.post is not None:
49         # fallback for v.post: guess-next-dev scheme from setuptools_scm
50         return VersionTuple(v.major, v.minor, v.micro + 1, "alpha", v.post)
51     else:
52         return VersionTuple(v.major, v.minor, v.micro + 1, "alpha", 0)
53 
54 
55 version_info = _parse_to_version_info(__version__)
56
```
--- 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/source/conf.py b/doc/source/conf.py
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -70,7 +70,7 @@
 # The short X.Y version.
 version = "4.3"
 # The full version, including alpha/beta/rc tags.
-release = "4.3-dev"
+release = "4.3.0"
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
diff --git a/yt/_version.py b/yt/_version.py
--- a/yt/_version.py
+++ b/yt/_version.py
@@ -7,7 +7,7 @@
     "version_info",
 ]
 
-__version__ = "4.3.dev0"  # keep in sync with pyproject.toml
+__version__ = "4.3.0"  # keep in sync with pyproject.toml
 
 
 class VersionTuple(NamedTuple):

{"golden_diff": "diff --git a/doc/source/conf.py b/doc/source/conf.py\n--- a/doc/source/conf.py\n+++ b/doc/source/conf.py\n@@ -70,7 +70,7 @@\n # The short X.Y version.\n version = \"4.3\"\n # The full version, including alpha/beta/rc tags.\n-release = \"4.3-dev\"\n+release = \"4.3.0\"\n \n # The language for content autogenerated by Sphinx. Refer to documentation\n # for a list of supported languages.\ndiff --git a/yt/_version.py b/yt/_version.py\n--- a/yt/_version.py\n+++ b/yt/_version.py\n@@ -7,7 +7,7 @@\n     \"version_info\",\n ]\n \n-__version__ = \"4.3.dev0\"  # keep in sync with pyproject.toml\n+__version__ = \"4.3.0\"  # keep in sync with pyproject.toml\n \n \n class VersionTuple(NamedTuple):\n", "issue": "DEP: (yt 4.3) set upper limit on runtime requirement on numpy (<2.0)\nThis issue is a reminder that, if yt 4.3.0 is released, as scheduled (sometime about end of September), *before* numpy 2.0 (currently aimed at December 2023), we should update the runtime requirement on the backport branch (basically replaying https://github.com/yt-project/yt/pull/4573).\n", "before_files": [{"content": "#\n# yt documentation build configuration file, created by\n# sphinx-quickstart on Tue Jan 11 09:46:53 2011.\n#\n# This file is execfile()d with the current directory set to its 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\nimport glob\nimport os\nimport sys\n\nimport sphinx_bootstrap_theme\n\non_rtd = os.environ.get(\"READTHEDOCS\", None) == \"True\"\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.\nsys.path.insert(0, os.path.abspath(\"../extensions/\"))\n\n# -- General configuration -----------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be extensions\n# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.intersphinx\",\n    \"sphinx.ext.mathjax\",\n    \"sphinx.ext.viewcode\",\n    \"sphinx.ext.napoleon\",\n    \"yt_cookbook\",\n    \"yt_colormaps\",\n    \"config_help\",\n    \"yt_showfields\",\n    \"nbsphinx\",\n]\n\nif not on_rtd:\n    extensions.append(\"sphinx.ext.autosummary\")\n    extensions.append(\"pythonscript_sphinxext\")\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix of source filenames.\nsource_suffix = \".rst\"\n\n# The encoding of source files.\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# General information about the project.\nproject = \"The yt Project\"\ncopyright = \"2013-2021, the yt Project\"\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# The short X.Y version.\nversion = \"4.3\"\n# The full version, including alpha/beta/rc tags.\nrelease = \"4.3-dev\"\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n# language = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n# today = ''\n# Else, today_fmt is used as the format for a strftime call.\n# today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = []\n\n# The reST default role (used for this markup: `text`) to use for all documents.\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\nshow_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = \"sphinx\"\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\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.\nhtml_theme = \"bootstrap\"\nhtml_theme_path = sphinx_bootstrap_theme.get_html_theme_path()\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.\nhtml_theme_options = dict(\n    bootstrap_version=\"3\",\n    bootswatch_theme=\"readable\",\n    navbar_links=[\n        (\"\", \"\"),  # see https://github.com/yt-project/yt/pull/3423\n        (\"How to get help\", \"help/index\"),\n        (\"Quickstart notebooks\", \"quickstart/index\"),\n        (\"Cookbook\", \"cookbook/index\"),\n    ],\n    navbar_sidebarrel=False,\n    globaltoc_depth=2,\n)\n\n# Add any paths that contain custom themes here, relative to this directory.\n# html_theme_path = []\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n# html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\nhtml_logo = \"_static/yt_icon.png\"\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n# html_favicon = None\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\", \"analyzing/_static\"]\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n# html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n# html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n# html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n# html_additional_pages = {}\n\n# If false, no module index is generated.\nhtml_domain_indices = False\n\n# If false, no index is generated.\nhtml_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\nhtml_show_sourcelink = False\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n# html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n# html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = None\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"ytdoc\"\n\n\n# -- Options for LaTeX output --------------------------------------------------\n\n# The paper size ('letter' or 'a4').\n# latex_paper_size = 'letter'\n\n# The font size ('10pt', '11pt' or '12pt').\n# latex_font_size = '10pt'\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual]).\nlatex_documents = [\n    (\"index\", \"yt.tex\", \"yt Documentation\", \"The yt Project\", \"manual\"),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n# latex_use_parts = False\n\n# If true, show page references after internal links.\n# latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n# latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n# latex_appendices = []\n\n# If false, no module index is generated.\n# latex_domain_indices = True\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 = [(\"index\", \"yt\", \"yt Documentation\", [\"The yt Project\"], 1)]\n\nnbsphinx_allow_errors = True\n\n# Example configuration for intersphinx: refer to the Python standard library.\nintersphinx_mapping = {\n    \"python\": (\"https://docs.python.org/3/\", None),\n    \"ipython\": (\"https://ipython.readthedocs.io/en/stable/\", None),\n    \"numpy\": (\"https://numpy.org/doc/stable/\", None),\n    \"matplotlib\": (\"https://matplotlib.org/stable/\", None),\n    \"astropy\": (\"https://docs.astropy.org/en/stable\", None),\n    \"pandas\": (\"https://pandas.pydata.org/pandas-docs/stable\", None),\n    \"trident\": (\"https://trident.readthedocs.io/en/latest/\", None),\n    \"yt_astro_analysis\": (\"https://yt-astro-analysis.readthedocs.io/en/latest/\", None),\n    \"yt_attic\": (\"https://yt-attic.readthedocs.io/en/latest/\", None),\n    \"pytest\": (\"https://docs.pytest.org/en/stable\", None),\n}\n\nif not on_rtd:\n    autosummary_generate = glob.glob(\"reference/api/api.rst\")\n\n\n# as of Sphinx 3.1.2 this is the supported way to link custom style sheets\ndef setup(app):\n    app.add_css_file(\"custom.css\")\n", "path": "doc/source/conf.py"}, {"content": "from typing import NamedTuple\n\nfrom packaging.version import Version\n\n__all__ = [\n    \"__version__\",\n    \"version_info\",\n]\n\n__version__ = \"4.3.dev0\"  # keep in sync with pyproject.toml\n\n\nclass VersionTuple(NamedTuple):\n    \"\"\"\n    A minimal representation of the current version number\n    that can be used downstream to check the runtime version\n    simply by comparing with builtin tuples, as can be done with\n    the runtime Python version using sys.version_info\n\n    https://docs.python.org/3/library/sys.html#sys.version_info\n    \"\"\"\n\n    major: int\n    minor: int\n    micro: int\n    releaselevel: str\n    serial: int\n\n\ndef _parse_to_version_info(version_str: str) -> VersionTuple:\n    # adapted from matplotlib 3.5\n    \"\"\"\n    Parse a version string to a namedtuple analogous to sys.version_info.\n    See:\n    https://packaging.pypa.io/en/latest/version.html#packaging.version.parse\n    https://docs.python.org/3/library/sys.html#sys.version_info\n    \"\"\"\n    v = Version(version_str)\n    if v.pre is None and v.post is None and v.dev is None:\n        return VersionTuple(v.major, v.minor, v.micro, \"final\", 0)\n    elif v.dev is not None:\n        return VersionTuple(v.major, v.minor, v.micro, \"alpha\", v.dev)\n    elif v.pre is not None:\n        releaselevel = {\"a\": \"alpha\", \"b\": \"beta\", \"rc\": \"candidate\"}.get(\n            v.pre[0], \"alpha\"\n        )\n        return VersionTuple(v.major, v.minor, v.micro, releaselevel, v.pre[1])\n    elif v.post is not None:\n        # fallback for v.post: guess-next-dev scheme from setuptools_scm\n        return VersionTuple(v.major, v.minor, v.micro + 1, \"alpha\", v.post)\n    else:\n        return VersionTuple(v.major, v.minor, v.micro + 1, \"alpha\", 0)\n\n\nversion_info = _parse_to_version_info(__version__)\n", "path": "yt/_version.py"}], "after_files": [{"content": "#\n# yt documentation build configuration file, created by\n# sphinx-quickstart on Tue Jan 11 09:46:53 2011.\n#\n# This file is execfile()d with the current directory set to its 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\nimport glob\nimport os\nimport sys\n\nimport sphinx_bootstrap_theme\n\non_rtd = os.environ.get(\"READTHEDOCS\", None) == \"True\"\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.\nsys.path.insert(0, os.path.abspath(\"../extensions/\"))\n\n# -- General configuration -----------------------------------------------------\n\n# If your documentation needs a minimal Sphinx version, state it here.\n# needs_sphinx = '1.0'\n\n# Add any Sphinx extension module names here, as strings. They can be extensions\n# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.\nextensions = [\n    \"sphinx.ext.autodoc\",\n    \"sphinx.ext.intersphinx\",\n    \"sphinx.ext.mathjax\",\n    \"sphinx.ext.viewcode\",\n    \"sphinx.ext.napoleon\",\n    \"yt_cookbook\",\n    \"yt_colormaps\",\n    \"config_help\",\n    \"yt_showfields\",\n    \"nbsphinx\",\n]\n\nif not on_rtd:\n    extensions.append(\"sphinx.ext.autosummary\")\n    extensions.append(\"pythonscript_sphinxext\")\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = [\"_templates\"]\n\n# The suffix of source filenames.\nsource_suffix = \".rst\"\n\n# The encoding of source files.\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = \"index\"\n\n# General information about the project.\nproject = \"The yt Project\"\ncopyright = \"2013-2021, the yt Project\"\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# The short X.Y version.\nversion = \"4.3\"\n# The full version, including alpha/beta/rc tags.\nrelease = \"4.3.0\"\n\n# The language for content autogenerated by Sphinx. Refer to documentation\n# for a list of supported languages.\n# language = None\n\n# There are two options for replacing |today|: either, you set today to some\n# non-false value, then it is used:\n# today = ''\n# Else, today_fmt is used as the format for a strftime call.\n# today_fmt = '%B %d, %Y'\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = []\n\n# The reST default role (used for this markup: `text`) to use for all documents.\n# default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n# add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n# add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\nshow_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = \"sphinx\"\n\n# A list of ignored prefixes for module index sorting.\n# modindex_common_prefix = []\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.\nhtml_theme = \"bootstrap\"\nhtml_theme_path = sphinx_bootstrap_theme.get_html_theme_path()\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.\nhtml_theme_options = dict(\n    bootstrap_version=\"3\",\n    bootswatch_theme=\"readable\",\n    navbar_links=[\n        (\"\", \"\"),  # see https://github.com/yt-project/yt/pull/3423\n        (\"How to get help\", \"help/index\"),\n        (\"Quickstart notebooks\", \"quickstart/index\"),\n        (\"Cookbook\", \"cookbook/index\"),\n    ],\n    navbar_sidebarrel=False,\n    globaltoc_depth=2,\n)\n\n# Add any paths that contain custom themes here, relative to this directory.\n# html_theme_path = []\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n# html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n# html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\nhtml_logo = \"_static/yt_icon.png\"\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n# html_favicon = None\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\", \"analyzing/_static\"]\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n# html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n# html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n# html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n# html_additional_pages = {}\n\n# If false, no module index is generated.\nhtml_domain_indices = False\n\n# If false, no index is generated.\nhtml_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n# html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\nhtml_show_sourcelink = False\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n# html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n# html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n# html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n# html_file_suffix = None\n\n# Output file base name for HTML help builder.\nhtmlhelp_basename = \"ytdoc\"\n\n\n# -- Options for LaTeX output --------------------------------------------------\n\n# The paper size ('letter' or 'a4').\n# latex_paper_size = 'letter'\n\n# The font size ('10pt', '11pt' or '12pt').\n# latex_font_size = '10pt'\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual]).\nlatex_documents = [\n    (\"index\", \"yt.tex\", \"yt Documentation\", \"The yt Project\", \"manual\"),\n]\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n# latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n# latex_use_parts = False\n\n# If true, show page references after internal links.\n# latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n# latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n# latex_appendices = []\n\n# If false, no module index is generated.\n# latex_domain_indices = True\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 = [(\"index\", \"yt\", \"yt Documentation\", [\"The yt Project\"], 1)]\n\nnbsphinx_allow_errors = True\n\n# Example configuration for intersphinx: refer to the Python standard library.\nintersphinx_mapping = {\n    \"python\": (\"https://docs.python.org/3/\", None),\n    \"ipython\": (\"https://ipython.readthedocs.io/en/stable/\", None),\n    \"numpy\": (\"https://numpy.org/doc/stable/\", None),\n    \"matplotlib\": (\"https://matplotlib.org/stable/\", None),\n    \"astropy\": (\"https://docs.astropy.org/en/stable\", None),\n    \"pandas\": (\"https://pandas.pydata.org/pandas-docs/stable\", None),\n    \"trident\": (\"https://trident.readthedocs.io/en/latest/\", None),\n    \"yt_astro_analysis\": (\"https://yt-astro-analysis.readthedocs.io/en/latest/\", None),\n    \"yt_attic\": (\"https://yt-attic.readthedocs.io/en/latest/\", None),\n    \"pytest\": (\"https://docs.pytest.org/en/stable\", None),\n}\n\nif not on_rtd:\n    autosummary_generate = glob.glob(\"reference/api/api.rst\")\n\n\n# as of Sphinx 3.1.2 this is the supported way to link custom style sheets\ndef setup(app):\n    app.add_css_file(\"custom.css\")\n", "path": "doc/source/conf.py"}, {"content": "from typing import NamedTuple\n\nfrom packaging.version import Version\n\n__all__ = [\n    \"__version__\",\n    \"version_info\",\n]\n\n__version__ = \"4.3.0\"  # keep in sync with pyproject.toml\n\n\nclass VersionTuple(NamedTuple):\n    \"\"\"\n    A minimal representation of the current version number\n    that can be used downstream to check the runtime version\n    simply by comparing with builtin tuples, as can be done with\n    the runtime Python version using sys.version_info\n\n    https://docs.python.org/3/library/sys.html#sys.version_info\n    \"\"\"\n\n    major: int\n    minor: int\n    micro: int\n    releaselevel: str\n    serial: int\n\n\ndef _parse_to_version_info(version_str: str) -> VersionTuple:\n    # adapted from matplotlib 3.5\n    \"\"\"\n    Parse a version string to a namedtuple analogous to sys.version_info.\n    See:\n    https://packaging.pypa.io/en/latest/version.html#packaging.version.parse\n    https://docs.python.org/3/library/sys.html#sys.version_info\n    \"\"\"\n    v = Version(version_str)\n    if v.pre is None and v.post is None and v.dev is None:\n        return VersionTuple(v.major, v.minor, v.micro, \"final\", 0)\n    elif v.dev is not None:\n        return VersionTuple(v.major, v.minor, v.micro, \"alpha\", v.dev)\n    elif v.pre is not None:\n        releaselevel = {\"a\": \"alpha\", \"b\": \"beta\", \"rc\": \"candidate\"}.get(\n            v.pre[0], \"alpha\"\n        )\n        return VersionTuple(v.major, v.minor, v.micro, releaselevel, v.pre[1])\n    elif v.post is not None:\n        # fallback for v.post: guess-next-dev scheme from setuptools_scm\n        return VersionTuple(v.major, v.minor, v.micro + 1, \"alpha\", v.post)\n    else:\n        return VersionTuple(v.major, v.minor, v.micro + 1, \"alpha\", 0)\n\n\nversion_info = _parse_to_version_info(__version__)\n", "path": "yt/_version.py"}]}