Skip to content

Commit

Permalink
chore: Update dependencies' versions and set default Python to 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
bow committed Oct 6, 2023
1 parent f779642 commit 5b96fe1
Show file tree
Hide file tree
Showing 7 changed files with 839 additions and 805 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.10", "3.9", "3.8"]
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
steps:
- name: Checkout repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
annotate_only: true

- name: Upload coverage
if: matrix.python-version == '3.11'
if: matrix.python-version == '3.12'
uses: paambaati/codeclimate-action@v3.2.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v3
with:
python-version: "3.11"
python-version: "3.12"

- name: Setup poetry cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.9.1
hooks:
- id: black
name: "Apply Black"
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Dockerfile for packaging releases.
#
# Copyright (c) 2015-2022 Wibowo Arindrarto <contact@arindrarto.dev>
# Copyright (c) 2015-2023 Wibowo Arindrarto <contact@arindrarto.dev>
# SPDX-License-Identifier: BSD-3-Clause
#
# This file is part of Crimson <https://github.com/bow/crimson>.

FROM python:3.11.0-alpine AS builder
FROM python:3.12.0-alpine AS builder

ENV PIP_DISABLE_PIP_VERSION_CHECK=on
ENV PIP_NO_CACHE_DIR=on

WORKDIR /src

RUN apk add --update --no-cache build-base~=0 make~=4 git~=2 libffi-dev~=3 py3-pip~=22
RUN apk add --update --no-cache build-base~=0 make~=4 git~=2 libffi-dev~=3 py3-pip~=23

COPY .git /src/.git

Expand All @@ -22,7 +22,7 @@ RUN git checkout -- . \

# --- #

FROM python:3.11.0-alpine
FROM python:3.12.0-alpine

ARG REVISION
ARG BUILD_TIME
Expand All @@ -38,7 +38,7 @@ ENV PIP_NO_INDEX=on
WORKDIR /app
COPY --from=builder /wheels /wheels

RUN apk add --update --no-cache py3-pip~=22 \
RUN apk add --update --no-cache py3-pip~=23 \
&& pip install --find-links=/wheels/deps /wheels/deps/* \
&& pip install --no-deps --find-links=/wheels crimson \
&& apk --purge del py3-pip \
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ endif
APP_NAME := crimson

# Supported Python versions; latest listed first.
PYTHON_VERSIONS := 3.11.0 3.10.8 3.9.15 3.8.15
PYTHON_VERSIONS := 3.12.0 3.11.0 3.10.8 3.9.15 3.8.15

# Primary Python version used for virtualenv.
PYTHON_VERSION := $(firstword $(PYTHON_VERSIONS))
Expand All @@ -30,10 +30,10 @@ PYTHON_VERSION := $(firstword $(PYTHON_VERSIONS))
VENV_NAME := $(APP_NAME)-dev

# Non-pyproject.toml dependencies.
PIP_DEPS := poetry==1.2.2 poetry-dynamic-versioning==0.19.0 twine==4.0.1
PIP_DEPS := poetry==1.6.1 poetry-dynamic-versioning==1.1.0 twine==4.0.2

# Non-pyproject.toml dev dependencies.
PIP_DEV_DEPS := pre-commit tox==3.27.0
PIP_DEV_DEPS := pre-commit tox==4.11.3

# Various build info.
GIT_TAG := $(shell git describe --tags --always --dirty 2> /dev/null || echo "untagged")
Expand Down Expand Up @@ -96,7 +96,6 @@ env: ## Configure a local development setup.
&& source "$(shell pyenv root)/versions/$(VENV_NAME)/bin/activate" \
&& pip install --upgrade pip && pyenv rehash \
&& pip install $(PIP_DEPS) $(PIP_DEV_DEPS) && pyenv rehash \
&& poetry config experimental.new-installer false \
&& poetry config virtualenvs.create false \
&& poetry install && pyenv rehash \
&& pre-commit install && pyenv rehash \
Expand Down
1,577 changes: 805 additions & 772 deletions poetry.lock

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Utilities",
"Topic :: Software Development :: Libraries",

Expand All @@ -36,30 +37,29 @@ style = "semver"
pattern = "^v?(?P<base>\\d+\\.\\d+\\.\\d+)(-?((?P<stage>[a-zA-Z]+)\\.?(?P<revision>\\d+)?))?(\\+(?P<tagged_metadata>.+))?$"

[tool.poetry.dependencies]
python = "^3.8"
click = "^8.0"
PyYAML = "^6.0"
single-source = "^0.2.0"
urllib3 = "^1.26.16"
python = ">=3.8.1,<4.0"
click = "^8.1.7"
PyYAML = "^6.0.1"
single-source = "^0.3.0"

[tool.poetry.group.dev.dependencies]
black = "^22.10.0"
pytest = "^7.4.0"
black = "^23.9.1"
pytest = "^7.4.2"
pytest-cov = "^4.1.0"
pytest-sugar = "^0.9.7"
bandit = "^1.7.0"
flake8 = "^5.0.4"
bandit = "^1.7.5"
flake8 = "^6.1.0"
flake8-polyfill = "^1.0.2"
mypy = "^1.4.1"
mypy = "^1.5.1"
mypy-extensions = "^1.0.0"
radon = "^5.0.1"
pytest-flake8 = "^1.0.7"
types-PyYAML = "^6.0.12"
twine = "^4.0.1"
safety = "^2.0.0"
radon = "^6.0.1"
pytest-flake8 = "^1.1.1"
types-PyYAML = "^6.0.12.12"
twine = "^4.0.2"
safety = "^2.3.5"

[tool.mypy]
python_version = "3.11"
python_version = "3.12"
ignore_missing_imports = true
show_error_context = true
show_column_numbers = true
Expand Down Expand Up @@ -93,5 +93,5 @@ omit = ["tests/*"]
universal = true

[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
6 changes: 4 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
[tox]
envlist = py311, py310, py39, py38
envlist = py312, py311, py310, py39, py38

[testenv]
whitelist_externals = poetry
allowlist_externals =
poetry
make
skip_install = true
commands =
poetry install
Expand Down

0 comments on commit 5b96fe1

Please sign in to comment.