Skip to content

Require Python 3.9+; add Python 3.12 and 3.13 to CI #64

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

Merged
merged 6 commits into from
Mar 30, 2025
Merged
Show file tree
Hide file tree
Changes from 5 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
36 changes: 9 additions & 27 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ env:
PRE_COMMIT_COLOR: always
PY_COLORS: 1 # Recognized by the `py` package, dependency of `pytest`
PYTHONIOENCODING: utf-8
PYTHONLEGACYWINDOWSSTDIO: 1 # Python 3.6 hack
PYTHONUTF8: 1
TOX_PARALLEL_NO_SPINNER: 1
TOX_TESTENV_PASSENV: >- # Make tox-wrapped tools see color requests
Expand Down Expand Up @@ -84,7 +83,7 @@ jobs:
os:
- Ubuntu
python-version:
- 3.11
- 3.13

env:
TOXENV: lint
Expand Down Expand Up @@ -191,10 +190,10 @@ jobs:
sdist-artifact-name: ${{ steps.artifact-name.outputs.sdist }}
wheel-artifact-name: ${{ steps.artifact-name.outputs.wheel }}
steps:
- name: Switch to using Python 3.11 by default
- name: Switch to using Python 3.13 by default
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.13
- name: >-
Mark the build as non-tagged
${{ github.event.repository.default_branch }} build
Expand Down Expand Up @@ -396,10 +395,10 @@ jobs:
TOXENV: cleanup-dists,build-dists,metadata-validation

steps:
- name: Switch to using Python 3.11 by default
- name: Switch to using Python 3.13 by default
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.13
- name: >-
Calculate Python interpreter version hash value
for use in the cache key
Expand Down Expand Up @@ -506,33 +505,16 @@ jobs:
- macos-latest
- windows-latest
python-version:
- 3.13
- 3.12
- 3.11
- pypy-3.9
- 3.8
- 3.7
- 3.9
- >-
3.10
- pypy-3.6
- ~3.12.0-0
- pypy-3.9
- 3.9
tested-artifact:
- wheel
- sdist
exclude:
# NOTE: PyPy 3.6 is not built for Ubuntu 22
- os: windows-latest
python-version: pypy-3.6
- os: macos-latest
python-version: pypy-3.6
# CPython 3.7 is no longer available on macos-latest
- os: macos-latest
python-version: 3.7
include:
# NOTE: The last GNU/Linux CPython 3.6 available is built for Ubuntu 20
# https://github.com/actions/python-versions/blob/6dd0b75/versions-manifest.json#L3956-L3960
- os: ubuntu-20.04
python-version: 3.6
tested-artifact: wheel

continue-on-error: >-
${{
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Ansible = "ansible_pygments.styles:AnsibleStyle"
ansible = "ansible_pygments.styles:AnsibleStyle"

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

Expand Down
4 changes: 2 additions & 2 deletions src/ansible_pygments/lexers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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

# pylint: disable=consider-using-f-string

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

from pygments import token
from pygments.lexer import DelegatingLexer, RegexLexer, bygroups, include
from pygments.lexers import DiffLexer # pylint: disable=no-name-in-module
Expand Down
Loading