From 4e87aaa55bece38f5f7837c6db35a4eb229fd210 Mon Sep 17 00:00:00 2001 From: Lev Lybin Date: Wed, 11 Sep 2024 19:11:23 +0700 Subject: [PATCH] drop support old django 3.2, 4.0, 4.1 drop support python 3.8 3.9 drop support drf 3.11 3.12 3.13 --- .github/workflows/tests.yml | 46 +++++---------------- drf_recaptcha/fields.py | 2 + poetry.lock | 79 +++++++++++++++---------------------- pyproject.toml | 15 +++---- 4 files changed, 48 insertions(+), 94 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1531e9c..71d80a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,42 +9,16 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] - django-version: [ "3.2", "4.0", "4.1", "4.2", "5.0", "5.1" ] - drf-version: [ "3.11", "3.12", "3.13", "3.14", "3.15" ] - exclude: - # https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django - - django-version: "4.2" - python-version: "3.8" - - django-version: "4.2" - python-version: "3.9" - - django-version: "5.0" - python-version: "3.8" - - django-version: "5.0" - python-version: "3.9" - - django-version: "5.1" - python-version: "3.8" - - django-version: "5.1" - python-version: "3.9" - # https://www.django-rest-framework.org/community/release-notes/ - - django-version: "4.2" - drf-version: "3.11" - - django-version: "4.2" - drf-version: "3.12" - - django-version: "4.2" - drf-version: "3.13" - - django-version: "5.0" - drf-version: "3.11" - - django-version: "5.0" - drf-version: "3.12" - - django-version: "5.0" - drf-version: "3.13" - - django-version: "5.1" - drf-version: "3.11" - - django-version: "5.1" - drf-version: "3.12" - - django-version: "5.1" - drf-version: "3.13" + python-version: [ "3.10", "3.11", "3.12" ] + django-version: [ "4.2", "5.0", "5.1" ] + drf-version: [ "3.14", "3.15" ] +# exclude: +# #https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django +# - django-version: "4.2" +# python-version: "3.8" +# # https://www.django-rest-framework.org/community/release-notes/ +# - django-version: "5.1" +# drf-version: "3.13" steps: #---------------------------------------------- # check-out repo and set-up python diff --git a/drf_recaptcha/fields.py b/drf_recaptcha/fields.py index 2e51161..cdf98db 100644 --- a/drf_recaptcha/fields.py +++ b/drf_recaptcha/fields.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from django.conf import settings from django.core.exceptions import ImproperlyConfigured from rest_framework.serializers import CharField diff --git a/poetry.lock b/poetry.lock index 2ebde65..9290733 100644 --- a/poetry.lock +++ b/poetry.lock @@ -17,34 +17,6 @@ typing-extensions = {version = ">=4", markers = "python_version < \"3.11\""} [package.extras] tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"] -[[package]] -name = "backports-zoneinfo" -version = "0.2.1" -description = "Backport of the standard library zoneinfo module" -optional = false -python-versions = ">=3.6" -files = [ - {file = "backports.zoneinfo-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:da6013fd84a690242c310d77ddb8441a559e9cb3d3d59ebac9aca1a57b2e18bc"}, - {file = "backports.zoneinfo-0.2.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:89a48c0d158a3cc3f654da4c2de1ceba85263fafb861b98b59040a5086259722"}, - {file = "backports.zoneinfo-0.2.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:1c5742112073a563c81f786e77514969acb58649bcdf6cdf0b4ed31a348d4546"}, - {file = "backports.zoneinfo-0.2.1-cp36-cp36m-win32.whl", hash = "sha256:e8236383a20872c0cdf5a62b554b27538db7fa1bbec52429d8d106effbaeca08"}, - {file = "backports.zoneinfo-0.2.1-cp36-cp36m-win_amd64.whl", hash = "sha256:8439c030a11780786a2002261569bdf362264f605dfa4d65090b64b05c9f79a7"}, - {file = "backports.zoneinfo-0.2.1-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:f04e857b59d9d1ccc39ce2da1021d196e47234873820cbeaad210724b1ee28ac"}, - {file = "backports.zoneinfo-0.2.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:17746bd546106fa389c51dbea67c8b7c8f0d14b5526a579ca6ccf5ed72c526cf"}, - {file = "backports.zoneinfo-0.2.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5c144945a7752ca544b4b78c8c41544cdfaf9786f25fe5ffb10e838e19a27570"}, - {file = "backports.zoneinfo-0.2.1-cp37-cp37m-win32.whl", hash = "sha256:e55b384612d93be96506932a786bbcde5a2db7a9e6a4bb4bffe8b733f5b9036b"}, - {file = "backports.zoneinfo-0.2.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a76b38c52400b762e48131494ba26be363491ac4f9a04c1b7e92483d169f6582"}, - {file = "backports.zoneinfo-0.2.1-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:8961c0f32cd0336fb8e8ead11a1f8cd99ec07145ec2931122faaac1c8f7fd987"}, - {file = "backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:e81b76cace8eda1fca50e345242ba977f9be6ae3945af8d46326d776b4cf78d1"}, - {file = "backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7b0a64cda4145548fed9efc10322770f929b944ce5cee6c0dfe0c87bf4c0c8c9"}, - {file = "backports.zoneinfo-0.2.1-cp38-cp38-win32.whl", hash = "sha256:1b13e654a55cd45672cb54ed12148cd33628f672548f373963b0bff67b217328"}, - {file = "backports.zoneinfo-0.2.1-cp38-cp38-win_amd64.whl", hash = "sha256:4a0f800587060bf8880f954dbef70de6c11bbe59c673c3d818921f042f9954a6"}, - {file = "backports.zoneinfo-0.2.1.tar.gz", hash = "sha256:fadbfe37f74051d024037f223b8e001611eac868b5c5b06144ef4d8b799862f2"}, -] - -[package.extras] -tzdata = ["tzdata"] - [[package]] name = "colorama" version = "0.4.6" @@ -145,19 +117,19 @@ toml = ["tomli"] [[package]] name = "django" -version = "3.2.25" -description = "A high-level Python Web framework that encourages rapid development and clean, pragmatic design." +version = "4.2.16" +description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design." optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "Django-3.2.25-py3-none-any.whl", hash = "sha256:a52ea7fcf280b16f7b739cec38fa6d3f8953a5456986944c3ca97e79882b4e38"}, - {file = "Django-3.2.25.tar.gz", hash = "sha256:7ca38a78654aee72378594d63e51636c04b8e28574f5505dff630895b5472777"}, + {file = "Django-4.2.16-py3-none-any.whl", hash = "sha256:1ddc333a16fc139fd253035a1606bb24261951bbc3a6ca256717fa06cc41a898"}, + {file = "Django-4.2.16.tar.gz", hash = "sha256:6f1616c2786c408ce86ab7e10f792b8f15742f7b7b7460243929cb371e7f1dad"}, ] [package.dependencies] -asgiref = ">=3.3.2,<4" -pytz = "*" -sqlparse = ">=0.2.2" +asgiref = ">=3.6.0,<4" +sqlparse = ">=0.3.1" +tzdata = {version = "*", markers = "sys_platform == \"win32\""} [package.extras] argon2 = ["argon2-cffi (>=19.1.0)"] @@ -165,28 +137,28 @@ bcrypt = ["bcrypt"] [[package]] name = "django-ipware" -version = "2.1.0" -description = "A Django utility application that returns client's real IP address" +version = "5.0.2" +description = "A Django application to retrieve user's IP address" optional = false -python-versions = "*" +python-versions = ">=3.8" files = [ - {file = "django-ipware-2.1.0.tar.gz", hash = "sha256:a7c7a8fd019dbdc9c357e6e582f65034e897572fc79a7e467674efa8aef9d00b"}, + {file = "django-ipware-5.0.2.tar.gz", hash = "sha256:ab3ab7645e674df682c1146a5bddfa5151b1b7be7be9210872c3156bd836aad4"}, + {file = "django_ipware-5.0.2-py2.py3-none-any.whl", hash = "sha256:838b7aede77734603bd32ebd08ad7957304266580b646f8cbe982c4833b71c84"}, ] [[package]] name = "djangorestframework" -version = "3.15.1" +version = "3.15.2" description = "Web APIs for Django, made easy." optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "djangorestframework-3.15.1-py3-none-any.whl", hash = "sha256:3ccc0475bce968608cf30d07fb17d8e52d1d7fc8bfe779c905463200750cbca6"}, - {file = "djangorestframework-3.15.1.tar.gz", hash = "sha256:f88fad74183dfc7144b2756d0d2ac716ea5b4c7c9840995ac3bfd8ec034333c1"}, + {file = "djangorestframework-3.15.2-py3-none-any.whl", hash = "sha256:2b8871b062ba1aefc2de01f773875441a961fefbf79f5eed1e32b2f096944b20"}, + {file = "djangorestframework-3.15.2.tar.gz", hash = "sha256:36fe88cd2d6c6bec23dca9804bab2ba5517a8bb9d8f47ebc68981b56840107ad"}, ] [package.dependencies] -"backports.zoneinfo" = {version = "*", markers = "python_version < \"3.9\""} -django = ">=3.0" +django = ">=4.2" [[package]] name = "exceptiongroup" @@ -389,7 +361,18 @@ files = [ {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, ] +[[package]] +name = "tzdata" +version = "2024.1" +description = "Provider of IANA time zone data" +optional = false +python-versions = ">=2" +files = [ + {file = "tzdata-2024.1-py2.py3-none-any.whl", hash = "sha256:9068bc196136463f5245e51efda838afa15aaeca9903f49050dfa2679db4d252"}, + {file = "tzdata-2024.1.tar.gz", hash = "sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd"}, +] + [metadata] lock-version = "2.0" -python-versions = "^3.8" -content-hash = "561c50dd2e4e27a6de677809ab59ecb0e2e8174ca9ab6ee982254a53271a63e1" +python-versions = "^3.10" +content-hash = "992205999ae17e3243f3f1fa0c8450401c18d8b0dcf507c61c24a79e6d5cfca2" diff --git a/pyproject.toml b/pyproject.toml index 69e210b..6ee4d5a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,9 +22,6 @@ classifiers = [ "Environment :: Plugins", "Intended Audience :: Developers", "Framework :: Django", - "Framework :: Django :: 3.2", - "Framework :: Django :: 4.0", - "Framework :: Django :: 4.1", "Framework :: Django :: 4.2", "Framework :: Django :: 5.0", "Framework :: Django :: 5.1", @@ -37,8 +34,6 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -46,10 +41,10 @@ classifiers = [ ] [tool.poetry.dependencies] -python = "^3.8" -django = "^3.2" -djangorestframework = "^3.11" -django-ipware = "^2.1" +python = "^3.10" +django = "^4.2" +djangorestframework = "^3.14" +django-ipware = "^5.0.2" [tool.poetry.dev-dependencies] coverage = { version = "*", extras = ["toml"] } @@ -66,7 +61,7 @@ build-backend = "poetry.masonry.api" [tool.ruff] preview = true -target-version = "py312" +target-version = "py310" src = ["drf_recaptcha"] [tool.ruff.lint]