diff options
| author | bwarsaw | 2006-04-15 22:58:13 +0000 |
|---|---|---|
| committer | bwarsaw | 2006-04-15 22:58:13 +0000 |
| commit | 592feaed3c2fbc9e0c8489805f818b6a9d5b13b8 (patch) | |
| tree | 2a7e0afd65fd0a751a53489e6d3d2eaf973be2a1 /Mailman/Utils.py | |
| parent | fdd34dfe8926c22353e8b6defd4d538a52f4cc00 (diff) | |
| download | mailman-592feaed3c2fbc9e0c8489805f818b6a9d5b13b8.tar.gz mailman-592feaed3c2fbc9e0c8489805f818b6a9d5b13b8.tar.zst mailman-592feaed3c2fbc9e0c8489805f818b6a9d5b13b8.zip | |
Now that Python 2.3 is the minimum requirement for Mailman 2.2:
- Remove True/False binding cruft
- Remove __future__ statements for nested scopes
- Remove ascii_letters import hack from Utils.py
- Remove mimetypes.guess_all_extensions import hack from Scrubber.py
- In Pending.py, set _missing to object() (better than using [])
Also, update copyright years where appropriate, and re-order imports more to
my PEP 8 tastes. Whitespace normalize.
Diffstat (limited to 'Mailman/Utils.py')
| -rw-r--r-- | Mailman/Utils.py | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py index d0eca99a3..b5b13252d 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -21,11 +21,8 @@ This includes actual message transmission routines, address checking and message and address munging, a handy-dandy routine to map a function on all the mailing lists, and whatever else doesn't belong elsewhere. - """ -from __future__ import nested_scopes - import os import re import cgi @@ -38,28 +35,16 @@ import urlparse import htmlentitydefs import email.Header import email.Iterators + from email.Errors import HeaderParseError +from string import ascii_letters, digits, whitespace from types import UnicodeType -from string import whitespace, digits -try: - # Python 2.2 - from string import ascii_letters -except ImportError: - # Older Pythons - _lower = 'abcdefghijklmnopqrstuvwxyz' - ascii_letters = _lower + _lower.upper() -from Mailman import mm_cfg from Mailman import Errors from Mailman import Site +from Mailman import mm_cfg from Mailman.SafeDict import SafeDict -try: - True, False -except NameError: - True = 1 - False = 0 - EMPTYSTRING = '' UEMPTYSTRING = u'' NL = '\n' |
