Skip to content

Commit e5643be

Browse files
authored
Merge branch 'main' into add-zizmor
2 parents 4325a30 + abbbf4a commit e5643be

26 files changed

Lines changed: 281 additions & 43 deletions

File tree

.github/workflows/cherry-pick-v2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
pull-requests: write
1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v5
21+
uses: actions/checkout@v6
2222
with:
2323
fetch-depth: 0
2424

.github/workflows/ci.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
validate:
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v5
17+
- uses: actions/checkout@v6
1818

1919
- uses: actions/setup-python@v6
2020
with:
@@ -25,7 +25,7 @@ jobs:
2525

2626
- name: Load cached Pre-Commit Dependencies
2727
id: cached-pre-commit-dependencies
28-
uses: actions/cache@v4
28+
uses: actions/cache@v5
2929
with:
3030
path: ~/.cache/pre-commit/
3131
key: pre-commit-4|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
@@ -36,7 +36,7 @@ jobs:
3636
mypy:
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v5
39+
- uses: actions/checkout@v6
4040

4141
- uses: actions/setup-python@v6
4242
with:
@@ -53,7 +53,7 @@ jobs:
5353
pyright:
5454
runs-on: ubuntu-latest
5555
steps:
56-
- uses: actions/checkout@v5
56+
- uses: actions/checkout@v6
5757

5858
- uses: actions/setup-python@v6
5959
with:
@@ -70,7 +70,7 @@ jobs:
7070
slotscheck:
7171
runs-on: ubuntu-latest
7272
steps:
73-
- uses: actions/checkout@v5
73+
- uses: actions/checkout@v6
7474

7575
- uses: actions/setup-python@v6
7676
with:
@@ -117,7 +117,7 @@ jobs:
117117
typing-extensions: ["4.12.1", "4.13.1", "latest"]
118118
steps:
119119
- name: Check out repository
120-
uses: actions/checkout@v5
120+
uses: actions/checkout@v6
121121

122122
- name: Set up python
123123
uses: actions/setup-python@v6
@@ -153,7 +153,7 @@ jobs:
153153
uvicorn-version: ["uvicorn<0.27.0", "uvicorn>=0.27.0"]
154154
steps:
155155
- name: Check out repository
156-
uses: actions/checkout@v5
156+
uses: actions/checkout@v6
157157

158158
- name: Set up python 3.11
159159
uses: actions/setup-python@v6
@@ -200,7 +200,7 @@ jobs:
200200
security-events: write
201201
steps:
202202
- name: Checkout repository
203-
uses: actions/checkout@v5
203+
uses: actions/checkout@v6
204204

205205
- name: Initialize CodeQL Without Dependencies
206206
uses: github/codeql-action/init@v4
@@ -217,7 +217,7 @@ jobs:
217217
runs-on: ubuntu-latest
218218
steps:
219219
- name: Check out repository
220-
uses: actions/checkout@v5
220+
uses: actions/checkout@v6
221221

222222
- name: Install Build Dependencies
223223
run: sudo apt-get install build-essential libpq-dev python3-dev -y
@@ -246,7 +246,7 @@ jobs:
246246
echo "${{ github.event.number }}" > .pr_number
247247
248248
- name: Upload artifact
249-
uses: actions/upload-artifact@v5
249+
uses: actions/upload-artifact@v6
250250
with:
251251
name: docs-preview
252252
path: |
@@ -261,7 +261,7 @@ jobs:
261261
python_version: "3.12"
262262
steps:
263263
- name: Check out repository
264-
uses: actions/checkout@v5
264+
uses: actions/checkout@v6
265265

266266
- name: Set up Python
267267
uses: actions/setup-python@v6
@@ -288,7 +288,7 @@ jobs:
288288
python_version: "3.12"
289289
steps:
290290
- name: Check out repository
291-
uses: actions/checkout@v5
291+
uses: actions/checkout@v6
292292

293293
- name: Install Build Dependencies
294294
run: sudo apt-get install build-essential libpq-dev python3-dev -y
@@ -317,7 +317,7 @@ jobs:
317317
- name: Rename coverage file
318318
run: mv .coverage* .coverage.pydantic_v1
319319

320-
- uses: actions/upload-artifact@v5
320+
- uses: actions/upload-artifact@v6
321321
with:
322322
name: coverage-data-pydantic_v1-${{ inputs.python-version }}
323323
path: .coverage.pydantic_v1
@@ -329,13 +329,13 @@ jobs:
329329
- test
330330
- test_pydantic_1_app
331331
steps:
332-
- uses: actions/checkout@v5
332+
- uses: actions/checkout@v6
333333
- uses: actions/setup-python@v6
334334
with:
335335
python-version: "3.12"
336336

337337
- name: Download Artifacts
338-
uses: actions/download-artifact@v6
338+
uses: actions/download-artifact@v7
339339
with:
340340
pattern: coverage-data*
341341
merge-multiple: true

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
security-events: write
1010
steps:
1111
- name: Checkout repository
12-
uses: actions/checkout@v5
12+
uses: actions/checkout@v6
1313
with:
1414
ref: "main"
1515
- name: Initialize CodeQL With Dependencies

.github/workflows/docs-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Check out repository
17-
uses: actions/checkout@v5
17+
uses: actions/checkout@v6
1818

1919
- name: Download artifact
2020
uses: dawidd6/action-download-artifact@v11

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
contents: write
3030
runs-on: ubuntu-latest
3131
steps:
32-
- uses: actions/checkout@v5
32+
- uses: actions/checkout@v6
3333

3434
- uses: actions/setup-python@v6
3535
with:

.github/workflows/notify-released-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Check out repository
14-
uses: actions/checkout@v5
14+
uses: actions/checkout@v6
1515

1616
- name: Set up Python
1717
uses: actions/setup-python@v6

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
environment: release
1616
steps:
1717
- name: Check out repository
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
1919

2020
- uses: actions/setup-python@v6
2121
with:

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
shell: bash
3232
steps:
3333
- name: Check out repository
34-
uses: actions/checkout@v5
34+
uses: actions/checkout@v6
3535

3636
- name: Set up python ${{ inputs.python-version }}
3737
uses: actions/setup-python@v6
@@ -77,7 +77,7 @@ jobs:
7777
if: inputs.coverage
7878
run: mv .coverage .coverage.${{ inputs.python-version }}
7979

80-
- uses: actions/upload-artifact@v5
80+
- uses: actions/upload-artifact@v6
8181
if: inputs.coverage
8282
with:
8383
name: coverage-data-${{ inputs.python-version }}
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
from litestar.openapi.plugins import RedocRenderPlugin
22

3-
redoc_plugin = RedocRenderPlugin(version="next", google_fonts=True, path="/redoc")
3+
redoc_plugin = RedocRenderPlugin(
4+
version="latest",
5+
google_fonts=True,
6+
path="/redoc",
7+
js_url="https://cdn.company.internal/redoc/custom-redoc.js",
8+
)

docs/usage/middleware/builtin-middleware.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ list of domains to :class:`~litestar.app.Litestar`:
165165
Compression
166166
-----------
167167

168-
HTML responses can optionally be compressed. Litestar has built in support for gzip, brotli, and zstd. Gzip support is provided
169-
through the built-in Starlette classes. Brotli support can be added by installing the ``brotli`` extra, and Zstd support by installing the ``zstd`` extra.
168+
HTTP responses can optionally be compressed. Litestar has support for gzip, brotli, and zstd.
169+
Gzip is supported by Litestar out of the box, while Brotli support can be added by installing the ``brotli`` extra, and Zstd support can be added by installing the ``zstd`` extra.
170170

171-
You can enable either backend by passing an instance of
171+
You can enable any one of these backends by passing an instance of
172172
:class:`~litestar.config.compression.CompressionConfig` to ``compression_config`` of
173173
:class:`~litestar.app.Litestar`.
174174

@@ -182,9 +182,9 @@ You can configure the following additional gzip-specific values:
182182

183183

184184
* ``minimum_size``: the minimum threshold for response size to enable compression. Smaller responses will not be
185-
compressed. Defaults is ``500``, i.e. half a kilobyte.
185+
compressed. Default is ``500``, i.e. half a kilobyte.
186186
* ``gzip_compress_level``: a range between 0-9, see the `official python docs <https://docs.python.org/3/library/gzip.html>`_.
187-
Defaults to ``9`` , which is the maximum value.
187+
Defaults to ``9``, which is the maximum value.
188188

189189
.. code-block:: python
190190
@@ -232,16 +232,15 @@ You can configure the following additional brotli-specific values:
232232
Zstd
233233
^^^^^^
234234

235-
The `Zstd <https://pypi.org/project/zstd>`_ package is required to run this middleware. It is available as an extra for Litestar via the ``zstd`` extra: (``pip install 'litestar[zstd]'``).
235+
The `zstandard <https://pypi.org/project/zstandard>`_ package is required to run this middleware. It is available as an extra for Litestar via the ``zstd`` extra: (``pip install 'litestar[zstd]'``).
236236

237237
You can enable zstd compression of responses by passing an instance of
238238
:class:`~litestar.config.compression.CompressionConfig` with the ``backend`` parameter set to ``"zstd"``.
239239

240240
You can configure the following additional zstd-specific values:
241241

242-
* ``minimum_size``: the minimum threshold for response size to enable compression. Smaller responses will not be
243-
compressed. Default is 500, i.e. half a kilobyte.
244-
* ``zstd_level``: Range [0-22], Controls the compression level. Higher values increase compression ratio but are slower. Default is 3.
242+
* ``minimum_size``: the minimum threshold for response size to enable compression. Smaller responses will not be compressed. Default is 500, i.e. half a kilobyte.
243+
* ``zstd_compress_level``: Range [0-22], Controls the compression level. Higher values increase compression ratio but are slower. Default is 3.
245244
* ``zstd_gzip_fallback``: Boolean indicating whether to fall back to gzip if Zstd is not supported. Default is True.
246245

247246
.. code-block:: python

0 commit comments

Comments
 (0)