Skip to content

Commit 171c4a7

Browse files
authored
refresh to match pallets (#386)
2 parents a80358b + d6dd65d commit 171c4a7

Some content is hidden

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

99 files changed

+2168
-1574
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
insert_final_newline = true
7+
trim_trailing_whitespace = true
8+
end_of_line = lf
9+
charset = utf-8
10+
max_line_length = 88
11+
12+
[*.{css,html,js,json,jsx,scss,ts,tsx,yaml,yml}]
13+
indent_size = 2

.github/ISSUE_TEMPLATE/bug-report.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ about: Report a bug in Quart (not other projects which depend on Quart)
44
---
55

66
<!--
7-
This issue tracker is a tool to address bugs in Quart itself. Please
8-
use Pallets Discord or Stack Overflow for questions about your own code.
7+
This issue tracker is a tool to address bugs in Quart itself. Please use
8+
GitHub Discussions or the Pallets Discord for questions about your own code.
99
1010
Replace this comment with a clear outline of what the bug is.
1111
-->

.github/ISSUE_TEMPLATE/config.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Security issue
4-
url: security@palletsprojects.com
5-
about: Do not report security issues publicly. Email our security contact.
4+
url: https://github.com/pallets/quart/security/advisories/new
5+
about: Do not report security issues publicly. Create a private advisory.
66
- name: Questions
7-
url: https://stackoverflow.com/questions/tagged/quart?tab=Frequent
8-
about: Search for and ask questions about your code on Stack Overflow.
9-
- name: Questions and discussions
7+
url: https://github.com/pallets/quart/discussions/
8+
about: Ask questions about your own code on the Discussions tab.
9+
- name: Questions on
1010
url: https://discord.gg/pallets
11-
about: Discuss questions about your code on our Discord chat.
11+
about: Ask questions about your own code on our Discord chat.

.github/ISSUE_TEMPLATE/feature-request.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ about: Suggest a new feature for Quart
55

66
<!--
77
Replace this comment with a description of what the feature should do.
8-
Include details such as links relevant specs or previous discussions.
8+
Include details such as links to relevant specs or previous discussions.
99
-->
1010

1111
<!--
1212
Replace this comment with an example of the problem which this feature
13-
would resolve. Is this problem solvable without changes to Quart,
14-
such as by subclassing or using an extension?
13+
would resolve. Is this problem solvable without changes to Quart, such
14+
as by subclassing or using an extension?
1515
-->

.github/dependabot.yml

-6
This file was deleted.

.github/pull_request_template.md

+3-18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<!--
22
Before opening a PR, open a ticket describing the issue or feature the
3-
PR will address. Follow the steps in CONTRIBUTING.rst.
3+
PR will address. An issue is not required for fixing typos in
4+
documentation, or other simple non-code changes.
45
56
Replace this comment with a description of the change. Describe how it
67
addresses the linked ticket.
@@ -9,22 +10,6 @@ addresses the linked ticket.
910
<!--
1011
Link to relevant issues or previous PRs, one per line. Use "fixes" to
1112
automatically close an issue.
12-
-->
13-
14-
- fixes #<issue number>
15-
16-
<!--
17-
Ensure each step in CONTRIBUTING.rst is complete by adding an "x" to
18-
each box below.
1913
20-
If only docs were changed, these aren't relevant and can be removed.
14+
fixes #<issue number>
2115
-->
22-
23-
Checklist:
24-
25-
- [ ] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
26-
- [ ] Add or update relevant docs, in the docs folder and in code.
27-
- [ ] Add an entry in `CHANGES.rst` summarizing the change and linking to the issue.
28-
- [ ] Add `.. versionchanged::` entries in any relevant code docs.
29-
- [ ] Run `pre-commit` hooks and fix any issues.
30-
- [ ] Run `pytest` and `tox`, no tests failed.

.github/workflows/lock.yaml

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1-
name: 'Lock threads'
2-
# Lock closed issues that have not received any further activity for
3-
# two weeks. This does not close open issues, only humans may do that.
4-
# We find that it is easier to respond to new issues with fresh examples
5-
# rather than continuing discussions on old issues.
1+
name: Lock inactive closed issues
2+
# Lock closed issues that have not received any further activity for two weeks.
3+
# This does not close open issues, only humans may do that. It is easier to
4+
# respond to new issues with fresh examples rather than continuing discussions
5+
# on old issues.
66

77
on:
88
schedule:
99
- cron: '0 0 * * *'
10-
1110
permissions:
1211
issues: write
1312
pull-requests: write
14-
1513
concurrency:
1614
group: lock
17-
1815
jobs:
1916
lock:
2017
runs-on: ubuntu-latest
2118
steps:
22-
- uses: dessant/lock-threads@v5
19+
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
2320
with:
2421
issue-inactive-days: 14
2522
pr-inactive-days: 14

.github/workflows/pre-commit.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: pre-commit
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main, stable]
6+
jobs:
7+
main:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
11+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
12+
with:
13+
python-version: 3.x
14+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
15+
- uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0
16+
if: ${{ !cancelled() }}

.github/workflows/publish.yaml

+19-15
Original file line numberDiff line numberDiff line change
@@ -9,40 +9,42 @@ jobs:
99
outputs:
1010
hash: ${{ steps.hash.outputs.hash }}
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-python@v5
12+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
1414
with:
1515
python-version: '3.x'
16-
- run: pip install poetry
17-
- run: poetry build
16+
cache: pip
17+
cache-dependency-path: requirements*/*.txt
18+
- run: pip install -r requirements/build.txt
19+
# Use the commit date instead of the current date during the build.
20+
- run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV
21+
- run: python -m build
1822
# Generate hashes used for provenance.
1923
- name: generate hash
2024
id: hash
2125
run: cd dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT
22-
- uses: actions/upload-artifact@v4
26+
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
2327
with:
2428
path: ./dist
25-
2629
provenance:
27-
needs: ['build']
30+
needs: [build]
2831
permissions:
2932
actions: read
3033
id-token: write
3134
contents: write
3235
# Can't pin with hash due to how this workflow works.
33-
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.10.0
36+
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v2.0.0
3437
with:
3538
base64-subjects: ${{ needs.build.outputs.hash }}
36-
3739
create-release:
3840
# Upload the sdist, wheels, and provenance to a GitHub release. They remain
3941
# available as build artifacts for a while as well.
40-
needs: ['provenance']
42+
needs: [provenance]
4143
runs-on: ubuntu-latest
4244
permissions:
4345
contents: write
4446
steps:
45-
- uses: actions/download-artifact@v4
47+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
4648
- name: create release
4749
run: >
4850
gh release create --draft --repo ${{ github.repository }}
@@ -51,15 +53,17 @@ jobs:
5153
env:
5254
GH_TOKEN: ${{ github.token }}
5355
publish-pypi:
54-
needs: ['provenance']
56+
needs: [provenance]
5557
# Wait for approval before attempting to upload to PyPI. This allows reviewing the
5658
# files in the draft release.
57-
environment: 'publish'
59+
environment:
60+
name: publish
61+
url: https://pypi.org/project/Quart/${{ github.ref_name }}
5862
runs-on: ubuntu-latest
5963
permissions:
6064
id-token: write
6165
steps:
62-
- uses: actions/download-artifact@v4
63-
- uses: pypa/gh-action-pypi-publish@release/v1
66+
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
67+
- uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2
6468
with:
6569
packages-dir: artifact/

.github/workflows/tests.yaml

+31-37
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,48 @@
11
name: Tests
22
on:
33
push:
4-
branches:
5-
- main
6-
- pallets
7-
paths-ignore:
8-
- 'docs/**'
9-
- '*.md'
10-
- '*.rst'
4+
branches: [main, stable]
5+
paths-ignore: ['docs/**', '*.md', '*.rst']
116
pull_request:
12-
branches:
13-
- main
14-
paths-ignore:
15-
- 'docs/**'
16-
- '*.md'
17-
- '*.rst'
7+
paths-ignore: [ 'docs/**', '*.md', '*.rst' ]
188
jobs:
199
tests:
20-
name: ${{ matrix.name }}
21-
runs-on: ${{ matrix.os }}
10+
name: ${{ matrix.name || matrix.python }}
11+
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
2212
strategy:
2313
fail-fast: false
2414
matrix:
2515
include:
26-
- {name: Linux, python: '3.13', os: ubuntu-latest, tox: py313}
27-
- {name: Windows, python: '3.13', os: windows-latest, tox: py313}
28-
- {name: Mac, python: '3.13', os: macos-latest, tox: py313}
29-
- {name: '3.13', python: '3.13', os: ubuntu-latest, tox: py313}
30-
- {name: '3.12', python: '3.12', os: ubuntu-latest, tox: py312}
31-
- {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311}
32-
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
33-
- {name: Typing, python: '3.13', os: ubuntu-latest, tox: mypy}
34-
- {name: Package, python: '3.13', os: ubuntu-latest, tox: package}
35-
- {name: Lint, python: '3.13', os: ubuntu-latest, tox: pep8}
36-
- {name: Format, python: '3.13', os: ubuntu-latest, tox: format}
16+
- {python: '3.13'}
17+
- {name: Windows, python: '3.13', os: windows-latest}
18+
- {name: Mac, python: '3.13', os: macos-latest}
19+
- {python: '3.12'}
20+
- {python: '3.11'}
21+
- {python: '3.10'}
22+
- {python: '3.9'}
3723
steps:
38-
- uses: actions/checkout@v4
39-
- uses: actions/setup-python@v5
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
4026
with:
4127
python-version: ${{ matrix.python }}
42-
- name: update pip
43-
run: |
44-
pip install -U wheel
45-
pip install -U setuptools
46-
python -m pip install -U pip
28+
allow-prereleases: true
29+
cache: pip
30+
cache-dependency-path: requirements*/*.txt
31+
- run: pip install tox
32+
- run: tox run -e ${{ matrix.tox || format('py{0}', matrix.python) }}
33+
typing:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
38+
with:
39+
python-version: '3.x'
40+
cache: pip
41+
cache-dependency-path: requirements*/*.txt
4742
- name: cache mypy
48-
uses: actions/cache@v4.0.0
43+
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4.1.2
4944
with:
5045
path: ./.mypy_cache
51-
key: mypy|${{ matrix.python }}|${{ hashFiles('pyproject.toml') }}
52-
if: matrix.tox == 'typing'
46+
key: mypy|${{ hashFiles('pyproject.toml') }}
5347
- run: pip install tox
54-
- run: tox -e ${{ matrix.tox }}
48+
- run: tox run -e typing

.gitignore

+8-12
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
*~
2-
venv/
1+
.idea/
2+
.vscode/
3+
.venv*/
4+
venv*/
35
__pycache__/
4-
Quart.egg-info/
5-
.cache/
6+
dist/
7+
.coverage*
8+
htmlcov/
69
.tox/
7-
TODO
8-
.mypy_cache/
9-
.pytest_cache/
10-
.hypothesis/
10+
docs/reference/source
1111
docs/_build/
12-
docs/reference/source/
13-
dist/
14-
.coverage
15-
poetry.lock

.pre-commit-config.yaml

+7-25
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,14 @@
11
repos:
2-
- repo: https://github.com/asottile/pyupgrade
3-
rev: v3.9.0
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.7.3
44
hooks:
5-
- id: pyupgrade
6-
args: ["--py38-plus"]
7-
- repo: https://github.com/pycqa/isort
8-
rev: 5.12.0
9-
hooks:
10-
- id: isort
11-
- repo: https://github.com/psf/black
12-
rev: 23.7.0
13-
hooks:
14-
- id: black
15-
- repo: https://github.com/PyCQA/flake8
16-
rev: 6.0.0
17-
hooks:
18-
- id: flake8
19-
additional_dependencies:
20-
- flake8-bugbear
21-
- flake8-implicit-str-concat
22-
- repo: https://github.com/peterdemin/pip-compile-multi
23-
rev: v2.6.3
24-
hooks:
25-
- id: pip-compile-multi-verify
5+
- id: ruff
6+
- id: ruff-format
267
- repo: https://github.com/pre-commit/pre-commit-hooks
27-
rev: v4.4.0
8+
rev: v5.0.0
289
hooks:
10+
- id: check-merge-conflict
11+
- id: debug-statements
2912
- id: fix-byte-order-marker
3013
- id: trailing-whitespace
3114
- id: end-of-file-fixer
32-
exclude: "^tests/.*.http$"

.readthedocs.yaml

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
version: 2
2-
32
build:
43
os: ubuntu-22.04
54
tools:
6-
python: "3.12"
7-
5+
python: '3.12'
86
python:
97
install:
8+
- requirements: requirements/docs.txt
109
- method: pip
1110
path: .
12-
extra_requirements:
13-
- docs
14-
1511
sphinx:
16-
configuration: docs/conf.py
12+
builder: html
13+
fail_on_warning: false

0 commit comments

Comments
 (0)