Pyglet

Latest version: v2.1.3

Safety actively analyzes 723158 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 10

2.0.12

Note: This version is a quick bugfix release that superceeds v2.0.11.
The previous release contained a bug that broke Batch/Group migration, which has now been fixed (and a unit test added for).

Changes and Improvements
------------------------
- media: major internal audio cleanup, bugfixes, and improvements on all platforms.
- various typing and documentation improvements.
- math: add Quaternion class with common methods.
- shader: add support for setting and getting arrays in a Uniform via wrapper. (1005)
- shapes: add radius property get and set to Arc class. (1013)
- sprite, shapes: Avoid extra step of updating vertex list after creation. (1016)
- shapes: allow setting the line thickness of Arc and BezierCurve shapes. (1028, 1030)
- text: add Caret.select_all method.
- text: performance improvements on instantiation, visibility, anchors, positions. (1004)
- text: add left, right, bottom, top attributes. (1004)
- text: add program argument for custom shaders. (1037)
- text: add get_as_texture function to render text to a new texture. (1037)
- font: skip pre-parsing all system fonts to improve speed. Check only when needed.

Bugfixes
--------
- macOS: prevent crash when scanning for Controllers if device.transport is None. (995)
- input: avoid crash when encountering controls with invalid min/max values. (986)
- xlib: fix missed argument in window drag.
- media: fix bad behavior when clearing XAudio2AudioPlayer. (1011)
- pyglet.__init__: don't install debug_trace until after module proxies 1046
- media: numerous fixes to race conditions and deadlocks across all backends.
- experimental: Fix incorrect texture UVs and final positioning for GeometryShader Sprite.
- image: add missing binding calls for blit_to/texture methods.

2.0.10

Changes and Improvements
------------------------
- sprite: moving Sprites is now about 35% faster (as tested on R5 5600X)
- gui: Add TextEntry.focus property to allow programmatic focus control
- gui: Allow set TextEntry.width and TextEntry.height
- Window: Add experimental Window.get_clipboard_text and Window.set_clipboard_text methods
- experimental: Add new pyglet.experimental package for easier wider testing of new ideas
- experimental: Add `geoshader_sprite.py` that is more complex, but faster than the standard Sprite
- experimental: Add `net` module with Server/Client proof of concept
- tests: Add new interactive spot test to visually confirm shapes are working as expected
- shapes: Move rotate functionality to ShapeBase class, and allow all shapes to rotate
- VertexDomain: bind all buffers to VAO in __init__, and avoid binding each draw
- gl.Context: Add a new cached `Context.create_program` method to assist in shader reuse
- examples.model.fpscamera: fix drifting input, and other improvements
- contrib.qt_sprite_preview.py: Modify to allow using either PySide2 or PyQt5 (959)
- examples: Carry over the soundspace example (972)
- media: The "Silent" audio driver now behaves more like a real driver
- text: Add RGB color setter fallback for HTML labels, assuming 255 alpha
- shapes: Add a new (unfilled) Box shape
- gl: Take threading into account when deleting OpenGL objects (988)

Bugfixes
--------
- gl: Stop storing doomed VAOs in object space (918)
- xlib: Do a better job of detecting UTF8 capability (520)
- media.Player: for Video playback, set context when updating Textures
- shapes: fix re-positioning of BezierCurve and Polygon shapes
- media.codecs: Fix use-after-frees and memory leaks in the wmf decoder 962
- text.Caret: Fix caret blinking (971)
- text.layout: Fix incorrect background color vertex data
- Windows: Implement fix for ctypes.wintypes.BYTE in Python < 3.12 (977)
- input.evdev: Fix for pypy3 by removing usage of os.readv

2.0.9

Changes and Improvements
------------------------
- app: Passing `None` to pyglet.app.run will disable automatic Window redraws.
- window: Add a Window.draw method to help when manually scheduling Window redraws.
- shapes: Add a `border` thickness setter to BorderedRectangle.
- docs: Various docstring improvements and cleanups.
- examples: Add minimal ComputeShader example.

Bugfixes
--------
- media: Fix multiple on_eos events from OpenAL players, and major MediaThreads overhaul.
- macos: Fix on_key events (898)
- macos: Workaround for CGDisplaySetDisplayMode bug
- Xaudio2: Fix packet refill crash when removing a player that was deleted mid callback.
- gui: Fix incorrectly named on_mouse_scroll arguments (904).

2.0.8

Changes and Improvements
------------------------
- Add missing OpenGL extensions
- Add support for FFmpeg 6.0
- Sprite width & height properties are now settable, allowing scaling by pixels
- documentation: updates to migration guide, media, and events
- shapes: Allow checking if a point is in a shape, using the `in` operator

Bugfixes
--------
- clock: Fix clock swallowing ReferenceErrors
- documentation: fix some sphinx build issues on ReadTheDocs
- font: multiple macOS fixes, including issues with double-byte fonts
- input: ensure Xinput controllers dispatch events on the main thread

2.0.7

Changes and Improvements
------------------------
- gui: Add alpha value to the Caret's default color.
- docs: Some minor rewording of sections, and type fixes.

Bugfixes
--------
- Fix broken struct format strings in png and ttf decoders.
- text: Clear Group cache when a Layout's Group is changed.
- Fix incorrect string formatting in the timer.py example.

2.0.6

Changes and Improvements
------------------------
- Initialize AudioDriver when media module is imported, prevent pause on first sound playback.
- New TextureArrayBin class for managing TextureArray based atlases.
- macOS: implement "file_drop" support for Windows.
- macOS: add support for CoreAudio, allowing native mp3, aiff, etc. support without FFMpeg.
- macOS: alternative NSApplication based event loop, to avoid missing events on M1 Macs. 794
- text: Caret supports RGBA color, in line with other pyglet objects.
- Windows: New context manager for handling of safer handling of platform resources.

Bugfixes
--------
- Fix numerous bugs remaining with IncrementalTextLayout, with translation, caret, etc. 786
- Windows: fix incorrect on_resize values.
- macOS: numerous memory leak fixes.
- shader: add missing sampler type definitions.
- Add missing docstrings, and various documentation fixes.

Page 3 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.