comparison roundup/date.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 43970d92323e
children 7d276bb8b46d
comparison
equal deleted inserted replaced
5808:bab86c874efb 5809:936275dfe1fa
795 795
796 def __deepcopy__(self, memo): 796 def __deepcopy__(self, memo):
797 return Interval((self.sign, self.year, self.month, self.day, 797 return Interval((self.sign, self.year, self.month, self.day,
798 self.hour, self.minute, self.second), translator=self.translator) 798 self.hour, self.minute, self.second), translator=self.translator)
799 799
800 def set(self, spec, allowdate=1, interval_re=re.compile(''' 800 def set(self, spec, allowdate=1, interval_re=re.compile(r'''
801 \s*(?P<s>[-+])? # + or - 801 \s*(?P<s>[-+])? # + or -
802 \s*((?P<y>\d+\s*)y)? # year 802 \s*((?P<y>\d+\s*)y)? # year
803 \s*((?P<m>\d+\s*)m)? # month 803 \s*((?P<m>\d+\s*)m)? # month
804 \s*((?P<w>\d+\s*)w)? # week 804 \s*((?P<w>\d+\s*)w)? # week
805 \s*((?P<d>\d+\s*)d)? # day 805 \s*((?P<d>\d+\s*)d)? # day

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