File: 0001-Stop-using-removed-cgi-module.patch

package info (click to toggle)
libjsoncpp 1.9.6-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,840 kB
  • sloc: cpp: 9,483; python: 1,118; ansic: 215; makefile: 44; sh: 30; perl: 5
file content (42 lines) | stat: -rw-r--r-- 1,773 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
42
From: =?utf-8?q?Timo_R=C3=B6hling?= <roehling@debian.org>
Date: Tue, 19 Nov 2024 10:31:39 +0100
Subject: Stop using removed cgi module

The cgi module was removed from Python 3.13

Author: Alexandre Detiste <alexandre.detiste@gmail.com>
Forwarded: https://github.com/open-source-parsers/jsoncpp/pull/1578
Bug-Debian: https://bugs.debian.org/1084661
---
 devtools/batchbuild.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/devtools/batchbuild.py b/devtools/batchbuild.py
index 0eb0690..bf8be48 100644
--- a/devtools/batchbuild.py
+++ b/devtools/batchbuild.py
@@ -9,7 +9,7 @@ import shutil
 import string
 import subprocess
 import sys
-import cgi
+import html
 
 class BuildDesc:
     def __init__(self, prepend_envs=None, variables=None, build_type=None, generator=None):
@@ -195,12 +195,12 @@ def generate_html_report(html_report_path, builds):
     for variable in variables:
         build_types = sorted(build_types_by_variable[variable])
         nb_build_type = len(build_types_by_variable[variable])
-        th_vars.append('<th colspan="%d">%s</th>' % (nb_build_type, cgi.escape(' '.join(variable))))
+        th_vars.append('<th colspan="%d">%s</th>' % (nb_build_type, html.escape(' '.join(variable))))
         for build_type in build_types:
-            th_build_types.append('<th>%s</th>' % cgi.escape(build_type))
+            th_build_types.append('<th>%s</th>' % html.escape(build_type))
     tr_builds = []
     for generator in sorted(builds_by_generator):
-        tds = [ '<td>%s</td>\n' % cgi.escape(generator) ]
+        tds = [ '<td>%s</td>\n' % html.escape(generator) ]
         for variable in variables:
             build_types = sorted(build_types_by_variable[variable])
             for build_type in build_types: