Skip to content

Commit

Permalink
Merge branch 'master' into falconry#1520
Browse files Browse the repository at this point in the history
  • Loading branch information
vytas7 committed May 1, 2023
2 parents 42b046c + d2981f6 commit dd681c3
Show file tree
Hide file tree
Showing 33 changed files with 368 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[run]
branch = True
source = falcon
omit = falcon/tests*,falcon/cmd/bench.py,falcon/bench*,falcon/vendor/*
omit = falcon/tests*,falcon/cmd/bench.py,falcon/bench/*,falcon/vendor/*

parallel = True

Expand Down
24 changes: 24 additions & 0 deletions .devcontainer/devcontainer.json
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"
}
43 changes: 15 additions & 28 deletions .github/workflows/create-wheels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:

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 }}
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2

Expand All @@ -121,30 +121,17 @@ jobs:
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/python-wheels-manylinux-build@v0.3.2-manylinux2010_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/python-wheels-manylinux-build@v0.3.2-manylinux2014_x86_64
uses: RalfG/python-wheels-manylinux-build@v0.6.0-manylinux2014_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"
Expand Down Expand Up @@ -192,12 +179,12 @@ jobs:

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 }}
Expand Down Expand Up @@ -251,12 +238,12 @@ jobs:

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') }}
Expand All @@ -267,8 +254,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"
Expand All @@ -290,8 +277,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"
Expand All @@ -318,7 +305,7 @@ jobs:
files: 'dist/*manylinux*'

- name: Set up Python
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v4
with:
python-version: "3.10"
architecture: "x64"
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/mintest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -41,5 +41,6 @@ jobs:
run: |
tools/sed_coverage_rc.py
- name: Run tox
run: tox
- name: Run tox inside sdist
run: |
tools/tox_sdist.py
6 changes: 3 additions & 3 deletions .github/workflows/tests-emulated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
run_tox_emulate:
name: tox -e py310_cython (${{ matrix.architecture }})
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Expand All @@ -20,12 +20,12 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Cache PIP
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
.pip
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests-mailman.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 2

Expand All @@ -26,6 +26,7 @@ jobs:
# inside the container and raises exceptions upon teardown.
args: |
/bin/bash -c "
export LC_ALL=C.UTF-8 &&
tools/testing/fetch_mailman.sh &&
sed '/::1/d' /etc/hosts > /tmp/hosts && cat /tmp/hosts > /etc/hosts &&
python3 --version &&
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
python-version:
- "3.10"
os:
- "ubuntu-20.04"
- "ubuntu-latest"
toxenv:
- "pep8"
- "blue"
Expand All @@ -45,34 +45,34 @@ jobs:
# breaking changes in Falcon 3.0
# - "hug"
include:
- python-version: pypy3
os: ubuntu-20.04
- python-version: pypy3.9
os: ubuntu-latest
toxenv: pypy3
- python-version: "3.7"
os: ubuntu-20.04
os: ubuntu-latest
toxenv: py37
- python-version: "3.8"
os: ubuntu-20.04
os: ubuntu-latest
toxenv: py38
- python-version: "3.8"
os: ubuntu-20.04
os: ubuntu-latest
toxenv: py38_cython
- python-version: "3.9"
os: ubuntu-20.04
os: ubuntu-latest
toxenv: py39
- python-version: "3.9"
os: ubuntu-20.04
os: ubuntu-latest
toxenv: py39_cython
- python-version: "3.10"
os: ubuntu-20.04
os: ubuntu-latest
toxenv: py310
- python-version: "3.10"
os: ubuntu-20.04
os: ubuntu-latest
toxenv: py310_cython
- python-version: "3.11.0-rc - 3.11"
- python-version: "3.11"
os: ubuntu-latest
toxenv: py311
- python-version: "3.11.0-rc - 3.11"
- python-version: "3.11"
os: ubuntu-latest
toxenv: py311_cython
- python-version: "3.10"
Expand All @@ -81,12 +81,12 @@ jobs:
- python-version: "3.10"
os: windows-latest
toxenv: py310_nocover
# These env require 3.8, see tox.ini
# These env require 3.8 and 20.04, see tox.ini
- python-version: "3.8"
os: ubuntu-latest
os: ubuntu-20.04
toxenv: py38_smoke
- python-version: "3.8"
os: ubuntu-latest
os: ubuntu-20.04
toxenv: py38_smoke_cython
- python-version: "3.8"
os: ubuntu-latest
Expand All @@ -96,14 +96,14 @@ jobs:
# Some are GitHub actions, others run shell commands.
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3
# NOTE(vytas): Work around
# https://github.com/codecov/codecov-action/issues/190
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 }}

Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ $ gnome-open docs/_build/html/index.html
$ xdg-open docs/_build/html/index.html
```

### VS Code Dev Container development environment

When opening the project using the [VS Code](https://code.visualstudio.com/) IDE, if you have [Docker](https://www.docker.com/) (or some drop-in replacement such as [Podman](https://podman.io/) or [Colima](https://github.com/abiosoft/colima) or [Rancher Desktop](https://rancherdesktop.io/)) installed, you can leverage the [Dev Containers](https://code.visualstudio.com/docs/devcontainers/containers) feature to start a container in the background with all the dependencies required to test and debug the Falcon code. VS Code integrates with the Dev Container seamlessly, which can be configured via [devcontainer.json](.devcontainer/devcontainer.json). Once you open the project in VS Code, you can execute the "Reopen in Container" command to start the Dev Container which will run the headless VS Code Server process that the local VS Code app will connect to via a [published port](https://docs.docker.com/config/containers/container-networking/#published-ports).

### Code style rules

* Docstrings are required for classes, attributes, methods, and functions. Follow the
Expand Down
9 changes: 7 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
recursive-include docs *.rst *.html *.ico *.png *.py *.svg
recursive-include examples *.py
recursive-include falcon *.pyx
recursive-include tests *.py
recursive-include docs *.rst
recursive-include tests *.py *.pyx
include .coveragerc
include tox.ini
include CONTRIBUTING.md
include README.rst
include AUTHORS
include LICENSE
include docs/conf.py docs/Makefile
graft docs/_static
graft docs/_templates
graft requirements
graft tools
prune docs/_build
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ See also: `CONTRIBUTING.md <https://github.com/falconry/falcon/blob/master/CONTR
Legal
-----

Copyright 2013-2021 by Individual and corporate contributors as
Copyright 2013-2023 by Individual and corporate contributors as
noted in the individual source files.

Licensed under the Apache License, Version 2.0 (the "License"); you may
Expand Down
19 changes: 15 additions & 4 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Release Process:
6. Publish final version and add a release note.
7. Run benchmark and update falconframework.org with latest numbers.
8. Announce the new version in Gitter channels and on the socials.
9. Improve this document.

### Bump version and update tag

Expand All @@ -20,7 +21,7 @@ field to modify.
Update changelog filename in `pyproject.toml` to suit.

Update the build tag in `setup.cfg` under `[egg_info]` for pre-release builds,
or remove it (leaving it blank as in `tag_build = `) for a final releases.
or remove it (leaving it blank as in `tag_build =`) for a final release.

### Update changelog and render towncrier fragments

Expand Down Expand Up @@ -59,7 +60,7 @@ Many thanks to those who contributed to this bugfix release:
Otherwise, ensure the summary has been brought up to date; be sure to highlight
key changes in this release.

Next update the contributors and render towncrier fragments by running:
Next, update the contributors and render towncrier fragments by running:

```sh
$ tox -e changelog_release
Expand Down Expand Up @@ -92,9 +93,14 @@ you can re-render the docs without overwriting the changelog RST:
$ tox -e docs
```

Finally, if all looks good, remove the rendered towncrier fragments from
If all looks good, remove the rendered towncrier fragments from
`docs/_newsfragments` and then submit a PR containing the changes made so far.

Finally, merge the documentation PR and check that everything renders correctly
on https://falcon.readthedocs.io/. Note that if the release is not based on
`master` (or `main`), you may need to manually enable build on RtD for the
branch or tag in question.

### Release beta or rc

Be sure to install and test from PyPI as a sanity check afterwards. Fix docs,
Expand All @@ -113,4 +119,9 @@ Be sure to install and test from PyPI as a sanity check afterwards.

### Run benchmark and update falconframework.org with latest numbers

### Announce the new version in Gitter channels and on the socials.
### Announce the new version in Gitter channels and on the socials

### Improve this document

If you find any inconsistencies, outdated notes or anything missing here, make
sure you improve this document for future releases!
3 changes: 0 additions & 3 deletions docs/_newsfragments/2043.bugfix.rst

This file was deleted.

0 comments on commit dd681c3

Please sign in to comment.