- Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime.

This commit is contained in:
Charles-François Natali 2011-07-27 19:36:40 +02:00
parent d8e3901478
commit 0cf7e25c28
2 changed files with 4 additions and 2 deletions

View File

@ -212,8 +212,8 @@ def source_synopsis(file):
def synopsis(filename, cache={}):
"""Get the one-line summary out of a module file."""
mtime = os.stat(filename).st_mtime
lastupdate, result = cache.get(filename, (0, None))
if lastupdate < mtime:
lastupdate, result = cache.get(filename, (None, None))
if lastupdate is None or lastupdate < mtime:
info = inspect.getmoduleinfo(filename)
try:
file = open(filename)

View File

@ -37,6 +37,8 @@ Core and Builtins
Library
-------
- Issue #12603: Fix pydoc.synopsis() on files with non-negative st_mtime.
- Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is
given as a low fd, it gets overwritten.