We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
toml package is obsolete
### Steps To Reproduce

_No response_

### Expected Behavior

toml is not installed

### Actual Behavior

toml is installed

### Additional Information

I think our `toml` package is obsolete. The only other package listing it as a requirement is tox, but tox only needs it with ancient pythons: https://github.com/tox-dev/tox/blob/3.27.1/setup.cfg#L45

I think our dependency can be replaced with tomli at which point toml can go.


### Environment

```markdown
Gentoo / git develop
```


### Checklist

- [X] I have searched the existing issues for a bug report that matches the one I want to file, without success.
- [X] I have read the documentation and troubleshoot guide

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `build/sage_bootstrap/creator.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 """
3 Package Creator
4 """
5 
6 # ****************************************************************************
7 #       Copyright (C) 2016 Volker Braun <vbraun.name@gmail.com>
8 #
9 # This program is free software: you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation, either version 2 of the License, or
12 # (at your option) any later version.
13 #                  https://www.gnu.org/licenses/
14 # ****************************************************************************
15 
16 import os
17 
18 import logging
19 log = logging.getLogger()
20 
21 from sage_bootstrap.env import SAGE_ROOT
22 
23 
24 class PackageCreator(object):
25 
26     def __init__(self, package_name):
27         self.package_name = package_name
28         self.path = os.path.join(SAGE_ROOT, 'build', 'pkgs', package_name)
29         try:
30             os.mkdir(self.path)
31         except OSError:
32             pass
33 
34     def set_version(self, version):
35         """
36         Write the version to ``package-version.txt``
37         """
38         with open(os.path.join(self.path, 'package-version.txt'), 'w+') as f:
39             f.write(version)
40             f.write('\n')
41 
42     def set_type(self, pkg_type):
43         """
44         Write the package type to ``type``
45         """
46         with open(os.path.join(self.path, 'type'), 'w+') as f:
47             f.write(pkg_type)
48             f.write('\n')
49 
50     def set_tarball(self, tarball, upstream_url):
51         """
52         Write the tarball name pattern to ``checksums.ini``
53         """
54         with open(os.path.join(self.path, 'checksums.ini'), 'w+') as f:
55             f.write('tarball={0}'.format(tarball))
56             f.write('\n')
57             if upstream_url:
58                 f.write('upstream_url={0}'.format(upstream_url))
59             f.write('\n')
60 
61     def set_description(self, description, license, upstream_contact):
62         """
63         Write the ``SPKG.rst`` file
64         """
65         with open(os.path.join(self.path, 'SPKG.rst'), 'w+') as f:
66             def heading(title, char='-'):
67                 return '{0}\n{1}\n\n'.format(title, char * len(title))
68             if description:
69                 title = '{0}: {1}'.format(self.package_name, description)
70             else:
71                 title = self.package_name
72             f.write(heading(title, '='))
73             f.write(heading('Description'))
74             if description:
75                 f.write('{0}\n\n'.format(description))
76             f.write(heading('License'))
77             if license:
78                 f.write('{0}\n\n'.format(license))
79             f.write(heading('Upstream Contact'))
80             if upstream_contact:
81                 f.write('{0}\n\n'.format(upstream_contact))
82 
83     def set_python_data_and_scripts(self, pypi_package_name=None, source='normal'):
84         """
85         Write the file ``dependencies`` and other files for Python packages.
86 
87         If ``source`` is ``"normal"``, write the files ``spkg-install.in`` and
88         ``install-requires.txt``.
89 
90         If ``source`` is ``"wheel"``, write the file ``install-requires.txt``.
91 
92         If ``source`` is ``"pip"``, write the file ``requirements.txt``.
93         """
94         if pypi_package_name is None:
95             pypi_package_name = self.package_name
96         with open(os.path.join(self.path, 'dependencies'), 'w+') as f:
97             f.write('$(PYTHON) | $(PYTHON_TOOLCHAIN)\n\n')
98             f.write('----------\nAll lines of this file are ignored except the first.\n')
99         if source == 'normal':
100             with open(os.path.join(self.path, 'spkg-install.in'), 'w+') as f:
101                 f.write('cd src\nsdh_pip_install .\n')
102             with open(os.path.join(self.path, 'install-requires.txt'), 'w+') as f:
103                 f.write('{0}\n'.format(pypi_package_name))
104         elif source == 'wheel':
105             with open(os.path.join(self.path, 'install-requires.txt'), 'w+') as f:
106                 f.write('{0}\n'.format(pypi_package_name))
107         elif source == 'pip':
108             with open(os.path.join(self.path, 'requirements.txt'), 'w+') as f:
109                 f.write('{0}\n'.format(pypi_package_name))
110         elif source == 'script':
111             pass
112         else:
113             raise ValueError('package source must be one of normal, script, pip, or wheel')
114
```
--- 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/build/sage_bootstrap/creator.py b/build/sage_bootstrap/creator.py
--- a/build/sage_bootstrap/creator.py
+++ b/build/sage_bootstrap/creator.py
@@ -94,7 +94,7 @@
         if pypi_package_name is None:
             pypi_package_name = self.package_name
         with open(os.path.join(self.path, 'dependencies'), 'w+') as f:
-            f.write('$(PYTHON) | $(PYTHON_TOOLCHAIN)\n\n')
+            f.write(' | $(PYTHON_TOOLCHAIN) $(PYTHON)\n\n')
             f.write('----------\nAll lines of this file are ignored except the first.\n')
         if source == 'normal':
             with open(os.path.join(self.path, 'spkg-install.in'), 'w+') as f:

{"golden_diff": "diff --git a/build/sage_bootstrap/creator.py b/build/sage_bootstrap/creator.py\n--- a/build/sage_bootstrap/creator.py\n+++ b/build/sage_bootstrap/creator.py\n@@ -94,7 +94,7 @@\n         if pypi_package_name is None:\n             pypi_package_name = self.package_name\n         with open(os.path.join(self.path, 'dependencies'), 'w+') as f:\n-            f.write('$(PYTHON) | $(PYTHON_TOOLCHAIN)\\n\\n')\n+            f.write(' | $(PYTHON_TOOLCHAIN) $(PYTHON)\\n\\n')\n             f.write('----------\\nAll lines of this file are ignored except the first.\\n')\n         if source == 'normal':\n             with open(os.path.join(self.path, 'spkg-install.in'), 'w+') as f:\n", "issue": "toml package is obsolete\n### Steps To Reproduce\n\n_No response_\n\n### Expected Behavior\n\ntoml is not installed\n\n### Actual Behavior\n\ntoml is installed\n\n### Additional Information\n\nI think our `toml` package is obsolete. The only other package listing it as a requirement is tox, but tox only needs it with ancient pythons: https://github.com/tox-dev/tox/blob/3.27.1/setup.cfg#L45\r\n\r\nI think our dependency can be replaced with tomli at which point toml can go.\r\n\n\n### Environment\n\n```markdown\nGentoo / git develop\n```\n\n\n### Checklist\n\n- [X] I have searched the existing issues for a bug report that matches the one I want to file, without success.\n- [X] I have read the documentation and troubleshoot guide\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nPackage Creator\n\"\"\"\n\n# ****************************************************************************\n#       Copyright (C) 2016 Volker Braun <vbraun.name@gmail.com>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 2 of the License, or\n# (at your option) any later version.\n#                  https://www.gnu.org/licenses/\n# ****************************************************************************\n\nimport os\n\nimport logging\nlog = logging.getLogger()\n\nfrom sage_bootstrap.env import SAGE_ROOT\n\n\nclass PackageCreator(object):\n\n    def __init__(self, package_name):\n        self.package_name = package_name\n        self.path = os.path.join(SAGE_ROOT, 'build', 'pkgs', package_name)\n        try:\n            os.mkdir(self.path)\n        except OSError:\n            pass\n\n    def set_version(self, version):\n        \"\"\"\n        Write the version to ``package-version.txt``\n        \"\"\"\n        with open(os.path.join(self.path, 'package-version.txt'), 'w+') as f:\n            f.write(version)\n            f.write('\\n')\n\n    def set_type(self, pkg_type):\n        \"\"\"\n        Write the package type to ``type``\n        \"\"\"\n        with open(os.path.join(self.path, 'type'), 'w+') as f:\n            f.write(pkg_type)\n            f.write('\\n')\n\n    def set_tarball(self, tarball, upstream_url):\n        \"\"\"\n        Write the tarball name pattern to ``checksums.ini``\n        \"\"\"\n        with open(os.path.join(self.path, 'checksums.ini'), 'w+') as f:\n            f.write('tarball={0}'.format(tarball))\n            f.write('\\n')\n            if upstream_url:\n                f.write('upstream_url={0}'.format(upstream_url))\n            f.write('\\n')\n\n    def set_description(self, description, license, upstream_contact):\n        \"\"\"\n        Write the ``SPKG.rst`` file\n        \"\"\"\n        with open(os.path.join(self.path, 'SPKG.rst'), 'w+') as f:\n            def heading(title, char='-'):\n                return '{0}\\n{1}\\n\\n'.format(title, char * len(title))\n            if description:\n                title = '{0}: {1}'.format(self.package_name, description)\n            else:\n                title = self.package_name\n            f.write(heading(title, '='))\n            f.write(heading('Description'))\n            if description:\n                f.write('{0}\\n\\n'.format(description))\n            f.write(heading('License'))\n            if license:\n                f.write('{0}\\n\\n'.format(license))\n            f.write(heading('Upstream Contact'))\n            if upstream_contact:\n                f.write('{0}\\n\\n'.format(upstream_contact))\n\n    def set_python_data_and_scripts(self, pypi_package_name=None, source='normal'):\n        \"\"\"\n        Write the file ``dependencies`` and other files for Python packages.\n\n        If ``source`` is ``\"normal\"``, write the files ``spkg-install.in`` and\n        ``install-requires.txt``.\n\n        If ``source`` is ``\"wheel\"``, write the file ``install-requires.txt``.\n\n        If ``source`` is ``\"pip\"``, write the file ``requirements.txt``.\n        \"\"\"\n        if pypi_package_name is None:\n            pypi_package_name = self.package_name\n        with open(os.path.join(self.path, 'dependencies'), 'w+') as f:\n            f.write('$(PYTHON) | $(PYTHON_TOOLCHAIN)\\n\\n')\n            f.write('----------\\nAll lines of this file are ignored except the first.\\n')\n        if source == 'normal':\n            with open(os.path.join(self.path, 'spkg-install.in'), 'w+') as f:\n                f.write('cd src\\nsdh_pip_install .\\n')\n            with open(os.path.join(self.path, 'install-requires.txt'), 'w+') as f:\n                f.write('{0}\\n'.format(pypi_package_name))\n        elif source == 'wheel':\n            with open(os.path.join(self.path, 'install-requires.txt'), 'w+') as f:\n                f.write('{0}\\n'.format(pypi_package_name))\n        elif source == 'pip':\n            with open(os.path.join(self.path, 'requirements.txt'), 'w+') as f:\n                f.write('{0}\\n'.format(pypi_package_name))\n        elif source == 'script':\n            pass\n        else:\n            raise ValueError('package source must be one of normal, script, pip, or wheel')\n", "path": "build/sage_bootstrap/creator.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\"\"\"\nPackage Creator\n\"\"\"\n\n# ****************************************************************************\n#       Copyright (C) 2016 Volker Braun <vbraun.name@gmail.com>\n#\n# This program is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, either version 2 of the License, or\n# (at your option) any later version.\n#                  https://www.gnu.org/licenses/\n# ****************************************************************************\n\nimport os\n\nimport logging\nlog = logging.getLogger()\n\nfrom sage_bootstrap.env import SAGE_ROOT\n\n\nclass PackageCreator(object):\n\n    def __init__(self, package_name):\n        self.package_name = package_name\n        self.path = os.path.join(SAGE_ROOT, 'build', 'pkgs', package_name)\n        try:\n            os.mkdir(self.path)\n        except OSError:\n            pass\n\n    def set_version(self, version):\n        \"\"\"\n        Write the version to ``package-version.txt``\n        \"\"\"\n        with open(os.path.join(self.path, 'package-version.txt'), 'w+') as f:\n            f.write(version)\n            f.write('\\n')\n\n    def set_type(self, pkg_type):\n        \"\"\"\n        Write the package type to ``type``\n        \"\"\"\n        with open(os.path.join(self.path, 'type'), 'w+') as f:\n            f.write(pkg_type)\n            f.write('\\n')\n\n    def set_tarball(self, tarball, upstream_url):\n        \"\"\"\n        Write the tarball name pattern to ``checksums.ini``\n        \"\"\"\n        with open(os.path.join(self.path, 'checksums.ini'), 'w+') as f:\n            f.write('tarball={0}'.format(tarball))\n            f.write('\\n')\n            if upstream_url:\n                f.write('upstream_url={0}'.format(upstream_url))\n            f.write('\\n')\n\n    def set_description(self, description, license, upstream_contact):\n        \"\"\"\n        Write the ``SPKG.rst`` file\n        \"\"\"\n        with open(os.path.join(self.path, 'SPKG.rst'), 'w+') as f:\n            def heading(title, char='-'):\n                return '{0}\\n{1}\\n\\n'.format(title, char * len(title))\n            if description:\n                title = '{0}: {1}'.format(self.package_name, description)\n            else:\n                title = self.package_name\n            f.write(heading(title, '='))\n            f.write(heading('Description'))\n            if description:\n                f.write('{0}\\n\\n'.format(description))\n            f.write(heading('License'))\n            if license:\n                f.write('{0}\\n\\n'.format(license))\n            f.write(heading('Upstream Contact'))\n            if upstream_contact:\n                f.write('{0}\\n\\n'.format(upstream_contact))\n\n    def set_python_data_and_scripts(self, pypi_package_name=None, source='normal'):\n        \"\"\"\n        Write the file ``dependencies`` and other files for Python packages.\n\n        If ``source`` is ``\"normal\"``, write the files ``spkg-install.in`` and\n        ``install-requires.txt``.\n\n        If ``source`` is ``\"wheel\"``, write the file ``install-requires.txt``.\n\n        If ``source`` is ``\"pip\"``, write the file ``requirements.txt``.\n        \"\"\"\n        if pypi_package_name is None:\n            pypi_package_name = self.package_name\n        with open(os.path.join(self.path, 'dependencies'), 'w+') as f:\n            f.write(' | $(PYTHON_TOOLCHAIN) $(PYTHON)\\n\\n')\n            f.write('----------\\nAll lines of this file are ignored except the first.\\n')\n        if source == 'normal':\n            with open(os.path.join(self.path, 'spkg-install.in'), 'w+') as f:\n                f.write('cd src\\nsdh_pip_install .\\n')\n            with open(os.path.join(self.path, 'install-requires.txt'), 'w+') as f:\n                f.write('{0}\\n'.format(pypi_package_name))\n        elif source == 'wheel':\n            with open(os.path.join(self.path, 'install-requires.txt'), 'w+') as f:\n                f.write('{0}\\n'.format(pypi_package_name))\n        elif source == 'pip':\n            with open(os.path.join(self.path, 'requirements.txt'), 'w+') as f:\n                f.write('{0}\\n'.format(pypi_package_name))\n        elif source == 'script':\n            pass\n        else:\n            raise ValueError('package source must be one of normal, script, pip, or wheel')\n", "path": "build/sage_bootstrap/creator.py"}]}