Skip to content

Import StringIO from stdlib in test_runtime.py - #158

Merged
mpounsett merged 1 commit into
mainfrom
t3/remove-compat-uses
Nov 28, 2026
Merged

mpounsett merged 1 commit into
mainfrom
t3/remove-compat-uses

Conversation

@mpounsett

Copy link
Copy Markdown
Owner

nagiosplugin.compat was deprecated in #156 (see #142). tests/test_runtime.py was the last in-tree importer of it, pulling in StringIO; this switches it to from io import StringIO.

After this change nothing in the library or the tests imports nagiosplugin.compat, so the test suite no longer triggers its DeprecationWarning.

Testing

  • pytest -W "error:nagiosplugin.compat:DeprecationWarning": 140 passed, 1 skipped.
  • nagiosplugin/platform/nt.py is Windows-only and could not be imported on macOS; it was checked by grep only.

Removes the last in-tree use of the deprecated nagiosplugin.compat
module (see #142).
@mpounsett
mpounsett merged commit 75c4e03 into main Nov 28, 2026
12 checks passed
@mpounsett
mpounsett deleted the t3/remove-compat-uses branch November 28, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant