Skip to content

Commit

Permalink
misc: Add Python v3.12-dev to the testing
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Sep 28, 2023
1 parent 5746691 commit 6d25770
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,21 @@ jobs:
steps:
- uses: actions/checkout@v3
- run: pip install --user ruff
- run: ruff --format=github --select="E,F,PLC,PLE,UP,W,YTT" --ignore="E721,PLC1901,S101,UP031" --target-version=py38 .
- run: ruff --output-format=github --select="ASYNC,E,F,PLC,PLE,UP,W,YTT"
--ignore="E721,PLC1901,S101,UP031" --target-version=py38 .
Tests:
needs: Lint_Python # Lint_Python takes ~5 seconds, so wait for it to pass before running the full matrix of tests.
strategy:
fail-fast: false
max-parallel: 15
matrix:
node: [16.x, 18.x, 20.x]
python: ["3.8", "3.11"]
python: ["3.8", "3.11", "3.12"]
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v3
with:
Expand All @@ -35,6 +36,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
allow-prereleases: true
env:
PYTHON_VERSION: ${{ matrix.python }} # Why do this?
- name: Install Dependencies
Expand Down
4 changes: 2 additions & 2 deletions gyp/pylib/gyp/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import sys
import threading
import traceback
from distutils.version import StrictVersion
from packaging.version import Version
from gyp.common import GypError
from gyp.common import OrderedSet

Expand Down Expand Up @@ -1183,7 +1183,7 @@ def EvalSingleCondition(cond_expr, true_dict, false_dict, phase, variables, buil
else:
ast_code = compile(cond_expr_expanded, "<string>", "eval")
cached_conditions_asts[cond_expr_expanded] = ast_code
env = {"__builtins__": {}, "v": StrictVersion}
env = {"__builtins__": {}, "v": Version}
if eval(ast_code, env, variables):
return true_dict
return false_dict
Expand Down
1 change: 1 addition & 0 deletions gyp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
dependencies = ["packaging"]

[project.optional-dependencies]
dev = ["flake8", "pytest"]
Expand Down

0 comments on commit 6d25770

Please sign in to comment.