Skip to content
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

Version bumps for Python 3.13; fix a Python 3.11 incompatibility #306

Merged
merged 4 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ jobs:
- name: Update Python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: '3.13'
- name: Download archives
uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Run pre-commit hooks
uses: pre-commit/[email protected]
setup:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: '3.13'
- name: Run pre-commit hooks
uses: pre-commit/[email protected]
setup:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
- name: Update Python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: '3.13'
- name: Download artifacts
uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Update Python
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: '3.13'
- name: Install dependencies
run: pip install --user meson requests
- name: Check out repo
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: v3.18.0
rev: v3.19.0
hooks:
- id: pyupgrade
name: Modernize python code
Expand Down Expand Up @@ -48,7 +48,7 @@ repos:
additional_dependencies: [flake8-bugbear, Flake8-pyproject]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.12.0
rev: v1.13.0
hooks:
- id: mypy
name: Check Python types
Expand Down
1 change: 1 addition & 0 deletions artifacts/python/pyproject.in.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Typing :: Typed",
]
Expand Down
5 changes: 3 additions & 2 deletions common/software.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from dataclasses import dataclass
from functools import cache, cached_property
from itertools import count
import os
from pathlib import Path
import shutil
import subprocess
Expand Down Expand Up @@ -227,9 +228,9 @@ def walkerr(e: OSError) -> None:
return
for subdir in self.remove_dirs:
shutil.rmtree(projdir / subdir)
for dirpath, _, filenames in projdir.walk(on_error=walkerr):
for dirpath, _, filenames in os.walk(projdir, onerror=walkerr):
for filename in filenames:
path = dirpath / filename
path = Path(dirpath) / filename
if path.relative_to(projdir).as_posix() in self.keep_files:
continue
if (
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.black]
line-length = 79
skip-string-normalization = true
target-version = ["py311", "py312"]
target-version = ["py311", "py312", "py313"]

# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
# requires Flake8-pyproject
Expand All @@ -16,4 +16,5 @@ line_length = 79

[tool.mypy]
namespace_packages = false
python_version = "3.11"
strict = true