Skip to content
Draft
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
16 changes: 8 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@ jobs:
fail-fast: false
matrix:
include:
# Legacy: Python 3.8 + Django 3.2
- python-version: "3.8"
test-env: legacy
# Previous: Python 3.10 + Django 4.2
# Legacy: Python 3.10 + Django 4.2
- python-version: "3.10"
test-env: previous
# Latest: Python 3.13 + Django 5.1
test-env: legacy
# Previous: Python 3.13 + Django 5.2
- python-version: "3.13"
test-env: previous
# Latest: Python 3.14 + Django 6.0
- python-version: "3.14"
test-env: latest
- python-version: "3.13"
- python-version: "3.14"
test-env: latest-pyuca
- python-version: "3.13"
- python-version: "3.14"
test-env: latest-noi18n

steps:
Expand Down
16 changes: 8 additions & 8 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ just test quick
just test [latest|previous|legacy|latest-pyuca|latest-noi18n]

# Examples:
just test latest # Python 3.13 + Django 5.2
just test previous # Python 3.10 + Django 4.2
just test legacy # Python 3.8 + Django 3.2
just test latest # Python 3.14 + Django 6.0
just test previous # Python 3.13 + Django 5.2
just test legacy # Python 3.10 + Django 4.2
just test latest-pyuca # With Unicode collation
just test latest-noi18n # Without i18n

# Run specific environment with custom Python version
just test [latest|previous|legacy|latest-pyuca|latest-noi18n] [3.8-3.13]
just test [latest|previous|legacy|latest-pyuca|latest-noi18n] [3.10-3.14]

# Example:
just test latest 3.12 # Latest Django with Python 3.12
just test latest 3.14 # Latest Django with Python 3.14

# Run a single test file
uv run --group test pytest django_countries/tests/test_fields.py
Expand Down Expand Up @@ -291,6 +291,6 @@ Test models are defined in `tests/models.py` and the test app is configured in `
- Translations are managed via Transifex and pulled using `just tx-pull`
- Releases use `uv version` for version management and `just deploy` for publishing
- Supported versions:
- Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13
- Django 3.2 (LTS), 4.2 (LTS), 5.0, 5.1, 5.2
- DRF 3.11+
- Python 3.10, 3.11, 3.12, 3.13, 3.14
- Django 4.2 (LTS), 5.2 (LTS), 6.0
- DRF 3.13+
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ class Person(models.Model):

## Support

- **Python**: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13
- **Django**: 3.2 (LTS), 4.2 (LTS), 5.0, 5.1, 5.2
- **Django REST Framework**: 3.11+
- **Python**: 3.10, 3.11, 3.12, 3.13, 3.14
- **Django**: 4.2 (LTS), 5.2 (LTS), 6.0
- **Django REST Framework**: 3.13+

## Contributing

Expand Down
20 changes: 10 additions & 10 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ just --list
### Testing

```bash
# Run all test environments (Python 3.8-3.13, Django 3.2-5.2)
# Run all test environments (Python 3.10-3.14, Django 4.2-6.0)
just test

# Quick test with current Python (no coverage matrix)
Expand All @@ -69,22 +69,22 @@ just test quick
just test [latest|previous|legacy|latest-pyuca|latest-noi18n]

# Examples:
just test latest # Latest Django/DRF with Python 3.13
just test previous # Django 4.2 with Python 3.10
just test legacy # Django 3.2 with Python 3.8
just test latest # Latest Django/DRF with Python 3.14
just test previous # Django 5.2 with Python 3.13
just test legacy # Django 4.2 with Python 3.10

# Run specific environment with custom Python version
just test [latest|previous|legacy|latest-pyuca|latest-noi18n] [3.8-3.13]
just test [latest|previous|legacy|latest-pyuca|latest-noi18n] [3.10-3.14]

# Examples:
just test latest 3.12 # Latest Django with Python 3.12
just test previous 3.9 # Django 4.2 with Python 3.9
just test latest 3.14 # Latest Django with Python 3.13
just test previous 3.13 # Django 5.2 with Python 3.13
```

Test environments:
- **legacy**: Python 3.8 + Django 3.2 + DRF 3.11
- **previous**: Python 3.10 + Django 4.2 + DRF 3.14
- **latest**: Python 3.13 + Django 5.2 + DRF 3.15
- **legacy**: Python 3.10 + Django 4.2 + DRF 3.13
- **previous**: Python 3.13 + Django 5.2 + DRF 3.16
- **latest**: Python 3.14 + Django 6.0 + DRF 3.16
- **latest-pyuca**: Latest + pyuca (Unicode collation)
- **latest-noi18n**: Latest + i18n disabled

Expand Down
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ Country names are translated using Django's standard `gettext` and imported from

## Support

- **Python**: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13
- **Django**: 3.2 (LTS), 4.2 (LTS), 5.0, 5.1, 5.2
- **Django REST Framework**: 3.11+
- **Python**: 3.10, 3.11, 3.12, 3.13, 3.14
- **Django**: 4.2 (LTS), 5.2 (LTS), 6.0
- **Django REST Framework**: 3.13+

## License

Expand Down
36 changes: 18 additions & 18 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ default:
# just test -> run all test matrices + coverage
# just test quick -> quick test with current Python (no coverage)
# just test [latest|previous|legacy|latest-pyuca|latest-noi18n] -> run specific env
# just test [latest|previous|legacy|latest-pyuca|latest-noi18n] [3.8-3.13] -> run specific env + python
# just test [latest|previous|legacy|latest-pyuca|latest-noi18n] [3.10-3.14] -> run specific env + python
test *ARGS='':
#!/usr/bin/env bash
set -euo pipefail
Expand All @@ -32,9 +32,9 @@ test *ARGS='':
uv run --group test pytest
else
case "$ENV" in
legacy) PYTHON="3.8" ;;
previous) PYTHON="3.10" ;;
latest|latest-pyuca|latest-noi18n) PYTHON="3.13" ;;
legacy) PYTHON="3.10" ;;
previous) PYTHON="3.13" ;;
latest|latest-pyuca|latest-noi18n) PYTHON="3.14" ;;
*) echo "Unknown environment: $ENV"; exit 1 ;;
esac
just _test-env "$ENV" "$PYTHON"
Expand All @@ -51,11 +51,11 @@ test *ARGS='':
_test-matrix:
@echo "Cleaning old coverage files..."
@rm -rf .coverage* htmlcov
@just _test-env legacy 3.8
@just _test-env previous 3.10
@just _test-env latest 3.13
@just _test-env latest-pyuca 3.13
@just _test-env latest-noi18n 3.13
@just _test-env legacy 3.10
@just _test-env previous 3.13
@just _test-env latest 3.14
@just _test-env latest-pyuca 3.14
@just _test-env latest-noi18n 3.14

# Run a specific test environment (internal)
_test-env ENV PYTHON:
Expand All @@ -66,31 +66,31 @@ _test-env ENV PYTHON:
@case "{{ ENV }}" in \
legacy) \
uv run --python {{ PYTHON }} \
--with "Django==3.2.*" \
--with "djangorestframework==3.11.*" \
--with "Django==4.2.*" \
--with "djangorestframework==3.13.*" \
--with "pyuca" \
--group test \
coverage run -m pytest \
;; \
previous) \
uv run --python {{ PYTHON }} \
--with "Django==4.2.*" \
--with "djangorestframework==3.14.*" \
--with "Django==5.2.*" \
--with "djangorestframework==3.16.*" \
--group test \
coverage run -m pytest \
;; \
latest) \
uv run --python {{ PYTHON }} \
--with "Django==5.1.*" \
--with "djangorestframework==3.15.*" \
--with "Django==6.0.*" \
--with "djangorestframework==3.16.*" \
--with "graphene-django==3.0.*" \
--group test \
coverage run -m pytest \
;; \
latest-pyuca) \
uv run --python {{ PYTHON }} \
--with "Django==5.1.*" \
--with "djangorestframework==3.15.*" \
--with "Django==6.0.*" \
--with "djangorestframework==3.16.*" \
--with "graphene-django==3.0.*" \
--with "pyuca" \
--group test \
Expand All @@ -99,7 +99,7 @@ _test-env ENV PYTHON:
latest-noi18n) \
DJANGO_SETTINGS_MODULE=django_countries.tests.settings_noi18n \
uv run --python {{ PYTHON }} \
--with "Django==5.1.*" \
--with "Django==6.0.*" \
--with "djangorestframework==3.15.*" \
--with "graphene-django==3.0.*" \
--group test \
Expand Down
9 changes: 2 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,15 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"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",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"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",
"Framework :: Django :: 5.2",
"Framework :: Django :: 6.0",
]
requires-python = ">=3.8"
dependencies = ["asgiref", "typing_extensions"]
Expand Down