Skip to content

Fix pyglet version pin to exclude incompatible 3.0 pre-release#5149

Open
Kripner wants to merge 2 commits intoisaac-sim:developfrom
Kripner:fix/pyglet-version-pin
Open

Fix pyglet version pin to exclude incompatible 3.0 pre-release#5149
Kripner wants to merge 2 commits intoisaac-sim:developfrom
Kripner:fix/pyglet-version-pin

Conversation

@Kripner
Copy link
Copy Markdown

@Kripner Kripner commented Apr 2, 2026

Pin pyglet>=2.1.6,<3.0 in source/isaaclab/setup.py to prevent pip/uv from resolving to pyglet==3.0.dev2, which removes pyglet.graphics.shader.Shader and breaks the Newton OpenGL viewer.

Test of the fix: Newton visualizer launches without ImportError: ./isaaclab.sh -p scripts/environments/zero_agent.py --task Isaac-Reach-Franka-v0 --num_envs 4 env.sim.physics=newton --visualizer newton

pyglet 3.0.dev2 removes pyglet.graphics.shader.Shader, breaking the
Newton OpenGL viewer. Add an upper bound (<3.0) to the existing pin.
@github-actions github-actions bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Apr 2, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 2, 2026

Greptile Summary

This PR tightens the pyglet version pin in source/isaaclab/setup.py from >=2.1.6 to >=2.1.6,<3.0 to prevent pip/uv from resolving to pyglet==3.0.dev2, which dropped pyglet.graphics.shader.Shader and broke the Newton OpenGL viewer. The change is minimal, correct, and consistent with how PEP 440 exclusive upper-bound comparisons exclude pre-releases of the boundary version.

Confidence Score: 5/5

  • Safe to merge — single-line dependency pin with a confirmed fix for a broken install path.
  • The only change is narrowing a version range for a single dependency. The fix is correct per PEP 440 (exclusive <3.0 blocks 3.0.dev2 and the whole 3.x pre-release series), has been manually verified by the author, and no other setup files need updating. The sole finding is a P2 documentation suggestion.
  • No files require special attention.

Important Files Changed

Filename Overview
source/isaaclab/setup.py Narrows the pyglet version specifier from >=2.1.6 to >=2.1.6,<3.0, correctly blocking pyglet==3.0.dev2 (and the entire 3.x line) which removed pyglet.graphics.shader.Shader and broke the Newton OpenGL viewer.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[pip / uv resolves pyglet] --> B{Version satisfies constraint?}
    B -- "Before: >=2.1.6" --> C["pyglet==3.0.dev2 ✓ (pre-release selected)"]
    B -- "After: >=2.1.6,<3.0" --> D["pyglet==3.0.dev2 ✗ (excluded by PEP 440 <3.0)"]
    C --> E["ImportError: pyglet.graphics.shader.Shader missing"]
    D --> F["Latest 2.x release installed ✓"]
    F --> G["Newton OpenGL viewer launches correctly ✓"]
Loading

Reviews (1): Last reviewed commit: "Fix pyglet version pin to exclude incomp..." | Re-trigger Greptile

Copy link
Copy Markdown

@isaaclab-review-bot isaaclab-review-bot bot left a comment

Choose a reason for hiding this comment

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

Clean, minimal fix. The <3.0 upper bound correctly excludes pyglet==3.0.dev2 (and any future 3.0 release) per PEP 440 pre-release ordering — verified that Version("3.0.dev2") < Version("3.0") holds and the specifier >=2.1.6,<3.0 rejects both.

This is consistent with the existing hf-xet>=1.4.1,<2.0.0 pattern in the same file, which was added for the same reason (a broken pre-release on NVIDIA Artifactory getting pulled in by --pre).

No inline comments — nothing to improve here. The change is correct and the scope is appropriate.

Minor note: Consider adding a CHANGELOG.rst entry under Fixed for source/isaaclab/docs/CHANGELOG.rst (e.g. "Fixed pyglet version pin to exclude incompatible 3.0 pre-release that breaks the Newton OpenGL viewer."). The contributing guide states every change should have a changelog entry, though I acknowledge dependency pins are borderline.

Add explanatory comment to the version bound on `pyglet`.

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Signed-off-by: Matěj Kripner <kripnermatej@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant