Skip to content

chore: bump invoke 2.2.0 -> 2.2.1 for Python 3.14 compatibility#992

Merged
polmichel merged 1 commit intostablefrom
pmi-20260504-bump-invoke
May 5, 2026
Merged

chore: bump invoke 2.2.0 -> 2.2.1 for Python 3.14 compatibility#992
polmichel merged 1 commit intostablefrom
pmi-20260504-bump-invoke

Conversation

@polmichel
Copy link
Copy Markdown
Contributor

Why

invoke 2.2.0 raises SystemError: buffer overflow on Python 3.14: 3.14 tightened fcntl buffer-overflow detection, and invoke's termios.TIOCGWINSZ probe in terminals.py was reading too few fields of the 4-field winsize struct. When sys.stdout is a TTY, any uv run invoke <task> (or --list/--help) aborts before the task body.

invoke 2.2.1 (2025-10-10) unpacks all four fields and discards the unused two — pure compat fix, no behavior change. Upstream fix: pyinvoke/invoke#1040. Equivalent bump on the main repo: opsmill/infrahub#9128.

What changed

  • pyproject.toml: invoke>=2.2.0invoke>=2.2.1
  • uv.lock: regenerated; invoke resolves to 2.2.1

How to test

uv sync --all-groups
uv run invoke --list          # was failing on Python 3.14 with SystemError; now succeeds
uv run invoke format
uv run invoke lint

Reproduce the original bug (before the bump) on Python 3.14 with a real TTY:

uv pip install invoke==2.2.0
.venv/bin/invoke --list       # SystemError: buffer overflow at terminals.py:96

Impact & rollout

  • Backward compatibility: none — patch-level bump, no API change.
  • Deployment notes: safe to deploy.

invoke 2.2.0 raises SystemError on Python 3.14: 3.14 tightened fcntl
buffer-overflow detection, and invoke's termios.TIOCGWINSZ probe was
reading too few fields of a 4-field winsize struct. Any uv run invoke
<task> aborts before the task body when stdout is a TTY.

invoke 2.2.1 (2025-10-10) unpacks all four fields and discards the
unused two -- pure compat fix, no behavior change.

See opsmill/infrahub#9128 for the equivalent
bump on opsmill/infrahub.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@polmichel polmichel requested a review from a team as a code owner May 4, 2026 21:05
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying infrahub-sdk-python with  Cloudflare Pages  Cloudflare Pages

Latest commit: c789ae4
Status: ✅  Deploy successful!
Preview URL: https://603950ba.infrahub-sdk-python.pages.dev
Branch Preview URL: https://pmi-20260504-bump-invoke.infrahub-sdk-python.pages.dev

View logs

@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@           Coverage Diff           @@
##           stable     #992   +/-   ##
=======================================
  Coverage   81.41%   81.41%           
=======================================
  Files         134      134           
  Lines       11347    11347           
  Branches     1703     1703           
=======================================
  Hits         9238     9238           
  Misses       1566     1566           
  Partials      543      543           
Flag Coverage Δ
integration-tests 41.84% <ø> (-0.01%) ⬇️
python-3.10 54.36% <ø> (+0.01%) ⬆️
python-3.11 54.36% <ø> (ø)
python-3.12 54.36% <ø> (ø)
python-3.13 54.34% <ø> (-0.02%) ⬇️
python-3.14 54.34% <ø> (-0.02%) ⬇️
python-filler-3.12 22.74% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@polmichel polmichel merged commit f8a2940 into stable May 5, 2026
20 checks passed
@polmichel polmichel deleted the pmi-20260504-bump-invoke branch May 5, 2026 09:20
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.

2 participants