Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build!: update pyproject syntax for poetry v2 (PEP-621), drop py38, add py313 #486

Merged
merged 7 commits into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Tests

env:
POETRY_VERSION: "1.7.1"
PYTHON_VERSION: "3.12"
POETRY_VERSION: "2.1.1"
PYTHON_VERSION: "3.13"

on:
merge_group:
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
fail-fast: false
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Release

env:
POETRY_VERSION: "1.7.1"
PYTHON_VERSION: "3.12"
POETRY_VERSION: "2.1.1"
PYTHON_VERSION: "3.13"

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ tox:
image: python:${PYTHON_VERSION}
parallel:
matrix:
- PYTHON_VERSION: ["3.8", "3.9", "3.10", "3.11", "3.12"]
- PYTHON_VERSION: ["3.9", "3.10", "3.11", "3.12", "3.13"]
script:
- pip install poetry==${POETRY_VERSION}
- poetry install
Expand Down
31 changes: 17 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
default_install_hook_types: [commit-msg, pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
stages: [pre-commit]
- id: end-of-file-fixer
stages: [pre-commit]
- id: check-added-large-files
stages: [pre-commit]
- id: check-toml
stages: [pre-commit]
- id: check-yaml
stages: [pre-commit]

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.9
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings
- Flake8-pyproject

- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
- id: ruff
args: [--fix]
stages: [pre-commit]
- id: ruff-format
stages: [pre-commit]

- repo: https://codeberg.org/frnmst/md-toc
rev: 9.0.0
hooks:
- id: md-toc
stages: [pre-commit]

- repo: https://github.com/tox-dev/tox-ini-fmt
rev: "1.3.1"
rev: "1.5.0"
hooks:
- id: tox-ini-fmt
stages: [pre-commit]

- repo: https://github.com/compilerla/conventional-pre-commit
rev: v3.1.0
rev: v4.0.0
hooks:
- id: conventional-pre-commit
stages: [commit-msg]
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# 14.0.0 (unreleased)

BREAKING:

- Drop support for Python 3.8

ADDED:

- Add support for Python 3.13

UPDATES:

- Update pyproject syntax from poetry v1 to v2 respecting PEP-621
- Replace black and flake8 with ruff for linting and formatting

# 13.2.4 (2025/03/07)

FIXES:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Note: the term _Terraform_ is used in this documentation when talking about gene

## Setup Dependencies

- `python3` `>= 3.8.1 <4.0`
- `python3` `>= 3.9 <4.0`
- `python3-pip`
- `python3-venv`
- `pipx` (recommended)
Expand Down
769 changes: 30 additions & 739 deletions poetry.lock

Large diffs are not rendered by default.

101 changes: 52 additions & 49 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,87 +1,90 @@
[tool.poetry]
[project]
name = "claranet-tfwrapper"
version = "13.2.5a0"
description = "Claranet's `tfwrapper` is a wrapper for [Terraform](https://www.terraform.io/) implemented in python which aims to simplify Terraform usage and enforce best practices"
authors = []
license = "Mozilla Public License Version 2.0"
license = { text = "Mozilla Public License Version 2.0" }
readme = "README.md"
homepage = "https://github.com/claranet/tfwrapper"
requires-python = ">=3.9,<4.0"
keywords = ["terraform", "wrapper"]

# For reference, see https://pypi.org/pypi?%3Aaction=list_classifiers
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: System :: Systems Administration",
"Topic :: Utilities",
]
dependencies = [
"argcomplete<4.0",
"boto3>=1.17.94,<2.0.0",
"cachecontrol[filecache]>=0.14.0,<0.15.0",
"colorlog>=5.0.1,<7.0.0",
"jinja2>=3.0.1,<4.0.0",
"lockfile>=0.12.2,<0.13.0",
"natsort>=7.1.1,<9.0.0",
"packaging>=24,<25",
"pyyaml>=6.0.1,<7.0.0",
"requests>=2.25.1,<3.0.0",
"schema>=0.7.4,<0.8.0",
"semver>=3.0.1,<4.0.0",
"termcolor>=1.1,<3.0",
]

[project.urls]
homepage = "https://github.com/claranet/tfwrapper"

[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
argcomplete = "<4.0"
boto3 = "^1.17.94"
cachecontrol = {extras = ["filecache"], version = "^0.14.0"}
colorlog = ">=5.0.1,<7.0.0"
jinja2 = "^3.0.1"
lockfile = "^0.12.2"
natsort = ">=7.1.1,<9.0.0"
packaging = ">=24,<25"
pyyaml = "^6.0.1"
requests = "^2.25.1"
schema = "^0.7.4"
semver = "^3.0.1"
termcolor = ">=1.1,<3.0"
[project.scripts]
tfwrapper = "claranet_tfwrapper:main"

[tool.poetry]
# Poetry-specific configurations that don't fit in the PEP-621 schema

[tool.poetry.group.test.dependencies]
black = "*"
coverage = "*"
flake8 = ">=6.0.0"
flake8-docstrings = "*"
flake8-pyproject = "*"
md-toc = "*"
mock = "*"
pook = ">=1.0.2"
pre-commit = "*"
pytest = "*"
pytest-mock = "*"
requests-mock = "*"
ruff = "*"
toml = "*"
tox = ">=4"

[tool.poetry.scripts]
tfwrapper = 'claranet_tfwrapper:main'

[build-system]
requires = ["poetry-core>=1.1.0"]
build-backend = "poetry.core.masonry.api"

[tool.black]
# Make sure to match flake8's max-line-length.
line-length = 130 # black's default
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
exclude = '''
/(
\.git
| \.pytest_cache
| \.tox
| \.venv
)/
'''

[tool.flake8]
verbose = 3
max-line-length = 130
per-file-ignores = ['tests/*.py:D103']
exclude = ['.git', '.tox', '.venv', '.virtualenv', '__pycache__']
# See https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated
ignore = ['E203', 'W503']
enable-extensions = ['W504']
[tool.ruff]
exclude = [
".git",
".tox",
".venv",
".virtualenv",
"__pycache__",
"venv",
"build",
".eggs",
"setup.py",
]
line-length = 130
lint.ignore = []
lint.per-file-ignores."tests/*.py" = [
"D100",
"D101",
"D102",
"D103",
"D104",
"E501",
]
lint.select = ["D", "E", "F", "W"]
target-version = "py39"
Loading
Loading