☀️🌊🏖️😎🏄🐚🏝️🍹☀️🌊🏖️
pip uninstall pygame (if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
☀️🌊🏖️😎🏄🐚🏝️🍹☀️🌊🏖️
Heya, welcome to another release of pygame-ce!! It's been about 2 months since the last release and there have been a lot of nice additions, enhancements and bugfixes. We hope this release treats you well until we get the next release out ;)
This release has several changes to the wheels (binaries) we distribute. We've raised our minimum MacOS version from 10.9 to 10.11, following our dependencies. Unlike previous releases, this release has wheels for aarch64 Linux, Python 3.12 beta releases, and Pypy 3.10. We've dropped wheels for Pypy3.7 due to lack of use. Thanks to @ankith26 and @Starbuck5 for these updates, in #2171, #2352, #2325, #2315, and #2335.
See what we've been working on!
New additions
- @andrewhong04 added the
point_sizeattribute tofont.Fontin #1961. This allows fonts to be resized after being loaded. - @dr0id added
style_nameproperty tofont.Font/freetype.Fontin #2175 - @yunline added two
pygame.systemfunctionsget_cpu_instruction_setsandget_total_ramin #2308. These can be used to find out more about the system at runtime. - @dr0id added new
Rect/FRectmethods -scale_by/scale_by_ipand @jonotassia updated these to accept keyword-arguments. This addition was ported topygame-ceby @Starbuck5 in #2277 - New contributor @AlexanderGroeger added functions to manage soundfonts (
get_soundfontandset_soundfont) tomixerin #2274. This is relevant for midi playback throughpygame.mixer. - @Matiiss added a few convenience classmethods -
Color.from_<color_space>(i.e.Color.from_hsla) in #2177 - @yunline added
always_on_topattribute to_sdl2.video.Windowin #2307. Now you can use this to force yourWindows to always be highlighted at the top.
Potential breaking changes
- @yunline fixed
transform.gaussian_blurto handle radius like other standard implementations in #2246 (as an effect of this change, the output will be visually different to the older versions) - @that1guy232 removed the obsolete and deprecated vidcapture camera backend in #2207
Bug fixes
time.set_timerhad a long standing bug in which one could get a segfault in some cases (like the timer duration being too low). @ankith26 fixed this in #2284 along with other enhancements to code quality and performance. As a resultset_timeris now much more accurate with the timing!- @ankith26 fixed
FRectslice subscripting to correctly returnfloats in #2313 - @yunline added support for
SDL_WINDOWIDback, fixing a long standing compatibility issue with pygame 1 in #1953. However, this fix is not perfect, and there are some known issues with it (like certain events not working). We heavily recommend not using this. pygame-ce2.3.0 introduced a regression whereSysFontcould no longer handleNone. @Sjmarf fixed this in #2271- Another
pygame-ce2.3.0 regression was in_sdl2.video.Window, this class was no longer usable when pyinstaller was used. @Starbuck5 fixed this by correctly marking a hiddenimport in the pyinstaller hook in #2287 - @yunline fixed potential segfaults in
fontin #2255 - @zoldalma999 fixed a segfault related to
_sdl2.Window.from_display_modulethat happened ondeallocin #2341
Usage and performance enhancements
- @ScriptLineStudios added support for
Vector2objects inget_at/set_atmethods ofSurfacein #2111 - @itzpr3d4t0r improved the performance of
Surface.set_atby changing it to useFASTCALLin #2330 - @yunline added
__repr__to the_sdl2.video.Windowclass in #2345
Docs and examples improvements
- New contributor @devdanzin fixed the positioning of the theme icon of the docs when the page shrinks in #2321
- New contributors @Martinus2004 and @JiffyRob updated existing example programs to use
pygame-cemultiline text rendering. #2219, #2235 - New contributor @IrvKalb corrected the documentation of the
get_pref_pathfunction in thesystemmodule to use theorgargument in the example in #2326 - @Mega-JC made "note" blocks in the documentation look more distinct. #2163
- @VantaTree fixed a typo in the event docs in #2290
- @oddbookworm removed
pygame.cdromreferences from documentation and code in #2327 - @bilhox updated joystick docs to reflect changed mappings of the joycon controllers in #2258
- @rethanon added named colors to docs of the
drawandSurfacemodules in #2346 - @Starbuck5 removed
SDLversion information where it mentions versions that are below our supportedSDLversion in #2334
Unittests and typing related improvements
- @oddbookworm improved
Rect/FRecttyping to be more generic and accurate in #2297 - @ankith26 made some types more lax by using a custom
SequenceABC and also fixed some other related issues in #2292 - @ankith26 made freetype tests run again on CI and fixed minor test failures in #2383 and #2370
Code robustness and cleanups
- @zoldalma999 renamed
PyClockObjecttopgClockObject, remove rendered field, small cleanups intime.cin #2351 - @yunline fixed warnings in
video.cin #2343 and removed the oldWindowcython sources in #2294 - @Starbuck5 did a lot of code cleanups and maintenance work. #2272, #2318, #2278, #2305, #2301, #2328, #2316, #2347, #2356
New Contributors
- @Martinus2004 made their first contribution in #2219
- @devdanzin made their first contribution in #2321
- @JiffyRob made their first contribution in #2235
- @IrvKalb made their first contribution in #2326
- @AlexanderGroeger made their first contribution in #2274
Thanks all
Sincere thanks to everyone helping out! In addition to PR makers, as always we are thankful to the community at large and this includes issue reporters, PR reviewers, tutorial makers, admins/mods/helpers on various online forums, people who make helper libraries, and last but certainly not least, all our users including you: the person reading these notes!
If we've made a mistake in these notes, please get in touch with us to get a correction made.
Cya, have fun using pygame-ce!
Full Changelog: 2.3.0...2.3.1