Skip to content

2.3.1

Compare
Choose a tag to compare
@github-actions github-actions released this 07 Aug 06:51
2ffcf1e

โ˜€๏ธ๐ŸŒŠ๐Ÿ–๏ธ๐Ÿ˜Ž๐Ÿ„๐Ÿš๐Ÿ๏ธ๐Ÿนโ˜€๏ธ๐ŸŒŠ๐Ÿ–๏ธ
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

  • @novialriptide added the point_size attribute to font.Font in #1961. This allows fonts to be resized after being loaded.
  • @dr0id added style_name property to font.Font/freetype.Font in #2175
  • @yunline added two pygame.system functions get_cpu_instruction_sets and get_total_ram in #2308. These can be used to find out more about the system at runtime.
  • @dr0id added new Rect/FRect methods - scale_by/scale_by_ip and @jonotassia updated these to accept keyword-arguments. This addition was ported to pygame-ce by @Starbuck5 in #2277
  • New contributor @AlexanderGroeger added functions to manage soundfonts (get_soundfont and set_soundfont) to mixer in #2274. This is relevant for midi playback through pygame.mixer.
  • @Matiiss added a few convenience classmethods - Color.from_<color_space> (i.e. Color.from_hsla) in #2177
  • @yunline added always_on_top attribute to _sdl2.video.Window in #2307. Now you can use this to force your Windows to always be highlighted at the top.

Potential breaking changes

  • @yunline fixed transform.gaussian_blur to 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_timer had 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 result set_timer is now much more accurate with the timing!
  • @ankith26 fixed FRect slice subscripting to correctly return floats in #2313
  • @yunline added support for SDL_WINDOWID back, 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-ce 2.3.0 introduced a regression where SysFont could no longer handle None. @Sjmarf fixed this in #2271
  • Another pygame-ce 2.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 font in #2255
  • @zoldalma999 fixed a segfault related to _sdl2.Window.from_display_module that happened on dealloc in #2341

Usage and performance enhancements

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-ce multiline text rendering. #2219, #2235
  • New contributor @IrvKalb corrected the documentation of the get_pref_path function in the system module to use the org argument 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.cdrom references 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 draw and Surface modules in #2346
  • @Starbuck5 removed SDL version information where it mentions versions that are below our supported SDL version in #2334

Unittests and typing related improvements

  • @oddbookworm improved Rect/FRect typing to be more generic and accurate in #2297
  • @ankith26 made some types more lax by using a custom Sequence ABC 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

New Contributors

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