forked from pool/python-wxPython
Jan Engelhardt
c5aed123df
- Update buildset: * Tumbleweed: Prepare python312, drop python38 * 15.X: Prepare for "SLE15 Python module pythons" (The repository does not have all the requirements yet to build) - Add 0001-wxWidgets-Phoenix-integer-division.patch * Required for Python 3.12 * gh#wxWidgets/Phoenix#2508 - Update requirements: * This version requires Pillow again. * Require numpy for all flavors: Add require-numpy.patch * Upstream goes back and forth, see https://github.com/wxWidgets/Phoenix/commits/master/requirements/install.txt - Repack the source: Remove stray wxWidgets-4.1.0 tree OBS-URL: https://build.opensuse.org/request/show/1137308 OBS-URL: https://build.opensuse.org/package/show/X11:wxWidgets/python-wxPython?expand=0&rev=47
26 lines
887 B
Diff
26 lines
887 B
Diff
From 3b042c863f4092f802a877a972fd6eb284451a78 Mon Sep 17 00:00:00 2001
|
|
From: Ben Greiner <code@bnavigator.de>
|
|
Date: Sat, 6 Jan 2024 21:58:29 +0100
|
|
Subject: [PATCH] integer division for randint
|
|
|
|
Python 3.12 does not accept floats for random.randint() anymore
|
|
---
|
|
unittests/test_dcDrawLists.py | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/unittests/test_dcDrawLists.py b/unittests/test_dcDrawLists.py
|
|
index 9e35e5eaf..6696a79a0 100644
|
|
--- a/unittests/test_dcDrawLists.py
|
|
+++ b/unittests/test_dcDrawLists.py
|
|
@@ -63,8 +63,8 @@ def makeRandomRectangles():
|
|
rects = []
|
|
|
|
for i in range(num):
|
|
- W = random.randint(10, w/2)
|
|
- H = random.randint(10, h/2)
|
|
+ W = random.randint(10, w//2)
|
|
+ H = random.randint(10, h//2)
|
|
x = random.randint(0, w - W)
|
|
y = random.randint(0, h - H)
|
|
rects.append( (x, y, W, H) )
|