From 0b260d7c3c8170e1ef893ac4f2b9741cbaa8fbf7 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Wed, 19 Feb 2025 05:19:11 -0600 Subject: [PATCH 1/3] ci(tests) Verify runtime deps --- .github/workflows/tests.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 67e57b26de..75006152f2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,6 +29,17 @@ jobs: - name: Set up Python ${{ matrix.python-version }} run: uv python install ${{ matrix.python-version }} + - name: Test runtime dependencies + run: | + uv run --no-dev -p python${{ matrix.python-version }} -- python -c ' + from tmuxp import _internal, cli, workspace, exc, log, plugin, shell, types, util, __version__ + from tmuxp._internal import config_reader, types + from tmuxp.workspace import builder, constants, finders, freezer, importers, loader, validation + from libtmux import __version__ as __libtmux_version__ + print("tmuxp version:", __version__) + print("libtmux version:", __libtmux_version__) + ' + - name: Install dependencies run: uv sync --all-extras --dev From 8d337d9b70ac11cab813bf05f309aee7bda927af Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Wed, 19 Feb 2025 05:22:26 -0600 Subject: [PATCH 2/3] types: Fix missing runtime dependency uv run --no-dev -p python3.13 -- python -c ' from tmuxp import _internal, cli, workspace, exc, log, plugin, shell, types, util, __version__ from tmuxp._internal import config_reader, types from tmuxp.workspace import builder, constants, finders, freezer, importers, loader, validation from libtmux import __version__ as __libtmux_version__ print("tmuxp version:", __version__) print("libtmux version:", __libtmux_version__) ' shell: /usr/bin/bash -e {0} env: UV_CACHE_DIR: /home/runner/work/_temp/setup-uv-cache Using CPython 3.13.2 Creating virtual environment at: .venv Building tmuxp @ file:///home/runner/work/tmuxp/tmuxp Built tmuxp @ file:///home/runner/work/tmuxp/tmuxp Installed 4 packages in 1ms Traceback (most recent call last): File "", line 3, in from tmuxp._internal import config_reader, types File "/home/runner/work/tmuxp/tmuxp/src/tmuxp/_internal/types.py", line 15, in from typing_extensions import NotRequired, TypedDict ModuleNotFoundError: No module named 'typing_extensions' --- src/tmuxp/_internal/types.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/tmuxp/_internal/types.py b/src/tmuxp/_internal/types.py index c66d88956c..a3521f5832 100644 --- a/src/tmuxp/_internal/types.py +++ b/src/tmuxp/_internal/types.py @@ -12,7 +12,16 @@ from __future__ import annotations -from typing_extensions import NotRequired, TypedDict +import typing as t +from typing import TypedDict + +if t.TYPE_CHECKING: + import sys + + if sys.version_info >= (3, 11): + from typing import NotRequired + else: + from typing_extensions import NotRequired class PluginConfigSchema(TypedDict): From d2cb248c1f9d6a049631d123037375b186725b0f Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Wed, 19 Feb 2025 05:24:49 -0600 Subject: [PATCH 3/3] docs(CHANGES) Note CI runtime check and bug fix --- CHANGES | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES b/CHANGES index b0c485a056..fd4d555575 100644 --- a/CHANGES +++ b/CHANGES @@ -21,8 +21,13 @@ $ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force - _Future release notes will be placed here_ +### Bug fixes + +- Fix import type unavailable at runtime (#965) + ### Development +- CI: Check for runtime dependencies (#965) - Tests: Improve parametrized test suite (#964) Convert remaining `pytest.mark.parametrize()` tests to `NamedTuple` fixtures: