Pygame

Latest version: v2.5.2

Safety actively analyzes 631178 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 10

2.0.1

Not secure
๐ŸŒบ๐ŸŒป๐ŸŒน๐Ÿฅ€๐ŸŒท๐ŸŒผ๐ŸŒธ๐Ÿ’๐Ÿ’ฎ๐ŸŒบ๐ŸŒป๐ŸŒน๐Ÿฅ€๐ŸŒท๐ŸŒผ๐ŸŒธ๐Ÿ’๐Ÿ’ฎ๐ŸŒบ๐ŸŒป


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](https://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 worked some more on the alpha blitter so it's more compatible.
- Change opaque surface test to use SDL_ISPIXELFORMAT_ALPHA() macro 2269

Renรฉ Dudfield (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


Major event refactor

Ankith (ankith26) did a major event refactor in 2357 2404 2416 and 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 unicode keydown field does not appear occasionally
- 1238 posting keydown events fills the all fields.
- 1524 Unicode property not returned on KEYUP event
- 1550 time.set_timer accept event object
- 2146 Segfault in pygame.event.post() fixed
- 2214 WINDOWEVENT API upgrade
- 2319 event.get(type) does not return a list of all events posted
- 2347 pygame.time.set_timer() accepts loops param
- 2378 unicode keydown field working 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.

![Figure_1](https://user-images.githubusercontent.com/46915066/102309972-082dec80-3f90-11eb-8023-195a0fc1cb09.png)



New contributors

Thanks to bwright8 for adding a unit test for image.load_basic() 2307 and also for adding some Surface.convert tests in 2368.


kristofszentes made a unit test for image.load_extended() in 2324

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

The Dog Lulu (Iamsoto) updated the TYPE_HEAD macro to use a newer API 2363

aminouhammou added a unit test for display.gl_get_attribute() 2375

Tom Fryers (TomFryers) Capitalised "Python" in the import message. 2389

Pierre Sassoulas (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
- Merge some comparisons in lists for simplicity 2290
- Change range(len(x)) to enumerate(x) when applicable 2291
- Temporarily skip test_sound_args on windows and Appveyor 2371


Color.update() and Rect.update()

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) to add Color.update and Rect.update 2277

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

python

>>> 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 also worked on:
- the "edit on github" link in the docs was fixed to now point to `main` branch. 2318
- document that sprite groups are ordered in python 3.6 and above 2336
- Remove unittest skip from freetype_Font_render_to_mono 2351
- Fix render_to returning unpositioned rect 2410



Renรฉ Dudfield (illume) was hacking on some things like these:
- Fixing some sysfont test failures 2354
- docs, tests and types for pathlib support 2387
- fix for a gl crash 2394
- SDL 2.0.14, and manylinux improvements (pulseaudio and other deps) 2395
- Fix and skip test failures 2415

2.0.0

Not secure
๐ŸŒบ๐ŸŒป๐ŸŒน๐Ÿฅ€๐ŸŒท๐ŸŒผ๐ŸŒธ๐Ÿ’๐Ÿ’ฎ๐ŸŒบ๐ŸŒป๐ŸŒน๐Ÿฅ€๐ŸŒท๐ŸŒผ๐ŸŒธ๐Ÿ’๐Ÿ’ฎ๐ŸŒบ๐ŸŒป


Happy pygame 20th birthday all! ๐ŸŽ‰ ๐Ÿฐ ๐Ÿฅณ

<img src="https://user-images.githubusercontent.com/9541/97467489-8bde3c00-1944-11eb-8ebd-6e91db1a8295.png" width="320" />

---

- 937 [merged PRs](https://github.com/pygame/pygame/pulls?q=is%3Apr+is%3Aclosed+merged%3A2018-06-19..2020-10-28+sort%3Aupdated-desc+) since we started the pygame 2 series in Jul 19, 2018.
- [3306 Commits since 1.9.4 stable release](https://github.com/pygame/pygame/compare/1.9.4...2.0.0)
- [previous pygame release notes](https://github.com/pygame/pygame/releases)

2.0.0.dev24

Not secure
A bunch of fixes and speedups before the release.
Now the default branch on the pygame repo is [main](https://github.com/pygame/pygame/issues/2257).


MyreMylar Dan Lawrence
- Sets SDL Hint for hidden mouse cursor at window edges when full screen 2254
- Documents that integers underlying key code constants differ between Pygame 1 & 2 2253
- Updates the joystick docs to include controller mappings for X360 & PS4 controllers 2252
- Updates the docs for toggle_fullscreen() 2251
- New Alpha blitter - fixes and speed ups 2243

siggisv Sigurรฐur Sveinn Halldรณrsson
- Add to `test/draw_test.py` some unit tests for `draw.line()` 2247

Ankith ankith26
- A small little deletion of obsolete file 2256
- Do MOUSEBUTTONUP event on MOUSEWHEEL 2242
- Fix event.post KEYDOWN/KEYUP 2244

2.0.0.dev22

Not secure
Several very difficult to find and fix issues with alpha blending were fixed in this release.
- [First pass at backwards compatible pygame alpha blit](https://github.com/pygame/pygame/pull/2213) by MyreMylar

The new alpha blitter has an SSE2 and arm NEON implementation, and keeps compatibility with pygame 1.

Also some progress on other issues, including these...

- [Fix twitchy key tests on raspi](https://github.com/pygame/pygame/pull/2234) by ankith26
- [Better unit tests for event module](https://github.com/pygame/pygame/pull/2236) by ankith26
- [Fix messed up SSE 4.2 removal](https://github.com/pygame/pygame/pull/2233)

2.0.0.dev20

Not secure
- [Disable SSE 4.2 stuff because it does not do runtime detection on old CPUs.](https://github.com/pygame/pygame/pull/2228)
- [Use manylinux2010 for pypy and manylinux1 for other pythons](https://github.com/pygame/pygame/pull/2229)
- [Doc updates (SDL2 -> pygame 2)](https://github.com/pygame/pygame/pull/2211) by ankith26
- [Fix pygame.midi so tests and example runs on py3 and py2](https://github.com/pygame/pygame/pull/2230)

2.0.0.dev18

Not secure
This is a small bugfix release to fix a problem with installing pygame from source code.

If 2.0.0.dev16 worked for you, there's no need to upgrade.

Page 6 of 10

ยฉ 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.