GeezerVison is showing github.com — Fix pytest 9.1 fixture-mark import failure by tony · Pull Request #687 · tmux-python/libtmux
Conversation
tony
commented
Jun 16, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
Fixes #686.
This PR keeps libtmux's zshrc fixture, but removes the pytest mark that was applied directly to the fixture function. Pytest 9.1 rejects that pattern during plugin import, before collection reaches any tests.
It also removes the project-level pytest filterwarnings block one entry at a time so pytest-facing compatibility warnings stay visible in development and CI instead of being hidden by configuration.
Upstream pytest context
Pytest documents marks on fixtures as deprecated in 7.4 and removed in 9.0:
In pytest 9.1, mark application now checks whether the target is a fixture and fails during decorator evaluation:
Reversing decorator order is not a compatible workaround, because fixture creation also rejects functions that already carry pytest marks:
Testing
uv run python -c 'import libtmux.pytest_plugin'
uv run ruff check .
uv run mypy
TMUX= TMUX_PANE= SHELL=/bin/sh uv run pytest -q -W error::pytest.PytestWarning
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
why: Pytest 9.1 rejects marks applied to fixture functions during
plugin import. Without this fix, libtmux's pytest plugin can fail before
collection for downstream users. The mark never affected fixture behavior,
and conftest.py already decides when to request zshrc.
what:
- Remove the skipif mark from the zshrc fixture
- Keep the fixture and USING_ZSH request path intact for zsh users
why: Project-wide ignores for libtmux deprecations can hide plugin
compatibility regressions until downstream users hit them.
what:
- Remove the filterwarnings entry that ignored libtmux deprecations
why: Test-suite deprecation warnings should stay visible so compatibility
regressions are fixed where they are introduced instead of hidden by config.
what:
- Remove the filterwarnings entry that ignored test deprecations
why: The remaining pytest warning ignore is not needed by the current suite.
Keeping warning filters in project config encourages hiding compatibility
signals.
what:
- Remove the remaining frontend.OptionParser deprecation ignore
- Drop the now-empty filterwarnings block from pytest configuration
codecov
Bot
commented
Jun 16, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.30%. Comparing base (025d1f2) to head (9e278f1).
⚠️ Report is 7 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #687 +/- ##
==========================================
+ Coverage 51.29% 51.30% +0.01%
==========================================
Files 25 25
Lines 3488 3487 -1
Branches 686 686
==========================================
Hits 1789 1789
+ Misses 1404 1403 -1
Partials 295 295
☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
why: Document the downstream-facing pytest 9.1 import fix for the
forthcoming 0.59.x release so users of libtmux's pytest fixtures know
the plugin loads on pytest 9.1+.
what:
- Add a Fixes entry under the 0.59.x unreleased block noting the pytest
plugin now imports cleanly under pytest 9.1
Uh oh!
There was an error while loading. Please reload this page.
tony
added a commit
to tmux-python/tmuxp
that referenced
this pull request
Jun 17, 2026
Raises the libtmux floor to ~=0.58.1 so tmuxp's pytest fixtures keep
loading under pytest 9.1+. libtmux's bundled pytest plugin applied a
mark to its zshrc fixture that pytest 9.1 rejects during plugin
import — before collection — which broke test runs for any project
that loads the plugin to use tmuxp's or libtmux's fixtures. libtmux
0.58.1 fixes the mark; this floor bump pulls in that fix.
- **Dependency floor:** libtmux ~=0.58.0 -> ~=0.58.1, resolved from
PyPI.
- **Dev toolchain:** bump the locked dev tooling, moving tmuxp's own
test runs onto pytest 9.1.0 — the version the fix is required for.
- **Changelog:** record the floor bump and the pytest 9.1 fixture
compatibility fix under the unreleased notes.
libtmux fix: tmux-python/libtmux#687
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.