Skip to content

build!: lower the supported Python floor to 3.10 - #45

Merged
ahmadki merged 3 commits into
NVIDIA-NeMo:mainfrom
shurkat-nvidia:build/lower-python-floor-to-3.10
Aug 27, 2026
Merged

build!: lower the supported Python floor to 3.10#45
ahmadki merged 3 commits into
NVIDIA-NeMo:mainfrom
shurkat-nvidia:build/lower-python-floor-to-3.10

Conversation

@shurkat-nvidia

Copy link
Copy Markdown
Collaborator

requires-python goes from >=3.12 to >=3.10, matching the floor of opentelemetry-api and opentelemetry-sdk, which both declare >=3.10.

Exactly one construct in the tree needed 3.12: the PEP 695 type-alias statement in strategies.py. It is respelled with typing.TypeAlias, which landed in 3.10. vermin reports the tree at 3.9 with that file excluded, so nothing else was holding the floor up -- the docs justified the 3.12 requirement by pointing at that single line.

Verified by running the full suite on real interpreters rather than inferring from static analysis: 218 passed on 3.10.21 and on 3.11.16, unchanged from 3.12. The CI matrix grows from ["3.12", "3.13"] to ["3.10", "3.11", "3.12", "3.13"] so the claim stays tested; declaring a floor no job exercises is how it silently rots.

ruff target-version drops to py310 so lint enforces the same floor, and the 3.10/3.11 trove classifiers are added.

BREAKING CHANGE: none for existing users -- this only widens the supported range. Marked breaking because requires-python is packaging metadata that resolvers act on, and a consumer pinning to the previous floor should notice the change.

What does this PR do?

Add a one line overview of what this PR aims to accomplish.

Issues

List issues that this PR closes (syntax):

Usage

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this

Before your PR is "Ready for review"

Pre checks:

  • I read the Contributor guidelines.
  • All commits are signed off (git commit -s) per the DCO.
  • I added or updated tests under tests/ for any behavior change.
  • I ran pytest and pre-commit run --all-files locally; both pass.
  • I updated docs/ and README.md where behavior, configuration, or public API changed.
  • If this changes a lens public API symbol, I updated the cross-repo _fallbacks.py files in Megatron-LM / RL / Gym.

Additional information

requires-python goes from >=3.12 to >=3.10, matching the floor of
opentelemetry-api and opentelemetry-sdk, which both declare >=3.10.

Exactly one construct in the tree needed 3.12: the PEP 695 type-alias
statement in strategies.py. It is respelled with typing.TypeAlias, which
landed in 3.10. vermin reports the tree at 3.9 with that file excluded, so
nothing else was holding the floor up -- the docs justified the 3.12
requirement by pointing at that single line.

Verified by running the full suite on real interpreters rather than
inferring from static analysis: 218 passed on 3.10.21 and on 3.11.16,
unchanged from 3.12. The CI matrix grows from ["3.12", "3.13"] to
["3.10", "3.11", "3.12", "3.13"] so the claim stays tested; declaring a
floor no job exercises is how it silently rots.

ruff target-version drops to py310 so lint enforces the same floor, and
the 3.10/3.11 trove classifiers are added.

BREAKING CHANGE: none for existing users -- this only widens the
supported range. Marked breaking because requires-python is packaging
metadata that resolvers act on, and a consumer pinning to the previous
floor should notice the change.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Skand Hurkat <shurkat@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@rhewett-nv

Copy link
Copy Markdown
Collaborator

This LGTM

@shurkat-nvidia
shurkat-nvidia marked this pull request as ready for review August 21, 2026 21:04
@shurkat-nvidia
shurkat-nvidia requested review from a team and ahmadki as code owners August 21, 2026 21:04
@ahmadki

ahmadki commented Aug 26, 2026

Copy link
Copy Markdown
Member

/ok to test 270ce90

@ahmadki ahmadki self-assigned this Aug 26, 2026

@ahmadki ahmadki left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shurkat-nvidia in general looks good, by please regenerate the uv.lock file, and do a simple search for python and 3.12 to update all references to python 3.12, a non-complete list of files that need to be updated:

  • .claude/skills/lens-create-issue/SKILL.md
  • .agents/skills/lens-create-issue/SKILL.md
  • skills/lens-create-issue/SKILL.md
  • .github/workflows/cicd-main.yml
  • README.md
  • CONTRIBUTING.md
  • CLAUDE.md
  • docs/developer/contributing.mdx
  • docs/fern/versions/0.1.0/pages/get-started/installation.mdx

shurkat-nvidia and others added 2 commits August 26, 2026 13:57
Follow-up to lowering requires-python, addressing PR review feedback.

uv.lock is regenerated: its own requires-python moves 3.12 -> 3.10, and the
resolution picks up exceptiongroup and tomli, both marked
python_full_version < '3.11'. Regenerated without --upgrade, so existing pins
are untouched and the diff is only what the lower floor requires.

Doc and skill references follow: the README badge, CONTRIBUTING.md, and
docs/developer/contributing.mdx all said 3.12+. skills/lens-create-issue
described the CI test matrix as "Python 3.12 and 3.13", which is now four
versions -- its triage rule is rewritten accordingly, since with a lower floor a
failure only on 3.10 or 3.11 has a specific meaning: a construct newer than the
declared floor.

.claude/skills, .agents/skills and CLAUDE.md are symlinks into skills/ and
AGENTS.md, so the three paths named separately in review resolve to the two
files edited here.

Verified on a real interpreter: a fresh 3.10.21 venv built from the regenerated
lock runs the full suite, 218 passed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Skand Hurkat <shurkat@nvidia.com>
Matches the precedent set by NVIDIA-NeMo#27, the last time this floor moved: it updated the
same file set, including both 0.1.0 pages, in one commit.

Despite its name that tree is not a snapshot of the 0.1.0 release. It was created
in NVIDIA-NeMo#21, after the v0.1.0 tag, from a tree already on 0.2.0 -- and the v0.1.0 tag
requires >=3.13, which the tree has never said. In practice it is maintained as a
mirror of the nightly pages, which is why AGENTS.md describes it as a
byte-identical copy, and why leaving it behind would strand a fourth stale
version claim rather than preserve a historical one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Skand Hurkat <shurkat@nvidia.com>
@ahmadki

ahmadki commented Aug 27, 2026

Copy link
Copy Markdown
Member

/ok to test 270ce90

@copy-pr-bot

copy-pr-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

/ok to test 270ce90

@ahmadki, there was an error processing your request: E2

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/

@ahmadki

ahmadki commented Aug 27, 2026

Copy link
Copy Markdown
Member

/ok to test aee8f2d

@ahmadki
ahmadki merged commit 67fff3c into NVIDIA-NeMo:main Aug 27, 2026
29 checks passed
@shurkat-nvidia
shurkat-nvidia deleted the build/lower-python-floor-to-3.10 branch August 27, 2026 16:09
shurkat-nvidia added a commit to shurkat-nvidia/Lens that referenced this pull request Sep 2, 2026
Two conflicts, both from NVIDIA-NeMo#45 lowering the Python floor to 3.10:

- src/nemo/lens/strategies.py: NVIDIA-NeMo#45 respelled the PEP 695 `type` alias as
  `TypeAlias` so the file would compile on 3.10. This branch deletes the
  module along with the rest of the export-strategy API, so the fix has
  nothing left to apply to. Kept the deletion.
- docs/get-started/installation.mdx: took main's 3.10 floor wording over
  this branch's stale "requires Python >= 3.12".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Skand Hurkat <shurkat@nvidia.com>
shurkat-nvidia added a commit to shurkat-nvidia/Lens that referenced this pull request Sep 3, 2026
Picks up NVIDIA-NeMo#45 (Python 3.10 floor), NVIDIA-NeMo#44 (encode_resource_attributes) and NVIDIA-NeMo#46
(the consumer-driven metric registry).

Five conflicts, four of them the same one wearing different clothes: this
branch adds SpanRegistry to the fallback surface while NVIDIA-NeMo#44 added
encode_resource_attributes, so both sides edited the same list in
fallbacks.py, tests/test_fallbacks.py, AGENTS.md and
docs/design/optional-dependency.mdx. Kept both symbols everywhere. The
surface is now seven, and both docs said "six" because each side had counted
its own addition against a base of five.

tests/test_fallbacks.py needed more than a union: the strengthened
_shape()-based parity check from this branch replaced the name-only loop that
NVIDIA-NeMo#44's TestFallbackEncodeResourceAttributes was written against. Kept both,
and added encode_resource_attributes to the parametrized sweep so the
stricter check -- which compares parameter kind and default, not just name --
actually covers the symbol NVIDIA-NeMo#44 contributed.

The fifth was src/nemo/lens/__init__.py, where the two sides added different
imports adjacent to each other. Union.

Also corrected the AGENTS.md testing section from three autouse fixtures to
four: NVIDIA-NeMo#46 added reset_metric_registry without updating that sentence.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Signed-off-by: Skand Hurkat <shurkat@nvidia.com>
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.

3 participants