Skip to content
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
8 changes: 4 additions & 4 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ jobs:
secrets: inherit
with:
matrix-os-version: "[ 'ubuntu-latest' ]"
matrix-python-version: "[ '3.10', '3.11', '3.12', '3.13' ]" # run Linux tests on all supported Python versions
matrix-python-version: "[ '3.11', '3.12', '3.13', '3.14' ]" # run Linux tests on all supported Python versions
enable-coveralls: true # only report to coveralls.io for tests that run on Linux
persist-python-version: "3.10" # persist artifacts for the oldest supported Python version
persist-python-version: "3.11" # persist artifacts for the oldest supported Python version
macos-build-and-test:
name: "MacOS"
uses: pronovic/gha-shared-workflows/.github/workflows/uv-build-and-test.yml@v10
secrets: inherit
with:
matrix-os-version: "[ 'macos-latest' ]"
matrix-python-version: "[ '3.13' ]" # only run MacOS tests on latest Python
matrix-python-version: "[ '3.14' ]" # only run MacOS tests on latest Python
windows-build-and-test:
name: "Windows"
uses: pronovic/gha-shared-workflows/.github/workflows/uv-build-and-test.yml@v10
secrets: inherit
with:
matrix-os-version: "[ 'windows-latest' ]"
matrix-python-version: "[ '3.13' ]" # only run Windows tests on latest Python
matrix-python-version: "[ '3.14' ]" # only run Windows tests on latest Python
release:
name: "Release"
if: github.ref_type == 'tag'
Expand Down
3 changes: 0 additions & 3 deletions .python-version
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
3.10
3.11
3.12
3.13
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sphinx:
build:
os: ubuntu-24.04
tools:
python: '3.10'
python: '3.11'
python:
install:
- method: pip
Expand Down
42 changes: 33 additions & 9 deletions .run/commands/uvvenv.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,50 @@
# vim: set ft=bash ts=3 sw=3 expandtab:
# Install the Python interpreter and virtual environment.

# By default, the Python version is taken from .python-version.
# At runtime, you can override this with $UV_PYTHON.
# By default, the Python version is taken from .python-version. At
# runtime, you can override by exporting $UV_PYTHON in your shell.
#
# Switching back and forth between versions can sometimes leave
# leftover junk, like two different python3.x links pointing at the
# same interpreter (one of which is wrong). If I detect this, I
# re-build the virtualenv to fix it.

command_uvvenv() {
echo -n "Installing virtual environment..."
if [ ! -z "$UV_PYTHON" ]; then
echo -n "Installing virtual environment with UV_PYTHON=$UV_PYTHON..."
else
echo -n "Installing virtual environment..."
fi

uv python install --quiet
if [ $? != 0 ]; then
echo "Command failed: uv python"
exit 1
fi

uv venv --quiet --allow-existing
if [ $? != 0 ]; then
echo "Command failed: uv venv"
exit 1
if [ ! -z "$UV_PYTHON" ]; then
uv venv --quiet --clear
if [ $? != 0 ]; then
echo "Command failed: uv venv"
exit 1
fi
else
uv venv --quiet --allow-existing
if [ $? != 0 ]; then
echo "Command failed: uv venv"
exit 1
fi
fi

run_command uvsync
if [ $(/bin/ls .venv/bin/python3.?? 2>/dev/null | wc -l) -gt 1 ]; then
uv venv --quiet --clear # clean up leftover junk from switching versions
if [ $? != 0 ]; then
echo "Command failed: uv venv"
exit 1
fi
fi

echo "done"
run_command uvsync
run_command uvrun python --version
}

5 changes: 5 additions & 0 deletions .run/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,13 @@ setup_environment() {

# Add addendum information to the end of the help output
add_addendum() {
echo "The Python interpreter version is controlled by the .python-version file. To"
echo "test with a different version of Python temporarily, set \$UV_PYTHON in your"
echo "shell, and execute 'run install'. Make sure to unset and reinstall when done."
echo ""
if [ -f "$REPO_DIR/.run/addendum.sh" ]; then
bash "$REPO_DIR/.run/addendum.sh"
echo ""
fi
}

Expand Down
2 changes: 2 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Version 0.2.1 unreleased
* Pull in latest version of run-script-framework.
* Exclude generated files in `docs/_build` from the Python sdist.
* Migrate from Poetry to UV for the Python build system.
* Add support for Python v3.14 and drop support for v3.10.
* Document how to change the interpreter version with `$UV_PYTHON`.

Version 0.2.0 17 Sep 2025

Expand Down
4 changes: 4 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ Additional tasks:
- run docs: Build the Sphinx documentation for readthedocs.io
- run docs -o: Build the Sphinx documentation and open in a browser
- run release: Tag and release the code, triggering GHA to publish artifacts

The Python interpreter version is controlled by the .python-version file. To
test with a different version of Python temporarily, set $UV_PYTHON in your
shell, and execute 'run install'. Make sure to unset and reinstall when done.
```

## Integration with PyCharm
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exclude = [ "docs/_build" ]

[project]
name = "uciparse"
requires-python = ">=3.10,<4"
requires-python = ">=3.11,<4"
description = "Parse and emit OpenWRT uci-format files"
authors = [ { name="Kenneth J. Pronovici", email="pronovic@ieee.org" } ]
license = "Apache-2.0"
Expand All @@ -20,10 +20,10 @@ readme = "PyPI.md"
dynamic = [ "version" ]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Environment :: Console",
"Intended Audience :: System Administrators",
Expand Down
Loading
Loading