2.3.1
โ๏ธ๐๐๏ธ๐๐๐๐๏ธ๐นโ๏ธ๐๐๏ธ
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 tofont.Font
in #1961. This allows fonts to be resized after being loaded. - @dr0id added
style_name
property tofont.Font
/freetype.Font
in #2175 - @yunline added two
pygame.system
functionsget_cpu_instruction_sets
andget_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 topygame-ce
by @Starbuck5 in #2277 - New contributor @AlexanderGroeger added functions to manage soundfonts (
get_soundfont
andset_soundfont
) tomixer
in #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_top
attribute to_sdl2.video.Window
in #2307. Now you can use this to force yourWindow
s 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 resultset_timer
is now much more accurate with the timing!- @ankith26 fixed
FRect
slice subscripting to correctly returnfloat
s 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 whereSysFont
could no longer handleNone
. @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 ondealloc
in #2341
Usage and performance enhancements
- @ScriptLineStudios added support for
Vector2
objects inget_at
/set_at
methods ofSurface
in #2111 - @itzpr3d4t0r improved the performance of
Surface.set_at
by changing it to useFASTCALL
in #2330 - @yunline added
__repr__
to the_sdl2.video.Window
class 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-ce
multiline text rendering. #2219, #2235 - New contributor @IrvKalb corrected the documentation of the
get_pref_path
function in thesystem
module to use theorg
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
andSurface
modules in #2346 - @Starbuck5 removed
SDL
version information where it mentions versions that are below our supportedSDL
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
- @zoldalma999 renamed
PyClockObject
topgClockObject
, remove rendered field, small cleanups intime.c
in #2351 - @yunline fixed warnings in
video.c
in #2343 and removed the oldWindow
cython 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