diff options
| author | Barry Warsaw | 2010-10-27 17:13:36 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2010-10-27 17:13:36 -0400 |
| commit | d5da4860511d35142ffa7ad83f9d60753399344f (patch) | |
| tree | c1e634cfee77735746ff165f626cea45f0389d9a /src | |
| parent | 1ad87091c3fdbf4be7dec33fc31d3a2c767a8f35 (diff) | |
| download | mailman-d5da4860511d35142ffa7ad83f9d60753399344f.tar.gz mailman-d5da4860511d35142ffa7ad83f9d60753399344f.tar.zst mailman-d5da4860511d35142ffa7ad83f9d60753399344f.zip | |
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/core/logging.py | 2 | ||||
| -rw-r--r-- | src/mailman/docs/NEWS.txt | 4 | ||||
| -rw-r--r-- | src/mailman/tests/test_documentation.py | 12 |
3 files changed, 12 insertions, 6 deletions
diff --git a/src/mailman/core/logging.py b/src/mailman/core/logging.py index edbacef31..e90367aae 100644 --- a/src/mailman/core/logging.py +++ b/src/mailman/core/logging.py @@ -55,10 +55,10 @@ class ReopenableFileHandler(logging.Handler): """A file handler that supports reopening.""" def __init__(self, name, filename): + logging.Handler.__init__(self) self.name = name self._filename = filename self._stream = self._open() - logging.Handler.__init__(self) def _open(self): return codecs.open(self._filename, 'a', 'utf-8') diff --git a/src/mailman/docs/NEWS.txt b/src/mailman/docs/NEWS.txt index 6ded4f2a9..0062ec7e6 100644 --- a/src/mailman/docs/NEWS.txt +++ b/src/mailman/docs/NEWS.txt @@ -20,6 +20,10 @@ REST ---- * Add Basic Auth support for REST API security. (given by Jimmy Bergman) +Build +----- + * Support Python 2.7. (LP: #667472) + 3.0 alpha 6 -- "Cut to the Chase" ================================= diff --git a/src/mailman/tests/test_documentation.py b/src/mailman/tests/test_documentation.py index f4ecd924c..f4b382714 100644 --- a/src/mailman/tests/test_documentation.py +++ b/src/mailman/tests/test_documentation.py @@ -151,6 +151,8 @@ def call_http(url, data=None, method=None, username=None, password=None): for header in sorted(response): print '{0}: {1}'.format(header, response[header]) return None + # XXX Workaround http://bugs.python.org/issue10038 + content = unicode(content) return json.loads(content) @@ -170,18 +172,18 @@ def dump_json(url, data=None, method=None, username=None, password=None): from the configuration. :type username: str """ - data = call_http(url, data, method, username, password) - if data is None: + results = call_http(url, data, method, username, password) + if results is None: return - for key in sorted(data): + for key in sorted(results): if key == 'entries': - for i, entry in enumerate(data[key]): + for i, entry in enumerate(results[key]): # entry is a dictionary. print 'entry %d:' % i for entry_key in sorted(entry): print ' {0}: {1}'.format(entry_key, entry[entry_key]) else: - print '{0}: {1}'.format(key, data[key]) + print '{0}: {1}'.format(key, results[key]) |
