Skip to content

Commit ba6cdf7

Browse files
committed
drop Python 3.8 support
1 parent 81eb99d commit ba6cdf7

File tree

15 files changed

+67
-68
lines changed

15 files changed

+67
-68
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ on:
1212
permissions:
1313
contents: read
1414

15+
env:
16+
MIN_PYTHON_VERSION: "3.9"
17+
1518
jobs:
1619
pre-commit:
1720
runs-on: ubuntu-latest
1821
steps:
1922
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2023
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
2124
with:
22-
python-version: '3.8'
25+
python-version: ${{ env.MIN_PYTHON_VERSION }}
2326
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
2427

2528
sanity:
@@ -28,7 +31,7 @@ jobs:
2831
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2932
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
3033
with:
31-
python-version: '3.8'
34+
python-version: ${{ env.MIN_PYTHON_VERSION }}
3235
- run: |
3336
pip install --upgrade pip
3437
pip install -r requirements.txt
@@ -48,7 +51,7 @@ jobs:
4851
- name: Setup Python
4952
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
5053
with:
51-
python-version: '3.8'
54+
python-version: ${{ env.MIN_PYTHON_VERSION }}
5255

5356
- name: Install dependencies
5457
run: |
@@ -73,7 +76,7 @@ jobs:
7376
strategy:
7477
fail-fast: true
7578
matrix:
76-
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
79+
python: ['3.10', '3.11', '3.12', '3.13']
7780
steps:
7881
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7982
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0

.github/workflows/publish.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ on:
77
types: [published]
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
13+
env:
14+
MIN_PYTHON_VERSION: "3.9"
15+
1016
jobs:
1117
test:
1218
runs-on: ubuntu-latest
@@ -16,7 +22,7 @@ jobs:
1622
- name: Setup Python
1723
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
1824
with:
19-
python-version: '3.8'
25+
python-version: ${{ env.MIN_PYTHON_VERSION }}
2026

2127
- name: Install dependencies
2228
run: |
@@ -41,7 +47,7 @@ jobs:
4147
- name: Setup Python
4248
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
4349
with:
44-
python-version: '3.8'
50+
python-version: ${{ env.MIN_PYTHON_VERSION }}
4551

4652
- name: Install dependencies
4753
run: |
@@ -68,12 +74,14 @@ jobs:
6874
update-brew:
6975
needs: publish-package
7076
runs-on: ubuntu-latest
77+
permissions:
78+
contents: write
7179
steps:
7280
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7381
- name: Setup Python
7482
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
7583
with:
76-
python-version: '3.8'
84+
python-version: ${{ env.MIN_PYTHON_VERSION }}
7785
- name: publish brew
7886
run: |
7987
sleep 5m
@@ -94,6 +102,8 @@ jobs:
94102
bump-version:
95103
needs: update-brew
96104
runs-on: ubuntu-latest
105+
permissions:
106+
contents: write
97107
steps:
98108
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
99109
with:

.github/workflows/python-dependency-updater.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
- cron: '0 0 1 * *'
77
workflow_dispatch:
88

9+
permissions:
10+
contents: read
11+
12+
env:
13+
MIN_PYTHON_VERSION: "3.9"
14+
915
jobs:
1016
python-dependency-updater:
1117
runs-on: ubuntu-latest
@@ -15,7 +21,7 @@ jobs:
1521
- name: Setup Python
1622
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
1723
with:
18-
python-version: '3.8'
24+
python-version: ${{ env.MIN_PYTHON_VERSION }}
1925

2026
- name: Run Pyup.io Dependency updater
2127
run: |

.github/workflows/update.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
permissions:
1010
contents: read
1111

12+
env:
13+
MIN_PYTHON_VERSION: "3.9"
14+
1215
jobs:
1316
update-actions:
1417
runs-on: ubuntu-latest
@@ -20,7 +23,7 @@ jobs:
2023
- name: Setup python
2124
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
2225
with:
23-
python-version: '3.8'
26+
python-version: ${{ env.MIN_PYTHON_VERSION }}
2427
- name: install dependencies
2528
run: |
2629
pip install -r requirements.txt
@@ -58,7 +61,7 @@ jobs:
5861
- name: Setup Python
5962
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
6063
with:
61-
python-version: '3.8'
64+
python-version: ${{ env.MIN_PYTHON_VERSION }}
6265
- name: Install dependencies
6366
run: |
6467
pip install -r requirements.txt

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
repos:
22
- repo: https://github.com/rhysd/actionlint
3-
rev: v1.7.1
3+
rev: v1.7.4
44
hooks:
55
- id: actionlint-docker
66
- repo: https://github.com/antonbabenko/pre-commit-terraform
7-
rev: v1.92.0
7+
rev: v1.96.2
88
hooks:
99
- id: terraform_fmt
1010
# - id: terraform_docs
1111
# args: ['--sort-by-required', '--no-providers']
1212
- repo: https://github.com/astral-sh/ruff-pre-commit
13-
rev: v0.6.2
13+
rev: v0.8.1
1414
hooks:
1515
- id: ruff
16+
args: [--fix]
1617
files: ^(examples/|policy_sentry/|utils/|setup.py)
1718
- id: ruff-format
1819
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety

.readthedocs.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,19 @@
44
# Required
55
version: 2
66

7+
build:
8+
os: ubuntu-24.04
9+
tools:
10+
python: 3.9
11+
712
mkdocs:
813
configuration: mkdocs.yml
914
fail_on_warning: false
1015

1116
# Optionally build your docs in additional formats such as PDF and ePub
1217
formats: all
1318

14-
# Optionally set the version of Python and requirements required to build your docs
19+
# Optionally set requirements required to build your docs
1520
python:
16-
version: 3.8
1721
install:
1822
- requirements: docs/requirements.txt

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG FROM_TAG=3.8-slim-buster
1+
ARG FROM_TAG=3.9-slim
22
FROM python:${FROM_TAG}
33
MAINTAINER Kinnaird McQuade "[email protected]"
44

policy_sentry/bin/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# pylint: disable=missing-module-docstring
2-
__version__ = "0.13.3"
2+
__version__ = "0.14.0"

policy_sentry/command/write_policy.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
import json
88
import logging
99
import sys
10-
from pathlib import Path
11-
from typing import Any
10+
from typing import TYPE_CHECKING, Any
1211

1312
import click
1413
import yaml
@@ -18,6 +17,9 @@
1817
from policy_sentry.util.file import read_yaml_file
1918
from policy_sentry.writing.sid_group import SidGroup
2019

20+
if TYPE_CHECKING:
21+
from pathlib import Path
22+
2123
logger = logging.getLogger(__name__)
2224

2325

policy_sentry/shared/awsdocs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def create_database(destination_directory: str | Path, access_level_overrides_fi
181181
continue
182182

183183
title = re.sub(
184-
".*Actions, resources, and condition Keys for *",
184+
r".*Actions, resources, and condition Keys for *",
185185
"",
186186
topic_title.text,
187187
flags=re.IGNORECASE,

0 commit comments

Comments
 (0)