Skip to content

Commit 649dce6

Browse files
authored
Merge branch 'v3.0' into 3023-fix-cookie-string-parser
2 parents c82a6ad + 817f518 commit 649dce6

File tree

261 files changed

+6848
-2374
lines changed

Some content is hidden

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

261 files changed

+6848
-2374
lines changed

.all-contributorsrc

+77-1
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,9 @@
910910
"avatar_url": "https://avatars.githubusercontent.com/u/35638715?v=4",
911911
"profile": "https://github.com/kedod",
912912
"contributions": [
913-
"doc"
913+
"doc",
914+
"code",
915+
"test"
914916
]
915917
},
916918
{
@@ -1593,6 +1595,80 @@
15931595
"contributions": [
15941596
"code"
15951597
]
1598+
},
1599+
{
1600+
"login": "JeanArhancet",
1601+
"name": "Jean Arhancet",
1602+
"avatar_url": "https://avatars.githubusercontent.com/u/10811879?v=4",
1603+
"profile": "https://github.com/JeanArhancet",
1604+
"contributions": [
1605+
"bug"
1606+
]
1607+
},
1608+
{
1609+
"login": "betaprior",
1610+
"name": "Leo Alekseyev",
1611+
"avatar_url": "https://avatars.githubusercontent.com/u/338250?v=4",
1612+
"profile": "http://dnquark.com",
1613+
"contributions": [
1614+
"code"
1615+
]
1616+
},
1617+
{
1618+
"login": "aranvir",
1619+
"name": "aranvir",
1620+
"avatar_url": "https://avatars.githubusercontent.com/u/75439739?v=4",
1621+
"profile": "https://github.com/aranvir",
1622+
"contributions": [
1623+
"doc"
1624+
]
1625+
},
1626+
{
1627+
"login": "bunny-therapist",
1628+
"name": "bunny-therapist",
1629+
"avatar_url": "https://avatars.githubusercontent.com/u/87039365?v=4",
1630+
"profile": "https://github.com/bunny-therapist",
1631+
"contributions": [
1632+
"code"
1633+
]
1634+
},
1635+
{
1636+
"login": "benluo",
1637+
"name": "Ben Luo",
1638+
"avatar_url": "https://avatars.githubusercontent.com/u/70398?v=4",
1639+
"profile": "http://www.benluo.cc",
1640+
"contributions": [
1641+
"doc"
1642+
]
1643+
},
1644+
{
1645+
"login": "hugovk",
1646+
"name": "Hugo van Kemenade",
1647+
"avatar_url": "https://avatars.githubusercontent.com/u/1324225?v=4",
1648+
"profile": "https://github.com/hugovk",
1649+
"contributions": [
1650+
"doc"
1651+
]
1652+
},
1653+
{
1654+
"login": "error418",
1655+
"name": "Michael Gerbig",
1656+
"avatar_url": "https://avatars.githubusercontent.com/u/7716544?v=4",
1657+
"profile": "https://error418.github.io",
1658+
"contributions": [
1659+
"doc"
1660+
]
1661+
},
1662+
{
1663+
"login": "crisog",
1664+
"name": "CrisOG",
1665+
"avatar_url": "https://avatars.githubusercontent.com/u/40803711?v=4",
1666+
"profile": "https://github.com/crisog",
1667+
"contributions": [
1668+
"bug",
1669+
"code",
1670+
"test"
1671+
]
15961672
}
15971673
],
15981674
"contributorsPerLine": 7,

.devcontainer/devcontainer.json

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
"name": "litestar-org/litestar",
33
"build": {
44
"dockerfile": "./Dockerfile",
5-
"context": "."
5+
"context": ".",
66
},
77
"features": {
88
"ghcr.io/devcontainers/features/common-utils:2": {
99
"installZsh": "true",
1010
"username": "vscode",
1111
"userUid": "1000",
1212
"userGid": "1000",
13-
"upgradePackages": "true"
13+
"upgradePackages": "true",
1414
},
1515
"ghcr.io/devcontainers/features/github-cli:1": {},
1616
"ghcr.io/devcontainers-contrib/features/pre-commit:2": {},
1717
"ghcr.io/devcontainers/features/python:1": "none",
1818
"ghcr.io/devcontainers/features/git:1": {
1919
"version": "latest",
20-
"ppa": "false"
21-
}
20+
"ppa": "false",
21+
},
2222
},
2323
"customizations": {
2424
"codespaces": {
25-
"openFiles": ["CONTRIBUTING.rst"]
25+
"openFiles": ["CONTRIBUTING.rst"],
2626
},
2727
"vscode": {
2828
"extensions": [
@@ -31,7 +31,7 @@
3131
"github.vscode-github-actions",
3232
"ms-python.black-formatter",
3333
"ms-python.mypy-type-checker",
34-
"charliermarsh.ruff"
34+
"charliermarsh.ruff",
3535
],
3636
"settings": {
3737
"python.editor.defaultFormatter": "charliermarsh.ruff",
@@ -45,17 +45,17 @@
4545
"terminal.integrated.profiles.linux": {
4646
"bash": {
4747
"path": "bash",
48-
"icon": "terminal-bash"
48+
"icon": "terminal-bash",
4949
},
5050
"zsh": {
51-
"path": "zsh"
51+
"path": "zsh",
5252
},
5353
"fish": {
54-
"path": "fish"
55-
}
56-
}
57-
}
58-
}
54+
"path": "fish",
55+
},
56+
},
57+
},
58+
},
5959
},
6060
"forwardPorts": [8000],
6161
"postCreateCommand": [
@@ -64,7 +64,7 @@
6464
"--extras",
6565
"full",
6666
"--with",
67-
"docs,lint"
67+
"docs,lint",
6868
],
69-
"remoteUser": "vscode"
69+
"remoteUser": "vscode",
7070
}

.github/PULL_REQUEST_TEMPLATE.md

+7
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@ By submitting this pull request, you agree to:
44
- follow [Litestar's contribution guidelines](https://github.com/litestar-org/.github/blob/main/CONTRIBUTING.md)
55
- follow the [PSFs's Code of Conduct](https://www.python.org/psf/conduct/)
66
-->
7+
## Description
8+
9+
-
710

811
<!--
912
Please add in issue numbers this pull request will close, if applicable
1013
Examples: Fixes #4321 or Closes #1234
14+
15+
Ensure you are using a supported keyword to properly link an issue:
16+
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
1117
-->
18+
## Closes

.github/workflows/ci.yml

+39-3
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,41 @@ jobs:
9292
coverage: ${{ (matrix.python-version == '3.12' || matrix.python-version == '3.8') }}
9393
python-version: ${{ matrix.python-version }}
9494

95+
test_integration:
96+
name: Test server integration
97+
runs-on: ubuntu-latest
98+
strategy:
99+
matrix:
100+
uvicorn-version: ["uvicorn<0.27.0", "uvicorn>=0.27.0"]
101+
steps:
102+
- name: Check out repository
103+
uses: actions/checkout@v4
104+
105+
- name: Set up python 3.11
106+
uses: actions/setup-python@v5
107+
with:
108+
python-version: 3.11
109+
110+
- uses: pdm-project/setup-pdm@v4
111+
name: Set up PDM
112+
with:
113+
python-version: 3.11
114+
allow-python-prereleases: false
115+
cache: true
116+
cache-dependency-path: |
117+
./pdm.lock
118+
119+
- name: Install dependencies
120+
run: |
121+
pdm install -G:all
122+
pip install -U "${{ matrix.uvicorn-version }}"
123+
124+
- name: Set PYTHONPATH
125+
run: echo "PYTHONPATH=$PWD" >> $GITHUB_ENV
126+
127+
- name: Test
128+
run: pdm run pytest tests -m server_integration
129+
95130
upload-test-coverage:
96131
runs-on: ubuntu-latest
97132
needs: test
@@ -112,16 +147,17 @@ jobs:
112147
python -Im coverage combine
113148
python -Im coverage xml -i
114149
115-
- name: Fix coverage file for sonarcloud
150+
- name: Fix coverage file name
116151
run: sed -i "s/home\/runner\/work\/litestar\/litestar/github\/workspace/g" coverage.xml
117152

118153
- name: Upload coverage reports to Codecov
119-
uses: codecov/codecov-action@v3
154+
uses: codecov/codecov-action@v4
120155
with:
121156
files: coverage.xml
157+
token: ${{ secrets.CODECOV_TOKEN }}
122158

123159
test-platform-compat:
124-
if: github.event_name == 'push'
160+
if: github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'test platform compat')
125161
strategy:
126162
fail-fast: false
127163
matrix:

.github/workflows/pr-merged.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: "PR merged"
2+
3+
on:
4+
pull_request:
5+
types:
6+
- closed
7+
branches:
8+
- develop
9+
- main
10+
11+
jobs:
12+
close_and_notify:
13+
name: Close issues and notify
14+
if: github.event.pull_request.merged == true
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/github-script@v7
18+
with:
19+
script: |
20+
const prNumber = context.payload.number
21+
const branch = context.baseRef
22+
const isDevelop = branch === "develop"
23+
const commentBody = `<!--closing-comment-->\nThis issue has been closed in #${prNumber}. The change will be included in the upcoming ${isDevelop ? "minor" : "patch"} release.`
24+
25+
const query = `query($number: Int!, $owner: String!, $name: String!) { repository(owner: $owner, name: $name) {
26+
pullRequest(number: $number) {
27+
id
28+
closingIssuesReferences (first: 10) { edges { node { number } } }
29+
}
30+
}
31+
}`
32+
const res = await github.graphql(query, {number: prNumber, owner: context.repo.owner, name: context.repo.repo})
33+
const linkedIssues = res.repository.pullRequest.closingIssuesReferences.edges.map(
34+
edge => edge.node.number
35+
)
36+
37+
for (const issueNumber of linkedIssues) {
38+
const res = await github.rest.issues.update({
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
issue_number: issueNumber,
42+
state: "closed",
43+
state_reason: "completed"
44+
})
45+
if (res.status === 200) {
46+
await github.rest.issues.createComment({
47+
owner: context.repo.owner,
48+
repo: context.repo.repo,
49+
issue_number: issueNumber,
50+
body: commentBody,
51+
})
52+
}
53+
}

.pre-commit-config.yaml

+3-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ default_language_version:
22
python: "3.8"
33
repos:
44
- repo: https://github.com/compilerla/conventional-pre-commit
5-
rev: v3.0.0
5+
rev: v3.1.0
66
hooks:
77
- id: conventional-pre-commit
88
stages: [commit-msg]
@@ -23,7 +23,7 @@ repos:
2323
- id: unasyncd
2424
additional_dependencies: ["ruff"]
2525
- repo: https://github.com/charliermarsh/ruff-pre-commit
26-
rev: "v0.1.6"
26+
rev: "v0.2.1"
2727
hooks:
2828
- id: ruff
2929
args: ["--fix"]
@@ -35,23 +35,14 @@ repos:
3535
exclude: "tests/openapi/typescript_converter/test_converter|README.md"
3636
additional_dependencies:
3737
- tomli
38-
- repo: https://github.com/asottile/blacken-docs
39-
rev: 1.16.0
40-
hooks:
41-
- id: blacken-docs
42-
- repo: https://github.com/pre-commit/mirrors-prettier
43-
rev: "v3.1.0"
44-
hooks:
45-
- id: prettier
46-
exclude: "_templates|.git|.all-contributorsrc"
4738
- repo: https://github.com/python-formate/flake8-dunder-all
4839
rev: v0.3.1
4940
hooks:
5041
- id: ensure-dunder-all
5142
exclude: "test*|examples*|tools"
5243
args: ["--use-tuple"]
5344
- repo: https://github.com/ariebovenberg/slotscheck
54-
rev: v0.17.1
45+
rev: v0.17.3
5546
hooks:
5647
- id: slotscheck
5748
exclude: "test_*|docs|.github"

0 commit comments

Comments
 (0)