diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 9b88b9be9316..f61692ef7964 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -30,7 +30,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
- python-version: '3.12'
+ python-version: '3.13'
cache: 'pip'
cache-dependency-path: 'docs/requirements.txt'
- run: python -m pip install -r docs/requirements.txt
@@ -48,7 +48,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
- python-version: '3.12'
+ python-version: '3.13'
- run: python -m pip install blacken-docs
- name: Build docs
run: |
diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml
index 3875e755f912..7c64dc98ff4c 100644
--- a/.github/workflows/linters.yml
+++ b/.github/workflows/linters.yml
@@ -27,7 +27,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
- python-version: '3.12'
+ python-version: '3.13'
- run: python -m pip install flake8
- name: flake8
# Pinned to v3.0.0.
@@ -44,7 +44,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
- python-version: '3.12'
+ python-version: '3.13'
- run: python -m pip install isort
- name: isort
# Pinned to v3.0.0.
diff --git a/.github/workflows/python_matrix.yml b/.github/workflows/python_matrix.yml
new file mode 100644
index 000000000000..ab48c2be8322
--- /dev/null
+++ b/.github/workflows/python_matrix.yml
@@ -0,0 +1,52 @@
+name: Python Matrix from config file
+
+on:
+ pull_request:
+ types: [labeled, synchronize, opened, reopened]
+ paths-ignore:
+ - 'docs/**'
+ workflow_dispatch:
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+permissions:
+ contents: read
+
+jobs:
+ define-matrix:
+ if: contains(github.event.pull_request.labels.*.name, 'python-matrix')
+ runs-on: ubuntu-latest
+ outputs:
+ python_versions_output: ${{ steps.set-matrix.outputs.python_versions }}
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - id: set-matrix
+ run: |
+ python_versions=$(sed -n "s/^.*Programming Language :: Python :: \([[:digit:]]\+\.[[:digit:]]\+\).*$/'\1', /p" pyproject.toml | tr -d '\n' | sed 's/, $//g')
+ echo "Supported Python versions: $python_versions"
+ echo "python_versions=[$python_versions]" >> "$GITHUB_OUTPUT"
+ python:
+ runs-on: ubuntu-latest
+ needs: define-matrix
+ strategy:
+ matrix:
+ python-version: ${{ fromJson(needs.define-matrix.outputs.python_versions_output) }}
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ - name: Set up Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v5
+ with:
+ python-version: ${{ matrix.python-version }}
+ cache: 'pip'
+ cache-dependency-path: 'tests/requirements/py3.txt'
+ - name: Install libmemcached-dev for pylibmc
+ run: sudo apt-get install libmemcached-dev
+ - name: Install and upgrade packaging tools
+ run: python -m pip install --upgrade pip setuptools wheel
+ - run: python -m pip install -r tests/requirements/py3.txt -e .
+ - name: Run tests
+ run: python tests/runtests.py -v2
diff --git a/.github/workflows/schedule_tests.yml b/.github/workflows/schedule_tests.yml
index c4523af4a030..495a61637846 100644
--- a/.github/workflows/schedule_tests.yml
+++ b/.github/workflows/schedule_tests.yml
@@ -19,7 +19,7 @@ jobs:
- '3.10'
- '3.11'
- '3.12'
- - '3.13-dev'
+ - '3.13'
name: Windows, SQLite, Python ${{ matrix.python-version }}
continue-on-error: true
steps:
@@ -46,7 +46,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
- python-version: '3.12'
+ python-version: '3.13'
cache: 'pip'
- name: Install libmemcached-dev for pylibmc
run: sudo apt-get install libmemcached-dev
@@ -145,7 +145,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
- python-version: '3.12'
+ python-version: '3.13'
cache: 'pip'
cache-dependency-path: 'tests/requirements/py3.txt'
- name: Install libmemcached-dev for pylibmc
@@ -181,7 +181,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
- python-version: '3.12'
+ python-version: '3.13'
cache: 'pip'
cache-dependency-path: 'tests/requirements/py3.txt'
- name: Install libmemcached-dev for pylibmc
diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml
index fa916a0dedf0..bb82eb4203c5 100644
--- a/.github/workflows/selenium.yml
+++ b/.github/workflows/selenium.yml
@@ -24,7 +24,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
- python-version: '3.12'
+ python-version: '3.13'
cache: 'pip'
cache-dependency-path: 'tests/requirements/py3.txt'
- name: Install libmemcached-dev for pylibmc
@@ -61,7 +61,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
- python-version: '3.12'
+ python-version: '3.13'
cache: 'pip'
cache-dependency-path: 'tests/requirements/py3.txt'
- name: Install libmemcached-dev for pylibmc
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index abe7c78a2554..5de554721d1f 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
python-version:
- - '3.12'
+ - '3.13'
name: Windows, SQLite, Python ${{ matrix.python-version }}
steps:
- name: Checkout
diff --git a/django/__init__.py b/django/__init__.py
index e0b92dccfb39..e3f6bb49533d 100644
--- a/django/__init__.py
+++ b/django/__init__.py
@@ -1,6 +1,6 @@
from django.utils.version import get_version
-VERSION = (5, 1, 2, "final", 0)
+VERSION = (5, 1, 3, "final", 0)
__version__ = get_version(VERSION)
diff --git a/django/contrib/admin/templates/admin/includes/fieldset.html b/django/contrib/admin/templates/admin/includes/fieldset.html
index a9d3f927025e..c94d46fd6478 100644
--- a/django/contrib/admin/templates/admin/includes/fieldset.html
+++ b/django/contrib/admin/templates/admin/includes/fieldset.html
@@ -1,8 +1,7 @@
-{% with name=fieldset.name|default:""|slugify %}
-