Compare commits

..

No commits in common. "master" and "2.4.0" have entirely different histories.

9 changed files with 24 additions and 54 deletions

View file

@ -1,8 +0,0 @@
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

View file

@ -11,12 +11,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@v2
with:
python-version: 3.8

View file

@ -9,8 +9,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
django-version: ['4.2', '5.0', '5.1', '5.2', 'main']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
django-version: ['4.2', '5.0', 'main']
exclude:
# Django 5.0 dropped support for Python <3.10
- django-version: '5.0'
@ -23,10 +23,10 @@ jobs:
python-version: '3.9'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
@ -36,7 +36,7 @@ jobs:
echo "::set-output name=dir::$(pip cache dir)"
- name: Cache
uses: actions/cache@v4
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
@ -56,6 +56,6 @@ jobs:
DJANGO: ${{ matrix.django-version }}
- name: Upload coverage
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v1
with:
name: Python ${{ matrix.python-version }}

View file

@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
rev: v4.6.0
hooks:
- id: check-toml
- id: check-yaml
@ -10,11 +10,11 @@ repos:
- id: file-contents-sorter
files: docs/spelling_wordlist.txt
- repo: https://github.com/pycqa/doc8
rev: v2.0.0
rev: v1.1.1
hooks:
- id: doc8
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.29.1
rev: 1.20.0
hooks:
- id: django-upgrade
args: [--target-version, "4.2"]
@ -32,7 +32,7 @@ repos:
args:
- --trailing-comma=es5
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.39.1
rev: v9.8.0
hooks:
- id: eslint
additional_dependencies:
@ -44,16 +44,16 @@ repos:
args:
- --fix
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.14.5'
rev: 'v0.5.5'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.11.1
rev: 2.1.4
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.24.1
rev: v0.18
hooks:
- id: validate-pyproject

View file

@ -4,28 +4,17 @@ Changelog
This document describes changes between past releases. For information about
future releases, check `milestones`_ and :doc:`/about/vision`.
2.6.0 (unreleased)
2.4 (2024-08-05)
----------------
- No changes yet
2.5.0 (2025-10-28)
----------------
- Upgrade to Django 5.2 and Python 3.14
2.4.0 (2024-08-05)
------------------
- Drop support for Python 3.6
- Escape malicious filenames
- Handle headers in XAccel responses
2.3.0 (2022-01-11)
------------------
2.3 (2022-01-11)
----------------
- Drop Django 3.0 support
- Add Django 3.2 support

View file

@ -145,7 +145,7 @@ class SmartDownloadMiddleware(DownloadDispatcherMiddleware):
self.backend_factory = import_member(settings.DOWNLOADVIEW_BACKEND)
except AttributeError:
raise ImproperlyConfigured(
"SmartDownloadMiddleware requires settings.DOWNLOADVIEW_BACKEND"
"SmartDownloadMiddleware requires " "settings.DOWNLOADVIEW_BACKEND"
)
def auto_configure_backend_options(self):
@ -155,7 +155,7 @@ class SmartDownloadMiddleware(DownloadDispatcherMiddleware):
options_list = copy.deepcopy(settings.DOWNLOADVIEW_RULES)
except AttributeError:
raise ImproperlyConfigured(
"SmartDownloadMiddleware requires settings.DOWNLOADVIEW_RULES"
"SmartDownloadMiddleware requires " "settings.DOWNLOADVIEW_RULES"
)
for key, options in enumerate(options_list):
args = []

View file

@ -20,8 +20,6 @@ setup(
"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 :: 4.2",
"Framework :: Django :: 5.0",

View file

@ -141,5 +141,5 @@ class DeprecatedAPITestCase(django.test.SimpleTestCase):
if missed_warnings:
self.fail(
f"No DeprecationWarning raised about following settings: "
f"{', '.join(missed_warnings)}."
f'{", ".join(missed_warnings)}.'
)

13
tox.ini
View file

@ -1,10 +1,7 @@
[tox]
envlist =
py{38,39,310,311,312}-dj{42}-{unittest,pytest,checkmigrations}
py{310,311,312,313}-dj{50}-{unittest,pytest,checkmigrations}
py{310,311,312,313}-dj{51}-{unittest,pytest,checkmigrations}
py{310,311,312,313,314}-dj{52}-{unittest,pytest,checkmigrations}
py{312,313,314}-dj{main}-{unittest,pytest,checkmigrations}
py{38,39,310,311,312}-dj42
py{310,311,312}-dj{50,main}
lint
sphinx
readme
@ -16,15 +13,11 @@ python =
3.10: py310
3.11: py311
3.12: py312
3.13: py313
3.14: py314
[gh-actions:env]
DJANGO =
4.2: dj42
5.0: dj50
5.1: dj51
5.2: dj52
main: djmain
[testenv]
@ -32,8 +25,6 @@ deps =
coverage
dj42: Django>=4.2,<5.0
dj50: Django>=5.0,<5.1
dj51: django>=5.1,<5.2
dj52: django>=5.2,<5.3
djmain: https://github.com/django/django/archive/main.tar.gz
pytest
pytest-cov