From 1bbc2e34cfccbb187d99bd5b51930207c94c8398 Mon Sep 17 00:00:00 2001 From: Oliver Sauder Date: Thu, 19 Oct 2023 18:01:35 +0400 Subject: [PATCH 1/3] Added Python 3.12 support --- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 4 ++++ README.rst | 2 +- docs/getting-started.md | 2 +- setup.py | 1 + tox.ini | 4 ++-- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b167fde5..17c6a9a5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] env: PYTHON: ${{ matrix.python-version }} steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e69577b..c4c9eca0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ any parts of the framework not mentioned in the documentation should generally b ## [Unreleased] +### Added + +* Added support for Python 3.12 + ### Fixed * Fixed OpenAPI schema generation for `Serializer` when used inside another `Serializer` or as a child of `ListField`. diff --git a/README.rst b/README.rst index f156f3ab..59ba17da 100644 --- a/README.rst +++ b/README.rst @@ -92,7 +92,7 @@ As a Django REST framework JSON:API (short DJA) we are trying to address followi Requirements ------------ -1. Python (3.8, 3.9, 3.10, 3.11) +1. Python (3.8, 3.9, 3.10, 3.11, 3.12) 2. Django (3.2, 4.1, 4.2) 3. Django REST framework (3.13, 3.14) diff --git a/docs/getting-started.md b/docs/getting-started.md index f1ab7d4d..e1ca4abd 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -51,7 +51,7 @@ like the following: ## Requirements -1. Python (3.8, 3.9, 3.10, 3.11) +1. Python (3.8, 3.9, 3.10, 3.11, 3.12) 2. Django (3.2, 4.1, 4.2) 3. Django REST framework (3.13, 3.14) diff --git a/setup.py b/setup.py index eeb88b97..359324fb 100755 --- a/setup.py +++ b/setup.py @@ -90,6 +90,7 @@ def get_package_data(package): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", diff --git a/tox.ini b/tox.ini index a4749185..3943b462 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ envlist = py{38,39,310}-django32-drf{313,314,master}, py{38,39,310,311}-django41-drf{314,master}, - py{38,39,310,311}-django42-drf{314,master}, + py{38,39,310,311,312}-django42-drf{314,master}, black, docs, lint @@ -54,5 +54,5 @@ ignore_outcome = true [testenv:py{38,39,310,311}-django41-drfmaster] ignore_outcome = true -[testenv:py{38,39,310,311}-django42-drfmaster] +[testenv:py{38,39,310,311,312}-django42-drfmaster] ignore_outcome = true From 6d046a11b8353ebafeb515afe135b55806b461ac Mon Sep 17 00:00:00 2001 From: Oliver Sauder Date: Mon, 20 Nov 2023 20:36:58 +0400 Subject: [PATCH 2/3] Tagged master branch of django-polymorphic This way Python 3.12 will work as following PR was merged. https://github.com/django-polymorphic/django-polymorphic/pull/541 --- requirements/requirements-optionals.txt | 5 ++++- setup.cfg | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements/requirements-optionals.txt b/requirements/requirements-optionals.txt index fc16b02c..6dd4b8d7 100644 --- a/requirements/requirements-optionals.txt +++ b/requirements/requirements-optionals.txt @@ -1,4 +1,7 @@ django-filter==23.3 -django-polymorphic==3.1.0 +# TODO once next version has been released (>3.1.0) +# this should be set to pinned version again +# see https://github.com/django-polymorphic/django-polymorphic/pull/541 +django-polymorphic@git+https://github.com/django-polymorphic/django-polymorphic@master pyyaml==6.0.1 uritemplate==4.1.1 diff --git a/setup.cfg b/setup.cfg index f55ed558..ad2536a9 100644 --- a/setup.cfg +++ b/setup.cfg @@ -65,9 +65,6 @@ filterwarnings = error::PendingDeprecationWarning # Remove when DRF is not depending on it anymore ignore:The django.utils.timezone.utc alias is deprecated. - # can be removed once fixed in django polymorphic - ignore:pkg_resources is deprecated as an API - ignore:Deprecated call to `pkg_resource # Django filter schema generation. Can be removed once we remove # schema support ignore:Built-in schema generation is deprecated. From af8ff7c009d953a6c1438cd51d6ad1eecc47e9bd Mon Sep 17 00:00:00 2001 From: Oliver Sauder Date: Mon, 20 Nov 2023 20:52:21 +0400 Subject: [PATCH 3/3] Ignore warning of django filter Can be removed once https://github.com/carltongibson/django-filter/pull/1623 is released. --- requirements/requirements-optionals.txt | 4 ++-- setup.cfg | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/requirements/requirements-optionals.txt b/requirements/requirements-optionals.txt index 6dd4b8d7..f01f61de 100644 --- a/requirements/requirements-optionals.txt +++ b/requirements/requirements-optionals.txt @@ -1,6 +1,6 @@ django-filter==23.3 -# TODO once next version has been released (>3.1.0) -# this should be set to pinned version again +# once next version has been released (>3.1.0) this +# should be set to pinned version again # see https://github.com/django-polymorphic/django-polymorphic/pull/541 django-polymorphic@git+https://github.com/django-polymorphic/django-polymorphic@master pyyaml==6.0.1 diff --git a/setup.cfg b/setup.cfg index ad2536a9..a02f67e6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -68,6 +68,9 @@ filterwarnings = # Django filter schema generation. Can be removed once we remove # schema support ignore:Built-in schema generation is deprecated. + # can be removed once django filter has released a new version including + # https://github.com/carltongibson/django-filter/pull/1623 + ignore:'pkgutil.find_loader' is deprecated and slated for removal testpaths = example tests pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy