Skip to content

Commit dec1d07

Browse files
felixfonteinpre-commit-ci[bot]webknjaz
authored
Require Python 3.9+; add Python 3.12 and 3.13 to CI (#64)
* Require Python 3.9+. Add Python 3.12 and 3.13 to CI. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Use >= instead of ^ for Python version. Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua> * Remove boilerplate. * Try to move it back up. Let's hope that pre-commit doesn't screw this up. * Reorder versions. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
1 parent c50df0f commit dec1d07

File tree

3 files changed

+14
-30
lines changed

3 files changed

+14
-30
lines changed

.github/workflows/ci-cd.yml

Lines changed: 11 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,18 @@ jobs:
506505
- macos-latest
507506
- windows-latest
508507
python-version:
509-
- 3.11
510-
- pypy-3.9
511-
- 3.8
512-
- 3.7
508+
# Highest, lowest, and pypy should come first:
509+
- 3.13
513510
- 3.9
511+
- pypy-3.9
512+
# Then all other versions:
513+
- 3.12
514+
- 3.11
514515
- >-
515516
3.10
516-
- pypy-3.6
517-
- ~3.12.0-0
518517
tested-artifact:
519518
- wheel
520519
- 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
536520

537521
continue-on-error: >-
538522
${{

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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3333
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3434

35-
"""Pygments lexers for ansible console output."""
36-
3735
# pylint: disable=consider-using-f-string
3836

37+
"""Pygments lexers for ansible console output."""
38+
3939
from pygments import token
4040
from pygments.lexer import DelegatingLexer, RegexLexer, bygroups, include
4141
from pygments.lexers import DiffLexer # pylint: disable=no-name-in-module

0 commit comments

Comments
 (0)