WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 9f42cde

Browse files
authored
Merge pull request #213 from jazzband/prepare-2.4
Prepare 2.4 release
2 parents 18cb41f + 5c8bbda commit 9f42cde

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+181
-67
lines changed

.pre-commit-config.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.6.0
4+
hooks:
5+
- id: check-toml
6+
- id: check-yaml
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
- id: mixed-line-ending
10+
- id: file-contents-sorter
11+
files: docs/spelling_wordlist.txt
12+
- repo: https://github.com/pycqa/doc8
13+
rev: v1.1.1
14+
hooks:
15+
- id: doc8
16+
- repo: https://github.com/adamchainz/django-upgrade
17+
rev: 1.20.0
18+
hooks:
19+
- id: django-upgrade
20+
args: [--target-version, "4.2"]
21+
- repo: https://github.com/pre-commit/pygrep-hooks
22+
rev: v1.10.0
23+
hooks:
24+
- id: rst-backticks
25+
- id: rst-directive-colons
26+
- repo: https://github.com/pre-commit/mirrors-prettier
27+
rev: v4.0.0-alpha.8
28+
hooks:
29+
- id: prettier
30+
entry: env PRETTIER_LEGACY_CLI=1 prettier
31+
types_or: [javascript, css]
32+
args:
33+
- --trailing-comma=es5
34+
- repo: https://github.com/pre-commit/mirrors-eslint
35+
rev: v9.8.0
36+
hooks:
37+
- id: eslint
38+
additional_dependencies:
39+
40+
- "@eslint/[email protected]"
41+
- "globals"
42+
files: \.js?$
43+
types: [file]
44+
args:
45+
- --fix
46+
- repo: https://github.com/astral-sh/ruff-pre-commit
47+
rev: 'v0.5.5'
48+
hooks:
49+
- id: ruff
50+
args: [--fix, --exit-non-zero-on-fix]
51+
- id: ruff-format
52+
- repo: https://github.com/tox-dev/pyproject-fmt
53+
rev: 2.1.4
54+
hooks:
55+
- id: pyproject-fmt
56+
- repo: https://github.com/abravalheri/validate-pyproject
57+
rev: v0.18
58+
hooks:
59+
- id: validate-pyproject

.readthedocs.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
version: 2
6+
7+
build:
8+
os: ubuntu-22.04
9+
tools:
10+
python: "3.10"
11+
12+
sphinx:
13+
configuration: docs/conf.py
14+
15+
python:
16+
install:
17+
- method: pip
18+
path: .

AUTHORS

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,23 @@ Maintainer: Benoît Bryon <[email protected]>
66

77
Original code by `PeopleDoc <https://www.people-doc.com/>`_ team:
88

9-
* Nicolas Tobo <https://github.com/nicolastobo>
10-
* Lauréline Guérin <https://github.com/zebuline>
11-
* Gregory Tappero <https://github.com/gregtap>
12-
* Rémy Hubscher <https://github.com/natim>
9+
* Adam Chainz <[email protected]>
10+
* Aleksi Häkli <[email protected]>
1311
* Benoît Bryon <[email protected]>
14-
* Aleksi Häkli <https://github.com/aleksihakli>
15-
* Johnt Hagen <[email protected]>
12+
13+
* David Wolf <[email protected]>
14+
* Davide Setti <[email protected]>
15+
* Erik Dykema <[email protected]>
1616
* Fabre Florian <[email protected]>
17-
* Peter Marheine <[email protected]>
1817
* Hasan Ramezani <[email protected]>
1918
* Jannis Leidel <[email protected]>
20-
* Erik Dykema <[email protected]>
19+
* John Hagen <[email protected]>
20+
* Mariusz Felisiak <[email protected]>
21+
* Martin Bächtold <[email protected]>
2122
* Nikhil Benesch <[email protected]>
2223
* Omer Katz <[email protected]>
24+
* Peter Marheine <[email protected]>
2325
* René Leonhardt <[email protected]>
24-
* Adam Chainz <[email protected]>
25-
* Martin Bächtold <[email protected]>
26+
* Rémy HUBSCHER <[email protected]>
2627
* Tim Gates <[email protected]>
2728
* zero13cool <[email protected]>

CHANGELOG

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ This document describes changes between past releases. For information about
55
future releases, check `milestones`_ and :doc:`/about/vision`.
66

77

8-
2.4 (Unreleased)
8+
2.4 (2024-08-05)
99
----------------
1010

1111
- Drop support for Python 3.6
12+
- Escape malicious filenames
13+
- Handle headers in XAccel responses
1214

1315

1416
2.3 (2022-01-11)

CONTRIBUTING.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This is a `Jazzband <https://jazzband.co>`_ project. By contributing you agree t
1111

1212

1313
This document provides guidelines for people who want to contribute to
14-
`django-downloadview`.
14+
``django-downloadview``.
1515

1616

1717
**************
@@ -50,7 +50,7 @@ Use topic branches
5050
Fork, clone
5151
***********
5252

53-
Clone `django-downloadview` repository (adapt to use your own fork):
53+
Clone ``django-downloadview`` repository (adapt to use your own fork):
5454

5555
.. code:: sh
5656
@@ -62,15 +62,15 @@ Clone `django-downloadview` repository (adapt to use your own fork):
6262
Usual actions
6363
*************
6464

65-
The `Makefile` is the reference card for usual actions in development
65+
The ``Makefile`` is the reference card for usual actions in development
6666
environment:
6767

6868
* Install development toolkit with `pip`_: ``make develop``.
6969

7070
* Run tests with `tox`_: ``make test``.
7171

7272
* Build documentation: ``make documentation``. It builds `Sphinx`_
73-
documentation in `var/docs/html/index.html`.
73+
documentation in ``var/docs/html/index.html``.
7474

7575
* Release project with `zest.releaser`_: ``make release``.
7676

@@ -84,15 +84,15 @@ See also ``make help``.
8484
Demo project included
8585
*********************
8686

87-
The `demo` included in project's repository is part of the tests and
87+
The ``demo`` included in project's repository is part of the tests and
8888
documentation. Maintain it along with code and documentation.
8989

9090

9191
.. rubric:: Notes & references
9292

9393
.. target-notes::
9494

95-
.. _`bugtracker`:
95+
.. _`bugtracker`:
9696
https://github.com/jazzband/django-downloadview/issues
9797
.. _`rebase`: http://git-scm.com/book/en/Git-Branching-Rebasing
9898
.. _`merge-based rebase`: https://tech.people-doc.com/psycho-rebasing.html

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ django-downloadview
2626
:target: https://codecov.io/gh/jazzband/django-downloadview
2727
:alt: Coverage
2828

29-
`django-downloadview` makes it easy to serve files with `Django`_:
29+
``django-downloadview`` makes it easy to serve files with `Django`_:
3030

3131
* you manage files with Django (permissions, filters, generation, ...);
3232

3333
* files are stored somewhere or generated somehow (local filesystem, remote
3434
storage, memory...);
3535

36-
* `django-downloadview` helps you stream the files with very little code;
36+
* ``django-downloadview`` helps you stream the files with very little code;
3737

38-
* `django-downloadview` helps you improve performances with reverse proxies,
38+
* ``django-downloadview`` helps you improve performances with reverse proxies,
3939
via mechanisms such as Nginx's X-Accel or Apache's X-Sendfile.
4040

4141

demo/README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Demo project
33
############
44

55
`Demo folder in project's repository`_ contains a Django project to illustrate
6-
`django-downloadview` usage.
6+
``django-downloadview`` usage.
77

88

99
*****************************************
@@ -32,7 +32,7 @@ Deploy the demo
3232
System requirements:
3333

3434
* `Python`_ version 3.7+, available as ``python`` command.
35-
35+
3636
.. note::
3737

3838
You may use `Virtualenv`_ to make sure the active ``python`` is the right

demo/demoproject/apache/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ def test_response(self):
5858
basename="hello-world.txt",
5959
file_path="/apache-modified-headers/hello-world.txt",
6060
)
61-
self.assertEqual(response['X-Test'], 'header')
61+
self.assertEqual(response["X-Test"], "header")

demo/demoproject/apache/urls.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""URL mapping."""
2+
23
from django.urls import path
34

45
from demoproject.apache import views

demo/demoproject/apache/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
def _modified_headers(request):
2828
view = StorageDownloadView.as_view(storage=storage, path="hello-world.txt")
2929
response = view(request)
30-
response["X-Test"] = 'header'
30+
response["X-Test"] = "header"
3131
return response
3232

3333

0 commit comments

Comments
 (0)