We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add Python 3.12 support
* Cookiecutter version: 2.5.0
* Python version: 3.12
* Operating System: All


--- 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 """cookiecutter distutils configuration."""
2 from pathlib import Path
3 
4 from setuptools import setup
5 
6 
7 def _get_version() -> str:
8     """Read cookiecutter/VERSION.txt and return its contents."""
9     path = Path("cookiecutter").resolve()
10     version_file = path / "VERSION.txt"
11     return version_file.read_text().strip()
12 
13 
14 version = _get_version()
15 
16 
17 with open('README.md', encoding='utf-8') as readme_file:
18     readme = readme_file.read()
19 
20 
21 requirements = [
22     'binaryornot>=0.4.4',
23     'Jinja2>=2.7,<4.0.0',
24     'click>=7.0,<9.0.0',
25     'pyyaml>=5.3.1',
26     'python-slugify>=4.0.0',
27     'requests>=2.23.0',
28     'arrow',
29     'rich',
30 ]
31 
32 setup(
33     name='cookiecutter',
34     version=version,
35     description=(
36         'A command-line utility that creates projects from project '
37         'templates, e.g. creating a Python package project from a '
38         'Python package project template.'
39     ),
40     long_description=readme,
41     long_description_content_type='text/markdown',
42     author='Audrey Feldroy',
43     author_email='audreyr@gmail.com',
44     url='https://github.com/cookiecutter/cookiecutter',
45     project_urls={
46         "Documentation": "https://cookiecutter.readthedocs.io",
47         "Issues": "https://github.com/cookiecutter/cookiecutter/issues",
48         "Discord": "https://discord.gg/9BrxzPKuEW",
49     },
50     packages=['cookiecutter'],
51     package_dir={'cookiecutter': 'cookiecutter'},
52     entry_points={'console_scripts': ['cookiecutter = cookiecutter.__main__:main']},
53     include_package_data=True,
54     python_requires='>=3.7',
55     install_requires=requirements,
56     license='BSD',
57     zip_safe=False,
58     classifiers=[
59         "Development Status :: 5 - Production/Stable",
60         "Environment :: Console",
61         "Intended Audience :: Developers",
62         "Natural Language :: English",
63         "License :: OSI Approved :: BSD License",
64         "Programming Language :: Python :: 3 :: Only",
65         "Programming Language :: Python :: 3",
66         "Programming Language :: Python :: 3.7",
67         "Programming Language :: Python :: 3.8",
68         "Programming Language :: Python :: 3.9",
69         "Programming Language :: Python :: 3.10",
70         "Programming Language :: Python :: 3.11",
71         "Programming Language :: Python :: Implementation :: CPython",
72         "Programming Language :: Python :: Implementation :: PyPy",
73         "Programming Language :: Python",
74         "Topic :: Software Development",
75     ],
76     keywords=[
77         "cookiecutter",
78         "Python",
79         "projects",
80         "project templates",
81         "Jinja2",
82         "skeleton",
83         "scaffolding",
84         "project directory",
85         "package",
86         "packaging",
87     ],
88 )
89
```
--- 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
@@ -68,6 +68,7 @@
         "Programming Language :: Python :: 3.9",
         "Programming Language :: Python :: 3.10",
         "Programming Language :: Python :: 3.11",
+        "Programming Language :: Python :: 3.12",
         "Programming Language :: Python :: Implementation :: CPython",
         "Programming Language :: Python :: Implementation :: PyPy",
         "Programming Language :: Python",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -68,6 +68,7 @@\n         \"Programming Language :: Python :: 3.9\",\n         \"Programming Language :: Python :: 3.10\",\n         \"Programming Language :: Python :: 3.11\",\n+        \"Programming Language :: Python :: 3.12\",\n         \"Programming Language :: Python :: Implementation :: CPython\",\n         \"Programming Language :: Python :: Implementation :: PyPy\",\n         \"Programming Language :: Python\",\n", "issue": "Add Python 3.12 support\n* Cookiecutter version: 2.5.0\r\n* Python version: 3.12\r\n* Operating System: All\r\n\n", "before_files": [{"content": "\"\"\"cookiecutter distutils configuration.\"\"\"\nfrom pathlib import Path\n\nfrom setuptools import setup\n\n\ndef _get_version() -> str:\n    \"\"\"Read cookiecutter/VERSION.txt and return its contents.\"\"\"\n    path = Path(\"cookiecutter\").resolve()\n    version_file = path / \"VERSION.txt\"\n    return version_file.read_text().strip()\n\n\nversion = _get_version()\n\n\nwith open('README.md', encoding='utf-8') as readme_file:\n    readme = readme_file.read()\n\n\nrequirements = [\n    'binaryornot>=0.4.4',\n    'Jinja2>=2.7,<4.0.0',\n    'click>=7.0,<9.0.0',\n    'pyyaml>=5.3.1',\n    'python-slugify>=4.0.0',\n    'requests>=2.23.0',\n    'arrow',\n    'rich',\n]\n\nsetup(\n    name='cookiecutter',\n    version=version,\n    description=(\n        'A command-line utility that creates projects from project '\n        'templates, e.g. creating a Python package project from a '\n        'Python package project template.'\n    ),\n    long_description=readme,\n    long_description_content_type='text/markdown',\n    author='Audrey Feldroy',\n    author_email='audreyr@gmail.com',\n    url='https://github.com/cookiecutter/cookiecutter',\n    project_urls={\n        \"Documentation\": \"https://cookiecutter.readthedocs.io\",\n        \"Issues\": \"https://github.com/cookiecutter/cookiecutter/issues\",\n        \"Discord\": \"https://discord.gg/9BrxzPKuEW\",\n    },\n    packages=['cookiecutter'],\n    package_dir={'cookiecutter': 'cookiecutter'},\n    entry_points={'console_scripts': ['cookiecutter = cookiecutter.__main__:main']},\n    include_package_data=True,\n    python_requires='>=3.7',\n    install_requires=requirements,\n    license='BSD',\n    zip_safe=False,\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Environment :: Console\",\n        \"Intended Audience :: Developers\",\n        \"Natural Language :: English\",\n        \"License :: OSI Approved :: BSD License\",\n        \"Programming Language :: Python :: 3 :: Only\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Programming Language :: Python :: Implementation :: PyPy\",\n        \"Programming Language :: Python\",\n        \"Topic :: Software Development\",\n    ],\n    keywords=[\n        \"cookiecutter\",\n        \"Python\",\n        \"projects\",\n        \"project templates\",\n        \"Jinja2\",\n        \"skeleton\",\n        \"scaffolding\",\n        \"project directory\",\n        \"package\",\n        \"packaging\",\n    ],\n)\n", "path": "setup.py"}], "after_files": [{"content": "\"\"\"cookiecutter distutils configuration.\"\"\"\nfrom pathlib import Path\n\nfrom setuptools import setup\n\n\ndef _get_version() -> str:\n    \"\"\"Read cookiecutter/VERSION.txt and return its contents.\"\"\"\n    path = Path(\"cookiecutter\").resolve()\n    version_file = path / \"VERSION.txt\"\n    return version_file.read_text().strip()\n\n\nversion = _get_version()\n\n\nwith open('README.md', encoding='utf-8') as readme_file:\n    readme = readme_file.read()\n\n\nrequirements = [\n    'binaryornot>=0.4.4',\n    'Jinja2>=2.7,<4.0.0',\n    'click>=7.0,<9.0.0',\n    'pyyaml>=5.3.1',\n    'python-slugify>=4.0.0',\n    'requests>=2.23.0',\n    'arrow',\n    'rich',\n]\n\nsetup(\n    name='cookiecutter',\n    version=version,\n    description=(\n        'A command-line utility that creates projects from project '\n        'templates, e.g. creating a Python package project from a '\n        'Python package project template.'\n    ),\n    long_description=readme,\n    long_description_content_type='text/markdown',\n    author='Audrey Feldroy',\n    author_email='audreyr@gmail.com',\n    url='https://github.com/cookiecutter/cookiecutter',\n    project_urls={\n        \"Documentation\": \"https://cookiecutter.readthedocs.io\",\n        \"Issues\": \"https://github.com/cookiecutter/cookiecutter/issues\",\n        \"Discord\": \"https://discord.gg/9BrxzPKuEW\",\n    },\n    packages=['cookiecutter'],\n    package_dir={'cookiecutter': 'cookiecutter'},\n    entry_points={'console_scripts': ['cookiecutter = cookiecutter.__main__:main']},\n    include_package_data=True,\n    python_requires='>=3.7',\n    install_requires=requirements,\n    license='BSD',\n    zip_safe=False,\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Environment :: Console\",\n        \"Intended Audience :: Developers\",\n        \"Natural Language :: English\",\n        \"License :: OSI Approved :: BSD License\",\n        \"Programming Language :: Python :: 3 :: Only\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\n        \"Programming Language :: Python :: 3.12\",\n        \"Programming Language :: Python :: Implementation :: CPython\",\n        \"Programming Language :: Python :: Implementation :: PyPy\",\n        \"Programming Language :: Python\",\n        \"Topic :: Software Development\",\n    ],\n    keywords=[\n        \"cookiecutter\",\n        \"Python\",\n        \"projects\",\n        \"project templates\",\n        \"Jinja2\",\n        \"skeleton\",\n        \"scaffolding\",\n        \"project directory\",\n        \"package\",\n        \"packaging\",\n    ],\n)\n", "path": "setup.py"}]}