diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 844d9f65..a7d90c95 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -9,14 +9,14 @@ jobs: pre-commit: runs-on: macos-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-python@v1 + - uses: actions/checkout@v5 + - uses: actions/setup-python@v6 with: - python-version: '3.12' + python-version: '3.x' - name: set PY run: echo "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" >> $GITHUB_ENV - - uses: actions/cache@v1 + - uses: actions/cache@v4 with: path: ~/.cache/pre-commit key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} - - uses: pre-commit/action@v1.0.1 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/release_to_pypi.yml b/.github/workflows/release_to_pypi.yml index a2b94d1c..09e50490 100644 --- a/.github/workflows/release_to_pypi.yml +++ b/.github/workflows/release_to_pypi.yml @@ -20,10 +20,10 @@ jobs: steps: - name: Checkout source - uses: actions/checkout@v2 + uses: actions/checkout@v5 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: "3.x" diff --git a/src/py2app/util.py b/src/py2app/util.py index 24682a5c..83005606 100644 --- a/src/py2app/util.py +++ b/src/py2app/util.py @@ -6,12 +6,12 @@ import io import os import pathlib +import py_compile import stat import subprocess import sys import time import typing -from py_compile import compile # noqa: A004 import macholib.util from macholib.util import is_platform_file @@ -377,7 +377,7 @@ def byte_compile( with open(fn, "wb") as fp_out: fp_out.write(fp_in.read()) - compile(fn, cfile, dfile, optimize=optimize) + py_compile.compile(fn, cfile, dfile, optimize=optimize) os.unlink(fn) elif suffix in PY_SUFFIXES: diff --git a/tox.ini b/tox.ini index e319e240..c9ee9383 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] ;envlist = py37,py38,py39,py310 -envlist = py27,py39,py310,py311 +envlist = py39,py310,py311,py312,py313 isolated_build = True [testenv] @@ -24,7 +24,7 @@ commands = coverage report [testenv:mypy] -basepython = python3.10 +basepython = python3.13 deps = mypy rich