Skip to content

Commit

Permalink
build: Bump dev Python version to 3.11.2 (#151)
Browse files Browse the repository at this point in the history
As well as bump pre-commit hooks and GitHub actions.

Also use `black==23.1.0` for formatting code.
  • Loading branch information
playpauseandstop authored Feb 23, 2023
1 parent d23c676 commit a2a876c
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/actions/install_badabump/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
steps:
- id: "python"
name: "Install Python"
uses: "actions/setup-python@v4.4.0"
uses: "actions/setup-python@v4.5.0"
with:
python-version-file: ".python-version"

Expand Down
4 changes: 2 additions & 2 deletions .github/actions/install_python_and_poetry/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ runs:
steps:
- id: "python"
name: "Install Python"
uses: "actions/setup-python@v4.4.0"
uses: "actions/setup-python@v4.5.0"
with:
python-version: "${{ inputs.python-version }}"
python-version-file: "${{ inputs.python-version-file }}"
Expand All @@ -49,7 +49,7 @@ runs:
run: "pipx install --python='${{ steps.python.outputs.python-path }}' poetry==${{ inputs.poetry-version }}"

- name: "Cache venv"
uses: "actions/cache@v3.2.2"
uses: "actions/cache@v3.2.6"
with:
path: "./.venv/"
key: "venv-${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{ hashFiles('poetry.lock') }}${{ inputs.cache-key-suffix }}"
2 changes: 1 addition & 1 deletion .github/actions/run_pre_commit/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ runs:
shell: "bash"

- name: "Cache mypy"
uses: "actions/cache@v3.2.2"
uses: "actions/cache@v3.2.6"
with:
path: "./.mypy_cache/"
key: "mypy-${{ runner.os }}-${{ inputs.python-version }}"
Expand Down
6 changes: 3 additions & 3 deletions .github/actions/run_tox/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ inputs:
tox-version:
description: "Tox version to use"
required: false
default: "4.1.3"
default: "4.4.6"

tox-gh-actions-version:
description: "Tox GitHub Actions plugin version to use"
Expand Down Expand Up @@ -41,9 +41,9 @@ runs:
shell: "bash"

- name: "Cache tox"
uses: "actions/cache@v3.2.2"
uses: "actions/cache@v3.2.6"
with:
path: "./.tox/"
path: ".tox/"
key: "tox-${{ inputs.python-version }}"

- name: "Run tox"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: "pipx install --python='${{ steps.python_and_poetry.outputs.python-path }}' twine==${{ inputs.twine-version }}"

- name: "Check package"
run: "twine check ./dist/*"
run: "twine check dist/*"

- name: "Publish package"
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_verify_docs_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
run: "poetry install --only main,docs"

- name: "Build docs"
run: "poetry run python3 -m sphinx -b html ./docs/ ./docs/_build/"
run: "poetry run python3 -m sphinx -b html docs/ docs/_build/"
2 changes: 1 addition & 1 deletion .github/workflows/release_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: "badabump --ci ${{ github.event.inputs.args }}"

- id: "token"
uses: "tibdex/github-app-token@v1.7.0"
uses: "tibdex/github-app-token@v1.8.0"
with:
app_id: "${{ secrets.BADABUMP_APP_ID }}"
private_key: "${{ secrets.BADABUMP_APP_PRIVATE_KEY }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- id: "token"
uses: "tibdex/github-app-token@v1.7.0"
uses: "tibdex/github-app-token@v1.8.0"
with:
app_id: "${{ secrets.BADABUMP_APP_ID }}"
private_key: "${{ secrets.BADABUMP_APP_PRIVATE_KEY }}"
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ exclude: ^(archive|assets|migrations)/.*|.*/(migrations|test-data|vendor)/.*|.*\
minimum_pre_commit_version: "1.17.0"
repos:
- repo: "https://github.com/commitizen-tools/commitizen"
rev: "v2.39.1"
rev: "v2.42.0"
hooks:
- id: "commitizen"
# By default commitizen using `python3` instead `python` language, so
# By default commitizen using `python3` language version, so
# needed to provide concrete version here as well
language_version: *python_version
stages: ["commit-msg"]
Expand All @@ -19,27 +19,27 @@ repos:
name: "Format code (no-optional)"

- repo: "https://github.com/PyCQA/isort"
rev: "5.11.4"
rev: "5.12.0"
hooks:
- id: "isort"
name: "Format code (isort)"
exclude: ^docs/.*$

- repo: "https://github.com/psf/black"
rev: "22.12.0"
rev: "23.1.0"
hooks:
- id: "black"
name: "Format code (black)"
exclude: ^docs/.*$

- repo: "https://github.com/asottile/blacken-docs"
rev: "v1.12.1"
rev: "1.13.0"
hooks:
- id: "blacken-docs"
name: "Format docs (blacken-docs)"
args: ["-l", "64"]
additional_dependencies:
- "black==22.10.0"
- "black==23.1.0"

- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: "v4.4.0"
Expand All @@ -51,7 +51,7 @@ repos:
- id: "check-yaml"

- repo: "https://github.com/pre-commit/pygrep-hooks"
rev: "v1.9.0"
rev: "v1.10.0"
hooks:
- id: "python-check-blanket-noqa"
- id: "python-check-blanket-type-ignore"
Expand All @@ -65,7 +65,7 @@ repos:
- id: "flake8"
name: "Lint code (flake8)"
additional_dependencies: &flake8_additional_dependencies
- "flake8-bugbear==22.12.6"
- "flake8-bugbear==23.2.13"
- "flake8-builtins==2.1.0"
- "flake8-comprehensions==3.10.1"
- "flake8-isort==6.0.0"
Expand All @@ -91,7 +91,7 @@ repos:
hooks:
- id: "mypy"
name: "Lint code (mypy)"
entry: "./.venv/bin/mypy"
entry: ".venv/bin/mypy"
language: "python"
"types": ["python"]
require_serial: true
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11.1
3.11.2
2 changes: 1 addition & 1 deletion python.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VENV_DIR = .venv
PYTHON_BIN = $(VENV_DIR)/bin/python3

STAGE ?= dev
DOTENV ?= $(shell if [ -f ./dotenv.sh ]; then echo "./dotenv.sh "; fi)
DOTENV ?= $(shell if [ -f dotenv.sh ]; then echo "./dotenv.sh"; fi)
POETRY ?= $(DOTENV) poetry
POETRY_INSTALL_ARGS ?=
PRE_COMMIT ?= pre-commit
Expand Down
1 change: 1 addition & 0 deletions src/aiohttp_middlewares/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
error_middleware,
)
# Error handler for API requests
async def api_error(request: web.Request) -> web.Response:
with error_context(request) as context:
Expand Down

0 comments on commit a2a876c

Please sign in to comment.