# HG changeset patch # User hodgestar # Date 1356808334 0 # Node ID 570226c4811999e9ebf00f2e3b09ce3cbff92806 # Parent 2bfd8f8d241c0c2d9f2a1e4c63173c140668c0e8 Templates should be loaded as bytes -- the encoding is passed around with the source explicitly. Fixes bugs in test suite in Python 3.3. diff --git a/genshi/template/loader.py b/genshi/template/loader.py --- a/genshi/template/loader.py +++ b/genshi/template/loader.py @@ -283,7 +283,7 @@ """ def _load_from_directory(filename): filepath = os.path.join(path, filename) - fileobj = open(filepath, 'rU') + fileobj = open(filepath, 'rb') mtime = os.path.getmtime(filepath) def _uptodate(): return mtime == os.path.getmtime(filepath)