diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8b1ca2c..d897118 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,5 +1,5 @@ name: Publish docs -on: +on: release: types: [published] @@ -8,14 +8,14 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - run: | git fetch --no-tags --prune --depth=1 origin gh-pages - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: '3.12' + python-version: "3.13" - name: Install dependencies run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e8ebc9..5ca327c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,8 +1,8 @@ name: Publish to PyPI on: - release: - types: [published] - workflow_dispatch: + release: + types: [published] + workflow_dispatch: jobs: build: @@ -15,16 +15,16 @@ jobs: permissions: id-token: write steps: - - uses: actions/checkout@v4 - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.12 - - name: Install dependencies - run: | - python -m pip install --upgrade pip build - - name: Build the package - run: | - python -m build - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + - uses: actions/checkout@v5 + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: 3.13 + - name: Install dependencies + run: | + python -m pip install --upgrade pip build + - name: Build the package + run: | + python -m build + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 829bdb2..63a014a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,17 +3,16 @@ name: test on: [pull_request, push] jobs: - lint: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: '3.12' + python-version: "3.13" - name: Install dependencies run: | @@ -31,19 +30,25 @@ jobs: strategy: matrix: - python: ['3.10', '3.13'] - django: ['5.1', '5.2'] include: - - python: '3.8' - django: '4.2' - - python: '3.12' - django: '4.2' + - python: "3.10" + django: "4.2" + - python: "3.13" + django: "4.2" + - python: "3.12" + django: "5.1" + - python: "3.13" + django: "5.1" + - python: "3.12" + django: "5.2" + - python: "3.13" + django: "5.2" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python }} @@ -54,12 +59,12 @@ jobs: - name: Run tox run: | - tox + tox env: TOXENV: python${{ matrix.python }}-django${{ matrix.django }} - name: Store test coverage - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v5 with: name: coverage-${{ matrix.python }}-${{ matrix.django }} include-hidden-files: true @@ -72,14 +77,14 @@ jobs: - test steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: "3.12" + python-version: "3.13" - name: Install dependencies run: | @@ -87,7 +92,7 @@ jobs: pip install tox - name: Retrieve test coverage - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v6 with: merge-multiple: true diff --git a/README.md b/README.md index 24c2f2b..c5296ff 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Feature flags allow you to toggle functionality in both Django code and the Djan ## Dependencies -- Python 3.8+ +- Python 3.10+ - Django 4.2+ ## Installation diff --git a/docs/releasenotes.md b/docs/releasenotes.md index ce931d6..7eba8be 100644 --- a/docs/releasenotes.md +++ b/docs/releasenotes.md @@ -1,5 +1,12 @@ # Release Notes +## Unreleased + +### What's new? + +- Added support for Python 3.13, removed support for Python < 3.10 + + ## 5.0.14 ### What's new? @@ -255,4 +262,3 @@ TEMPLATES = [ ## 3.0 Django-Flags is a fork of the Django-only components of the [Wagtail-Flags](https://github.com/cfpb/wagtail-flags) feature flag library. This is the initial release. - diff --git a/flags/tests/settings.py b/flags/tests/settings.py index 3e6742b..eb6f805 100644 --- a/flags/tests/settings.py +++ b/flags/tests/settings.py @@ -1,9 +1,5 @@ import os -from django.urls import include, path - -import debug_toolbar - from flags.conditions import register @@ -80,9 +76,4 @@ def kwarg_condition(expected_value, passed_value=None, **kwargs): # DEBUG=True # INTERNAL_IPS=['127.0.0.1'] -ROOT_URLCONF = __name__ - - -urlpatterns = [ - path("__debug__/", include(debug_toolbar.urls)), -] +ROOT_URLCONF = "flags.tests.urls" diff --git a/flags/tests/urls.py b/flags/tests/urls.py new file mode 100644 index 0000000..c12c001 --- /dev/null +++ b/flags/tests/urls.py @@ -0,0 +1,8 @@ +from django.urls import include, path + +import debug_toolbar + + +urlpatterns = [ + path("__debug__/", include(debug_toolbar.urls)), +] diff --git a/pyproject.toml b/pyproject.toml index c4db1ae..5e9f810 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,8 +7,8 @@ name = "django-flags" dynamic = ["version"] description = "Feature flags for Django projects" readme = "README.md" -requires-python = ">=3.8" -license = {text = "CC0"} +requires-python = ">=3.10" +license = "CC0-1.0" authors = [ {name = "CFPB", email = "tech@cfpb.gov" } ] @@ -20,12 +20,8 @@ classifiers = [ "Framework :: Django :: 4.2", "Framework :: Django :: 5.1", "Framework :: Django :: 5.2", - "License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication", - "License :: Public Domain", "Programming Language :: Python", "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", diff --git a/tox.ini b/tox.ini index ce298bf..e4e16e2 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,8 @@ skipsdist=True envlist= lint, - python{3.8,3.12}-django4.2 - python{3.10,3.13}-django{5.1,5.2} + python{3.10,3.13}-django4.2 + python{3.12,3.13}-django{5.1,5.2} coverage [testenv] @@ -14,7 +14,8 @@ setenv= DJANGO_SETTINGS_MODULE=flags.tests.settings basepython= - python3.8: python3.8 + python3.10: python3.10 + python3.12: python3.12 python3.13: python3.13 deps= @@ -23,7 +24,7 @@ deps= django5.2: Django~=5.2 [testenv:lint] -basepython=python3.12 +basepython=python3.13 deps= ruff bandit @@ -33,7 +34,7 @@ commands= bandit -c "pyproject.toml" -r flags [testenv:coverage] -basepython=python3.12 +basepython=python3.13 deps= coverage diff_cover @@ -43,7 +44,7 @@ commands= diff-cover coverage.xml --compare-branch=origin/main --fail-under=100 [testenv:docs] -basepython=python3.12 +basepython=python3.13 deps= -e .[docs] commands=