comparison roundup/cgi/templating.py @ 5809:936275dfe1fa

Try to fix: DeprecationWarning: invalid escape sequence \d DeprecationWarning: invalid escape sequence \s DeprecationWarning: invalid escape sequence \) Strings under python 3 are unicode strings rather then "regular" strings as under python 2. So all regexps need to be raw strings. We will see how many I fixed and if I broke any.
author John Rouillard <rouilj@ieee.org>
date Wed, 12 Jun 2019 20:34:47 -0400
parents 1a835db41674
children 883c9e90b403
comparison
equal deleted inserted replaced
5808:bab86c874efb 5809:936275dfe1fa
374 m = [] 374 m = []
375 for item in l: 375 for item in l:
376 m.append(HTMLClass(self._client, item)) 376 m.append(HTMLClass(self._client, item))
377 return m 377 return m
378 378
379 num_re = re.compile('^-?\d+$') 379 num_re = re.compile(r'^-?\d+$')
380 380
381 def lookupIds(db, prop, ids, fail_ok=0, num_re=num_re, do_lookup=True): 381 def lookupIds(db, prop, ids, fail_ok=0, num_re=num_re, do_lookup=True):
382 """ "fail_ok" should be specified if we wish to pass through bad values 382 """ "fail_ok" should be specified if we wish to pass through bad values
383 (most likely form values that we wish to represent back to the user) 383 (most likely form values that we wish to represent back to the user)
384 "do_lookup" is there for preventing lookup by key-value (if we 384 "do_lookup" is there for preventing lookup by key-value (if we
930 """ Return a list of HTMLJournalEntry instances. 930 """ Return a list of HTMLJournalEntry instances.
931 """ 931 """
932 # XXX do this 932 # XXX do this
933 return [] 933 return []
934 934
935 def history(self, direction='descending', dre=re.compile('^\d+$'), 935 def history(self, direction='descending', dre=re.compile(r'^\d+$'),
936 limit=None, showall=False ): 936 limit=None, showall=False ):
937 """Create an html view of the journal for the item. 937 """Create an html view of the journal for the item.
938 938
939 Display property changes for all properties that does not have quiet set. 939 Display property changes for all properties that does not have quiet set.
940 If showall=True then all properties regardless of quiet setting will be 940 If showall=True then all properties regardless of quiet setting will be

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