Skip to content

Commit e831878

Browse files
committed
Require Python 3.9+. Add Python 3.12 and 3.13 to CI.
1 parent 331752e commit e831878

File tree

4 files changed

+14
-28
lines changed

4 files changed

+14
-28
lines changed

.github/workflows/ci-cd.yml

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ env:
5656
PRE_COMMIT_COLOR: always
5757
PY_COLORS: 1 # Recognized by the `py` package, dependency of `pytest`
5858
PYTHONIOENCODING: utf-8
59-
PYTHONLEGACYWINDOWSSTDIO: 1 # Python 3.6 hack
6059
PYTHONUTF8: 1
6160
TOX_PARALLEL_NO_SPINNER: 1
6261
TOX_TESTENV_PASSENV: >- # Make tox-wrapped tools see color requests
@@ -84,7 +83,7 @@ jobs:
8483
os:
8584
- Ubuntu
8685
python-version:
87-
- 3.11
86+
- 3.13
8887

8988
env:
9089
TOXENV: lint
@@ -191,10 +190,10 @@ jobs:
191190
sdist-artifact-name: ${{ steps.artifact-name.outputs.sdist }}
192191
wheel-artifact-name: ${{ steps.artifact-name.outputs.wheel }}
193192
steps:
194-
- name: Switch to using Python 3.11 by default
193+
- name: Switch to using Python 3.13 by default
195194
uses: actions/setup-python@v4
196195
with:
197-
python-version: 3.11
196+
python-version: 3.13
198197
- name: >-
199198
Mark the build as non-tagged
200199
${{ github.event.repository.default_branch }} build
@@ -396,10 +395,10 @@ jobs:
396395
TOXENV: cleanup-dists,build-dists,metadata-validation
397396

398397
steps:
399-
- name: Switch to using Python 3.11 by default
398+
- name: Switch to using Python 3.13 by default
400399
uses: actions/setup-python@v4
401400
with:
402-
python-version: 3.11
401+
python-version: 3.13
403402
- name: >-
404403
Calculate Python interpreter version hash value
405404
for use in the cache key
@@ -506,33 +505,16 @@ jobs:
506505
- macos-latest
507506
- windows-latest
508507
python-version:
508+
- 3.13
509+
- 3.12
509510
- 3.11
510-
- pypy-3.9
511-
- 3.8
512-
- 3.7
513-
- 3.9
514511
- >-
515512
3.10
516-
- pypy-3.6
517-
- ~3.12.0-0
513+
- pypy-3.9
514+
- 3.9
518515
tested-artifact:
519516
- wheel
520517
- sdist
521-
exclude:
522-
# NOTE: PyPy 3.6 is not built for Ubuntu 22
523-
- os: windows-latest
524-
python-version: pypy-3.6
525-
- os: macos-latest
526-
python-version: pypy-3.6
527-
# CPython 3.7 is no longer available on macos-latest
528-
- os: macos-latest
529-
python-version: 3.7
530-
include:
531-
# NOTE: The last GNU/Linux CPython 3.6 available is built for Ubuntu 20
532-
# https://github.com/actions/python-versions/blob/6dd0b75/versions-manifest.json#L3956-L3960
533-
- os: ubuntu-20.04
534-
python-version: 3.6
535-
tested-artifact: wheel
536518

537519
continue-on-error: >-
538520
${{

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Ansible = "ansible_pygments.styles:AnsibleStyle"
3535
ansible = "ansible_pygments.styles:AnsibleStyle"
3636

3737
[tool.poetry.dependencies]
38-
python = "^3.6.0"
38+
python = "^3.9.0"
3939
# Pygments 2.4.0 includes bugfixes for YAML and YAML+Jinja lexers
4040
pygments = ">= 2.4.0"
4141

src/ansible_pygments/lexers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434

3535
"""Pygments lexers for ansible console output."""
3636

37+
from __future__ import annotations
38+
3739
# pylint: disable=consider-using-f-string
3840

3941
from pygments import token

src/ansible_pygments/styles.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Pygments styles for highlighting snippets in Ansible ecosystem."""
22

3+
from __future__ import annotations
4+
35
from pygments.style import Style
46
from pygments.token import (
57
Comment, Error, Generic, Keyword, Literal, Name,

0 commit comments

Comments
 (0)