Releases: pygame-community/pygame-ce
2.5.6
🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙
pip uninstall pygame # (if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙
Welcome to pygame-ce 2.5.6, our latest and greatest release. This release is the first to support Python 3.14 and PyPy 3.11 at launch, although wheels for both were retroactively added to the last release months ago. Additionally, PyPy 3.9 and PyPy 3.10 support was dropped, as they are end of life. This will be the last release with support for Python 3.9, which is fast approaching its own end of life date. The bundled SDL version was updated from 2.32.6 to 2.32.10.
This release was made possible by the work of 27 contributors who made 429 commits spanning across 106 PRs. Overall, 10,226 line additions and 5,343 line deletions were made across 226 files. Amazing! As always, we are grateful to everyone who made this release happen - from contributors, to people reporting issues, to PR reviewers. A big thanks also to those who helped the pygame-ce community whether that be making tutorials, helping people on forums, sharing cool things made with pygame-ce, or just talking about it online with other people. And thank you for reading the release notes and using pygame-ce! Let us know if we made any mistakes in these release notes so that we can correct them at the earliest.
Now, onto the release notes!
New API
- @Matiiss added the
areakwarg tomask.to_surfacein #2670. @ankith26 followed up with a minor docs fix for it in #3484. Theareakwarg controls what portion of the mask instance is drawn to the surface. - @AntonisDevStuff added the
Color.from_hexconstructor in #3456. - @oddbookworm added
set_ledforJoystickandControllerobjects in #3507. @aatle followed up with stubs improvements for it in #3524. This can be used to set or clear the colors of LEDs on joysticks and controllers. - @DickerDackel added
Renderer.coordinates_to_windowandRenderer.coordinates_from_windowto map renderer (logical) coordinates to window (pixel) coordinates and vice-versa in #3519. - @Matiiss added
Color.__bytes__to support usages likebytes(Color(...))in #3547. - @XFajk implemented
Line.projectin #3402. This gives an easy way to project a point onto a line with thegeometryAPI. - @oddbookworm implemented
transform.pixelateto support surface pixelation in #2354. - @robertpfeiffer added
draw.flood_fillin #2840. This works like the paint bucket tool found in tools like GIMP and ASEprite; now you can apply it directly to pygame surfaces! - @bilhox implemented
(F)Rect.relcenterin #3089 to get or set the center coordinates relative to the topleft coordinates. - @oddbookworm added
Sound.copy(andSound.__copy__forcopy.copysupport) in #3556. With this one can easily make copies ofSoundinstances. - @mzivic7 added and @ankith26 improved the
widthargument ofdraw.aalinein #3191 and #3510 respectively. Yes, this means that now you can draw thick lines that also look smooth with thedrawmodule, how cool!
Enhancements
- New contributor @cherez added weak reference support to
Texturein #3590 and tofreetype.Fontin #3596. - @pmp-p added Python 3.13 support to our emscripten builds in #3496. @ankith26 followed up with adding emscripten (pygbag + pyodide) support in the meson buildconfig in #3588 (with much appreciated help from @pmp-p and pyodide maintainer @ryanking13). As a result of these changes, we are back to supporting pyscript/pyodide after a brief period without support.
- @zoldalma999 moved mouse and key docs to stubs in #3441.
- @ankith26 fixed window event and key repeat handling in
sdl2-compatin #3470. - @oddbookworm added freethreaded build status indicators to prompts in #3554.
Bugfixes
- @MyreMylar fixed unusual pitch handling in
Surface.premul_alphain #2882. - @ankith26 fixed ASAN issues in
Surface.scrollin #3497. He also fixed ASCII scrap on mac/linux platforms and improved docs/tests in #3473.
Performance
- @aatle contributed lazy loading of
surfarrayandsndarray, to avoid eager loading of NumPy. In testing, this reduced the import time of pygame-ce by half, from 200 ms to 100 ms. See #3249. - @Starbuck5 optimized
Vector- number math by avoiding redundant checks in #3454. Benchmarks show 5% improvement. - @Starbuck5 optimized
Vectorcreation by up to 30% by avoiding redundant checks in #3458. The optimization makes the most difference when passing in(x, y)or(x, y, z)as a tuple instead of as separate arguments. - @ankith26 optimized
(F)Rect.inflate(_ip)to use theFASTCALLcalling convention, leading to a 25-30% improvement in #3518.
Docs and Types
- New contributors @wade-cheng, @tomatophu, @f4ni, @zepredos all made grammar fixes or typo fixes in the docs, in #3498, #3522, #3568, and #3566.
- New contributor @nachomaiz and @aatle improved type hints sprites in #3488 and #3525 respectively.
- @AntonisDevStuff and new contributor @Guedxx added README translations for Greek and Brazilian Portuguese respectively, in #3503 and #3582.
- @damusss and @Starbuck5 did a few cleanups in #3603, #3490, and #3607.
- @DickerDackel improved the docs for
Renderer.logical_sizein #3520. - @ankith26 improved the docs for
math.lerpin #3523. - @ankith26 removed usage of deprecated
ByteStringtype from the stubs, updated stubs to pass mypy stubcheck with latest mypy version, in #3600 and #3602.
SDL3 Porting
We've been working on SDL3 support for quite a while now, and have now largely moved from "let's get this compiling" to "let's get this actually working," which is satisfying. One large remaining blocker is audio support, as SDL3_mixer is very different from SDL2_mixer.
- @Starbuck5 got the Surface and freetype modules compiling on SDL3 in #3435 and #3574.
- @ankith26 got the display module compiling on SDL3 in #3428.
- @MightyJosip fixed SDL-init functions runtime behavior in #3509.
- @ankith26 and @Starbuck5 did lots of runtime fixes across the codebase in #3515, #3550, #3544, #3549, #3580, #3579, and #3573.
Maintenance
-
@MightyJosip refactored alphablit code to improve it in #3404 and ported
Textureto C code in #3330. -
@aatle rewrote sprite collision functions to improve code quality in #3209.
-
@AntoineMamou improved rect tests by using literal values in #3190.
-
@zoldalma999 added stubs as dependencies to doc pages in #3534.
-
- Added PyPy 3.11 support in #3527.
- Refactored
base.ccode and introduced base header in #3486. - Updated Python versions in
run-ubuntu-checksworkflow, and fixed faulty refcounting in rect clipline in #3548. - Added a Coderabbit configuration file in #3564.
- Pinned astroid version below 4.0.0 to fix docs in #3598.
-
- Added conditional skips to platform specific tests and did other test improvements in #3476, #3471, #3575, #3474, and #3570.
- Improved CI structuring and skip logic in #3483 and #3489.
- Applied some minor bug fixes and enhancements to various modules (display, window, image, pixelarray, math) in #3591 and #3487.
-
@ankith26 and @damusss enhanced our meson buildconfig and developer tooling (
dev.py) in #3500, #3493, #3495, and #3529. -
@Starbuck5 and @ankith26 kept SDL and other build dependencies updated in #3481, #3545, #3586, and #3443. They also managed pygame-ce releases in #3608, #3479, and #3619.
-
@dependabot kept our dependencies updated in #3608, #3599, #3594, #3593, #3584, #3583, #3569, #3561, #3559, #3558, #3557, #3552, #3551, #3540, #3526, #3505, and #3504.
New Contributors
- @wade-cheng made their first contribution in #3498.
- @nachomaiz made their first contribution in #3488.
- @tomatophu made their first contribution in #3522.
- @zepredos made their first contribution in #3566.
- @f4ni made their first contribution in #3568.
- @Guedxx made their first contribution in #3582.
- @cherez made their first contribution in #3590.
Full Changelog: 2.5.5...2.5.6
2.5.6.dev2
This is a pre-release for 2.5.6, which should be out next weekend if everything goes to plan. GitHub autogenerated release notes can be found below, for the full release we will clean these up to be more human readable.
What's Changed
- Start 2.5.5 by @Starbuck5 in #3437
- new angle and angle_rad property in vector2 by @AntoineMamou in #3222
- Use float for
load_animationdelay, improve docs by @damusss in #3444 - Update pythoncapi_compat.h by @Starbuck5 in #3445
- Elaborate on Vector conversion to tuples/lists by @DickerDackel in #3447
- add doc for vec conversion by @AntonisDevStuff in #3446
- Port over some SDL functions to SDL3 by @Starbuck5 in #3434
- Port over more SDL functions to SDL3 by @Starbuck5 in #3451
- Surface multiphase init by @oddbookworm in #3354
- Update pre-commit config by @oddbookworm in #3452
- Bump docker/build-push-action from 6.17.0 to 6.18.0 by @dependabot[bot] in #3459
- Simplify math module init by @Starbuck5 in #3453
- Fix palettes in
newsurf_fromsurfby @oddbookworm in #3464 - Fix dst palette in modify_hsl by @ankith26 in #3465
- Transform palette tests by @Starbuck5 in #3466
- Re exclude korean tutorials in release wheels and run important CI everytime by @ankith26 in #3478
- Start 2.5.6 by @Starbuck5 in #3479
- Remove redundant tp_getattro sets by @Starbuck5 in #3482
- Update CIBW setting to prevent warning by @Starbuck5 in #3438
- Optimize vector-number math by avoiding RealNumber_Check by @Starbuck5 in #3454
- Rewrite sprite collision functions by @aatle in #3209
- better rect tests using literal values by @AntoineMamou in #3190
- Added
areakwarg tomask.to_surfaceby @Matiiss in #2670 - Add versionchanged note to Mask.to_surface by @ankith26 in #3484
- Optimize vector creation/update using pg_VectorCoordsFromObj by @Starbuck5 in #3458
- Combine all "checks" CI into a single workflow by @ankith26 in #3483
- Add conditional skip to testSavePaletteAsPNG8 by @ankith26 in #3476
- Add skip to set_gamma tests by @ankith26 in #3471
- Fix cppcheck skip logic on CI by @ankith26 in #3489
- Update to SDL 2.32.8 by @Starbuck5 in #3481
- add Color.from_hex by @AntonisDevStuff in #3456
- Add missing/Fix versionadded tags in display, mixer and surface by @damusss in #3490
- New draw.aaline width algorithm by @mzivic7 in #3191
- Add sanitize flag to dev.py, fix UBSAN issues and run UBSAN check on CI by @ankith26 in #3493
- Fix event docs grammar by @wade-cheng in #3498
- Typing enhancements for the
pygame.spritemodule by @nachomaiz in #3488 - Move mouse and key docs to stubs by @zoldalma999 in #3441
- Use PyModule_AddType by @Starbuck5 in #3499
- Bump actions/attest-build-provenance from 2.3.0 to 2.4.0 by @dependabot[bot] in #3505
- Add stripped option to dev.py by @ankith26 in #3495
- Remove unused code in mask/alphablit by @Starbuck5 in #3508
- Wasm/py313 by @pmp-p in #3496
- Fix init functions with SDL3 build by @MightyJosip in #3509
- Refactor alphablit by @MightyJosip in #3404
- Pull windows deps on update in meson buildconfig by @ankith26 in #3500
- Simplify key code by @Starbuck5 in #3514
- Bump pypa/cibuildwheel from 2.23.2 to 3.0.0 by @dependabot[bot] in #3504
- Added set_led method for Joystick and Controller objects by @oddbookworm in #3507
- fixed incredibly small grammar error by @tomatophu in #3522
- Fix local stubtest for
set_led()by @aatle in #3524 - docs: logical_size might be (0, 0) by @DickerDackel in #3520
- Port more SDL functions (SDL3) by @Starbuck5 in #3515
- Bump pypa/cibuildwheel from 3.0.0 to 3.0.1 by @dependabot[bot] in #3526
- Fix math.lerp docs, improve code by @ankith26 in #3523
(F)Rect.inflate(_ip)FASTCALL by @ankith26 in #3518- Add pypy 3.11 support by @oddbookworm in #3527
- Add stubs as dependencies to doc pages by @zoldalma999 in #3534
- Fix refcount tests for Python 3.14 by @Starbuck5 in #3538
- Bump pypa/cibuildwheel from 3.0.1 to 3.1.1 and do the other things by @dependabot[bot] in #3540
- Update SDL3 from 3.2.10 to 3.2.18 by @Starbuck5 in #3545
- Port Texture to C code by @MightyJosip in #3330
- Surface module compiling in SDL3 by @Starbuck5 in #3435
- Base header by @oddbookworm in #3486
- Bump pypa/cibuildwheel from 3.1.1 to 3.1.3 by @dependabot[bot] in #3552
- Bump docker/metadata-action from 5.7.0 to 5.8.0 by @dependabot[bot] in #3551
- Update python versions in
run-ubuntu-checksworkflow, and fix faulty refcounting in rect clipline by @oddbookworm in #3548 - Bump actions/download-artifact from 4 to 5 by @dependabot[bot] in #3557
- Bump actions/cache from 4.2.3 to 4.2.4 by @dependabot[bot] in #3558
- Bump docker/login-action from 3.4.0 to 3.5.0 by @dependabot[bot] in #3559
- Add Renderer.coordinates_to_window and Renderer.coordinates_from_window by @DickerDackel in #3519
- Fix rwops and some image stuff on SDL3 by @ankith26 in #3550
- Fix some Surface and Window tests on SDL3 by @Starbuck5 in #3544
- Fix windowevent and key repeat in sdl2-compat by @ankith26 in #3470
- Bump build dependencies by @ankith26 in #3443
- Port
display.cto SDL3 by @ankith26 in #3428 - Fix font test segfault on SDL3 by @Starbuck5 in #3549
- Fix ASAN issues in surface.scroll by @ankith26 in #3497
- Add
Color.__bytes__by @Matiiss in #3547 - Bump actions/checkout from 4.2.2 to 5.0.0 by @dependabot[bot] in #3561
- documentataion -> documentation typo fix by @zepredos in #3566
- fix: typo in sndarray docs calling it surfarray #3567 by @f4ni in #3568
- Fix aaline width and blend conflict by @ankith26 in #3510
- Fix and improve
pygame.Windowtests by @ankith26 in #3474 - Support prompts indicate freethreaded build status by @oddbookworm in #3554
dev.py: alias build with install and add argument to only test specific modules with `all...
2.5.5
Hello again, this release is out a lot quicker than usual because we're responding to two reported regressions in 2.5.4. Thank you to @SamuelWyck and @davidfokkema for their reports. This release fixes both of those regressions and contains the other things we've worked on in the last few weeks.
EDIT 2025-07-28: New wheels have been uploaded to add support for Python 3.14 and Pypy 3.11
What's Changed
Bugfixes
- @oddbookworm found and fixed a regression where
pygame.transformwould fail to copy palettes when transforming palettized surfaces, making the outputs unusable, in #3464. @ankith26 made a related fix and @Starbuck5 added additional tests for this in #3465 and #3466 respectively. - @ankith26 fixed a regression where pygame-ce apps failed MacOS code notarization in Briefcase, due to the inclusion of non ascii (Korean) filenames in our tutorials. #3478.
New API
- @AntoineMamou added new
angleandangle_radproperties toVector2in #3222.
Docs
- @DickerDackel and @AntonisDevStuff added extra detail to the docs about how Vectors can be converted to other data types in #3447 and #3446.
Maintenance
- @Starbuck5 worked on SDL3 functionality in #3434 and #3451, updated pythoncapi_compat.h in #3445, and simplified math module init in #3453.
- @oddbookworm moved the surface module to multiphase init and updated our pre-commit config in #3354 and #3452.
New Contributors
- @AntoineMamou made their first contribution in #3222
- @DickerDackel made their first contribution in #3447
- @AntonisDevStuff made their first contribution in #3446
Full Changelog: 2.5.4...2.5.5
2.5.4
🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙
pip uninstall pygame (if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙
Hey all, we've got another release for you! This one was made by 13 contributors changing over 403 files in 74 PRs and 200 commits. A big theme of this release is porting our codebase to SDL3 (along with some other general maintenance stuff), but we also have some more immediately applicable enhancements. Here's what we did in the last 3 months!
What's Changed
New API
- @ankith26 and @damusss added
image.load_animationto load an animated file (like GIF or WEBP) as a list of surfaces in #3372 and #3444. - @MarcellPerger1 added support for passing
special_flagstoGroup.draw()in #3321 - @damusss added
Color.hexin #3379 - @itzpr3d4t0r and @aatle added
Font.set_linesize()to control the spacing between lines of text in #3282
Enhancements
- @damusss and @Starbuck5 reduced the sizes of our wheels by converting a lot of assets to webp in #3362, #3374 and #3358
- @zoldalma999 moved Window, display, system, Surface, draw, transform and image docs to their stub file so that editors can pick them up in #3296 and #3389
- @oddbookworm updated print_debug_info to show whether GIL is enabled in #3355
- @aatle removed angled brackets from Circle and Line
__repr__s in #3375 - @mv805 improved the warning message when a SysFont is not found and clarified the docs related to it in #3373
- @damusss removed an unnecessary warning when a zero sized resizable window is requested in display.set_mode in #3386
Bugfixes
- @oddbookworm added tolerance for Color.lerp in #3347
- @ankith26 added full unicode support to
Font.metricsin #3328 - @ankith26 fixed the unicode property of keydown events when keyup events are blocked in #3357
- @Matiiss fixed Vector initialization from numpy arrays in #3408
Docs and Types
- @aatle made a bunch of improvements and fixes to our stubs in #3335
- @damusss added tutorials to the offline docs that come with your pygame-ce installation in #3380
- @COUR4G3 fixed the depth argument missing in the type hints of
video.Texture.__init__in #3360 - @ankith26 fixed
__class_getitem__to be positional-only in #3410 - @XORandom finished the russian translation of our readme in #3424
- @aatle fixed stubs for buffer types in #3398
SDL3 Porting
- @Starbuck5 worked more on porting surface pixel formats to work with SDL3 in #3310, #3314, #3315, #3309, #3338, #3337, #3343, #3344 and #3371
- @ankith26 ported the font, scrap, camera, joystick and transform modules in #3326, #3340, #3341, #3208 and #3351
Maintenance
- @oddbookworm @aatle and @ankith26 kept our CI running in #3363, #3395 and #3334
- @Starbuck5 and @Matiiss kept our dependencies up-to-date (most importantly SDL was updated from 2.30.12 to 2.32.6, SDL_Image from 2.8.4 to 2.8.8 and SDL_Mixer from 2.8.0 to 2.8.1) in #3332, #3365, #3399, #3401 and #3425
- @oddbookworm fixed our debug python builds in #3345
- @ankith26 replaced tabs with spaces in our docs RST files in #3361
- @MightyJosip
- @oddbookworm added braces to one-line statements in #3364
- @Matiiss used
ruffto sort imports in #3237 - @ankith26 updated our pre-commit config in #3400
New Contributors
- @COUR4G3 made their first contribution in #3360
- @mv805 made their first contribution in #3373
- @MarcellPerger1 made their first contribution in #3321
Thank you all!
Thank you to everyone who helped make this release happen from contributors, to people reporting issues, to PR reviewers! A big thanks also to those who helped the pygame community whether that be making tutorials, helping people on forums, sharing cool things made with pygame or just talking about it online with other people! And thank you for reading the release notes and using pygame-ce!
Let us know if we made any mistakes in these release notes so that we can correct them.
Take care, and happy pygaming!
Full Changelog: 2.5.3...2.5.4
2.5.4.dev2
This is a preview release for 2.5.4, which should be out next weekend, if everything goes to plan. Included are the GitHub autogenerated release notes-- for the full release we will clean these up to be more human readable.
What's Changed
- 2.5.3.dev2 by @Starbuck5 in #3323
- Start 2.5.4 by @Starbuck5 in #3324
- Move Surface towards compiling w/ SDL3 by @Starbuck5 in #3310
- Port font to SDL3(_ttf) by @ankith26 in #3326
- Downgrade host image on debian multiarch by @ankith26 in #3334
- Update SDL to 2.32, mixer to 2.8.1 by @Starbuck5 in #3332
- Add interface for _sdl2.video classes by @MightyJosip in #3317
- Move transform towards compiling w/ SDL3 by @Starbuck5 in #3314
- Draw SDL3 by @Starbuck5 in #3315
- Pixelarray SDL3 by @Starbuck5 in #3309
- General improvements and fixes to stubs by @aatle in #3335
- Prep alphablit.c for SDL3 by @Starbuck5 in #3338
- Prep surface_fill.c for SDL3 by @Starbuck5 in #3337
- Port scap.c to SDL3 by @ankith26 in #3340
- Port camera to SDL3 by @ankith26 in #3341
- GET_PIXELVALS SDL3 compat by @Starbuck5 in #3343
- A few surface.c SDL3 fixes by @Starbuck5 in #3344
- Bump docker/build-push-action from 6.13.0 to 6.14.0 by @dependabot in #3348
- Bump actions/cache from 4.2.0 to 4.2.1 by @dependabot in #3349
- Added tolerance for Color.lerp by @oddbookworm in #3347
- Fix build with debug python by @oddbookworm in #3345
- Add full unicode support to
Font.metricsby @ankith26 in #3328 - Move Window, display and system docs to stubs by @zoldalma999 in #3296
- Use webp to minify logo images by @Starbuck5 in #3358
- Fixed stub for pygame._sdl2.video.Texture.init by @COUR4G3 in #3360
- Updated print_debug_info to output the status of the GIL by @oddbookworm in #3355
- Use spaces instead of tabs in docs rst files by @ankith26 in #3361
- Port joystick to SDL3 by @ankith26 in #3208
- Fix failing CI by @oddbookworm in #3363
- No more one-line statements without braces by @oddbookworm in #3364
- Bump SDL2 to 2.32.2, SDL3 to 3.2.6, SDL3_ttf to 3.2.0 by @Matiiss in #3365
- Bump actions/cache from 4.2.1 to 4.2.2 by @dependabot in #3366
- Bump docker/metadata-action from 5.6.1 to 5.7.0 by @dependabot in #3367
- Bump docker/build-push-action from 6.14.0 to 6.15.0 by @dependabot in #3368
- Bump pypa/cibuildwheel from 2.22.0 to 2.23.0 by @dependabot in #3369
- Fix unicode property when keyup blocked by @ankith26 in #3357
- Convert some
data/exampleimages to webp by @damusss in #3362 - Bump robinraju/release-downloader from 1.11 to 1.12 by @dependabot in #3376
- Bump actions/attest-build-provenance from 2.2.0 to 2.2.3 by @dependabot in #3377
- Remove angled brackets from Circle and Line reprs by @aatle in #3375
- Add
image.load_animationby @ankith26 in #3372 - Improve SysFont documentation and add font verification warning. Closes #2643 by @mv805 in #3373
- Bump docker/login-action from 3.3.0 to 3.4.0 by @dependabot in #3388
- Bump pypa/cibuildwheel from 2.23.0 to 2.23.1 by @dependabot in #3387
- Include tutorials docs in release build (fixes #3353) by @damusss in #3380
- Use
ruffto also sort imports by @Matiiss in #3237 - Remove warning with zero size & RESIZABLE in display.set_mode by @damusss in #3386
- Bump actions/cache from 4.2.2 to 4.2.3 by @dependabot in #3391
- Convert most tutorial assets to WEBP by @damusss in #3374
- Bump pypa/cibuildwheel from 2.23.1 to 2.23.2 by @dependabot in #3394
- Fix CI by avoiding bugged version of
pyproject-metadatapackage by @aatle in #3395 - Refactor bufferproxy by @MightyJosip in #3383
- Add
special_flagstoGroup.draw()by @MarcellPerger1 in #3321 - Update dependencies by @Starbuck5 in #3399
- Run
pre-commit autoupdateby @ankith26 in #3400 - Bump uraimo/run-on-arch-action from 3.0.0 to 3.0.1 by @dependabot in #3409
- Fix
pygame.Vector{2,3}initialization from numpy arrays by @Matiiss in #3408 - Update to SDL2_image 2.8.8 by @Starbuck5 in #3401
- Fix
__class_getitem__to be positional-only by @ankith26 in #3410 - Add
Color.hexby @damusss in #3379 - Bump docker/build-push-action from 6.15.0 to 6.16.0 by @dependabot in #3415
- Bump astral-sh/setup-uv from 5 to 6 by @dependabot in #3416
- Get transform compiling on SDL3 by @ankith26 in #3351
- Remove controller.c from gitignore by @MightyJosip in #3418
- Move Surface, draw, transform and image docs to stubs by @zoldalma999 in #3389
- Bump actions/attest-build-provenance from 2.2.3 to 2.3.0 by @dependabot in #3422
- Updating the translation to 100% by @XORandom in #3424
- Update SDL2 to 2.32.6 by @Starbuck5 in #3425
- Port Renderer to C code by @MightyJosip in #3327
- Restructure and port surface init and convert to SDL3 by @Starbuck5 in #3371
- Add
Font.set_linesize()(TTF 2.24.0 feature) by @itzpr3d4t0r in #3282 - Replace AddObject() with AddObjectRef() by @MightyJosip in #3406
- Bump docker/build-push-action from 6.16.0 to 6.17.0 by @dependabot in #3433
- Fix stubs for buffer types by @aatle in #3398
New Contributors
- @COUR4G3 made their first contribution in #3360
- @mv805 made their first contribution in #3373
- @MarcellPerger1 made their first contribution in #3321
Full Changelog: 2.5.3.dev2...2.5.4.dev2
2.5.3
🐉🛡️🔥🥇📗🐉🛡️🔥🥇📗🐉🛡️🔥🥇📗🐉🛡️🔥🥇📗🐉🛡️🔥🥇📗
pip uninstall pygame (if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
🐉🛡️🔥🥇📗🐉🛡️🔥🥇📗🐉🛡️🔥🥇📗🐉🛡️🔥🥇📗🐉🛡️🔥🥇📗
Hello all! We are pleased to announce the first pygame-ce release of 2025.
Since last release, our underlying library SDL (Simple DirectMedia Layer) has released SDL3, with tons of shiny new features and lots of breaking changes. Our goal is to get our existing API fully working on top of SDL3, then focus on a pygame-ce 3.0 release with SDL3 + cool SDL3 features + a few minor backwards compatibility tweaks-- nothing crazy but more than we would feel comfortable changing in a release normally. See #2760 for a discussion of potential pygame-ce 3.0 API changes. To that end, significant effort this release went to getting things more ready for SDL3, but we still have a ways to go. And this plan may change, just wanted to share what we're thinking.
Before we get into the meat of the changes,
- This release drops support for Python 3.8, as it is end of life. (Contributed by @ankith26 in #3143)
- This release raises the minimum SDL2 version to 2.0.14 (Contributed by @ankith26 in #3213)
Enhancements
- @gresm added an option for
pygame.Windows to not show up in the taskbar, for "utility windows".pygame.Window(utility=True). Added in #3226. - @damusss Added "erase" and "repeat" options for
Surface.scrollin #2855. - @damusss Expanded color type support (not just tuples, but also color strings like other APIs accept) for mask.from_threshold. He also fixed the type stubs for PixelArray methods to correctly indicate they don't have the expanded color type support. See #3164.
- @MrRedstone058 added
Linemethods andlengthattribute to the experimental geometry module in #3179.
Bugfixes
- @Matiiss Added runtime support for type hinting sprite Groups like other Python containers. E.g.
group: pygame.sprite.Group[MySpriteClass] = pygame.sprite.Group()tells type hinters that this is a sprite group of MySpriteClass instances. Contributed in #3053. - @ankith26 Fixed a bug in saving Surfaces as TGA images, where they could overrun allocated memory and crash, in #3169.
- @yunline Added the missing BLENDMODE_MUL (relevant to the experimental _sdl2.video module) in #3258.
- @ankith26, @MyreMylar, and @zoldalma999 all worked together (we love to see it) to straighten out event.peek behavior between implementation, type hints, and documentation, in #3283. Classifying this as a bugfix because the previous behavior was a mistake and has been fixed.
Peformance improvements
- @Starbuck5 removed unnecessary calls to PyNumber_Index, PyLong_Check-- speeding up
x = rect[0]andrect[0] = x7-9% percent-- in #3242. - @Starbuck5 optimized an internal function that converts pairs of Python numbers into C integers or floats. This function is used all over the place, but is only significant for functions that were pretty quick anyways. Rect.move_ip and Rect.collidepoint were tested to be 19% and 17% faster, respectively. Contributed in #3214.
- @ankith26 and @damusss improved the speed of color parsing for color names (e.g
"green") and string hex values (e.g."#FF00FF") by more than 2x, by adding a fast path before stranger arguments are considered. Contributed in #3297 and #3302.
Deprecations
- @ankith26 deprecated
Window'sforeignkwarg andWindow.focus'sinput_onlykwarg in #3234 - @Starbuck5 marked old type aliases as deprecated (SurfaceType, RectType --- just use Surface and Rect!) #3288
Docs and Types
- @zoldalma999 began implementation of a new documentation system where we generate the docs from a unified representation in the type hints. This will allow editors to see and display the documentation of each function as the user uses it. Currently this is only implemented for the time and cursors modules, it is planned to roll out to other modules in future releases. See #3188.
- @aatle improved the type hints, especially around Color, Rect, display, and geometry. See #3172, #3183, #3248, and #3264.
- @gavinmorrow fixed a grammar mistake in the Window docs in #3194.
- @Starbuck5 corrected some older docs content and some recent invalid formatting that got through, in #3204, #3205, #3266, #3272, and #3316.
- @ankith26 improved the type hints around the experimental geometry and _sdl2 modules, as well as the freetype module, in #3212, #3300, #3301.
- @damusss expanded the type hints for
pygame.Windowinit keyword arguments to make them easier to discover in editors/IDEs, see #3295. - @XORandom and @noahcse worked on Russian and Traditional Chinese readmes, respectively, in #3138 and #3113.
- @GabrieleLS added a note to the mixer documentation about different meanings of the word "channel" in #3228.
- @JovialKnoll did a grammar fix and removed incorrect information from the Surface docs in #3231 and #3263
- @yunline fixed a formatting mistake in sndarray.rst and cursors.rst in #3257
- @Matiiss documented how volume is stored internally for
(get|set)_volumefunctions/methods (129-value scale) in #3091
Tests and Examples
- @damusss Added
__name__ == "__main__"guards to the examples, so they can't be accidentally run on import. People occasionally import them on accident, like in this case. Contributed in #3181. - @Akaracy added a test for draw.arc in #3230.
- @MyreMylar renamed TestTags so it doesn't get confused for a test in #3276.
- @MyreMylar fixed most of the Deprecation Warnings in surfarray_test in #3274.
SDL 3 porting
- @Starbuck5 put in several PRs to getting modules compiling or get modules closer to compiling, focusing on modules failing because of SDL3's pixelformat changes. See #3166, #3171, #3278, #3294, #3308, #3307.
- @ankith26 put in a bunch of PRs as well, getting time, surflock, constants, event, imageext, window, key, and mouse all compiling for SDL3. See #3206, #3217, #3262, #3251, #3207.
Maintenance
- @ankith26 added a new
dev.pyfile to help pygame-ce devs run necessary commands and do editable builds very smoothly, as a spiritual successor tosetup.pywhich is seemingly being phased out in the Python packaging ecosystem. See #3128. - @ankith26 and @Starbuck5 kept us up to date with SDL2 (and SDL3 releases/prereleases for our experimental support). We've pulled in the new SDL 2.30.12, SDL_image 2.8.4, and SDL_ttf 2.24.0. Contributed in #3203, #3261, #3271, #3286, #3304, #3279, and #3322.
- @ankith26...
2.5.3.dev2
Hello! This is a preview release for 2.5.3, which should be out in a week or so. Included are the GitHub autogenerated release notes, for the full release we will clean these up to be more human readable.
What's Changed
- 2.5.2.dev2 by @Starbuck5 in #3173
- Start 2.5.3.dev1 by @Starbuck5 in #3174
- Fix TGA save bug, add test by @ankith26 in #3169
- Bump actions/checkout from 4.2.0 to 4.2.1 by @dependabot in #3175
- Bump actions/cache from 4.1.0 to 4.1.1 by @dependabot in #3176
- Minor fixes and changes to
geometry.pyistub file by @aatle in #3172 - Better meson error on windows when libraries versions are not correct by @bilhox in #3178
- Image module SDL3 support by @Starbuck5 in #3166
- Allow erasing pixels in pygame.Surface.scroll and add repeat functionality by @damusss in #2855
- Include the explicit type in
ColorLikeandRectLikeby @aatle in #3183 - Add main guard to examples (+ incredibly small fixes) by @damusss in #3181
- Bump uraimo/run-on-arch-action from 2.7.2 to 2.8.1 by @dependabot in #3200
- Bump actions/cache from 4.1.1 to 4.1.2 by @dependabot in #3198
- Fix latest SDL3 and MSYS2 fails by @ankith26 in #3201
- Bump actions/checkout from 4.2.1 to 4.2.2 by @dependabot in #3199
- Ignore new gcc version mask array bounds warning by @ankith26 in #3186
- Fix grammar and formatting in Window docs by @gavinmorrow in #3194
- Start getting base module ready for SDL3 by @Starbuck5 in #3171
- Bump SDL2 to 2.30.9 and SDL3 to 3.1.6 by @ankith26 in #3203
- Correct draw.aaline docs by @Starbuck5 in #3204
- Fix window docs by @Starbuck5 in #3205
- Add
dev.pyimplementing dev command shorthands by @ankith26 in #3128 - Port time, surflock and constants to SDL3 by @ankith26 in #3206
- Add Russian readme by @XORandom in #3138
- Raise minimum supported SDL2 to 2.0.14 by @ankith26 in #3213
- Bump actions/attest-build-provenance from 1.4.3 to 1.4.4 by @dependabot in #3220
- Use SequenceLike in geometry stubs by @ankith26 in #3212
- Port event.c to SDL3 by @ankith26 in #3217
- Allow all color types mask.from_threshold and fix typing for PixelArray methods by @damusss in #3164
- Batch and error check allocations by @Starbuck5 in #3224
- Update mixer documentation by @GabrieleLS in #3228
- fixing grammar by @JovialKnoll in #3231
- Fix SDL3 CI apt issues by @ankith26 in #3233
- Utility Window implementation. by @gresm in #3226
- Drop python 3.8 support by @ankith26 in #3143
- Bump docker/metadata-action from 5.5.1 to 5.6.1 by @dependabot in #3241
- Bump pypa/cibuildwheel from 2.21.3 to 2.22.0 by @dependabot in #3240
- Remove unnecessary calls to PyNumber_Index, PyLong_Checks by @Starbuck5 in #3242
- updated 'in' operator for sys.platform linux check by @sonotopes in #3246
- Draw arc test in draw_test.py by @Akaracy in #3230
- Bump build dependencies and use
dev.pyon msys2/multiarch CI by @ankith26 in #3211 - Added
Linemethods andlengthattribute by @MrRedstone058 in #3179 - Fix failing tests: change
Tuple[float, float]toPointingeometry.pyiby @aatle in #3248 - Bump docker/build-push-action from 6.9.0 to 6.10.0 by @dependabot in #3250
- Deprecate
Windowforeignkwarg andWindow.focusinput_onlykwarg by @ankith26 in #3234 - Add missing newline in sndarray.rst and cursors.rst by @yunline in #3257
- Bump actions/cache from 4.1.2 to 4.2.0 by @dependabot in #3259
- Bump actions/attest-build-provenance from 1.4.4 to 2.0.1 by @dependabot in #3260
- Add BLENDMODE_MUL to constants by @yunline in #3258
- this statement seems to be false, removing by @JovialKnoll in #3263
- Bump SDL2 to 2.30.10 by @ankith26 in #3261
- Optimize pg_Two(Ints/Floats)FromObj by @Starbuck5 in #3214
- Bump actions/attest-build-provenance from 2.0.1 to 2.1.0 by @dependabot in #3267
- Typo fixes by @Starbuck5 in #3266
- Correct
pygame.displaystubs by @aatle in #3264 - Docs updates (mainly to mixer) by @Starbuck5 in #3272
- Bump SDL2_image to 2.8.3 by @ankith26 in #3271
- Fix mypy to 1.13.0 to avoid all duplication by @MyreMylar in #3277
- Rename TestTags so it doesn't get confused for a test by @MyreMylar in #3276
- Fix most of the Deprecation Warnings in surfarray_test by @MyreMylar in #3274
- add and modified readme for Traditional Chinese. by @noahcse in #3113
- Port imageext.c to SDL3(_image) by @ankith26 in #3262
- Add runtime support for
pygame.sprite.AbstractGroupsubscripts by @Matiiss in #3053 - Generate reST/ref docs from python or stub files, move time and cursors docs by @zoldalma999 in #3188
- Document how volume is stored internally for
(get|set)_volumefunctions and methods by @Matiiss in #3091 - Bump SDL to 2.30.11 and SDL_ttf to 2.24.0 by @ankith26 in #3279
- Remove unnecessary lock in gfxdraw by @Starbuck5 in #3280
- event.peek return bool, minor doc/stub fixes by @ankith26 in #3283
- SDL3: restructure cliprect handling in draw.c by @Starbuck5 in #3278
- Bump SDL2_image and SDL3 prerelease by @Starbuck5 in #3286
- Bump docker/build-push-action from 6.10.0 to 6.11.0 by @dependabot in #3290
- Port key and mouse to SDL3 by @ankith26 in #3207
- Introduce PG_SURF_FORMATENUM macro (SDL3 compat) by @Starbuck5 in #3294
- Drop circleci, use gh actions for arm manylinux by @ankith26 in #3293
- Fix/improve _sdl2 stubs by @ankith26 in #3300
- Bump docker/build-push-action from 6.11.0 to 6.12.0 by @dependabot in #3299
- Expand init parameters for
Windowby @damusss in #3295 - Optimize correct colordict entries by @damusss in #3297
- Port window.c to SDL3 by @ankith26 in #3251
- Move get_rect helper to c_api by @MightyJosip in #3303
- Optimize for str hex color values by @ankith26 in #3302
- Bump SDL3 / SDL3_image prebuilts by @Starbuck5 in #3304
- Mask SDL3 by @Starbuck5 in #3307
- Freetype typing fixes, enhancements to dict/tuple...
2.5.2
☀️🎃👻🕸️🕷️🧛🧟♂️🧙♀️🧙♂️🕯️🪦🍬🍭🍫☠️⚰️🔮🧹🌕🐈⬛🦇🌌
pip uninstall pygame (if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
☀️🎃👻🕸️🕷️🧛🧟♂️🧙♀️🧙♂️🕯️🪦🍬🍭🍫☠️⚰️🔮🧹🌕🐈⬛🦇🌌
We're pumped to drop another pygame-ce release, thanks to the awesome efforts of 30+ contributors in this release! In the last couple of months, we've together made 286 commits, updated 281 files, and merged 85 pull requests.
Now, let's dive into what's new!
New and improved API
-
pygame.Windowhas left experimental status and now been declared public API (contributed by @Starbuck5 in #3170). @damusss further enhanced the API by adding theWindow.flashmethod andWindow.focusedproperty in #3054 and #3079 respectively. -
@damusss added a new module,
pygame.typing, in #3002 that exports commonly used type aliases for use in type hinting. -
The experimental
pygame.geometrymodule saw more API porting from its development repository in this release. A big thanks to allgeometryproject contributors: @andrewhong04, @Emc2356, @itzpr3d4t0r, @ScriptLineStudios, @avaxar, @Matiiss, @newpaxonian, @maqa41, @blankRiot96, @gresm- New contributor @MrRedstone058 added additional
Circleattributes in #3127 - @itzpr3d4t0r added the
Circle.intersectmethod and the base for theLineclass in #3071 and #3131 respectively. - @damusss added the
Circle.collidelist(all)method in #2880
- New contributor @MrRedstone058 added additional
-
@ScriptLineStudios added the
transform.solid_overlayfunction in #2304 making it easier to create a single color version of an alpha possessing surface. -
@damusss added the
desktopargument tomouse.get_posandmouse.get_pressedin #3105 so you can get the position of the mouse outside of the pygame window, where this is supported by the OS. -
@damusss added the
pygame.Soundalias to denotepygame.mixer.Soundin #3063. That should save a few precious characters of typing.
Bugfixes
-
@Starbuck5 fixed an OpenGL issue in
Windowinit in #3059 -
@oddbookworm fixed a break when the OS resizes the window in
set_modein #2992 -
@bilhox fixed segfault with antialiased draw functions with a depth different than 32bits in #3008
-
@pmp-p did some fixes for improved wasm support in #3137 and #3163
-
@MyreMylar fixed midi timer reset when quit in #3018
-
- Fixed aalines overlap issue in #2912
- Fixed missing pixels in
aalineswhen using integer coordinates in #3144
General Enhancements
- @oddbookworm improved
Vector{2,3}.__delattr__messaging when deletingx, y, {z}and removedVector4zombies in #3069, and @ankith26 applied some more related updates in #3087 - @bilhox made it so that too many arguments to
Color.from_{colorspace}style methods now raise errors in #3125 - @damusss added handling for all color types in
transform.thresholdin #3156
Performance Enhancements
-
@Starbuck5 updated more places in
rectcode to usePyObject_Vectorcallin #3048. The affected methods therefore see 15-22% improvements in speed.
Docs and Type Hints
-
New contributor @MrValdez added example on how
Windowbehaves withWINDOWCLOSEandQUITevents in #3115 -
New contributor @datapythonista clarified how
Rectand positions relate in the intro tutorial in #3111 -
@oddbookworm fixed a couple of versionadded tags that should have been versionaddedold in
displaydocs in #3046 -
@itzpr3d4t0r improved
geometrydocs in #3043 -
@Starbuck5 fixed
transform.average_colordocs and stubs to match implementation in #3076 -
@yunline updated the dependency section of zh-cn README in #3119
-
@zoldalma999 fix stubcheck typing error on windows in #3147
Examples and Unit Tests
-
New contributor @avpai-dinosaur fixed
test_inflate_ip__largerunit test in #3098
Code Quality and General Maintenance
-
New contributor @raspofabs migrated
pkgdatacode to importlib to resolve warning aboutpkg_resourcesin #3061 -
@zoldalma999 ported the controller module to C in #2056
-
@oddbookworm added code coverage CI in #2990
-
- Switched code to use
PyObject_CallOneArgwhere applicable in #3023 - Drop MSYS2 clang32 from our CI in #3116
- Fix whitespace and eof formatting with pre-commit in #3104
- Fix a compiler warning in debug mode in #3124
- Made sure our CI and build dependency versions are all up to date in #3123, #3100 and #3118
- Switched code to use
-
@ankith26 and @Starbuck5 continued on the work to get pygame-ce compiling with the latest SDL3 prerelease in #3141, #2975, #3145, #2933, #3146, and #3160
-
@oddbookworm and @Starbuck5 kept our SDL dependency updated in #3094 and #3168 respectively
-
@ankith26 and @Starbuck5 kept the dev release process running in #3042 and #3173 respectively
-
@dependabot kept our CI dependencies updated in #3065, #3095, #3051, #3050, #3081, #3103, https://github...
2.5.2.dev2
Pre release version of 2.5.2 for testing, we appreciate everyone who tests out our dev releases!
Release highlights
- Promoted pygame.Window to public API. Allows use of multiple windows at once, new window operations.
- Various rect optimizations
- Dependency updates: SDL and lower level C libraries
- New module pygame.typing
- Fixed segfault in antialiased draw functions with non 32 bit surfaces
What's Changed
- 2.5.2.dev1 by @ankith26 in #3042
- Fixed a couple of versionadded tags that should have been versionaddedold in
displaydocs by @oddbookworm in #3046 - Bump docker/build-push-action from 6.5.0 to 6.6.1 by @dependabot in #3051
- Bump actions/attest-build-provenance from 1.4.0 to 1.4.1 by @dependabot in #3050
- Improved geometry docs by @itzpr3d4t0r in #3043
- Fix imposter opengl by @Starbuck5 in #3059
- Add
Window.flash(operation)by @damusss in #3054 - Add pygame.typing module by @damusss in #3002
- Use PyObject_Vectorcall in rect by @Starbuck5 in #3048
- Version-getters SDL2/SDL3 by @Starbuck5 in #2975
- Coverage CI created, hopefully it works first time lol by @oddbookworm in #2990
- Bump docker/build-push-action from 6.6.1 to 6.7.0 by @dependabot in #3065
- Optimized
Rect.clipline()by @itzpr3d4t0r in #3067 - Optimized tuple creation for Rect getters by @itzpr3d4t0r in #3072
- Update
FRectrepr to handle larger values by @ankith26 in #3077 - Bump actions/attest-build-provenance from 1.4.1 to 1.4.2 by @dependabot in #3081
- Fix average_color docs and stubs to match implementation by @Starbuck5 in #3076
- Fix and improve
pygame.typingmodule by @aatle in #3080 - Add
Window.focusedby @damusss in #3079 - Add alias
pygame.Soundby @damusss in #3063 - Port the controller module to C. by @zoldalma999 in #2056
- Fix break when the OS resizes our window in
set_modeby @oddbookworm in #2992 - Make experimental API not hidden in the docs anymore by @bilhox in #3068
Vector{2,3}.__delattr__messaging fixed when deletingx, y, {z}and removedVector4zombies by @oddbookworm in #3069- Use PyObject_CallOneArg where applicable by @ankith26 in #3023
- migrate importlib to resolve warning about pkg_resources by @raspofabs in #3061
- Make
pygame.typing.PathLikeinternal/private by @aatle in #3086 - Updated SDL version to 2.30.7 by @oddbookworm in #3094
- Fix test_inflate_ip__larger. by @avpai-dinosaur in #3098
- Bump actions/attest-build-provenance from 1.4.2 to 1.4.3 by @dependabot in #3095
- Add
Circle.intersect()by @itzpr3d4t0r in #3071 - Remove RGBATuple by @Starbuck5 in #3102
- Fix component bounds checking by @ankith26 in #3087
- Bump build dependencies by @ankith26 in #3100
- Enhance
pygame.mouse.get_presseddocs by @damusss in #3084 - Bump pypa/cibuildwheel from 2.20.0 to 2.21.0 by @dependabot in #3103
- Bump pypa/cibuildwheel from 2.21.0 to 2.21.1 by @dependabot in #3112
- Drop MSYS2 clang32 from our CI by @ankith26 in #3116
- Fix whitespace and eof formatting with pre-commit by @ankith26 in #3104
- Fix segfault with antialiased draw functions with a depth different than 32bits by @bilhox in #3008
- Add japanese readme by @hisa10 in #3114
- Update the dependency section of zh-cn README by @yunline in #3119
- Add
desktopargument tomouse.get_posandmouse.get_pressedby @damusss in #3105 - added example on how Window behaves with WINDOWCLOSE and QUIT events by @MrValdez in #3115
- Fix editable install on windows by @ankith26 in #3117
- Add
Circle.collidelist/collidelistall()by @damusss in #2880 - Fix midi timer reset when quit by @MyreMylar in #3018
- Make
copymethods explicit for linting by @damusss in #3129 - Fix a compiler warning in debug mode by @ankith26 in #3124
- Set error when too many numbers of argument in
pygame.Color.from_colorspaceby @bilhox in #3125 - Bump actions/checkout from 4.1.7 to 4.2.0 by @dependabot in #3135
- Bump docker/build-push-action from 6.7.0 to 6.8.0 by @dependabot in #3136
- Added additional circle attributes by @MrRedstone058 in #3127
- Bump ubuntu to 24.04 on CI, fix cppcheck by @ankith26 in #3123
- Clarify how Rect and positions relate in the intro tutorial by @datapythonista in #3111
- Fix aalines overlap by @mzivic7 in #2912
- wasm: controller is not multiphase init + workaround for wasm 313t by @pmp-p in #3137
- Rename
pygame.typing.CoordinatetoPoint, fix related grammar by @aatle in #3139 - Fix
(F)Rect.scale_by(_ip)handling of thescale_byparameter by @ankith26 in #3078 - Add 9-patch to examples by @damusss in #2985
- transform.solid_overlay by @ScriptLineStudios in #2304
- Add draw.aaline width argument by @mzivic7 in #3140
- New up-to-date review of french readme + note of when it was last reviewed by @bilhox in #3142
- Missing pixels in
aalineswhen using integer coordinates by @mzivic7 in #3144 - Add meson flag for compiling with SDL3 by @ankith26 in #3141
- SDL3: compile rect, bufferproxy, math, newbuffer, geometry by @ankith26 in #3145
- Fixes for rwobject (now iostream) SDL3 by @Starbuck5 in #2933
- SDL3 support for pygame.system by @Starbuck5 in #3146
- Fix stubcheck error on windows, mark typealiases as such in typing by @zoldalma999 in #3147
- Bump docker/build-push-action from 6.8.0 to 6.9.0 by @dependabot in #3151
- Bump actions/cache from 4.0.2 to 4.1.0 by @dependabot in #3153
- Add Italian README by @damusss in #3120
- Bump pypa/cibuildwheel from 2.21.1 to 2.21.3 by @dependabot in #3161
- Adjust pg_MappedColorFromObj API for SDL3-porting by @Starbuck5 in #3160
- Fix handling all color types in
pygame.transform.thresholdby @damusss in #3156 - Improve color notation in the docs by @damusss in #3165
- SDL 2.30.8 by @Starbuck5 in #3168
- Add basic pygame.typing unit test, remove problematic TypeAlias usage by @ankith26 in #3150
- Added
geometry.Linebase by @itzpr3d4t0r in #3131 - wasm: better wasm fencing by @pmp-p in https://github.com/pyg...
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_ipto 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=Nonetodisplay.message_boxin #2723. - @itzpr3d4t0r fixed an issue
transform.hslnot working on certain pixel formats in #2948. - @oddbookworm fixed a
Surface.fillwhere 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
SCALEDafter not usingSCALEDindisplayin #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 = 0circles to the experimentalgeometrymodule, see #2913. - @zoldalma999 added new
"ABGR"format support toimage.frombytesandimage.tobytesin #2951. - @zoldalma999 made the experimental
Windowclass 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_surfaceand(F)Rectmethods. 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
drawoperations 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.jsusage 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_ATLEASTmacro 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 supp...
