…aerr#576)
* Fix mock.patch compatibility with Python 3.11+
- Use mock.patch.object() instead of string-based mock.patch()
- Add cache_clear() call before mocking load_library
- Fixes AttributeError in TestLibraryIntegration tests
The string-based mock.patch() path resolution changed in Python 3.11+
(using pkgutil.resolve_name()), which can fail to find attributes that
were imported into a module from elsewhere.
See: python/cpython#117860
* Modernize CI/CD: switch to uv and update Python versions
- Replace pip with uv across all GitHub Actions workflows
- Use astral-sh/setup-uv@v5 action for uv installation
- Update Python versions: drop 3.9 (EOL Oct 2025), add 3.14
- Update platform images to ubuntu-24.04 where appropriate
- Update pyproject.toml: requires-python >= 3.10
- Update tox.ini: py310-py314, use python3.13 for tools
- Update CLAUDE.md documentation to reflect new versions
Benefits of uv:
- Significantly faster package installation
- Better dependency resolution
- Modern Python packaging tool
* Remove macos-13 runner (retired) and complete uv migration
- Remove macos-13 from all workflow matrices (runner images retired)
- Update remaining publish workflows to use uv instead of pip
- Add Python 3.14 to publish workflow matrices
- Fix Windows Python versions (3.10-3.14)
* Add x86_64 cross-compile makefile for ARM64 runners
The macos-14 runner is ARM64, so we need cross-compile flags
to build x86_64 binaries for the universal binary.
* Fix lipo output path for macos-14 ARM64 runner
/usr/local/lib doesn't exist on macos-14 runners; use a local
path instead and copy the result to snap7/lib/.
* Simplify uv usage: remove explicit venv creation
uv automatically creates/uses .venv, so we can remove the
explicit `uv venv venv` steps and use `uv run` for execution.
* Add uv venv back - uv pip requires existing venv
uv pip install doesn't auto-create venv, so we need explicit
uv venv before uv pip install. Still simplified by using
default .venv path and uv run for execution.
* Use .venv/bin/pytest instead of uv run
uv run syncs the project from pyproject.toml, which rebuilds
the package from source without the bundled library. Using
.venv/bin/pytest directly avoids this issue.
* Simplify CI with uv run and replace requirements-dev.txt with uv.lock
- Use uv run for most workflows (cleaner syntax)
- Keep .venv/bin/pytest for wheel test jobs (with comment explaining why
uv run would rebuild from source and lose the bundled snap7 library)
- Replace requirements-dev.txt with uv.lock (generated with Python 3.10)
- Simplify tox.ini to use extras instead of requirements file
- Remove requirements-dev tox environment (no longer needed)
* Use uv run --no-project for wheel tests
--no-project prevents uv from discovering and syncing the project,
avoiding the rebuild that would lose the bundled snap7 library.
* Modernize CI/CD and fix configuration issues
- Add UV caching to all workflows for faster dependency installs
- Add concurrency control to cancel in-progress runs on new pushes
- Fix artifact name conflicts by using unique names per platform
- Delete redundant mypy.yml (already runs in pre-commit)
- Add Python 3.14 to ARM64 test matrix
- Fix pyproject.toml: [lint] -> [tool.ruff.lint]
- Fix Makefile: correct .venv path in clean, remove dead code
- Update pre-commit hooks to latest versions
- Fix S7DataItem deprecation warning for Python 3.19 compatibility
* Update documentation for Python 3.10+ requirement
- Update README.rst: Python 3.9+ -> 3.10+
- Update CLAUDE.md: Python 3.9+ -> 3.10+
- Update doc/introduction.rst: Python 3.7+ -> 3.10+, snap7 1.1.0 -> 1.4.2
- Fix Makefile: uv run pip -> uv pip for sphinx-build target
* Use SPDX license expression instead of classifier
Replace deprecated license classifier with modern SPDX format:
- Remove "License :: OSI Approved :: MIT License" classifier
- Change license = {text = "MIT License"} to license = "MIT"
See: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license
* Fix license format for older setuptools compatibility
The SPDX string format (license = "MIT") requires setuptools >= 69.0.0,
but the manylinux build containers use Python 3.8 with older setuptools.
Revert to table format while keeping the deprecated classifier removed.