Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ jobs:
fail-fast: false

steps:
- name: Run coverage
uses: sanic-org/simple-tox-action@v1
with:
python-version: "3.11"
tox-env: coverage
ignore-errors: true
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Run tests with coverage
run: uv run --python 3.13 nox -s tests-3.13
- name: Generate coverage XML
run: uv run --python 3.13 nox -s coverage_xml
if: success()
- name: Run Codecov
uses: codecov/codecov-action@v3
with:
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,20 +98,15 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: Install dependencies
run: pip install build twine
- name: Install uv
uses: astral-sh/setup-uv@v7

- name: Update package version
run: |
echo "__version__ = \"${{ needs.generate_info.outputs.pypi-version }}\"" > sanic/__version__.py

- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/ .
run: uv build

- name: Publish package distribution
uses: pypa/gh-action-pypi-publish@release/v1
Expand All @@ -126,7 +121,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.11", "3.12", "3.13"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
47 changes: 15 additions & 32 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,43 +17,26 @@ on:

jobs:
run_tests:
name: "${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / tox -e ${{ matrix.config.tox-env }}"
name: "${{ matrix.config.platform == 'windows-latest' && 'Windows' || 'Linux' }} / Python ${{ matrix.config.python-version }} / ${{ matrix.config.nox-session }}"
if: github.event.pull_request.draft == false
runs-on: ${{ matrix.config.platform || 'ubuntu-latest' }}
strategy:
fail-fast: true
matrix:
config:
- { python-version: "3.9", tox-env: security }
- { python-version: "3.10", tox-env: security }
- { python-version: "3.11", tox-env: security }
- { python-version: "3.12", tox-env: security }
- { python-version: "3.13", tox-env: security }
- { python-version: "3.13", tox-env: lint }
# - { python-version: "3.10", tox-env: docs }
- { python-version: "3.9", tox-env: type-checking }
- { python-version: "3.10", tox-env: type-checking }
- { python-version: "3.11", tox-env: type-checking }
- { python-version: "3.12", tox-env: type-checking }
- { python-version: "3.13", tox-env: type-checking }
- { python-version: "3.9", tox-env: py39, max-attempts: 3 }
- { python-version: "3.9", tox-env: py39-no-ext, max-attempts: 3 }
- { python-version: "3.10", tox-env: py310, max-attempts: 3 }
- { python-version: "3.10", tox-env: py310-no-ext, max-attempts: 3 }
- { python-version: "3.11", tox-env: py311, max-attempts: 3 }
- { python-version: "3.11", tox-env: py311-no-ext, max-attempts: 3 }
- { python-version: "3.12", tox-env: py312, max-attempts: 3 }
- { python-version: "3.12", tox-env: py312-no-ext, max-attempts: 3 }
- { python-version: "3.13", tox-env: py313, max-attempts: 3 }
- { python-version: "3.13", tox-env: py313-no-ext, max-attempts: 3 }
- { python-version: "3.9", tox-env: py39-no-ext, platform: windows-latest, ignore-errors: true }
- { python-version: "3.10", tox-env: py310-no-ext, platform: windows-latest, ignore-errors: true }
- { python-version: "3.11", tox-env: py311-no-ext, platform: windows-latest, ignore-errors: true }
- { python-version: "3.13", nox-session: security }
- { python-version: "3.13", nox-session: lint }
- { python-version: "3.13", nox-session: type_checking }
# - { python-version: "3.13", nox-session: docs }
- { python-version: "3.9", nox-session: tests-3.9, max-attempts: 3 }
- { python-version: "3.10", nox-session: tests-3.10, max-attempts: 3 }
- { python-version: "3.11", nox-session: tests-3.11, max-attempts: 3 }
- { python-version: "3.12", nox-session: tests-3.12, max-attempts: 3 }
- { python-version: "3.13", nox-session: tests-3.13, max-attempts: 3 }
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Run tests
uses: sanic-org/simple-tox-action@v1
with:
python-version: ${{ matrix.config.python-version }}
tox-env: ${{ matrix.config.tox-env }}
max-attempts: ${{ matrix.config.max-attempts || 1 }}
ignore-errors: ${{ matrix.config.ignore-errors || false }}
run: uv run --python ${{ matrix.config.python-version }} nox -s ${{ matrix.config.nox-session }}
continue-on-error: ${{ matrix.config.ignore-errors || false }}
67 changes: 44 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,47 @@
# Editor/system files
*~
*.egg-info
*.egg
*.eggs
*.pyc
.coverage
.coverage.*
coverage
*.swp
*.swo

# Dotfiles (with exceptions)
.*
!.appveyor.yml
!.coveragerc
!.gitattributes
!.github
!.gitignore

# Python cache and compiled files
__pycache__/
*.py[cod]
*$py.class
*.so

# Build artifacts
/build
/dist
*.egg-info/

# Python environments
/venv
/env
/ENV
/pip-wheel-metadata

# Coverage
/coverage
coverage.xml
.tox
htmlcov/

# Documentation
/docs/_build
/docs/_api

# Dependencies
/guide/node_modules

# Lock files
/*.lock

# Local settings
settings.py
.idea/*
.cache/*
.mypy_cache/
.python-version
docs/_build/
docs/_api/
build/*
.DS_Store
dist/*
pip-wheel-metadata/
.pytest_cache/*
.venv/*
venv/*
.vscode/*
guide/node_modules/
5 changes: 1 addition & 4 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
include LICENSE
include README.rst
include pyproject.toml

# Setup
include setup.py
include Makefile
include NOX_COMMANDS.md

# Tests
include .coveragerc
Expand Down
97 changes: 0 additions & 97 deletions Makefile

This file was deleted.

8 changes: 1 addition & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,7 @@ Installation

``pip install sanic``

Sanic makes use of ``uvloop`` and ``ujson`` to help with performance. If you do not want to use those packages, simply add an environmental variable ``SANIC_NO_UVLOOP=true`` or ``SANIC_NO_UJSON=true`` at install time.

.. code:: shell

$ export SANIC_NO_UVLOOP=true
$ export SANIC_NO_UJSON=true
$ pip install --no-binary :all: sanic
Sanic makes use of ``uvloop`` and ``ujson`` to help with performance on supported platforms (non-Windows, CPython).


.. note::
Expand Down
Loading
Loading