From f715bc8990b5b8a1df948c2b71e8edbdda47e7db Mon Sep 17 00:00:00 2001 From: aj2s <72272843+aj2s@users.noreply.github.com> Date: Fri, 17 Oct 2025 07:20:23 -0700 Subject: [PATCH 1/3] Fixed #36669 -- Doc'd that negative indexes are not supported in F() slices. --- docs/ref/models/expressions.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ref/models/expressions.txt b/docs/ref/models/expressions.txt index fc02f08f0d2c..b542fe7d715e 100644 --- a/docs/ref/models/expressions.txt +++ b/docs/ref/models/expressions.txt @@ -182,8 +182,8 @@ Slicing ``F()`` expressions For string-based fields, text-based fields, and :class:`~django.contrib.postgres.fields.ArrayField`, you can use Python's -array-slicing syntax. The indices are 0-based and the ``step`` argument to -``slice`` is not supported. For example: +array-slicing syntax. The indices are 0-based. The ``step`` argument to +``slice`` and negative indexing are not supported. For example: .. code-block:: pycon From 2d9c194d5a0d9ae746e16ee5f641e30d544dc31b Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Fri, 17 Oct 2025 15:34:05 +0200 Subject: [PATCH 2/3] Refs #35844 -- Relaxed GEOSIOTest.test02_wktwriter() test assertion. --- tests/gis_tests/geos_tests/test_io.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/gis_tests/geos_tests/test_io.py b/tests/gis_tests/geos_tests/test_io.py index 14646ce385cf..419ecfc3b7d7 100644 --- a/tests/gis_tests/geos_tests/test_io.py +++ b/tests/gis_tests/geos_tests/test_io.py @@ -41,10 +41,7 @@ def test01_wktreader(self): def test02_wktwriter(self): # Creating a WKTWriter instance, testing its ptr property. wkt_w = WKTWriter() - msg = ( - "Incompatible pointer type: " - "." - ) + msg = "Incompatible pointer type: " with self.assertRaisesMessage(TypeError, msg): wkt_w.ptr = WKTReader.ptr_type() From 56977b466c33ca3da14a1ed2609172425a76a34e Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Mon, 13 Oct 2025 16:34:26 +0200 Subject: [PATCH 3/3] Refs #35844 -- Doc'd Python 3.14 compatibility. --- .github/workflows/docs.yml | 6 +++--- .github/workflows/linters.yml | 4 ++-- .github/workflows/postgis.yml | 2 +- .github/workflows/schedule_tests.yml | 10 +++++----- .github/workflows/screenshots.yml | 2 +- .github/workflows/selenium.yml | 4 ++-- .github/workflows/tests.yml | 2 +- docs/faq/install.txt | 4 ++-- docs/howto/windows.txt | 4 ++-- docs/intro/reusable-apps.txt | 1 + docs/releases/5.2.8.txt | 3 ++- docs/releases/5.2.txt | 5 +++-- docs/releases/6.0.txt | 4 ++-- pyproject.toml | 1 + tests/mail/tests.py | 2 +- tests/requirements/py3.txt | 2 +- tox.ini | 2 +- 17 files changed, 31 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 90731ebcfc94..6e4a9cdd1bbf 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,7 +29,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' cache: 'pip' cache-dependency-path: 'docs/requirements.txt' - run: python -m pip install -r docs/requirements.txt @@ -47,7 +47,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' - run: python -m pip install blacken-docs - name: Build docs run: | @@ -68,7 +68,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' - run: python -m pip install sphinx-lint - name: Build docs run: | diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 9a70cb03b7c6..b5359efc3d24 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -27,7 +27,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' - 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@v6 with: - python-version: '3.13' + python-version: '3.14' - run: python -m pip install isort - name: isort # Pinned to v3.0.0. diff --git a/.github/workflows/postgis.yml b/.github/workflows/postgis.yml index 7976fdc03d78..e20735233bc4 100644 --- a/.github/workflows/postgis.yml +++ b/.github/workflows/postgis.yml @@ -42,7 +42,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - name: Update apt repo diff --git a/.github/workflows/schedule_tests.yml b/.github/workflows/schedule_tests.yml index 6ac72e24bbe8..402659b33828 100644 --- a/.github/workflows/schedule_tests.yml +++ b/.github/workflows/schedule_tests.yml @@ -18,7 +18,7 @@ jobs: python-version: - '3.12' - '3.13' - - '3.14-dev' + - '3.14' name: Windows, SQLite, Python ${{ matrix.python-version }} continue-on-error: true steps: @@ -45,7 +45,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' cache: 'pip' - name: Install libmemcached-dev for pylibmc run: sudo apt-get install libmemcached-dev @@ -86,7 +86,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - name: Install libmemcached-dev for pylibmc @@ -122,7 +122,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - name: Install libmemcached-dev for pylibmc @@ -167,7 +167,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - name: Install libmemcached-dev for pylibmc diff --git a/.github/workflows/screenshots.yml b/.github/workflows/screenshots.yml index c29cfc9eedf5..239b6958d857 100644 --- a/.github/workflows/screenshots.yml +++ b/.github/workflows/screenshots.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' cache: 'pip' cache-dependency-path: 'tests/requirements/py3.txt' - name: Install and upgrade packaging tools diff --git a/.github/workflows/selenium.yml b/.github/workflows/selenium.yml index c5e22d70c320..b9a573e37b3c 100644 --- a/.github/workflows/selenium.yml +++ b/.github/workflows/selenium.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v6 with: - python-version: '3.13' + python-version: '3.14' 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@v6 with: - python-version: '3.13' + python-version: '3.14' 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 eb0966e7a278..9428a9de0c2e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: python-version: - - '3.13' + - '3.14' name: Windows, SQLite, Python ${{ matrix.python-version }} steps: - name: Checkout diff --git a/docs/faq/install.txt b/docs/faq/install.txt index dcd7bcfdf5db..6f49bbe22bd8 100644 --- a/docs/faq/install.txt +++ b/docs/faq/install.txt @@ -53,8 +53,8 @@ Django version Python versions 4.2 3.8, 3.9, 3.10, 3.11, 3.12 (added in 4.2.8) 5.0 3.10, 3.11, 3.12 5.1 3.10, 3.11, 3.12, 3.13 (added in 5.1.3) -5.2 3.10, 3.11, 3.12, 3.13 -6.0 3.12, 3.13 +5.2 3.10, 3.11, 3.12, 3.13, 3.14 (added in 5.2.8) +6.0 3.12, 3.13, 3.14 6.1 3.12, 3.13, 3.14 ============== =============== diff --git a/docs/howto/windows.txt b/docs/howto/windows.txt index 235b18a24ff3..63e497be04c5 100644 --- a/docs/howto/windows.txt +++ b/docs/howto/windows.txt @@ -2,7 +2,7 @@ How to install Django on Windows ================================ -This document will guide you through installing Python 3.13 and Django on +This document will guide you through installing Python 3.14 and Django on Windows. It also provides instructions for setting up a virtual environment, which makes it easier to work on Python projects. This is meant as a beginner's guide for users working on Django projects and does not reflect how Django @@ -18,7 +18,7 @@ Install Python ============== Django is a Python web framework, thus requiring Python to be installed on your -machine. At the time of writing, Python 3.13 is the latest version. +machine. At the time of writing, Python 3.14 is the latest version. To install Python on your machine go to https://www.python.org/downloads/. The website should offer you a download button for the latest Python version. diff --git a/docs/intro/reusable-apps.txt b/docs/intro/reusable-apps.txt index c82a2b456e18..627cf3292eac 100644 --- a/docs/intro/reusable-apps.txt +++ b/docs/intro/reusable-apps.txt @@ -235,6 +235,7 @@ this. For a small app like polls, this process isn't too difficult. "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", ] diff --git a/docs/releases/5.2.8.txt b/docs/releases/5.2.8.txt index dc750e4636f0..415101238732 100644 --- a/docs/releases/5.2.8.txt +++ b/docs/releases/5.2.8.txt @@ -4,7 +4,8 @@ Django 5.2.8 release notes *Expected November 5, 2025* -Django 5.2.8 fixes several bugs in 5.2.7. +Django 5.2.8 fixes several bugs in 5.2.7 and adds compatibility with Python +3.14. Bugfixes ======== diff --git a/docs/releases/5.2.txt b/docs/releases/5.2.txt index fa005bd55098..728218cb0781 100644 --- a/docs/releases/5.2.txt +++ b/docs/releases/5.2.txt @@ -23,8 +23,9 @@ end in April 2026. Python compatibility ==================== -Django 5.2 supports Python 3.10, 3.11, 3.12, and 3.13. We **highly recommend** -and only officially support the latest release of each series. +Django 5.2 supports Python 3.10, 3.11, 3.12, 3.13, and 3.14 (as of 5.2.8). We +**highly recommend** and only officially support the latest release of each +series. .. _whats-new-5.2: diff --git a/docs/releases/6.0.txt b/docs/releases/6.0.txt index fd30c66121ee..0c9da42cc651 100644 --- a/docs/releases/6.0.txt +++ b/docs/releases/6.0.txt @@ -18,8 +18,8 @@ project. Python compatibility ==================== -Django 6.0 supports Python 3.12 and 3.13. We **highly recommend**, and only -officially support, the latest release of each series. +Django 6.0 supports Python 3.12, 3.13, and 3.14. We **highly recommend**, and +only officially support, the latest release of each series. The Django 5.2.x series is the last to support Python 3.10 and 3.11. diff --git a/pyproject.toml b/pyproject.toml index 3fc10a0131f1..38a4457c0ec8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ classifiers = [ "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", diff --git a/tests/mail/tests.py b/tests/mail/tests.py index f1d7fcf43e3b..1dba83eb8ece 100644 --- a/tests/mail/tests.py +++ b/tests/mail/tests.py @@ -258,7 +258,7 @@ def test_nonascii_as_string_with_ascii_charset(self, mock_set_payload): `surrogateescape`. Following https://github.com/python/cpython/issues/76511, newer - versions of Python (3.12.3 and 3.13) ensure that a message's + versions of Python (3.12.3 and 3.13+) ensure that a message's payload is encoded with the provided charset and `surrogateescape` is used as the error handling strategy. diff --git a/tests/requirements/py3.txt b/tests/requirements/py3.txt index 1a16cc044093..76a017aab48f 100644 --- a/tests/requirements/py3.txt +++ b/tests/requirements/py3.txt @@ -7,7 +7,7 @@ docutils >= 0.19 geoip2 >= 4.8.0 jinja2 >= 2.11.0 numpy >= 1.26.0 -Pillow >= 10.1.0; sys.platform != 'win32' or python_version < '3.14' +Pillow >= 10.1.0 # pylibmc/libmemcached can't be built on Windows. pylibmc; sys_platform != 'win32' pymemcache >= 3.4.0 diff --git a/tox.ini b/tox.ini index 4f1274a266b1..8d4698f08445 100644 --- a/tox.ini +++ b/tox.ini @@ -27,7 +27,7 @@ setenv = PYTHONDONTWRITEBYTECODE=1 deps = -e . - py{3,312,313}: -rtests/requirements/py3.txt + py{3,312,313,314}: -rtests/requirements/py3.txt postgres: -rtests/requirements/postgres.txt mysql: -rtests/requirements/mysql.txt oracle: -rtests/requirements/oracle.txt