๐ŸŒบ๐ŸŒป๐ŸŒน๐Ÿฅ€๐ŸŒท๐ŸŒผ๐ŸŒธ๐Ÿ’๐Ÿ’ฎ๐ŸŒบ๐ŸŒป๐ŸŒน๐Ÿฅ€๐ŸŒท๐ŸŒผ๐ŸŒธ๐Ÿ’๐Ÿ’ฎ๐ŸŒบ๐ŸŒป
๐ŸŒผ๐ŸŒธ python3 -m pip install pygame==2.0.1
๐ŸŒบ๐ŸŒป๐ŸŒน๐Ÿฅ€๐ŸŒท๐ŸŒผ๐ŸŒธ๐Ÿ’๐Ÿ’ฎ๐ŸŒบ๐ŸŒป๐ŸŒน๐Ÿฅ€๐ŸŒท๐ŸŒผ๐ŸŒธ๐Ÿ’๐Ÿ’ฎ๐ŸŒบ๐ŸŒป

The Age Of Aquarius,
the northern Winter Solstice,
and the southern Summer Solstice bring us...
a new pygame to play with :)

This is a bug fix release, with a bunch of features and optimizations
thrown in for good measure. Thank you to the people reporting issues
related to pygame 1 compatibility. Some of them will take a bit longer to
discuss, work through, and find solutions. We say goodbye to Travis the CI
that served us well. We said goodbye to the pygame discord that had grown
too big, only for a few more to have sprouted up in its place. We said
hello to the patreon.com/pygame and we took a breather for a little bit.

Enough bla bla bla... what's new?
Backwards compatibility fixes

Firstly, a few backwards compatibility fixes have been made.

Dan Lawrence @MyreMylar <https://github.com/MyreMylar> worked some more on
the alpha blitter so it's more compatible.

   - Change opaque surface test to use SDL_ISPIXELFORMAT_ALPHA() macro #2269
   <https://github.com/pygame/pygame/pull/2269>

Renรฉ Dudfield (@illume <https://github.com/illume>) worked on making some
old audio driver and video driver names that had been renamed work in
backwards compatible env vars, SDL_VIDEODRIVER=windib,
SDL_AUDIODRIVER=pulse or dsound #2292
<https://github.com/pygame/pygame/pull/2292>
Major event refactor

Ankith (@ankith26 <https://github.com/ankith26>) did a major event refactor
in #2357 <https://github.com/pygame/pygame/pull/2357> #2404
<https://github.com/pygame/pygame/pull/2404> #2416
<https://github.com/pygame/pygame/pull/2416> and #2398
<https://github.com/pygame/pygame/pull/2398> This not only cleaned up the
event processing code, but fixed a bunch of issues an introduced some new
features making event processing more comfy along the way.

   - #1236 <https://github.com/pygame/pygame/issues/1236> unicode keydown
   field when mashing 4 keys at once. Adds unicode field to keyup event.
   - #1238 <https://github.com/pygame/pygame/issues/1238> posting keydown
   events fills the fields.
   - #1524 <https://github.com/pygame/pygame/issues/1524> Unicode property
   not returned on KEYUP event
   - #1550 <https://github.com/pygame/pygame/issues/1550> set_event_timer
   Event param (needs testing).
   - #2146 <https://github.com/pygame/pygame/issues/2146> Segfault in
   pygame.event.post()
   - #2214 <https://github.com/pygame/pygame/issues/2214> WINDOWEVENT event
   name change (needs testing, and API review).
   - #2319 <https://github.com/pygame/pygame/issues/2319> event.get(type)
   does not return a list of all events posted
   - #2347 <https://github.com/pygame/pygame/issues/2347>
   pygame.time.set_timer() num_events/loops param naming needs to be decided.
   - #2378 <https://github.com/pygame/pygame/issues/2378> unicode keydown
   field when mashing 4 keys at once

Here's a graph to treat your eyes, on an event benchmark where getting lots
of events has been sped up a lot. As you can see, its a 7 times speed up.
There are also less peaks in there, due to less thread locking on the event
queue and using batching API calls.

[image: Figure_1]
<https://user-images.githubusercontent.com/46915066/102309972-082dec80-3f90-11eb-8023-195a0fc1cb09.png>
New contributors

Thanks to @bwright8 <https://github.com/bwright8> for adding a unit test
for image.load_basic() #2307 <https://github.com/pygame/pygame/pull/2307>
and also for adding some Surface.convert tests in #2368
<https://github.com/pygame/pygame/pull/2368>.

@kristofszentes <https://github.com/kristofszentes> made a unit test for
image.load_extended() in #2324 <https://github.com/pygame/pygame/pull/2324>

Paul m. p. P. (@pmp-p <https://github.com/pmp-p>) fixed typo in windib
driver handler condition #2342 <https://github.com/pygame/pygame/pull/2342>

The Dog Lulu (@Iamsoto <https://github.com/Iamsoto>) updated the TYPE_HEAD
macro to use a newer API #2363 <https://github.com/pygame/pygame/pull/2363>

@aminouhammou <https://github.com/aminouhammou> added a unit test for
display.gl_get_attribute() #2375
<https://github.com/pygame/pygame/pull/2375>

Tom Fryers (@TomFryers <https://github.com/TomFryers>) Capitalised "Python"
in the import message. #2389 <https://github.com/pygame/pygame/pull/2389>

Pierre Sassoulas (@Pierre-Sassoulas <https://github.com/Pierre-Sassoulas>)
has been working on some code quality fixes using the pylint tool (and
apart from these merged PRs working on setting up other code quality tools
and a pre-commit checker).

   - Add parentheses to print so it works in py2 and py3 #2284
   <https://github.com/pygame/pygame/pull/2284>
   - Merge some comparisons in lists for simplicity #2290
   <https://github.com/pygame/pygame/pull/2290>
   - Change range(len(x)) to enumerate(x) when applicable #2291
   <https://github.com/pygame/pygame/pull/2291>
   - Temporarily skip test_sound_args on windows and Appveyor #2371
   <https://github.com/pygame/pygame/pull/2371>

Color.update() and Rect.update()

@zoldalma999 <https://github.com/zoldalma999> (who recently joined the
pygame team on github after contributing several high quality patches to
pygame) worked on a proposal by David Lรถnnhager (@dlon
<https://github.com/dlon>) to add Color.update and Rect.update #2277
<https://github.com/pygame/pygame/pull/2277>

Vectors already have an update() method. Now Color, and Rect do too :)

>>> c = pygame.Color(0, 0, 0)>>> c2 = pygame.Color(1, 2, 3, 4)>>> c
(0, 0, 0, 255)>>> c.update(c2)>>> c
(1, 2, 3, 4)
>>> rect = pygame.Rect(0, 0, 1, 1)>>> rect.update(1, 2, 3, 4)>>> rect<rect(1, 
>>> 2, 3, 4)>>>> rect = pygame.Rect(0, 0, 1, 1)>>> rect2 = pygame.Rect(1, 2, 3, 
>>> 4)>>> rect.update(rect2)>>> rect<rect(1, 2, 3, 4)>

@zoldalma999 <https://github.com/zoldalma999> also worked on:

   - the "edit on github" link in the docs was fixed to now point to main
   branch. #2318 <https://github.com/pygame/pygame/pull/2318>
   - document that sprite groups are ordered in python 3.6 and above #2336
   <https://github.com/pygame/pygame/pull/2336>
   - Remove unittest skip from freetype_Font_render_to_mono #2351
   <https://github.com/pygame/pygame/pull/2351>
   - Fix render_to returning unpositioned rect #2410
   <https://github.com/pygame/pygame/pull/2410>

Renรฉ Dudfield (@illume <https://github.com/illume>) was hacking on some
things like these:

   - Fixing some sysfont test failures #2354
   <https://github.com/pygame/pygame/pull/2354>
   - docs, tests and types for pathlib support #2387
   <https://github.com/pygame/pygame/pull/2387>
   - fix for a gl crash #2394 <https://github.com/pygame/pygame/pull/2394>
   - SDL 2.0.14, and manylinux improvements (pulseaudio and other deps)
   #2395 <https://github.com/pygame/pygame/pull/2395>
   - Fix and skip test failures #2415
   <https://github.com/pygame/pygame/pull/2415>

SDL 2.0.14

libsdl is a library pygame is built on. It had a new release after almost 9
months of development. The 2.0.14 release notes
<https://discourse.libsdl.org/t/sdl-2-0-14-released/28470> detail things a
little bit. More than 9 months worth of effort is a bit much to explain.

There's been a number of bugs fixed we reported in the pygame 2 series. One
of which was pygame.display.update() updating the whole screen on windows.
So, now 'dirty rect drawing' is faster again on windows. From the list
you'll notice a lot of work went into joystick and game controller
improvements. Including support for more than 4 xbox controllers at once on
windows. But linux, android, mac, and even freebsd got joystick
improvements. On linux the Kernel Mode Setting (KMSDRM) video driver was
improved a lot. For retro computing fans, the OS2 port got a lot of love.
Lots of portability things were improved, like fixing compilation for M1
CPUs, improving the build system. Raspberry Pi support has been improved,
as have most video drivers for other platforms.
Xbox One port

Victor Lopez started on an Xbox one port, and has had some success.

I can confirm Xbox One is able to run the aliens sample with joystick
support, audio and sprites, it needs, however, heavy testing.

These are the relevant repositories:

   - https://github.com/greentwip/cpython
   - https://github.com/greentwip/pygame

pathlib support for image, sound, and font loading.

pathlib is an object oriented way of doing path handling in python 3
(there's also a backport to python2). Before pygame didn't handle these
objects in resource loading functions for image and sound loading. Now it
does pathlib!

        path = pathlib.Path('.') / "data" / "house_lo.wav"
        sound1 = mixer.Sound(path)

Thanks to @ankith26 <https://github.com/ankith26> in #2366
<https://github.com/pygame/pygame/pull/2366> and Renรฉ Dudfield (@illume
<https://github.com/illume>) in #2387
<https://github.com/pygame/pygame/pull/2387> .
Cursor object API

@Starbuck5 <https://github.com/Starbuck5> worked on a new Cursor object in
#2331 <https://github.com/pygame/pygame/pull/2331>

Now you can add system cursors, and color cursors out of surfaces along
with the other ones you could draw with ascii art.

box = pygame.cursors.Cursor((10,10), pygame.Surface((20,20)))system =
pg.cursors.Cursor(pg.SYSTEM_CURSOR_NO)pg.mouse.set_cursor(cursors[cursor_index])

@Starbuck5 <https://github.com/Starbuck5>

   - added a link to patreon on github in #2362
   <https://github.com/pygame/pygame/pull/2362>
   - Improved the README.rst by clarifying, restructuring and improving
   links. #2396 <https://github.com/pygame/pygame/pull/2396>
   - Cleaned up 'import pygame._view' in packager_imports by removing it.
   #2384 <https://github.com/pygame/pygame/pull/2384>
   - Docs build fixes + home for the Korean tutorial #2420
   <https://github.com/pygame/pygame/pull/2420>

@Starbuck5 <https://github.com/Starbuck5> added a deprecation warning for
mouse.set_system_cursor() #2397 <https://github.com/pygame/pygame/pull/2397>
after a long discussion and research with a number of us on if we should
have deprecation warnings anyway?
<https://github.com/pygame/pygame/issues/2197>.
pygame.draw.rect fixes.

Another project @Starbuck5 <https://github.com/Starbuck5> worked on was
fixing some draw.rect issues in PR #2406
<https://github.com/pygame/pygame/pull/2406> found by @gummbum
<https://github.com/gummbum> and @dr0id <https://github.com/dr0id>

This script by @dr0id <https://github.com/dr0id> made it much easier to
spot the problems.
[image: 2359-ex3]
<https://user-images.githubusercontent.com/46412508/102708240-5e33b600-4256-11eb-802e-b99182b682bd.PNG>

@galexandreg <https://github.com/galexandreg> worked on text_input
documentation improvements on by default, needed for pygame.TEXTINPUT #2333
<https://github.com/pygame/pygame/pull/2333>

@robertpfeiffer <https://github.com/robertpfeiffer> made a few fixes to
issues with android support. Added K_AC_BACK key constant, fixed data_file
pruning and "STRIPPED" install #2311
<https://github.com/pygame/pygame/pull/2311>

Ankith @ankith26 <https://github.com/ankith26> merged these ones in (whilst
also looking at some difficult event posting issues, and cleaning up some
image loading code).

   - Unittests for event module #2283
   <https://github.com/pygame/pygame/pull/2283>
   - Delete obsolete test/util files #2303
   <https://github.com/pygame/pygame/pull/2303>
   - Documented pygame.image load_basic, load_extended, save_extended.
   image.c code cleanups. #2270 <https://github.com/pygame/pygame/pull/2270>
   - Pathlib support for most pygame functions #2366
   <https://github.com/pygame/pygame/pull/2366>
   - Drop PyLong_FromUnicode, removed in python 3.10 #2385
   <https://github.com/pygame/pygame/pull/2385>
   - little music doc fix #2414 <https://github.com/pygame/pygame/pull/2414>

@mcpalmer1980 <https://github.com/mcpalmer1980> Added experimental relative
mouse motion support to video.Window in #2392
<https://github.com/pygame/pygame/pull/2392> They have also been using the
experimental _sdl2 features quite a lot and coming up with some good
improvements and discussions on that (including a new package!).

Dan Lawrence ( @MyreMylar <https://github.com/MyreMylar> ) was on a coding
rampage and made a number of improvements:

   - mixer.music.get_busy() return False when the music is paused #2295
   <https://github.com/pygame/pygame/pull/2295>
   - Small improvement to the get_locks() test #2281
   <https://github.com/pygame/pygame/pull/2281>
   - Interactive test for touch.get_finger() #2279
   <https://github.com/pygame/pygame/pull/2279>
   - Removed the link to the closed Discord server from GitHub #2296
   <https://github.com/pygame/pygame/pull/2296> ๐Ÿ˜ข
   - pygame.midi pass the output buffersize down to portmidi #2272
   <https://github.com/pygame/pygame/pull/2272>
   - interactive test for set_gamma_ramp() #2278
   <https://github.com/pygame/pygame/pull/2278>
   - Rejiged the alpha blitter path logic to cover issue on mac #2345
   <https://github.com/pygame/pygame/pull/2345>
   - Account for mixer.init()/pre_init() returning more channels than asked
   #2372 <https://github.com/pygame/pygame/pull/2372>
   - Fix typo in image.frombuffer() type hint #2383
   <https://github.com/pygame/pygame/pull/2383>

Many many special Thanks go to

   - everyone writing up issues, answering questions, sharing your work, or
   moderating discussions on different forums.
   - reviewers including: @illume <https://github.com/illume>, @siggisv
   <https://github.com/siggisv>, @ankith26 <https://github.com/ankith26>,
   @robertpfeiffer <https://github.com/robertpfeiffer>, @MyreMylar
   <https://github.com/MyreMylar>, @Starbuck5 <https://github.com/Starbuck5>,
   @pmp-p <https://github.com/pmp-p>, and others.
   - patreon.com/pygame sponsors: Christopher Cacho, Daniel Lawrence, Tommi
   Sinivuo, Leif Theden, zoldalma, and Bob Johnson. With their help half of
   the first patreon goal of covering the monthly hosting costs has been
   covered and a number of pygame tutorials have been made.
   - the people supporting pygame financially by buying the pre-release of
   a pygame book <https://pygame.itch.io/pygame-book>. It's a book by a
   long time pygame contributor where all funds go towards pygame development.

See ya!
------------------------------

   - merged PRs
   
<https://github.com/pygame/pygame/pulls?q=is%3Apr+is%3Aclosed+merged%3A2020-10-28..2020-12-24+sort%3Acreated-desc+>
   since we started the pygame 2.0.0.
   - 189 Commits since 2.0.0 stable release
   <https://github.com/pygame/pygame/compare/2.0.0...2.0.1>
_______________________________________________
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/
Member address: arch...@mail-archive.com

Reply via email to