Skip to content

Support (and require) tabulate version 0.10.0#189

Open
musicinmybrain wants to merge 1 commit intoeconchick:masterfrom
musicinmybrain:tabulate-0.10
Open

Support (and require) tabulate version 0.10.0#189
musicinmybrain wants to merge 1 commit intoeconchick:masterfrom
musicinmybrain:tabulate-0.10

Conversation

@musicinmybrain
Copy link
Copy Markdown

Hey, I just made a Pull Request!

Description

The tabulate.PRESERVE_WHITESPACE global was replaced with a new preserve_whitespace keyword argument for tabulate().

Since preserving backward compatibility with previous tabulate versions would be tedious, requiring various conditionals and parsing tabulate.__version__, support only tabulate>=0.10.0.

Motivation and Context

$ uv venv
Using CPython 3.14.3 interpreter at: /usr/bin/python3
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
$ . .venv/bin/activate
(interrogate) $ uv pip install -e .
(interrogate) $ uv pip install pytest pytest-mock
(interrogate) $ pytest
[…]
================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/unit/test_badge_gen.py:49: windows-only tests
SKIPPED [5] tests/unit/test_utils.py:75: windows-only tests
SKIPPED [7] tests/unit/test_utils.py:278: windows-only tests
FAILED tests/functional/test_coverage.py::test_print_results[2-expected_detailed.txt] - AssertionError: assert '------------------------------ Detailed Coverage -------------------------------\n| Name                             ...                     |    MISSED |\n|---...
FAILED tests/functional/test_coverage.py::test_print_results_omit_covered[2-expected_detailed_skip_covered.txt] - AssertionError: assert '------------------------------ Detailed Coverage -------------------------------\n| Name                             ...                     |    MISSED |\n|---...
FAILED tests/functional/test_coverage.py::test_print_results_ignore_module[False-2-expected_detailed.txt] - AssertionError: assert '------------------------------ Detailed Coverage -------------------------------\n| Name                             ...                     |    MISSED |\n|---...
FAILED tests/functional/test_coverage.py::test_print_results_ignore_module[True-2-expected_detailed_no_module.txt] - AssertionError: assert '------------------------------ Detailed Coverage -------------------------------\n| Name                             ...                     |    MISSED |\n|---...
FAILED tests/functional/test_coverage.py::test_print_results_single_file - AssertionError: assert '------------------------------ Detailed Coverage -------------------------------\n| Name                             ...0 |           29 |        100.0% |\n----...
=================================================================== 5 failed, 223 passed, 13 skipped, 1 warning in 0.39s ====================================================================

Have you tested this? If so, how?

Repeat the above pytest invocation and observe:

================================================================================== short test summary info ==================================================================================
SKIPPED [1] tests/unit/test_badge_gen.py:49: windows-only tests
SKIPPED [5] tests/unit/test_utils.py:75: windows-only tests
SKIPPED [7] tests/unit/test_utils.py:278: windows-only tests
======================================================================== 228 passed, 13 skipped, 1 warning in 0.34s =========================================================================

Checklist for PR author(s)

  • Changes are covered by unit tests (no major decrease in code coverage %).
  • All tests pass.
  • Docstring coverage is 100% via tox -e docs or interrogate -c pyproject.toml (I mean, we should set a good example 😄).
  • Updates to documentation:
    • Document any relevant additions/changes in README.rst.
    • Manually update both the README.rst and docs/index.rst for any new/changed CLI flags.
    • Any changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives. Find the appropriate next version in the project's __init__.py file.

Release note

Added
^^^^^

* Support for `tabulate` 0.10.0 and later

Removed
^^^^^^^

* Support for `tabulate` versions older than 0.10.0

The `tabulate.PRESERVE_WHITESPACE` global was replaced with a new
`preserve_whitespace` keyword argument for `tabulate()`.

Since preserving backward compatibility with previous `tabulate`
versions would be tedious, requiring various conditionals and parsing
`tabulate.__version__`, support *only* `tabulate>=0.10.0`.
@musicinmybrain musicinmybrain changed the title Support tabulate version 0.10.0 Support (and require) tabulate version 0.10.0 Mar 5, 2026
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