1. SHIBUKAWA Yoshiki
  2. sphinx

Commits

Georg Brandl  committed f2ad8a9

#544: Allow ``.pyw`` as a source file extension.

  • Participants
  • Parent commits ff5b505
  • Branches default

Comments (0)

Files changed (3)

File CHANGES

View file
  • Ignore whitespace
 Release 1.0.4 (Sep 17, 2010)
 ============================
 
+* #544: Allow ``.pyw`` as a source file extension.
+
 * #524: Open intersphinx inventories in binary mode on Windows,
   since version 2 contains zlib-compressed data.
 

File sphinx/ext/autodoc.py

View file
  • Ignore whitespace
             # parse right now, to get PycodeErrors on parsing (results will
             # be cached anyway)
             self.analyzer.find_attr_docs()
-        except PycodeError, err:
+        except PycodeError:
             # no source file -- e.g. for builtin and C modules
             self.analyzer = None
             # at least add the module.__file__ as a dependency

File sphinx/util/__init__.py

View file
  • Ignore whitespace
     lfilename = filename.lower()
     if lfilename.endswith('.pyo') or lfilename.endswith('.pyc'):
         filename = filename[:-1]
-    elif not lfilename.endswith('.py'):
+    elif not (lfilename.endswith('.py') or lfilename.endswith('.pyw')):
         raise PycodeError('source is not a .py file: %r' % filename)
     if not path.isfile(filename):
         raise PycodeError('source file is not present: %r' % filename)