Skip to content

2.5.0

Compare
Choose a tag to compare
@github-actions github-actions released this 12 Jun 03:59
d93ad87

โ˜€๏ธ๐ŸŒŠ๐Ÿ–๏ธ๐Ÿ˜Ž๐Ÿ„๐Ÿš๐ŸŒˆ๐Ÿ๏ธ๐Ÿนโ˜€๏ธ๐ŸŒŠ๐Ÿ–๏ธ๐ŸŽ‰
pip uninstall pygame (if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade
โ˜€๏ธ๐ŸŒŠ๐Ÿ–๏ธ๐Ÿ˜Ž๐Ÿ„๐Ÿš๐ŸŒˆ๐Ÿ๏ธ๐Ÿนโ˜€๏ธ๐ŸŒŠ๐Ÿ–๏ธ๐ŸŽ‰

This release, coming in just four months after the previous one, has been possible due to patches submitted by over 30 contributors, who have collectively made over 132 pull requests with 464 commits that touch 413 files! Impressive!

Now, onto the highlights!

Highlights

API updates

@damusss

  • added mouse.get_just_[pressed|released] in #2836
  • added display.[get|set]_window_position in #2816
  • (F)Rect can be initialized with no arguments in #2655

@whydoubt added the pitch argument for image.tobytes in #2602

@XFajk added Color.from_normalized constructor and Color.normalized property in #2693

@mzivic7 added draw.aacircle in #2800

@itzpr3d4t0r added transform.hsl in #2398

@ScriptLineStudios implemented a few convenience properties to Surface class: Surface.width, Surface.height and Surface.size in #2813

@bilhox added math.invlerp and math.remap in #2654

@ankith26 added mixer.get_driver in #2741

SIMD Performance enhancements

@Starbuck5 improved performance of SSE2 no_surf_alpha_opaque_dst blitter in #2601 and #2896. As a result of this PR, some kinds of blit operations should get a nice speed up (upto about 2.5x speedup on the testcases we used) on some hardware.

@itzpr3d4t0r

  • Partially refactor SSE2 blitters with macros in #2656.
  • Implemented AVX2 variant of Surface.premul_alpha in #2615

@MyreMylar added SIMD versions transform.invert in #2534. This gives a significant performance boost, and in the example we tested, we have observed a 12x-13x speedup!

More pygame.geometry goodies

The recently introduced experimental pygame.geometry submodule has gotten more features and polish in this release in the PRs: #2561, #2660, #2634, #2662, #2661, #2709, #2791, #2732, #2731

A big thanks to everyone who contributed to pygame-geometry so far: @Emc2356, @itzpr3d4t0r, @novialriptide, @ScriptLineStudios, @avaxar, @gresm, @Matiiss, @newpaxonian, @maqa41, and @blankRiot96

As with all experimental submodules, do remember that things in here are subject to change, and there are a lot more things to be added! See the docs for the current progress.

Other general highlights

@oddbookworm added opengl support to the experimental pygame.Window interface in #2659

@ankith26 added Wayland and PipeWire support in the linux wheels distributed by us in #1997 and #2733

@ankith26 rewrote the build machinery in the meson buildsystem, while deprecating the old build machinery in the PRs #2557, #2803, #2853, #2856, #2875, #2854, #2831, #2779. As part of these changes, a few improvements are:

  • On 32-bit ARMv7 systems (which includes many Raspberry Pi), NEON (SIMD) optimizations are now enabled by default. Therefore users of this should see a significant performance boost in many operations that can support SIMD.
  • Enhanced support for Windows MinGW/MSYS2 systems.
  • Reduced wheel size.

Deprecations and Removals

@Starbuck5 removed the pygame.threads submodule in #2762

@oddbookworm re-added and properly deprecated the blend argument of draw.aaline in #2743

Performance Enhancements

In addition to those mentioned above that are SIMD-related

@itzpr3d4t0r

  • Optimized (F)Rect.unionall(_ip) in #2784
  • Optimized (F)Rect.collideXX family of methods in #2786
  • Replaced use of internal C-API functions with more efficient alternatives in #2819

Bug fixes

@oddbookworm added shim to fix broken midi module compilation in #2863

@ankith26

  • fixed some init related issues in the experimental window API in #2860
  • fixed segmentation fault during invalid PixelArray usage in #2742

General Enhancements

@Kn4ughty made error messages for using font align clearer in #2777

@pmp-p ensured we keep supporting pygame on the web in

  • wasm: unify pygame-web/pyodide/static Freetype init in #2748
  • fixed some METH_NOARGS arg missing in #2888

@damusss

  • made transform blur on a surface with either width or height equal to 0 not raise ValueError in #2852
  • Cleanup codebase, docs and examples with American spelling in #2827

@Starbuck5 added a briefcase template to pygame-ce in #2862

@RainRat fixed typos across the repository in #2847

@robertpfeiffer relax Surface.convert conditions in #2839, now it is no longer a requirement to have called display.set_mode when this method has been invoked with a

@oddbookworm removed the xwayland warning and ensured that debug info now contains whether x11 is running or xwayland in #2823

Examples and Unit tests

@snowfruit added an example for retro scaling in #2785

@Matiiss removed undefined variable in aliens.py in #2769

@Starbuck5 fixed ftfont_test being run directly in #2763

@MyreMylar

  • Add a delta of 2 ms to test_music_pause__unpause() in #2898

@ankith26

  • Force window surface update after set_size, hopefully proper fix for that pesky frequent pypy test fail in #2865
  • Minor changes to support pytest in #2675

Docs, Tutorials and typestubs

@lispspb

  • fixed documentation mix up in attributes of object returned by get_power_state in #2734
  • added clarifications about ranges in mixer docs in #2738

@kritserv fixed an issue in pygame.display.get_caption docs in #2765

@yohanmoon added instructions for resolving setuptools issue in the docs readme in #2868

@Matiiss added more / (positional-only notation) to docs and stubs in #2691

@oddbookworm fixed indentation of surface attributes in #2900

@ankith26 did some minor docs/stubs improvements in invlerp/remap in #2902

@Starbuck5 added warning about 7.1 stereo on set_source_location in #2881

@MyreMylar

  • removed duplicate images in tutorials in #2871
  • including print_debug_info() in issue template in #2879
  • adjusted symbol color in light theme in #2891

Code quality and robustness

@cclauss

  • Minor optimizations by using comprehensions in #2771
  • PEP572 Use Python's assignment expression in #2782
  • Remove lint logic from setup.py in #2796
  • setup.py: Properly add _sdl2_data_files to data_files in #2770

@Lumiobyte fix a comment typo in rect_impl.h in #2658

@Matiiss reduced redundancy in surface.fblits code and handled generator exception in #2679

@oddbookworm applied formatting updates using newest version of clang-format in #2744

@itzpr3d4t0r

  • removed shuffle masks in AVX fillers in #2642
  • simplified SIMD fill algorithms in #2793

@Starbuck5

  • Unify freetype init codepaths in #2801
  • (Freetype) use calloc where possible in #2802
  • Cleanup rwobject.c file object methods in #2717
  • gitignore meson temp folder in #2805
  • Use HasColorKey before GetColorKey in #2835 and #2844

@ankith26

  • Remove docs non-public module stubs in #2794
  • Fix pylint undefined usage error in sysfont in #2858
  • Add explicit check and error for system cursor in #2843
  • Track version only in pyproject.toml in #2820
  • Remove all .editorconfig duplicates, re-add in project root with updates in #2788

Dependencies, DevOps and CI

@cclauss helped us improve our DevOps and CI

  • python3 setup.py lint is deprecated: Let's lint with pre-commit in #2772
  • build-on-msys2.yml: Upgrade GitHub actions/checkout@v4 in #2812
  • Format Python code with ruff format instead of black in #2824

@Starbuck5 continued working on changes that make our code ready for SDL3

  • transform.scale: softstretch SDL2/SDL3 compat in #2707
  • SDL2/SDL3 mutex support in #2712
  • Simple SDL3 patches for freetype, surface and mouse in #2838
  • Use macros for [Bytes|Bits]PerPixel compat in SDL3 in #2804

@ankith26

  • bumped gh actions mac runners (gets us native M1 builds) in #2494
  • kept the CI running by fixing a few dependency update related issues in #2774, #2778 and #2916
  • fixed python -m docs dev time convenience command in #2889

@MyreMylar altered our CODEOWNERS file to switch required PR review team in #2873

@Matiiss, @oddbookworm, and @Starbuck5 kept our SDL dependency updated in #2689, #2690, #2705, #2761, #2806, #2837

@dependabot kept all our CI dependencies updated in #2814, #2809, #2767, #2755, #2756, #2754, #2747, #2746, #2736, #2730, #2683, #2628, #2874, #2861, #2851, #2833

@Starbuck5 and @ankith26 kept them releases coming in at #2631, #2817, #2818, #2903, #2904, #2921

New Contributors

This release we have had 11 new contributors, special thanks to everyone getting started!

In addition, we're also inviting 2 new members to the contributor team: @damusss and @gresm! Members of the team have more permissions and more responsibilities, as regular reviewers: https://github.com/pygame-community/pygame-ce/wiki/Becoming-a-Reviewer#becoming-a-regular-reviewer

Thanks all

A sincere thank you to everyone involved! This involves not only the PR makers but also to the broader community which includes issue reporters, PR reviewers, tutorial creators, admins/mods/helpers across various online platforms, individuals developing helper libraries, and most importantly, all our users โ€“ including you, the reader of these notes!

Apologies in advance if we've made an error in these notes, and please get in touch with us to get a correction made.

Until next time, take care, and enjoy pygaming!

Full Changelog: 2.4.1...2.5.0