You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Earlier this year pipenv added supported for ranged python version requirements. There was initially a bug which prevented us from using it, but that has been fixed for months now. We can now just encode the minimum required version.
Reviewed bbdfff9f7. Verdict: approve — no blockers.
Verification of the fix mechanism:
The Python scaffold at packages/@cdktn/cli-core/templates/python/Pipfile is written out by cdktn init --template python and handed straight to pipenv install by the template's post-hook (.hooks.sscaff.js), so the exact python_version = "3.11" pin was what made init abort on machines without 3.11. With the new value (python_version = ">=3.9") in a scratch project, pipenv install (2026.8.0) exits 0, reports Found Python satisfying >=3.9: /usr/bin/python3, and creates the virtualenv from the highest interpreter available — 3.12.3 here, despite 3.11.15 also being installed — instead of demanding the pinned version. The specifier is carried into the lock verbatim: _meta.requires.python_version reads ">=3.9".
One behavioural floor worth noting: ranged python_version needs pipenv ≥ 2026.6.0 (added in 2026.4.0, broken in 2026.4.x–2026.5.x). pipenv 2026.2.0 fails the install with Python version range specifier '>=3.9' is not supported, so users on an older pipenv get a different init failure. Not a blocker — the message is self-explanatory and current pipenv carries the fix — but a minimum-version note in the template help, or a version probe next to the existing which pipenv check in .hooks.sscaff.js, would surface it earlier.
Two minors, non-blocking: examples/python/google-cloud-function/Pipfile and examples/python/upcloud-server/Pipfile still use python_version = "3" (uneven with the rest), and the committed Pipfile.lock files still record 3.11 — that staleness predates this change, and CI's reinstall script deletes the lock before installing, so no action needed here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Related issue
Fixes #282
Description
Earlier this year pipenv added supported for ranged python version requirements. There was initially a bug which prevented us from using it, but that has been fixed for months now. We can now just encode the minimum required version.
Checklist