[Python-checkins] python/dist/src/Lib _strptime.py,1.26,1.27

bcannon at users.sourceforge.net bcannon at users.sourceforge.net
Thu Aug 28 20:28:56 EDT 2003


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1:/tmp/cvs-serv12267/Lib

Modified Files:
	_strptime.py 
Log Message:
Make sure parentheses are escaped when used in the format string.
Closes bug #796149 .  Will be backported.


Index: _strptime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/_strptime.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** _strptime.py	11 Aug 2003 07:24:05 -0000	1.26
--- _strptime.py	29 Aug 2003 02:28:53 -0000	1.27
***************
*** 250,254 ****
          # The sub() call escapes all characters that might be misconstrued
          # as regex syntax.
!         regex_chars = re_compile(r"([\\.^$*+?{}\[\]|])")
          format = regex_chars.sub(r"\\\1", format)
          whitespace_replacement = re_compile('\s+')
--- 250,254 ----
          # The sub() call escapes all characters that might be misconstrued
          # as regex syntax.
!         regex_chars = re_compile(r"([\\.^$*+?\(\){}\[\]|])")
          format = regex_chars.sub(r"\\\1", format)
          whitespace_replacement = re_compile('\s+')





More information about the Python-checkins mailing list