-
-
Notifications
You must be signed in to change notification settings - Fork 949
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into type_compiled_wip
# Conflicts: # falcon/routing/compiled.py
- Loading branch information
Showing
219 changed files
with
5,606 additions
and
1,742 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
[run] | ||
branch = True | ||
source = falcon | ||
omit = falcon/tests*,falcon/cmd/bench.py,falcon/bench*,falcon/vendor/* | ||
omit = falcon/tests*,falcon/typing.py,falcon/cmd/bench.py,falcon/bench/*,falcon/vendor/* | ||
|
||
parallel = True | ||
|
||
[report] | ||
show_missing = True | ||
exclude_lines = | ||
if TYPE_CHECKING: | ||
if not TYPE_CHECKING: | ||
pragma: nocover | ||
pragma: no cover | ||
pragma: no py39,py310 cover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/python | ||
{ | ||
"name": "Python 3", | ||
"image": "mcr.microsoft.com/devcontainers/python:3.11", | ||
"features": { | ||
"ghcr.io/devcontainers-contrib/features/tox:1": {} | ||
} | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
// "features": {}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
// "postCreateCommand": "pip3 install --user -r requirements.txt", | ||
|
||
// Configure tool-specific properties. | ||
// "customizations": {}, | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a final newline; trim trailing whitespace | ||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# Set default charset for sources | ||
[*.{html,js,py,pyx}] | ||
charset = utf-8 | ||
|
||
# 4 space indentation | ||
[*.{py,pyx}] | ||
indent_style = space | ||
indent_size = 4 | ||
|
||
# 2 space indentation | ||
[*.{yaml,yml}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,28 +24,26 @@ jobs: | |
- "windows-latest" | ||
- "macos-latest" | ||
python-version: | ||
- "3.5" | ||
- "3.6" | ||
- "3.7" | ||
- "3.8" | ||
- "3.9" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
architecture: | ||
- x64 | ||
|
||
include: | ||
- python-version: "3.5" | ||
pytest-extra: --ignore=tests/asgi | ||
|
||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2.1.4 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: ${{ matrix.architecture }} | ||
|
@@ -63,9 +61,6 @@ jobs: | |
# - install the created wheel without using the pypi index | ||
# - check the cython extension | ||
# - runs the tests | ||
env: | ||
FALCON_ASGI_WRAP_NON_COROUTINES: Y | ||
FALCON_TESTING_SESSION: Y | ||
run: | | ||
pip install tox | ||
tox -e wheel_check -- ${{ matrix.pytest-extra }} | ||
|
@@ -100,23 +95,20 @@ jobs: | |
- "ubuntu-latest" | ||
python-version: | ||
# the versions are <python tag>-<abi tag> as specified in PEP 425. | ||
- cp35-cp35m | ||
- cp36-cp36m | ||
- cp37-cp37m | ||
- cp38-cp38 | ||
- cp39-cp39 | ||
- cp310-cp310 | ||
- cp311-cp311 | ||
- cp312-cp312 | ||
architecture: | ||
- x64 | ||
|
||
include: | ||
- python-version: cp35-cp35m | ||
pytest-extra: --ignore=tests/asgi | ||
|
||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
|
@@ -125,35 +117,23 @@ jobs: | |
env: | ||
py_tag: ${{ matrix.python-version }} | ||
run: | | ||
version="${py_tag: 2:1}.${py_tag: 3:1}" | ||
platform=${py_tag%%-*} | ||
version=${platform:2:1}.${platform:3:3} | ||
echo $version | ||
echo "::set-output name=python-version::$version" | ||
- name: Set up Python | ||
uses: actions/setup-python@v2.1.4 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ steps.linux-py-version.outputs.python-version }} | ||
architecture: ${{ matrix.architecture }} | ||
|
||
- name: Create wheel for manylinux 2010 and 1 | ||
# this step uses the image provided by pypa here https://github.com/pypa/manylinux to generate the wheels on linux | ||
# the action uses the image for manylinux2010 but can generate also a manylinux1 wheel | ||
# change the tag of this image to change the image used | ||
uses: RalfG/[email protected]_x86_64 | ||
# this action generates 3 wheels in dist/. linux manylinux1 and manylinux2010 | ||
with: | ||
python-versions: ${{ matrix.python-version }} | ||
build-requirements: "setuptools>=47 wheel>=0.34" | ||
# `--no-deps` is used to only generate the wheel for the current library. Redundant in falcon since it has no dependencies | ||
pip-wheel-args: "-w ./dist -v --no-deps" | ||
|
||
- name: Create wheel for manylinux 2014 | ||
# as previous step but for manylinux2014 | ||
uses: RalfG/[email protected]_x86_64 | ||
uses: RalfG/[email protected]_x86_64 | ||
# this action generates 2 wheels in dist/. linux, manylinux2014 | ||
with: | ||
# Remove previous original wheel just to be sure it is recreated. Should not be needed | ||
pre-build-command: "rm ./dist/*-linux*.whl" | ||
pre-build-command: "rm -f ./dist/*-linux*.whl" | ||
python-versions: ${{ matrix.python-version }} | ||
build-requirements: "setuptools>=47 wheel>=0.34" | ||
pip-wheel-args: "-w ./dist -v --no-deps" | ||
|
@@ -162,9 +142,6 @@ jobs: | |
# - install the created wheel without using the pypi index | ||
# - check the cython extension | ||
# - runs the tests | ||
env: | ||
FALCON_ASGI_WRAP_NON_COROUTINES: Y | ||
FALCON_TESTING_SESSION: Y | ||
run: | | ||
pip install tox | ||
tox -e wheel_check -- ${{ matrix.pytest-extra }} | ||
|
@@ -196,20 +173,20 @@ jobs: | |
os: | ||
- "ubuntu-latest" | ||
python-version: | ||
- "3.9" | ||
- "3.10" | ||
architecture: | ||
- x64 | ||
|
||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2.1.4 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: ${{ matrix.architecture }} | ||
|
@@ -250,29 +227,26 @@ jobs: | |
- "ubuntu-latest" | ||
python-version: | ||
# the versions are <python tag>-<abi tag> as specified in PEP 425. | ||
- cp35-cp35m | ||
- cp36-cp36m | ||
- cp37-cp37m | ||
- cp38-cp38 | ||
- cp39-cp39 | ||
- cp310-cp310 | ||
- cp311-cp311 | ||
- cp312-cp312 | ||
architecture: | ||
- aarch64 | ||
- s390x | ||
|
||
include: | ||
- python-version: cp35-cp35m | ||
pytest-extra: --ignore=tests/asgi | ||
|
||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Cache wheels | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v3 | ||
with: | ||
path: .pip | ||
key: ${{ matrix.python-version }}-${{ matrix.architecture }}-pip-${{ hashFiles('requirements/tests') }} | ||
|
@@ -283,8 +257,8 @@ jobs: | |
- name: Create wheel for manylinux 2014 for arm | ||
if: ${{ matrix.architecture == 'aarch64' }} | ||
uses: RalfG/python-wheels-manylinux-build@v0.3.2-manylinux2014_aarch64 | ||
# this action generates 2 wheels in dist/. linux manylinux1 and manylinux2010 | ||
uses: RalfG/python-wheels-manylinux-build@v0.6.0-manylinux2014_aarch64 | ||
# this action generates 2 wheels in dist/. linux, manylinux2014 | ||
with: | ||
python-versions: ${{ matrix.python-version }} | ||
build-requirements: "setuptools>=47 wheel>=0.34" | ||
|
@@ -294,8 +268,6 @@ jobs: | |
if: ${{ matrix.architecture == 'aarch64' }} | ||
uses: docker://quay.io/pypa/manylinux2014_aarch64 | ||
env: | ||
FALCON_ASGI_WRAP_NON_COROUTINES: Y | ||
FALCON_TESTING_SESSION: Y | ||
PIP_CACHE_DIR: /github/workspace/.pip/ | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
with: | ||
|
@@ -308,8 +280,8 @@ jobs: | |
- name: Create wheel for manylinux 2014 for s390x | ||
if: ${{ matrix.architecture == 's390x' }} | ||
uses: RalfG/python-wheels-manylinux-build@v0.3.2-manylinux2014_s390x | ||
# this action generates 2 wheels in dist/. linux manylinux1 and manylinux2010 | ||
uses: RalfG/python-wheels-manylinux-build@v0.6.0-manylinux2014_s390x | ||
# this action generates 2 wheels in dist/. linux, manylinux2014 | ||
with: | ||
python-versions: ${{ matrix.python-version }} | ||
build-requirements: "setuptools>=47 wheel>=0.34" | ||
|
@@ -319,8 +291,6 @@ jobs: | |
if: ${{ matrix.architecture == 's390x' }} | ||
uses: docker://quay.io/pypa/manylinux2014_s390x | ||
env: | ||
FALCON_ASGI_WRAP_NON_COROUTINES: Y | ||
FALCON_TESTING_SESSION: Y | ||
PIP_CACHE_DIR: /github/workspace/.pip/ | ||
with: | ||
args: | | ||
|
@@ -338,9 +308,9 @@ jobs: | |
files: 'dist/*manylinux*' | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2.1.4 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
python-version: "3.10" | ||
architecture: "x64" | ||
|
||
- name: Publish wheel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Run tests (contributor's checklist) | ||
|
||
on: | ||
# Trigger the workflow on master but also allow it to run manually. | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
run_tox: | ||
name: tox (default envlist on ${{matrix.python-version}}) | ||
runs-on: "ubuntu-latest" | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: | ||
- "3.8" | ||
- "3.10" | ||
- "3.11" | ||
- "3.12" | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -U setuptools tox wheel | ||
python --version | ||
pip --version | ||
tox --version | ||
- name: Adjust .coveragerc | ||
if: ${{ matrix.python-version != '3.10' }} | ||
run: | | ||
tools/sed_coverage_rc.py | ||
- name: Run tox inside sdist | ||
run: | | ||
tools/tox_sdist.py |
Oops, something went wrong.