Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Publish docs
on:
on:
release:
types: [published]

Expand All @@ -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: |
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Publish to PyPI
on:
release:
types: [published]
workflow_dispatch:
release:
types: [published]
workflow_dispatch:

jobs:
build:
Expand All @@ -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
41 changes: 23 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}

Expand All @@ -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
Expand All @@ -72,22 +77,22 @@ 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: |
python -m pip install --upgrade pip
pip install tox

- name: Retrieve test coverage
uses: actions/download-artifact@v4
uses: actions/download-artifact@v6
with:
merge-multiple: true

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion docs/releasenotes.md
Original file line number Diff line number Diff line change
@@ -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?
Expand Down Expand Up @@ -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.

11 changes: 1 addition & 10 deletions flags/tests/settings.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import os

from django.urls import include, path

import debug_toolbar

from flags.conditions import register


Expand Down Expand Up @@ -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"
8 changes: 8 additions & 0 deletions flags/tests/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django.urls import include, path

import debug_toolbar


urlpatterns = [
path("__debug__/", include(debug_toolbar.urls)),
]
8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
]
Expand All @@ -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",
Expand Down
13 changes: 7 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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=
Expand All @@ -23,7 +24,7 @@ deps=
django5.2: Django~=5.2

[testenv:lint]
basepython=python3.12
basepython=python3.13
deps=
ruff
bandit
Expand All @@ -33,7 +34,7 @@ commands=
bandit -c "pyproject.toml" -r flags

[testenv:coverage]
basepython=python3.12
basepython=python3.13
deps=
coverage
diff_cover
Expand All @@ -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=
Expand Down