mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
#544: Allow `.pyw
` as a source file extension.
This commit is contained in:
parent
39dc69e9d9
commit
c768b68340
2
CHANGES
2
CHANGES
@ -1,6 +1,8 @@
|
||||
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.
|
||||
|
||||
|
@ -659,7 +659,7 @@ class Documenter(object):
|
||||
# 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
|
||||
|
@ -204,7 +204,7 @@ def get_module_source(modname):
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user