1.12.1: test_environment_variables fails
Step 1: Provide a summary of your problem
When packaging 1.12.1 for Arch Linux, test_environment_variables failed.
Step 2: Provide tmuxp details
n/a
Step 3: Describe the problem:
Steps to reproduce:
- python -m build --wheel --no-isolation
- pytest -vv
Observed Results:
=================================== FAILURES ===================================
__________________________ test_environment_variables __________________________
session = Session($1 libtmux_sfy1ixon)
def test_environment_variables(session):
yaml_config = test_utils.read_config_file("workspacebuilder/environment_vars.yaml")
sconfig = kaptan.Kaptan(handler="yaml")
sconfig = sconfig.import_config(yaml_config).get()
sconfig = config.expand(sconfig)
builder = WorkspaceBuilder(sconf=sconfig)
builder.build(session)
> assert session.show_environment("FOO") == "BAR"
E TypeError: EnvironmentMixin.show_environment() takes 1 positional argument but 2 were given
tests/test_workspacebuilder.py:348: TypeError
=============================== warnings summary ===============================
../../../../usr/lib/python3.10/site-packages/libtmux/common.py:574: 1 warning
tests/test_cli.py: 226 warnings
tests/test_plugin.py: 10 warnings
tests/test_util.py: 8 warnings
tests/test_workspacebuilder.py: 206 warnings
tests/test_workspacefreezer.py: 5 warnings
tests/tests/test_helpers.py: 12 warnings
/usr/lib/python3.10/site-packages/libtmux/common.py:574: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
return LooseVersion(version)
../../../../usr/lib/python3.10/site-packages/libtmux/common.py:659
/usr/lib/python3.10/site-packages/libtmux/common.py:659: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
return get_version() < LooseVersion(max_version)
tests/test_cli.py: 172 warnings
tests/test_util.py: 8 warnings
tests/test_workspacebuilder.py: 206 warnings
tests/test_workspacefreezer.py: 5 warnings
tests/tests/test_helpers.py: 12 warnings
/usr/lib/python3.10/site-packages/libtmux/common.py:625: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
return get_version() >= LooseVersion(min_version)
tests/test_cli.py: 52 warnings
/usr/lib/python3.10/site-packages/libtmux/common.py:692: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if get_version() < LooseVersion(TMUX_MIN_VERSION):
tests/test_cli.py: 1 warning
tests/test_plugin.py: 10 warnings
/build/tmuxp/src/tmuxp-1.12.1/tmuxp/plugin.py:87: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
self.tmuxp_version = LooseVersion(__version__)
tests/test_cli.py: 3 warnings
tests/test_plugin.py: 48 warnings
/build/tmuxp/src/tmuxp-1.12.1/tmuxp/plugin.py:138: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if vmin and version < LooseVersion(vmin):
tests/test_cli.py: 1 warning
tests/test_plugin.py: 34 warnings
/usr/lib/python3.10/site-packages/setuptools/_distutils/version.py:351: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
other = LooseVersion(other)
tests/test_cli.py: 1 warning
tests/test_plugin.py: 11 warnings
/build/tmuxp/src/tmuxp-1.12.1/tmuxp/plugin.py:140: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if vmax and version > LooseVersion(vmax):
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_workspacebuilder.py::test_environment_variables - TypeError...
==== 1 failed, 178 passed, 2 skipped, 1 deselected, 1033 warnings in 24.92s ====`
Full build log: tmuxp-1.12.1-1-x86_64-build.log
Full test log: tmuxp-1.12.1-1-x86_64-check.log
Expected Results:
Tests pass.
Relevant Code:
n/a
@dvzrv You may need to pin libtmux at 0.12 (0.13 removes that)
@dvzrv Does pinning libtmux to at least 0.12 alleviate this?
I am doing system packaging on a rolling release distribution. There's no concept of pinning something. ;-)
@dvzrv I want to make it comfortable for you packaging downstream - but also want to balance it against refactoring that results in API changes - which happens time to time
Is there anything you'd propose for this issue? Other API Changes in the future that'd cause similar issues?
This seems to be fixed with tmuxp 1.13.0.
In regards to libtmux, it might be useful to provide new changes that are not yet incorporated in prereleases (distributions usually do not ship those). I'm not sure but it seems as if tmuxp is the largest consumer of libtmux so it would make sense for their current stable releases to somehow stay in sync :)