File: fix_py3_sphinx_build.patch

package info (click to toggle)
python-easygui 0.98.1-4
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,492 kB
  • sloc: python: 3,242; makefile: 151; xml: 120
file content (41 lines) | stat: -rw-r--r-- 1,119 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
35
36
37
38
39
40
41
From: Andreas Noteng <andreas@noteng.no>
Date: Wed, 9 Nov 2022 15:31:47 +0200
Subject: Update some Python2 syntax

Bug: https://github.com/robertlugg/easygui/issues/189
Last-Update: 2021-11-02

Some Python2 style code in sphinx/config.py needed updating to python3 style syntax
Last-Update: 2021-11-02
---
 sphinx/conf.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sphinx/conf.py b/sphinx/conf.py
index dc79e1c..a90a773 100644
--- a/sphinx/conf.py
+++ b/sphinx/conf.py
@@ -273,8 +273,8 @@ texinfo_documents = [
 def suppress_module_docstring(app, what, name, obj, options, lines):
 
   if what == 'module':
-    print len(lines)
-    for i in xrange(len(lines)):
+    print(len(lines))
+    for i in list(range(len(lines))):
       del lines[-1]
   pass
 
@@ -282,9 +282,9 @@ def functions_to_headers(app, what, name, obj, options, lines):
   if what == 'function':
     lines.insert(0,'.. py:function:: freddy')  # Not needed
     lines.insert(1,'')
-    print lines[0]
-    print obj
-    print options
+    print(lines[0])
+    print(obj)
+    print(options)
 
 
 def setup(app):