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 runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v6 - uses: actions/checkout@v2
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v6 uses: actions/setup-python@v2
with: with:
python-version: 3.8 python-version: 3.8

View file

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

View file

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

View file

@ -4,28 +4,17 @@ Changelog
This document describes changes between past releases. For information about This document describes changes between past releases. For information about
future releases, check `milestones`_ and :doc:`/about/vision`. 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 - Drop support for Python 3.6
- Escape malicious filenames - Escape malicious filenames
- Handle headers in XAccel responses - Handle headers in XAccel responses
2.3.0 (2022-01-11) 2.3 (2022-01-11)
------------------ ----------------
- Drop Django 3.0 support - Drop Django 3.0 support
- Add Django 3.2 support - Add Django 3.2 support

View file

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

View file

@ -20,8 +20,6 @@ setup(
"Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Framework :: Django", "Framework :: Django",
"Framework :: Django :: 4.2", "Framework :: Django :: 4.2",
"Framework :: Django :: 5.0", "Framework :: Django :: 5.0",

View file

@ -141,5 +141,5 @@ class DeprecatedAPITestCase(django.test.SimpleTestCase):
if missed_warnings: if missed_warnings:
self.fail( self.fail(
f"No DeprecationWarning raised about following settings: " 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] [tox]
envlist = envlist =
py{38,39,310,311,312}-dj{42}-{unittest,pytest,checkmigrations} py{38,39,310,311,312}-dj42
py{310,311,312,313}-dj{50}-{unittest,pytest,checkmigrations} py{310,311,312}-dj{50,main}
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}
lint lint
sphinx sphinx
readme readme
@ -16,15 +13,11 @@ python =
3.10: py310 3.10: py310
3.11: py311 3.11: py311
3.12: py312 3.12: py312
3.13: py313
3.14: py314
[gh-actions:env] [gh-actions:env]
DJANGO = DJANGO =
4.2: dj42 4.2: dj42
5.0: dj50 5.0: dj50
5.1: dj51
5.2: dj52
main: djmain main: djmain
[testenv] [testenv]
@ -32,8 +25,6 @@ deps =
coverage coverage
dj42: Django>=4.2,<5.0 dj42: Django>=4.2,<5.0
dj50: Django>=5.0,<5.1 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 djmain: https://github.com/django/django/archive/main.tar.gz
pytest pytest
pytest-cov pytest-cov