Commits

Georg Brandl committed c31b2b8

#440: Remove usage of a Python >= 2.5 API in the ``literalinclude`` directive.

CodecInfo is not a namedtuple, so accessing attributes on 2.4 fails.

  • Participants
  • Parent commits 877a4e9

Comments (0)

Files changed (2)

 Release 0.6.7 (in development)
 ==============================
 
+* #440: Remove usage of a Python >= 2.5 API in the ``literalinclude``
+  directive.
+
 
 Release 0.6.6 (May 25, 2010)
 ============================

File sphinx/directives/code.py

         codec_info = codecs.lookup(encoding)
         try:
             f = codecs.StreamReaderWriter(open(fn, 'U'),
-                    codec_info.streamreader, codec_info.streamwriter, 'strict')
+                    codec_info[2], codec_info[3], 'strict')
             lines = f.readlines()
             f.close()
         except (IOError, OSError):