Changeset - 626644bc5d43
[Not reviewed]
stable
0 1 0
Mads Kiilerich (mads) - 4 years ago 2021-09-28 15:59:54
mads@kiilerich.com
webutils: monkeypatch to make webhelpers2 work with Python 3.10

Webhelpers2 is apparently a dead project and is using collections.Sequence directly.
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/webutils.py
Show inline comments
 
@@ -17,12 +17,13 @@ kallithea.lib.webutils
 

	
 
Helper functions that may rely on the current WSGI request, exposed in the TG2
 
thread-local "global" variables. It should have few dependencies so it can be
 
imported anywhere - just like the global variables can be used everywhere.
 
"""
 

	
 
import collections
 
import datetime
 
import json
 
import logging
 
import random
 
import re
 

	
 
@@ -63,12 +64,16 @@ assert submit
 
assert text
 
assert textarea
 
assert truncate
 
assert wrap_paragraphs
 

	
 

	
 
# work around webhelpers2 being a dead project that doesn't support Python 3.10
 
collections.Sequence = collections.abc.Sequence
 

	
 

	
 
#
 
# General Kallithea URL handling
 
#
 

	
 
class UrlGenerator(object):
 
    """Emulate pylons.url in providing a wrapper around routes.url
0 comments (0 inline, 0 general)