Update pyglet to 3.0.dev11 - #2903
Merged
Merged
Conversation
Update the pyglet pin from 3.0.dev8 to 3.0.dev11 in pyproject.toml and uv.lock. Only the pyglet entries in the lock file change. Arcade needed no code changes: every arcade module imports, and the full test suite gives the same results as on dev8. The breaking changes in dev9-dev11 (ShaderProgram vertex_layout, resource handle/key, pyglet.gui UIManager) are in pyglet APIs arcade doesn't use. The new macOS display link draw source isn't started because arcade calls pyglet.app.run(None) and schedules its own frames. Document the changes for users who use pyglet directly in the changelog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pyglet 3.0.dev11 detects documentation builds through the PYGLET_DOC_BUILD environment variable, read when pyglet is first imported, instead of the sys.is_pyglet_doc_run flag. With only the old flag set, pyglet.lib.LibraryMock was never defined, so doc/conf.py's patch to it raised AttributeError and the docs build failed. Set the environment variable instead, before anything imports pyglet, and drop the LibraryMock patch: dev11's mock already defines __bool__ and __iter__. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Updates the pyglet pin from
3.0.dev8to3.0.dev11, inpyproject.tomlanduv.lock. Arcade's library code needed no changes;doc/conf.pydid (see "Docs build fix" below).uv lockwith my uv (0.11.6) also rewrote unrelated environment markers on the Sphinx dependencies, so I kept just the pyglet entries.uv lock --checkpasses, and the wheel hash in the lock matches the wheel I tested with.arcade/VERSIONis unchanged. chore: update pyglet to version 3.0.dev8 and modify changelog #2882 also bumped it as a release; let me know if this should be one too.What changed in pyglet dev9–dev11
pyglet's
RELEASE_NOTESdoesn't cover 3.0 yet, and the GitHub releases have no notes. So I went through the 148 commits betweenv3.0.dev8andv3.0.dev11, and the changes to the 3.0 migration guide.ShaderProgramrequires avertex_layoutkeyword argument;create_vertex_layoutandset_instance_attributesare replaced byVertexLayoutandget_vertex_viewarcade.gl, and arcade doesn't create pyglet shader programs or vertex lists.handleand a stable.key;.idis deprecated.iduses in arcade are Tiled tile IDsMouseCursor.gl_drawablerenamed toapi_drawablepyglet.guirewritten aroundUIManagerarcade.guiis separateWebGLOpenGLSurfaceContextrenamed toWebGL2SurfaceContextPYGLET_DOC_BUILDenvironment variable instead ofsys.is_pyglet_doc_rundoc/conf.py, see belowpyglet.app.runadds a SIGINT handler that callsapp.exitarcade.run()cleanly (except in headless mode and test runs, which use arcade's own loop)CADisplayLink(pyglet.options.osx_displaylink, default on)app.runis given an interval; arcade callspyglet.app.run(None)and schedules its own frames, so it falls through before any draw source is created (EventLoop._schedule_window_draw)These are written up in the changelog under "Breaking Changes" for users who use pyglet directly, following the dev8 entry's format.
Note that
pyglet/__init__.pyat thev3.0.dev11git tag still saysversion = '3.0.dev10'. The PyPI wheel says3.0.dev11, and apart from that line it's identical to the tag.Docs build fix
The first CI run failed in Build Documentation:
AttributeError: module 'pyglet.lib' has no attribute 'LibraryMock'.pyglet dev11 now detects documentation builds through the
PYGLET_DOC_BUILDenvironment variable, read when pyglet is first imported, instead of thesys.is_pyglet_doc_runflag thatdoc/conf.pyset. With only the old flag, pyglet never definedLibraryMock, soconf.py's patch to it crashed.conf.pynow setsos.environ["PYGLET_DOC_BUILD"] = "1"before anything imports pyglet. I also dropped theLibraryMock__bool__/__iter__patch, because dev11's mock defines both.I reproduced the failure locally with
uv run make.py docs-full, using an environment from the lock file (pyglet 3.0.dev11, Sphinx 9.1.0, Python 3.13). With the fix, the full build succeeds with-W. I missed this the first time because I'd run the tests and import checks but not the docs build.Testing
All of this was run with the actual PyPI
3.0.dev11wheel:atlas_array/atlas_bindless) fail the same way on dev8, because of missing optional packages or an existingArcadeContextNameError. The atlas stubs are removed in Remove unfinished array and bindless texture atlas stubs #2904.tests/folder, as CI runs it, gives identical results on dev8 and dev11: 1365 passed, with the same 3 render tests failing on my machine only. The warnings are also identical, so dev11 adds no new deprecation warnings for arcade.make.py docs-full(as CI runs it) succeeds with-W; see above.🤖 Generated with Claude Code