File: 0004-Fix-python3.12-compatibility-with-integer-division.patch

package info (click to toggle)
python-kyotocabinet 1.23-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 832 kB
  • sloc: cpp: 2,967; python: 1,241; javascript: 249; makefile: 85
file content (34 lines) | stat: -rw-r--r-- 1,640 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From: Boyuan Yang <byang@debian.org>
Date: Wed, 17 Jul 2024 15:39:08 -0400
Subject: Fix python3.12 compatibility with integer division

---
 kctest.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kctest.py b/kctest.py
index 2750fe0..4e97850 100755
--- a/kctest.py
+++ b/kctest.py
@@ -631,18 +631,18 @@ def procwicked(path, rnum, gopts, thnum, itnum):
                             if not cur.step() and db.error() != Error.NOREC:
                                 dberrprint(db, "Cursor::step")
                                 err = True
-                        if rand(rnum / 50 + 1) == 0:
+                        if rand(rnum // 50 + 1) == 0:
                             prefix = key[0:-1]
                             if db.match_prefix(prefix, rand(10)) == None:
                                 dberrprint(db, "DB::match_prefix")
                                 err = True
-                        if rand(rnum / 50 + 1) == 0:
+                        if rand(rnum // 50 + 1) == 0:
                             regex = key[0:-1]
                             if db.match_regex(regex, rand(10)) == None and \
                                     db.error() != Error.NOLOGIC:
                                 dberrprint(db, "DB::match_regex")
                                 err = True
-                        if rand(rnum / 50 + 1) == 0:
+                        if rand(rnum // 50 + 1) == 0:
                             origin = key[0:-1]
                             if db.match_similar(origin, 3, rand(2) == 0, rand(10)) == None:
                                 dberrprint(db, "DB::match_similar")