Repository: cookiecutter/cookiecutter (language: python)

Issue:
Add Python 3.12 support
* Cookiecutter version: 2.5.0
* Python version: 3.12
* Operating System: All



Discussion / hints:

Fix patch:
diff --git a/.github/workflows/pip-publish.yml b/.github/workflows/pip-publish.yml
index b0e335761..d4d5b11ce 100644
--- a/.github/workflows/pip-publish.yml
+++ b/.github/workflows/pip-publish.yml
@@ -19,7 +19,7 @@ jobs:
     - name: Set up Python
       uses: actions/setup-python@v4
       with:
-        python-version: "3.11"
+        python-version: "3.12"
 
     - name: Install pypa/build
       run: >-
diff --git a/README.md b/README.md
index 1657eeb56..fc9328d01 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@ python -m pip install --user cookiecutter
 
 - **Cross-Platform:** Supports Windows, Mac, and Linux.
 - **User-Friendly:** No Python knowledge required.
-- **Versatile:** Compatible with Python 3.7 to 3.11.
+- **Versatile:** Compatible with Python 3.7 to 3.12.
 - **Multi-Language Support:** Use templates in any language or markup format.
 
 ### For Users
diff --git a/setup.py b/setup.py
index 9442a1f1e..d6f97abc9 100644
--- a/setup.py
+++ b/setup.py
@@ -68,6 +68,7 @@ def _get_version() -> str:
         "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",
diff --git a/tox.ini b/tox.ini
index 2a0a5f40d..6164cf436 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,7 +1,7 @@
 [tox]
 envlist =
     lint
-    py{311, 310, 39, 38, 37}
+    py{312, 311, 310, 39, 38, 37}
     safety
     docs
 
@@ -27,7 +27,8 @@ depends =
     py38: py39
     py39: py310
     py310: py311
-    py311: lint
+    py311: py312
+    py312: lint
 deps = -rtest_requirements.txt
 commands = pytest --color=yes --cov-report=html --cov-report=xml --cov-branch --cov-fail-under=100 {posargs}
 


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 64dcb78ca..f8a48810d 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -45,6 +45,7 @@ jobs:
           - "3.9"
           - "3.10"
           - "3.11"
+          - "3.12"
     steps:
       - uses: actions/checkout@v4
       - name: Set up Python ${{ matrix.python }}
diff --git a/test_requirements.txt b/test_requirements.txt
index febcb2ae3..8128a06ca 100644
--- a/test_requirements.txt
+++ b/test_requirements.txt
@@ -4,3 +4,4 @@ pytest-mock
 freezegun
 safety
 pre-commit
+tox