Skip to content

Commit

Permalink
build: upgrade to python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdaemon committed May 20, 2024
1 parent 4048f48 commit 850ecbd
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/devcontainers/python:3.9
FROM mcr.microsoft.com/devcontainers/python:3.12

RUN \
pipx uninstall mypy \
Expand Down
4 changes: 2 additions & 2 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9 AS builder
FROM python:3.12 AS builder

RUN apt-get update && \
apt-get install --no-install-recommends --no-install-suggests -y \
Expand All @@ -13,7 +13,7 @@ WORKDIR /source

RUN rm -rf dist && /root/.local/bin/hatch build -t wheel

FROM python:3.9-slim
FROM python:3.12-slim

WORKDIR /gvm-sync-targets

Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ repos:
rev: 651c822fdcf45fffcf9743dc755085f32acb65e3
- hooks:
- args:
- --py39-plus
- --py312-plus
id: pyupgrade
repo: https://github.com/asottile/pyupgrade
rev: 12af25eb252deaaecb6b259df40d01f42e716dc3
Expand Down
14 changes: 6 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ dynamic = ["version"]
description = ''
readme = "README.md"
license = "MIT"
requires-python = ">=3.9"
requires-python = ">=3.12"
authors = [{ name = "linuxdaemon", email = "linuxdaemon.irc@gmail.com" }]
keywords = []
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
Expand Down Expand Up @@ -76,7 +73,7 @@ type = "container"
dependencies = ["coverage[toml]>=6.5", "pytest>=6.0"]

[[tool.hatch.envs.testall.matrix]]
python = ["3.9", "3.10", "3.11", "3.12"]
python = ["3.12"]

[tool.isort]
profile = "black"
Expand All @@ -87,12 +84,12 @@ float_to_top = true

[tool.black]
line-length = 80
target-version = ["py39"]
target-version = ["py312"]
include = '\.pyi?$'

[tool.ruff]
line-length = 80
target-version = 'py39'
target-version = 'py312'

[tool.ruff.format]
docstring-code-format = true
Expand Down Expand Up @@ -123,6 +120,7 @@ ignore = [
"ISC001", # Conflicts with formatter
"EXE002", # pre-commit does it better, works with SMB shares
"FA100",
"D",
]
select = ["ALL"]

Expand Down Expand Up @@ -160,7 +158,7 @@ transform-concats = true

[tool.mypy]
namespace_packages = true
python_version = "3.9"
python_version = "3.12"
warn_unused_configs = true
strict = true
strict_optional = true
Expand Down

0 comments on commit 850ecbd

Please sign in to comment.