Package: pysdl2 / 0.9.9+dfsg1-6

Metadata

Package Version Patches format
pysdl2 0.9.9+dfsg1-6 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
sdlttf_test Accept width and height within a range.patch | (download)

sdl2/test/sdlttf_test.py | 48 24 + 24 - 0 !
1 file changed, 24 insertions(+), 24 deletions(-)

 sdlttf_test: accept width and height within a range

SDL2_ttf 2.0.18 with Harfbuzz-based font rendering gives a width
slightly narrower than 2.0.15, so tolerate that.

Previously the height was not allowed to be 22 or 23, but if 21 and 25
are both acceptable values, then anything in between also seems fine;
for better future-proofing, accept a range.

Bug: https://github.com/py-sdl/py-sdl2/issues/212
Bug-Debian: https://bugs.debian.org/1003592
Signed-off-by: Simon McVittie <smcv@debian.org>
Fix some rwops bugs.patch | (download)

sdl2/rwops.py | 4 2 + 2 - 0 !
1 file changed, 2 insertions(+), 2 deletions(-)

 fix some rwops bugs

Clean up organization of dll.py.patch | (download)

sdl2/_internal.py | 25 25 + 0 - 0 !
sdl2/dll.py | 120 63 + 57 - 0 !
2 files changed, 88 insertions(+), 57 deletions(-)

 clean up organization of dll.py

Fix unit tests version parsing for latest SDL2 229.patch | (download)

sdl2/dll.py | 17 14 + 3 - 0 !
sdl2/test/sdlimage_test.py | 2 1 + 1 - 0 !
sdl2/test/sdlmixer_test.py | 2 1 + 1 - 0 !
sdl2/test/sdlttf_test.py | 2 1 + 1 - 0 !
sdl2/test/version_test.py | 2 1 + 1 - 0 !
5 files changed, 18 insertions(+), 7 deletions(-)

 fix unit tests & version parsing for latest sdl2 (#229)

Handle SDL 2.23 new versioning scheme 230.patch | (download)

sdl2/dll.py | 76 46 + 30 - 0 !
sdl2/test/sdlimage_test.py | 5 4 + 1 - 0 !
sdl2/test/sdlmixer_test.py | 5 4 + 1 - 0 !
sdl2/test/sdlttf_test.py | 5 4 + 1 - 0 !
sdl2/test/version_test.py | 33 27 + 6 - 0 !
5 files changed, 85 insertions(+), 39 deletions(-)

 handle sdl 2.23+ new versioning scheme (#230)

* test: Add more realistic tests of SDL_VERSIONNUM

The minor version overflows into the thousands digit in 2.23.0 and up.
Because the major version is fixed at 2 until SDL 3 (which will be a
version_test Don t assert that SDL_GetRevision starts wit.patch | (download)

sdl2/test/version_test.py | 3 2 + 1 - 0 !
1 file changed, 2 insertions(+), 1 deletion(-)

 version_test: don't assert that sdl_getrevision() starts with http

The default format is going to change in 2.25.x, and in git main it
currently starts with "SDL-".

SDL specifically documents the result of this function as "not intended
to be reliable in any way", so it seems wrong to have pysdl2's tests fail
whenever the format changes. To address that, turn unexpected formats
into an xfail, so that they're flagged as something to investigate but
do not make the unit tests fail when used as a QA gate.

Bug: https://github.com/py-sdl/py-sdl2/issues/248
Signed-off-by: Simon McVittie <smcv@collabora.com>
0001 drop intersphinx.patch | (download)

doc/conf.py | 5 2 + 3 - 0 !
1 file changed, 2 insertions(+), 3 deletions(-)

 drop intersphinx

0002 dont include buildpath in docs.patch | (download)

doc/conf.py | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 don't include buildpath in docs

surface_test Don t overlap pixel rows.patch | (download)

sdl2/test/surface_test.py | 8 4 + 4 - 0 !
1 file changed, 4 insertions(+), 4 deletions(-)

 surface_test: don't overlap pixel rows

SDL has the concept of pitch (sometimes referred to as stride or
rowstride in other imaging libraries, for example GNOME's GDK), which
is the number of bytes to advance through the data for each row/scanline.
Typically this is either exactly the number of bytes required to store
pixel data for a row, or a larger number chosen to align the beginning
of each row to a convenient memory address (for example a multiple of
16 bytes for SSE2).

Previously this test data used a fixed pitch of 16 bytes, even though
this is less than the memory required to store each 16-pixel row,
because each pixel uses 4 or 2 bytes of data (and therefore each 16-pixel
row is 64 or 32 bytes long). This meant SDL would start reading the
second row of pixels 16 bytes into the first row, and so on, with the
data for each row overlapping, and some unused bytes at the end. This
seems unlikely to have been intentional.

SDL 2.23.x and 2.24.0 have better validation for parameters, introduced
while adding overflow checks, which enforces that pixel rows do not
overlap (pitch < bytes per row). They may either have padding for better
alignment (pitch > bytes per row) or have no padding
(pitch == bytes per row, as seen after this commit).

Increase the pitch to match what was presumably intended.

Fix unit tests on big endian systems.patch | (download)

sdl2/test/pixels_test.py | 50 14 + 36 - 0 !
sdl2/test/sdl2ext_array_test.py | 20 13 + 7 - 0 !
sdl2/test/sdl2ext_draw_test.py | 9 6 + 3 - 0 !
sdl2/test/sdl2ext_pixelaccess_test.py | 2 1 + 1 - 0 !
4 files changed, 34 insertions(+), 47 deletions(-)

 fix unit tests on big-endian systems

Manual backport of https://github.com/py-sdl/py-sdl2/pull/232 adjusted
to the 0.9.9 codebase.

Co-authored-by: Austin Hurst