[Python-checkins] python/dist/src/Lib/email Utils.py,1.25,1.26 (original) (raw)

bwarsaw at users.sourceforge.net bwarsaw at users.sourceforge.net
Sat May 8 23:50:06 EDT 2004


Update of /cvsroot/python/python/dist/src/Lib/email In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14650

Modified Files: Utils.py Log Message: Update to Python 2.3, getting rid of backward compatiblity crud.

Index: Utils.py

RCS file: /cvsroot/python/python/dist/src/Lib/email/Utils.py,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Utils.py 19 Aug 2003 03:49:34 -0000 1.25 --- Utils.py 9 May 2004 03:50:04 -0000 1.26


*** 1,16 **** ! # Copyright (C) 2001,2002 Python Software Foundation ! # Author: barry at zope.com (Barry Warsaw)

! """Miscellaneous utilities. ! """

! import time ! import socket import re import random ! import os import warnings from cStringIO import StringIO

--- 1,15 ---- ! # Copyright (C) 2001-2004 Python Software Foundation ! # Author: barry at python.org (Barry Warsaw)

! """Miscellaneous utilities."""

! import os import re


*** 22,49 **** from email._parseaddr import parsedate_tz as _parsedate_tz

! try: ! True, False ! except NameError: ! True = 1 ! False = 0 ! ! try: ! from quopri import decodestring as _qdecode ! except ImportError: ! # Python 2.1 doesn't have quopri.decodestring() ! def _qdecode(s): ! import quopri as _quopri ! ! if not s: ! return s ! infp = StringIO(s) ! outfp = StringIO() ! _quopri.decode(infp, outfp) ! value = outfp.getvalue() ! if not s.endswith('\n') and value.endswith('\n'): ! return value[:-1] ! return value ! ! import base64

Intrapackage imports

--- 21,25 ---- from email._parseaddr import parsedate_tz as _parsedate_tz

! from quopri import decodestring as _qdecode

Intrapackage imports


*** 141,145 **** from email.Header import decode_header L = decode_header(s) ! if not isinstance(L, ListType): # s wasn't decoded return s --- 117,121 ---- from email.Header import decode_header L = decode_header(s) ! if not isinstance(L, list): # s wasn't decoded return s



More information about the Python-checkins mailing list