Fix pyglet version pin to exclude incompatible 3.0 pre-release#5149
Fix pyglet version pin to exclude incompatible 3.0 pre-release#5149Kripner wants to merge 2 commits intoisaac-sim:developfrom
Conversation
pyglet 3.0.dev2 removes pyglet.graphics.shader.Shader, breaking the Newton OpenGL viewer. Add an upper bound (<3.0) to the existing pin.
Greptile SummaryThis PR tightens the Confidence Score: 5/5
Important Files Changed
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 ✓"]
Reviews (1): Last reviewed commit: "Fix pyglet version pin to exclude incomp..." | Re-trigger Greptile |
There was a problem hiding this comment.
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>
Pin
pyglet>=2.1.6,<3.0insource/isaaclab/setup.pyto prevent pip/uv from resolving topyglet==3.0.dev2, which removespyglet.graphics.shader.Shaderand 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