2.5.1
โ๏ธ๐๐๏ธ๐๐๐๐๐๏ธ๐นโ๏ธ๐๐๏ธ๐
pip uninstall pygame
(if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
โ๏ธ๐๐๏ธ๐๐๐๐๐๏ธ๐นโ๏ธ๐๐๏ธ๐
We are pleased to do yet another release of pygame-ce, and this has been possible due to the efforts of over 20 code contributors. Together, we have made 193 commits across 139 files via 80 pull requests in the last 2 months since the previous release!
Now, onto the highlights!
Highlights
-
Added Python 3.13 (just standard 3.13, no free threading yet) and PyPy for apple silicon support.
-
We have a new logo!
- We haven't run out of optimization ideas yet ๐ , we've managed to cram a few more in this release.
New API
- There is now a default destination position
(0, 0)
forSurface.blit
, thanks to @damusss in #2936. - @itzpr3d4t0r added a new function
Surface.premul_alpha_ip
to premultiply alpha faster by operating in place instead of needing to allocate a new Surface. @Matiiss also helped with documentation. See #2899, #2972, and #2980.
Bugfixes
- @Matiiss fixed passing
parent_window=None
todisplay.message_box
in #2723. - @itzpr3d4t0r fixed an issue
transform.hsl
not working on certain pixel formats in #2948. - @oddbookworm fixed a
Surface.fill
where rects with negative positions would slide to(0, 0)
and then fill, instead of only filling part of theRect
. See #2939 for details. - @ankith26 fixed using
SCALED
after not usingSCALED
indisplay
in #2925. - @damusss fixed using OpenGL with a resizable
pygame.Window
, see #2915.
General Enhancements
- @MyreMylar added a SIMD printout (SSE2, AVX2 & NEON) to
pygame.print_debug_info()
in #2897. This will help us debug any SIMD-backend specific bugs submitted by users. - @damusss added support for
radius = 0
circles to the experimentalgeometry
module, see #2913. - @zoldalma999 added new
"ABGR"
format support toimage.frombytes
andimage.tobytes
in #2951. - @zoldalma999 made the experimental
Window
class subclassable in #2950. - @ankith26 added support for iterables in
display.update
, see #2987. - @Starbuck5 and @ankith26 added Python 3.13 support in #2994 and #3030.
Performance Enhancements
- @itzpr3d4t0r continued his quest to optimize all the things, merging improvements to
PixelArray.make_surface
,transform.scale2x
,Surface.fblits
(a fix for a performance regression),mask.from_surface
and(F)Rect
methods. See #2953, #2859, #2978, #2895, and #2908 for more details. - @mzivic7 got a 5-6% boost out of
draw.aacircle
(new in pygame-ce 2.5.0) in #3012. - @Starbuck5 boosted the performance of some
draw
operations on 24-bit surfaces, with a 20% improvement on single-pixel line drawing, see #3021.
Deprecations and Removals
No new deprecations this release, but-
- @ankith26 added deprecation warnings to some already-deprecated API (
freetype.was_init
,scrap.lost
) in #3001.
Docs and Type Hints
- @Mega-JC created a new logo and added it to the docs (in collaboration with @kadir014 on the design), in #2965. This is great for us to express our own identity as a project.
- @REX2626, @whangho, @Mic-lab, and @damusss made grammar and wording improvements to docs content. See #2907, #2919, #2911, #3004, and #2901.
- @damusss made it so deprecated functions are marked with the deprecated decorator in #2984. This allows editors to show users that a function is deprecated very neatly. They also made some smaller enhancements to the type stubs in #2918 and #2926.
- @ankith26 modernized the stubs to use python-3.8-isms in #2995
- @MrF1ow added a Contribution Section to README to help out new contributors in #2910.
- @MyreMylar added license identifier to README in #2890.
- @oddbookworm changed dark theme slightly to make code more readable in some cases in #2960.
Examples and Unit Tests
- @bilhox made some general example changes and enhancements in #2581.
- @ankith26 and @MyreMylar enhanced our unit tests and ensured sure they keep passing in #3031, #3017, #2934, #2885, and #2966.
Code Quality and General Maintenance
- @Notenlish got rid of unneeded
docscomments.js
usage in docs in #2959. - @ankith26 added support for macOS arm64 PyPy in our releases in #2945. He also improved our buildconfig/CI by making it more robust and secure in #2971, #2977, #3015, #2941, and #3040.
- @Starbuck5 helped keep our codebase modern and tidy in #2922, #2940, #2928, #3014, #2973, #2974, and #3020.
- @oddbookworm made some ease-of-use changes to doc generation in #2942 and #2989.
- @zoldalma999 updated the codebase to use the
SDL_TTF_VERSION_ATLEAST
macro in #3003. - @ankith26 and @zoldalma999 made some changes to better support development "editable" builds in #2996 and #2952.
- @Matiiss and @oddbookworm ensured our SDL dependency is kept updated in #2949, #2969, and #3034.
- @dependabot kept all our CI dependencies updated in #2906, #2932, #2931, #2930, #2955, #2963, #2964, #2983, #2982, #3013, #3025, and #3024.
- @Starbuck5 and @ankith26 worked on making intermediate dev releases possible in #2905, #3038, and #3039.
New Contributors
- @REX2626 made their first contribution in #2907.
- @MrF1ow made their first contribution in #2910.
- @whangho made their first contribution in #2919.
- @Mic-lab made their first contribution in #3004.
Thanks all
A heartfelt thank you to everyone involved! This includes not just code contributors, but also the wider community - issue reporters, PR reviewers, tutorial creators, helpers on various media platforms, developers of supporting libraries, and most importantly - all our users (including you, the reader of these notes)!
If you spot any errors in these notes, please let us know so we can correct them.
Take care and happy pygaming!
Full Changelog: 2.5.0...2.5.1