comparison doc/upgrading.txt @ 6418:559b3d8e03d7

issue2551136 - timezone extention crash on Python 3.8. cgi.escape is used in some template to provide a select box of timezones. It uses cgi.escape that is depricated and removed from 3.8 and newer. Use html.escape with fallback to cgi.escape.
author John Rouillard <rouilj@ieee.org>
date Fri, 21 May 2021 19:38:37 -0400
parents 51a1a9b0f567
children 269f39e28d5c
comparison
equal deleted inserted replaced
6417:586865e08f42 6418:559b3d8e03d7
70 running through the rest of the security roles after reporting a 70 running through the rest of the security roles after reporting a
71 property error. Now it stops after reporting the incorrect property. 71 property error. Now it stops after reporting the incorrect property.
72 72
73 If run non-interactively, it exits with status 1. It can now be 73 If run non-interactively, it exits with status 1. It can now be
74 used in a startup script to detect permission errors. 74 used in a startup script to detect permission errors.
75
76 Futureproof devel and responsive timezone selection extension
77 -------------------------------------------------------------
78
79 The devel and responsive (derived from devel) templates use a select
80 control to list all available timezones when pytz is used. It
81 sanitizes the data using cgi.escape. Cgi.escape is deprecated and
82 removed in newer pythons. Change your ``extensions/timezone.py``
83 file by applying the following patch manually::
84
85
86 -import cgi
87 +try:
88 + from html import escape
89 +except ImportError:
90 + from cgi import escape
91
92 try:
93 import pytz
94 @@ -25,7 +28,7 @@
95 s = ' '
96 if zone == value:
97 s = 'selected=selected '
98 - z = cgi.escape(zone)
99 + z = escape(zone)
100
101 See https://issues.roundup-tracker.org/issue2551136 for more details.
75 102
76 .. index:: Upgrading; 1.6.x to 2.0.0 103 .. index:: Upgrading; 1.6.x to 2.0.0
77 104
78 Migrating from 1.6.X to 2.0.0 105 Migrating from 1.6.X to 2.0.0
79 ============================= 106 =============================

Roundup Issue Tracker: http://roundup-tracker.org/