diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b35ac514..6a25f275 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,14 +2,14 @@ # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions name: CI -on: [push, pull_request] +on: [ push, pull_request ] jobs: ci: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + os: [ ubuntu-latest, macos-latest, windows-latest ] + python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ] fail-fast: false runs-on: ${{ matrix.os }} steps: @@ -22,6 +22,7 @@ jobs: uses: actions/setup-python@v5 # https://github.com/actions/setup-python with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - name: Install python prerequisites run: pip install -U --user pip setuptools setuptools-scm nox - name: Run tests and post coverage results diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 9605605f..5349f6b2 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -2,7 +2,7 @@ # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions name: Doc -on: [push, pull_request] +on: [ push, pull_request, workflow_dispatch ] permissions: contents: read @@ -11,8 +11,8 @@ jobs: doc: strategy: matrix: - os: [ubuntu-latest] - python-version: ["3.12"] + os: [ ubuntu-latest ] + python-version: [ "3.12" ] fail-fast: false runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 9c474be9..bbef3430 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -8,24 +8,13 @@ permissions: contents: read jobs: - lint: - strategy: - matrix: - os: [ ubuntu-latest ] - python-version: [ "3.12" ] - fail-fast: false - runs-on: ${{ matrix.os }} + format: + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # https://github.com/actions/checkout with: # Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. # Set fetch-depth: 0 to fetch all history for all branches and tags. fetch-depth: 0 # Needed for setuptools_scm to work correctly - - name: Set up Python - uses: actions/setup-python@v5 # https://github.com/actions/setup-python - with: - python-version: ${{ matrix.python-version }} - - name: Install python prerequisites - run: pip install -U --user ruff - - name: Ruff format - run: ruff format --check + - run: pip install --user ruff + - run: ruff format --check diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 967e9a5f..50913bcf 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,23 +9,12 @@ permissions: jobs: lint: - strategy: - matrix: - os: [ ubuntu-latest ] - python-version: [ "3.12" ] - fail-fast: false - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # https://github.com/actions/checkout with: # Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. # Set fetch-depth: 0 to fetch all history for all branches and tags. fetch-depth: 0 # Needed for setuptools_scm to work correctly - - name: Set up Python - uses: actions/setup-python@v5 # https://github.com/actions/setup-python - with: - python-version: ${{ matrix.python-version }} - - name: Install python prerequisites - run: pip install -U --user ruff - - name: Ruff lint - run: ruff check + - run: pip install --user ruff + - run: ruff check --output-format=github . diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 727ed43d..cf1833fd 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -2,30 +2,22 @@ # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions name: MyPy -on: [push, pull_request] +on: [ push, pull_request ] permissions: contents: read jobs: mypy: - strategy: - matrix: - os: [ubuntu-latest] - python-version: ["3.12"] - fail-fast: false - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 # https://github.com/actions/checkout + - uses: actions/setup-python@v5 # https://github.com/actions/setup-python with: + python-version: 3.13 + allow-prereleases: true # Only a single commit is fetched by default, for the ref/SHA that triggered the workflow. # Set fetch-depth: 0 to fetch all history for all branches and tags. fetch-depth: 0 # Needed for setuptools_scm to work correctly - - name: Set up Python - uses: actions/setup-python@v5 # https://github.com/actions/setup-python - with: - python-version: ${{ matrix.python-version }} - - name: Install python prerequisites - run: pip install -U --user pip setuptools setuptools-scm nox - - name: MyPy - run: python -m nox --non-interactive --session validate-${{ matrix.python-version }} -k mypy # Run nox for mypy + - run: pip install -U --user pip setuptools setuptools-scm nox + - run: python -m nox --non-interactive --session validate-${{ python-version }} -k mypy # Run nox for mypy diff --git a/CHANGELOG.md b/CHANGELOG.md index 66a5a3f6..1c08fe83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.5.0 (TBD) +## 2.5.0 (October 22, 2024) * Breaking Change * `cmd2` 2.5 supports Python 3.8+ (removed support for Python 3.6 and 3.7) * Bug Fixes @@ -12,7 +12,7 @@ * Removed dependency on `attrs` and replaced with [dataclasses](https://docs.python.org/3/library/dataclasses.html) * add `allow_clipboard` initialization parameter and attribute to disable ability to add output to the operating system clipboard - * Updated unit tests to be Python 3.12 compliant. + * Updated unit tests to be Python 3.13 compliant. * Fall back to bz2 compression of history file when lzma is not installed. * Added settable called `scripts_add_to_history` which determines whether scripts and pyscripts add commands to history. diff --git a/docs/requirements.txt b/docs/requirements.txt index 42757cc2..58a108b5 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,3 +1,8 @@ -Sphinx>=8.1.0 -sphinx-autobuild>=2024.10.3 -sphinx-rtd-theme>=3.0.1 + +pyperclip +setuptools +setuptools-scm +Sphinx +sphinx-autobuild +sphinx-rtd-theme +wcwidth diff --git a/noxfile.py b/noxfile.py index 9ec2ce16..30013e1d 100644 --- a/noxfile.py +++ b/noxfile.py @@ -17,7 +17,7 @@ def docs(session): ) -@nox.session(python=['3.8', '3.9', '3.10', '3.11', '3.12']) +@nox.session(python=['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']) @nox.parametrize('plugin', [None, 'ext_test', 'template', 'coverage']) def tests(session, plugin): if plugin is None: @@ -41,7 +41,7 @@ def tests(session, plugin): ) -@nox.session(python=['3.8', '3.9', '3.10', '3.11', '3.12']) +@nox.session(python=['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']) @nox.parametrize('step', ['mypy', 'flake8']) def validate(session, step): session.install('invoke', './[validate]')